Numerical control machine tool gear head edge computing task scheduling optimization method
Patent Information
- Application Number
- CN202611129906.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-28
- Publication Date
- 2026-10-27
AI Technical Summary
然而,齿轮头相关任务之间往往共享部分输入和中间计算过程,不同计算步骤对未来实时数据的依赖程度也不相同
1.依据加工指令序列构建齿轮头运行相位序列,并将边缘计算任务按照输入依赖、最早可执行时点、结果有效区间和控制影响等级组织为有向任务图,由此能够从完整任务中识别不依赖未来实时输入的公共计算前缀。在当前运行相位存在可用计算时间片时,公共计算前缀被提前执行并形成与状态指纹关联的中间结果;进入目标运行相位后,仅需补充执行依赖实时输入的剩余计算分支。加工指令前瞻确定未来任务集中到达的位置,有向任务图限定可提前执行的计算边界,二者共同将原本集中在升降速、齿轮级切换或负载转换阶段的计算量分散至前序低负载阶段,减少关键链任务在目标运行相位内的等待和重复排队,使结果提交过程更接近其对应的有效时间范围,解决任务集中触发时无法兼顾预执行和结果相容性的主要技术问题。
Smart Images

Figure CN122984569A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing and edge computing task scheduling technology, specifically to an optimization method for edge computing task scheduling of CNC machine tool gear heads. Background Technology
[0002] During the machining process, CNC machine tool gear heads need to perform multiple computational tasks in conjunction with spindle speed adjustment, gear stage switching, feed state changes, and cutting load fluctuations. These tasks include operational status analysis, load identification, shift condition judgment, compensation calculation, and abnormal state identification. Existing solutions typically set up edge computing nodes near the CNC system, sending machining commands, spindle commands, gear stage status, and operational feedback to these nodes. A scheduler allocates computing resources based on task priority, deadline, or processor occupancy. Each task generally enters an execution queue after its trigger condition is met. The scheduler selects tasks to execute based on the current queue length and the availability of computing resources, and returns the results to the CNC control process after the calculation is completed. For tasks with large processing volumes, existing solutions also employ task fragmentation, thread parallelism, or fixed-period polling to alleviate computational pressure. However, their scheduling is mainly based on already arrived tasks and the current computational load, without prior analysis of the number of tasks that may be triggered in subsequent machining segments, task dependencies, and the validity period of results.
[0003] Leveraging the sequential execution characteristic of CNC machining programs, this approach involves forward-looking reading of subsequent program segments and predicting future computational load based on historical execution times. This allows for the reservation of processor time slices before anticipated load increases or the pre-execution of some calculations when the current load is low. Such solutions typically treat the entire task as the minimum scheduling object, generating a pre-execution plan based on program segment number, task type, and expected trigger time. Calculation results are cached at edge nodes and directly invoked upon arrival of the target program segment. Some solutions further clear the cache and recalculate when the actual running state deviates from the predicted state to prevent erroneous results from entering the control process. However, gear-related tasks often share some inputs and intermediate calculation processes, and different calculation steps have varying degrees of dependence on future real-time data. If the entire task is executed in advance, it can easily solidify data dependent on future load states; if a deviation is detected and the entire task is cleared, already completed and still valid common calculation results become invalid, leading to duplicate calculations and the time advantage gained through pre-execution being consumed by recalculation during high-load phases.
[0004] Edge computing tasks for CNC machine tool gear heads may be triggered in concentrated periods during speed increases / decreases, gear stage switching, and cutting load transitions. Conventional scheduling schemes cannot distribute pre-computational calculations for future tasks to preceding low-load phases while ensuring compatibility between calculation results and actual operating conditions. The fundamental reason is that existing schemes lack forward-looking information on machining instructions, unified constraints on internal task dependencies, and unified constraints between operating state versions. They cannot clearly distinguish between common computational prefixes that do not require future real-time input and computational branches that must be completed within the target operating phase, nor can they identify specific computational nodes affected when predicted state deviations occur. Therefore, the system can only choose to execute tasks in concentrated periods after they arrive, or use a combination of pre-computation and overall failure. The former causes critical tasks to queue during peak computation periods, while the latter causes valid intermediate results to be repeatedly canceled and recalculated. Both of these methods may cause shift protection, load discrimination, or compensation calculations to exceed the effective time of the corresponding control cycle. Summary of the Invention
[0005] The purpose of this invention is to provide a method for optimizing task scheduling of edge computing for CNC machine tool gear heads, which can solve the problems mentioned in the background art.
[0006] To achieve the above objectives, the technical solution adopted by the present invention is as follows: An edge computing task scheduling optimization method for CNC machine tool gear heads includes: extracting spindle speed commands, gear stage switching commands, and feed states from the machining command sequence of the CNC system to construct a gear head running phase sequence; Obtain the edge computing tasks corresponding to the running phase sequence, and construct a directed task graph based on the input dependency, earliest executable time point, effective result interval and control influence level of each task; Based on the available computation time slices of the current running phase, a common computation prefix that does not depend on future real-time input is selected from the directed task graph for pre-execution, and the intermediate results are associated with and stored with the state fingerprint generated by the machining command position, the current gear stage, the spindle command state, and the load change trend. After entering the target running phase, the actual state fingerprint is matched with the state fingerprint for compatibility. If the match is successful, the remaining computation branches that depend on real-time input are executed. If the match is unsuccessful, the intermediate results affected by the deviation are canceled and the corresponding computation branches are rescheduled according to the directed task graph.
[0007] Preferably, constructing the gear head operation phase sequence includes: performing look-ahead analysis on the program segments in the machining instruction sequence, and marking spindle start / stop, spindle speed increase / decrease, gear stage switching, feed input, and feed exit as phase event points respectively; Connect adjacent phase event points according to the execution order of the program segments, and merge phase intervals without state transitions based on the velocity continuity relationship, gear stage holding relationship and feed state inheritance relationship between adjacent program segments; For phase intervals that include gear-stage switching or speed range changes, a composite phase node consisting of a pre-stabilization segment, a state transition segment, and a post-confirmation segment is established. Each composite phase node is associated with the corresponding program segment range, the expected start time, the expected duration, and the pre-calculated interval to form a running phase sequence that can be updated in a rolling manner as the machining command is executed.
[0008] Preferably, constructing the directed task graph includes: splitting each edge computing task into corresponding computing nodes for data shaping, state updating, feature calculation, discrimination calculation, and result encapsulation, and recording the input version, predecessor node set, reusable intermediate state, and result submission time limit for each computing node; Based on the sharing relationship of the same running status data among different edge computing tasks, computing nodes with the same input version and the same computational expression are merged to form cross-task common nodes; Based on whether the computing node reads the real-time status data generated by the target running phase, the cross-task common node is divided into pre-executable nodes and in-phase execution nodes; Node executable identifiers are generated based on the constraint that all predecessor nodes are completed and the input version is closed, and the critical chain of the corresponding edge computing task is marked by the longest dependency path from the starting node to the result submission node.
[0009] Preferably, generating the state fingerprint includes: converting the machining instruction position code, the current gear level code, the spindle instruction change direction, and the load change trend into state sub-items with time order, and recording the data version and source phase corresponding to each state sub-item; A combined fingerprint is generated by reading the sequential relationship of each state item according to the common computation prefix in the directed task graph, and a reference mapping between the state item and the computation node is established at the same time. Compatibility matching involves comparing each actual state item with the corresponding state item in the combined fingerprint, and outputting a set of incompatible state items. The computation nodes that directly reference incompatible state items are determined based on the reference mapping, and the set of affected nodes is marked along the successor direction of the directed task graph. Intermediate results that have not entered the set of affected nodes and whose input versions are still closed are retained.
[0010] Preferably, the rolling update of the running phase sequence includes: extracting program segment switching points, gear level confirmation points, spindle command stabilization points, and feed state switching points from the execution feedback of the CNC system, and generating an actual phase event sequence; Based on the constraints of consistent event types and monotonic execution order, the actual phase event sequence is aligned with the phase event points to obtain the timing deviation sequence of each phase interval. Based on the event combination and timing deviation direction of the previous composite phase node, the timing deviation sequence is split into continuous transmission deviation and local state deviation. The expected start time of subsequent composite phase nodes is corrected by the continuous transmission deviation, the pre-calculation interval of the corresponding composite phase node is shrunk by the local state deviation, and the phase boundary that has entered the current execution program segment remains unchanged.
[0011] Preferably, the selection of the common computation prefix includes: taking the computation node that reads the real-time state data of the target running phase as the input truncation node, traversing backwards from each result submission node along the predecessor direction to obtain the dependency closure connecting the starting node and the input truncation node; Exclude computation nodes that are not yet closed in the input version from the dependency closure, and form a pre-execution subgraph from the remaining computation nodes according to the predecessor closure relationship; For a cross-task common node referenced by multiple edge computing tasks, only one execution instance bound to the input version is generated, and a result index is established for each referencing task. The execution order of nodes in the pre-execution subgraph is determined based on the result submission deadline, critical chain position, and successor node coverage relationship. Intermediate results are submitted in topological order, and the completed predecessor set and uncompleted successor set corresponding to each intermediate result are recorded.
[0012] Preferably, the compatibility matching further includes: configuring program segment inclusion relationship for machining instruction position encoding, configuring consistency relationship for current gear level encoding, configuring ordered relationship for spindle instruction change direction, and configuring trend segment continuation relationship for load change trend according to the reading method of each computing node, forming a compatibility rule bound to the computing node; The compatibility rules of the computation nodes associated with the intermediate results being compared are called one by one to generate node-level matching results; When the node-level matching result is not valid, the set of boundary nodes pointing from compatible nodes to incompatible nodes is determined along the directed task graph, and the set of boundary nodes is used as the local recalculation entry point. Merge the successor nodes that are shared by different local recalculation entry points, and rebuild the input version according to the latest actual state sub-item, only rescheduling the merged successor subgraph.
[0013] Preferably, it further includes: for each target running phase, summarizing the remaining computational load, critical chain length, and result submission deadline of the execution nodes within the phase in the directed task graph, and establishing a computational requirement time sequence envelope according to the expected start time in the running phase sequence; Reverse-load the available computation time slices from the submission deadline of each result, bind the phase execution nodes on the critical chain to continuous time slices, and bind the non-critical chain nodes to discrete time slices that can be preempted by pre-execution nodes. When the actual end point of the current running phase deviates from the expected end point, the time slice boundary is recalculated based on the updated computational requirement time sequence envelope, the binding of non-critical chain nodes that have not yet been executed to discrete time slices is released, and the order of continuous time slices and their nodes that have entered the critical chain execution sequence remains unchanged.
[0014] Preferably, it further includes: generating an expected start time interval for each subsequent composite phase node based on the transmission relationship of the continuous transmission deviation between adjacent composite phase nodes, and generating an inner boundary of the pre-calculated interval for the corresponding composite phase node based on the local state deviation. The expected start time interval is mapped to the directed task graph, and the earliest available input time and the latest result retention time of each computing node are marked respectively; Select computation nodes that can be completed before the earliest start time of the target composite phase node and whose intermediate results cover the expected start time interval to form a stable pre-execution set; The remaining executable nodes are grouped into a conditional pre-execution set, and when the expected start time interval after the rolling update and the effective range of intermediate results are re-established to form an inclusion relationship, the corresponding computing nodes are transferred into the stable pre-execution set.
[0015] Preferably, the rescheduled and merged successor subgraph includes: marking the final computing node of each edge computing task as the result output node, establishing a branch version bound to the latest actual state sub-item for each local recalculation entry, and registering the intermediate results that have not been revoked as the base version; According to the dependencies of the directed task graph, a dependency vector consisting of predecessor result versions is generated for each computation node in the successor subgraph, and combined reading is allowed only when the branch version and the base version in the dependency vector have a common input version. After all boundary outputs connecting the local recalculation entry and the result output node are completed, the corresponding result index is switched from the original dependency vector to the new dependency vector in one go; Traverse the result index after the switch, delete the original branch version that is no longer referenced by any edge computing task, and retain the base version that is still referenced by other result output nodes.
[0016] Compared with the prior art, the beneficial effects of the present invention are as follows: 1. A gear head operation phase sequence is constructed based on the machining instruction sequence, and edge computing tasks are organized into a directed task graph according to input dependency, earliest executable time point, result validity interval, and control impact level. This allows for the identification of common computational prefixes that do not depend on future real-time input from the complete task. When there is available computation time slice in the current operation phase, the common computational prefix is executed in advance, forming intermediate results associated with the state fingerprint; after entering the target operation phase, only the remaining computational branches dependent on real-time input need to be executed. Machining instruction look-ahead determines the location of future task clusters, and the directed task graph defines the computational boundaries that can be executed in advance. Together, they distribute the computational workload originally concentrated in the acceleration / deceleration, gear stage switching, or load conversion stages to the preceding low-load stages, reducing waiting and repeated queuing of critical chain tasks within the target operation phase, making the result submission process closer to its corresponding valid time range, and solving the main technical problem of not being able to balance pre-execution and result compatibility when triggering task clusters.
[0017] 2. The status fingerprint is generated jointly by the machining command position, the current gear stage, the spindle command status, and the load change trend, and is associated with and saved with the pre-execution intermediate results, giving each intermediate result a clear operational status reference basis. When the actual state is incompatible with the predicted state, the system determines the directly affected nodes based on the reference mapping between the state sub-items and the calculation nodes, and then forms a local recalculation range along the successor relationship of the directed task graph. Intermediate results that are not affected and whose input versions remain closed are retained. This avoids clearing all pre-execution results due to a single state deviation, and also avoids directly submitting results formed under old states. The running phase sequence is rolled and corrected according to the program segment switching time point, gear stage confirmation time point, spindle command stabilization time point, and feed state switching time point, which can calculate the interval time sequence deviation shrinkage or adjustment in advance; combined with the rebinding of the critical chain continuous time slice and the non-critical node discrete time slice, the scheduling plan can be updated with the actual machining progress and the execution order of those already in the critical chain is not interrupted. Attached Figure Description
[0018] Figure 1 A flowchart of the overall process for optimizing task scheduling of edge computing for gear heads in CNC machine tools; Figure 2 A flowchart for constructing and continuously updating the gear head operation phase sequence based on look-ahead analysis of machining instructions; Figure 3 A flowchart for constructing a directed task graph for edge computing tasks, extracting common computing prefixes, and performing cross-cycle pre-execution; Figure 4 The flowchart describes the state fingerprint compatibility matching, partial cancellation, and computation branch rescheduling for the pre-execution intermediate results. Detailed Implementation
[0019] In one embodiment, please refer to Figure 1 The optimization method for edge computing task scheduling of CNC machine tool gear heads includes extracting spindle speed commands, gear stage switching commands, and feed states from the machining command sequence of the CNC system, constructing a gear head running phase sequence, obtaining edge computing tasks corresponding to the running phase sequence, constructing a directed task graph based on the input dependency, earliest executable time point, effective result range, and control influence level of each task, selecting common computing prefixes that do not depend on future real-time input from the directed task graph for pre-execution based on the available computing time slice of the current running phase, and associating and storing intermediate results with state fingerprints generated by machining command position, current gear stage, spindle command state, and load change trend. After entering the target running phase, the actual state fingerprint is matched with the state fingerprint for compatibility. If the match is successful, the remaining computing branches that depend on real-time input are executed. If the match is unsuccessful, the intermediate results affected by the deviation are canceled according to the directed task graph, and the corresponding computing branches are rescheduled.
[0020] In this embodiment, the machining instruction sequence originates from a set of program segments that have been grammatically interpreted by the CNC system and are in a state of pending execution. Each program segment records the program segment position, spindle target speed, spindle action type, gear-level instructions, feed start / stop status, and sequential constraints with preceding and following program segments. The edge scheduling process does not change the content of the machining instructions, but instead establishes a read-only look-ahead window and scrolls through the program segment execution direction. When the current program segment is completed or the CNC system changes the execution branch, the look-ahead window is re-formed with the new execution position as the starting point, so that the running phase sequence always corresponds to the actual machining path.
[0021] Specifically, spindle speed commands are interpreted as hold, speed up, speed down, stop, and restart states according to the command change relationship between adjacent program segments. Gear stage switching commands are interpreted as hold segment, switch preparation segment, switch execution segment, and switch confirmation segment according to the gear stage before switching, target gear stage, and switch confirmation state. Feed states are interpreted as cutting load access process, stable cutting process, and load release process according to access, continuous, exit, and pause. The scheduler establishes composite events for state changes that occur simultaneously within the same program segment, and merges adjacent program segments based on the condition that there are no new state jumps between composite events, forming a running phase that can be bound to the calculation task.
[0022] In a preferred embodiment, the edge computing task includes a running status update task, a load identification task, a gear-level switching condition judgment task, a control compensation calculation task, and an abnormal state discrimination task. Each task consists of an input description, a calculation expression, an output description, and a result submission constraint. The input description indicates the data item read and its data version, the calculation expression indicates the sequential dependency between intermediate calculations, the output description indicates which subsequent calculations can reference the result, and the result submission constraint indicates the latest time point at which the result is allowed to enter the CNC control process. Based on this, the scheduler converts the task into a computing node that can be executed and fail independently.
[0023] Preferably, the expected start time of the running phase is determined according to the formula: ; in, This indicates the expected start time of the j-th running phase. Indicates the starting point of the current lookout window. This represents the reference duration of the r-th operating phase, obtained based on the machining command. This represents the correction amount transferred from the actual timing deviation of the completed phase to the r-th running phase, when... Take the entry point of the current program segment and the first three execution phases. Take 12, 8 and 15 control cycles in sequence, corresponding to When 1, -2, and 0 control cycles are selected sequentially, the expected start time of the third operating phase is 34 control cycles after the start time. Based on this, the scheduler determines the range of pre-time that the common computation prefix can occupy.
[0024] In this embodiment, the directed task graph uses computation nodes as vertices and intermediate result reading relationships as directed edges. Data shaping nodes are used to unify the data version identifiers of different program segments and different control cycles. State update nodes are used to form new state variables based on the previous state and the input of the current cycle. Feature calculation nodes are used to form load change trends, speed change directions, and gear stage state combinations. Judgment calculation nodes are used to make judgments based on the feature results. Result encapsulation nodes are used to write the output results, the corresponding program segment positions, and the effective intervals into the result record. Any node only enters the executable state when all predecessor nodes are completed and the input version is closed.
[0025] Furthermore, input version closure means that the data items that a certain computing node needs to read have been determined before the start of the corresponding running phase and will not be replaced by subsequent real-time data. For example, the machining command position, target gear stage, and spindle command change direction can form a closed version after look-ahead analysis, while the actual load value, actual speed deviation, and gear stage confirmation feedback can only form a closed version within the target running phase. The scheduler traces backward from the result encapsulation node along the directed task graph and stops incorporating further when it encounters a node that reads an unclosed version, thus obtaining a common computing prefix that does not depend on future real-time inputs.
[0026] In a preferred embodiment, cross-task common nodes are identified by computational expression consistency and input version consistency. The scheduler normalizes the computational expression into a structural description composed of operation type, input field order, and state update rules. Then, it compares whether the structural descriptions of different task nodes are the same, and at the same time compares whether their input data versions point to the same program segment range and the same control cycle range. Only when both comparisons are consistent are they merged into one execution instance. Each referencing task saves an independent result index, so that after the common node is completed, it can be read by multiple successor branches without being executed repeatedly.
[0027] Specifically, the available computation time slices for the current running phase are determined by the current set of nodes to be executed, the consecutive time slices already occupied, and the expected start time of the target phase. The scheduler does not occupy the time slices already bound to the current control critical chain, but selects the pre-execution time slices from the idle intervals between critical chains and the discrete intervals where non-critical tasks have not yet started. Common computation prefixes enter the time slices in topological order. If a node cannot complete within its assigned time slice, the intermediate state that has been completed is saved and execution continues in the next available time slice. Node outputs are only registered as referenceable results after all computation expressions are completed.
[0028] Preferably, the node priority in the common computation prefix is determined according to the formula: ; in, This indicates the scheduling priority of the i-th node. This indicates the non-zero weight corresponding to the level of control impact. This indicates the remaining number of layers in the critical chain of the task to which the i-th node resides. This indicates the number of successor branches that reference the output of the i-th node. This indicates the estimated remaining computational workload. This represents the number of remaining control cycles until the result submission deadline, when two nodes... and When two nodes are identical, and one of them is also on a longer critical chain and referenced by more branches, its... The larger one is selected and enters the available time slice first.
[0029] In this embodiment, the state fingerprint does not copy all the running data as a whole, but generates a combined record according to the data items actually read according to the common computing prefix. The machining command position is represented by the start and end positions of the program segment and the branch path identifier. The current gear level is represented by the confirmed gear level code. The spindle command status is represented by the target value, the direction of change and the command effective position. The load change trend is represented by the increase, decrease, stability or undetermined state within the continuous control cycle. Each state sub-item also records the source phase, data version and which computing nodes reference it.
[0030] After entering the target operating phase, the scheduler generates an actual state fingerprint from the actual execution position of the CNC system and the formed operating feedback. The program segment position uses an inclusion relationship to determine whether the actual position is still within the program segment range allowed by the pre-execution result. The gear stage uses a consistency relationship to determine whether the actual confirmed state is the same as the pre-execution input. The spindle command change direction uses an ordered relationship to determine whether the actual change sequence is in the same direction as the look-ahead sequence. The load change trend uses a trend segment continuation relationship to determine whether the actual trend is still in the trend category used during pre-execution. When all referenced state sub-items satisfy the corresponding relationship, the intermediate result enters the state where it can continue to be calculated.
[0031] Preferably, the state compatibility of the q-th intermediate result is determined according to the formula: ; in, Let M represent the state compatibility of the q-th intermediate result, and M represent the number of state sub-items referenced by the q-th intermediate result. This represents the normalized reference weight of the m-th state item in the corresponding computation node, and all of them are included. The sum is 1. The value is 1 when the actual state sub-item satisfies the compatibility rule and 0 when it does not. When an intermediate result references four state sub-items with weights of 0.3, 0.3, 0.2, and 0.2 respectively, and the first three items are compatible while the fourth item is incompatible, If we set it to 0.8, the scheduler will read the reference maps of incompatible sub-items simultaneously instead of deciding that all results are invalid based solely on the total value.
[0032] In this embodiment, a match is established when all the state sub-items referenced by the intermediate results directly or indirectly read by the remaining computation branches meet the compatibility rules. The scheduler writes the real-time generated actual load value, actual speed deviation, or gear-level confirmation feedback into the input truncation node, and starts executing the in-phase computation node from the input truncation node. The common node results generated in the pre-execution directly participate in subsequent calculations through the result index. After all the result versions of the result encapsulation node in the dependency vector are consistent, a record to be submitted is formed.
[0033] In this embodiment, when a match is not found, the entire pre-execution cache is not cleared. The scheduler finds the node that directly reads the incompatible state item based on the reference mapping between the state item and the computing node, marks these nodes as local failure entry points, and then traverses all reachable successor nodes along the directed edge in the direction of result output to form a set of affected nodes. The results of nodes that have not been traversed and whose input version is still closed remain in a referable state. The result index corresponding to the affected node is temporarily frozen and waits for a new input version to be formed.
[0034] Specifically, the propagation of the affected nodes follows the formula: ; in, This indicates whether node v belongs to the set of affected nodes; a value of 1 indicates that it belongs, and a value of 0 indicates that it does not belong. This represents the set of direct predecessor nodes of node v. Nodes that directly read incompatible state items have pre-defined... Set to 1, and calculate the product term according to the value of its predecessor node. For example, if node v has 3 predecessor nodes with corresponding values of 0, 1, and 0, the product term is 0 and... Setting it to 1 indicates that any affected predecessor will cause nodes that depend on its output to enter the local recalculation range.
[0035] When rescheduling the corresponding computation branch, the scheduler generates a new branch version starting from the local failure entry point. The new branch version is bound to the actual state fingerprint and the current control cycle. Unfailed intermediate results are registered as the base version. Before execution, the successor node forms a dependency vector composed of all predecessor result versions. Combination reading is only allowed when all predecessor results point to the same processing instruction range and there are no conflicting data versions, thus avoiding the mixing of old branch results and new branch results in the same successor node.
[0036] In a preferred embodiment, please refer to Figure 2 When extracting phase event points from the machining instruction sequence of the CNC system, event types are set for spindle start / stop, spindle speed increase / decrease, gear stage switching, feed access, and feed exit. Phases are not divided based on a fixed number of program segments. When the speed continuity relationship, gear stage holding relationship, and feed state inheritance relationship of adjacent program segments are all valid, the program segments are merged into the same phase interval. When any relationship is invalid, a new phase boundary is established based on the position of the changed program segment.
[0037] Phase intervals that include gear-level switching or speed changes across ranges are constructed as composite phase nodes. The pre-stabilization segment starts from the nearest stabilization program segment before the state change command and ends before the change command takes effect. The state transition segment covers the process from command issuance to gear-level confirmation or speed entering the target change range. The post-confirmation segment starts after the confirmed state is formed and continues until the subsequent state changes again. Each composite phase node stores the corresponding program segment range, the expected start time, the expected duration, and the pre-calculated interval.
[0038] The starting point of the pre-calculated interval is the time when all necessary processing instructions in the current look-ahead window have been parsed and completed. The ending point is the earliest possible start time of the target phase minus the remaining computation amount of the common computation prefix. If the input version of a certain common node has not been closed at the starting point of the interval, the common node will not be included in this pre-execution set. If the expected start time of the target phase is advanced due to the program segment execution deviation, the scheduler shrinks the end point of the interval and stops the low priority nodes that have not yet started.
[0039] Furthermore, the running phase sequence is updated on a rolling basis according to the actual execution feedback. The program segment switching point is used to correct the command execution position, the gear level confirmation point is used to correct the end position of the state transition segment, the spindle command stabilization point is used to correct the start point of the post-confirmation segment, and the feed state switching point is used to correct the cutting load access or release boundary. The actual phase events are aligned with the predicted phase events according to the event type and occurrence order. The same event type is allowed to cross auxiliary events that have not occurred, but the order of the main events is not allowed to be changed.
[0040] In this embodiment, the timing deviation sequence is divided into continuous transmission deviation and local state deviation. Continuous transmission deviation refers to the time difference caused by the advance or delay of the previous phase, which leads to the overall translation of the subsequent phase. The scheduler accumulates it to the expected start time of the subsequent phase that has not yet started. Local state deviation refers to the time difference that occurs within a single composite phase when gear stage confirmation, spindle stabilization, or feed switching occurs. The scheduler only uses it to adjust the advance calculation interval and state transition boundary of the corresponding composite phase node, without changing the phase boundary that has already entered the current execution program segment.
[0041] In a preferred embodiment, please refer to Figure 3 Each edge computing task is broken down into corresponding computing nodes for data shaping, state updating, feature calculation, discrimination calculation, and result encapsulation. The data shaping node records the source of the input fields and the version alignment rules. The state updating node records the combination order of the previous state result and the input of the current cycle. The feature calculation node records the intermediate quantities that can be reused. The discrimination calculation node records the feature range that it depends on. The result encapsulation node records the result submission deadline and the range of program segments that can be read. This forms a data source chain that can be traced along the dependent edges.
[0042] When merging common nodes across tasks, the scheduler does not use the same node name as the merging criterion. Instead, it standardizes the computational expression, sorts the inputs whose order does not affect the result according to the field identifier, folds continuous constant transformations into a unified expression, and uses the previous state version in the state update as an explicit input. Then, it compares the standardized operation type, input field order, state update rules, and output data structure. Only nodes with the same structural description and consistent input version form an execution instance.
[0043] The executable flag of a node is generated by the completion status of the predecessor and the closed status of the input version. When all predecessor nodes have referenceable results and all external inputs of the current node have been bound to a defined version, the executable flag of the node is set to allow execution. When any predecessor result is frozen, revoked, or being recalculated, the executable flag of the node remains prohibited from execution. The scheduler does not guess whether the result is available by polling, but triggers the successor node to re-check the dependency conditions by the change of the result index status.
[0044] The critical chain is obtained by tracing back from the result submission node. The scheduler accumulates the estimated computation and data waiting time of the nodes that have not yet been completed on each dependent path. The path with the largest cumulative value is marked as the critical chain. When multiple paths have the same cumulative value, the path containing the node with the higher control impact level is selected as the critical chain. The critical chain marking is recalculated as the node is completed, the phase is updated, and the local recalculation range changes to avoid completed nodes continuing to occupy critical chain resources.
[0045] In a preferred embodiment, the common computation prefix is obtained by traversing backward from the result submission node. The node that reads the real-time status data of the target running phase is set as the input truncation node. The traversal process stops at the input truncation node and collects all its predecessor dependency closures. Nodes whose input versions are not closed in the dependency closures are removed. The remaining nodes form a pre-execution subgraph according to the predecessor relationship. If the removal of a node causes its successor node to lose the necessary input, the corresponding successor node and its subsequent dependency branches will exit the pre-execution subgraph together.
[0046] For cross-task common nodes referenced by multiple tasks, the scheduler establishes only one execution instance and creates a result index for each referenced task. After the execution instance is completed, the same result version identifier is written to all result indexes. When a referenced task enters local recalculation due to state incompatibility, only the result index pointing to the affected successor branch is frozen. If the common node itself does not reference incompatible state sub-items, the result indexes of other tasks remain readable, thus avoiding irrelevant failures caused by shared relationships between tasks.
[0047] The nodes in the pre-execution subgraph are arranged in execution order according to the predecessor closure relationship and priority. When selecting a node, the scheduler only compares the priority from all candidate nodes whose predecessors have been completed. After the node is executed, the set of completed predecessors, the set of uncompleted successors, and the result version are recorded. If the target phase arrives early, the candidate nodes that have not yet been executed stop entering the time slice, and the results that have been completed but have not yet been read continue to be retained according to the state compatibility rules.
[0048] In a preferred embodiment, please refer to Figure 4 The reference mapping between state items and compute nodes is generated before pre-execution. Each compute node records the set of state items that are directly read. The combined fingerprint arranges the state items according to the actual reading order of the common compute prefix in the directed task graph. When the same state item is read by multiple nodes, only one state value record is retained and multiple node reference addresses are established. When the state item is updated, all directly read nodes can be located directly without traversing all cached results.
[0049] The compatibility rules for machining instruction positions adopt a program segment inclusion relationship. When the program segment range allowed by the pre-execution result includes the actual program segment position, it is considered compatible. The compatibility rules for the current gear level adopt a confirmation code consistency relationship. When the actual gear level confirmation code is the same as the pre-execution input code, it is considered compatible. The compatibility rules for the spindle instruction change direction adopt an ordered relationship. When both the actual instruction sequence and the predicted sequence are in ascending order, both are in descending order, or both remain unchanged, they are considered compatible. The compatibility rules for load change trends adopt a trend segment continuation relationship. When the actual trend is still in the increase, decrease, or stable category used in the pre-execution, it is considered compatible.
[0050] When the node-level matching result is not valid, the scheduler searches along the directed task graph for the boundary position from the compatible node to the incompatible node. It directly reads the incompatible state sub-item and the node whose predecessor result is still compatible forms a local recalculation entry. When multiple local recalculation entries have a common successor node, the common successor node only establishes a new execution instance. The scheduler forms a new input version for each entry and checks whether the versions can be merged at the common successor node. If they cannot be merged, the branches are kept isolated until their respective results are output.
[0051] In a preferred embodiment, the computational requirement time envelope of the target running phase is generated based on the remaining computational load of the execution nodes within the phase, the critical chain length, and the result submission deadline. The scheduler allocates time slices backward from each result submission deadline. Critical chain nodes are bound to consecutive time slices according to their dependency order, while non-critical chain nodes are bound to discrete time slices outside the critical chain. Common computation prefixes can occupy non-critical chain discrete time slices that have not yet started, but must not cover nodes that have already entered the execution state.
[0052] Preferably, the amount of time that can be reserved for the running phase of the k-th target is determined according to the formula: ; in, This indicates the amount of time that can be allocated to the pre-execution nodes. This represents the amount of schedulable time from the current time point to the earliest start time of the k-th target's running phase. This represents the set of critical chain nodes that must be completed before the start of the k-th target execution phase. This represents the estimated remaining computational cost for the i-th critical chain node, when... Take 40 control cycles and 3 critical chain nodes. When taking 8, 7, and 5 control cycles in sequence, Take 20 control cycles, and the pre-execution node is only scheduled within 20 control cycles.
[0053] When the actual end point of the current running phase deviates from the expected end point, the scheduler reconstructs the computational demand time envelope based on the updated expected start point. Non-critical chain nodes that have not yet been executed are unbound from their original discrete time slices. Nodes that have already entered the critical chain execution sequence maintain their original order and execute continuously. If the remaining time is insufficient to accommodate all non-critical chain nodes, unread low-priority nodes are moved back to the scheduling set without changing the submitted result records.
[0054] Furthermore, the continuous propagation of bias causes subsequent composite phase nodes to form an expected start time interval. The left boundary of the interval is determined by the cumulative advance bias, and the right boundary of the interval is determined by the cumulative delay bias. Local state bias is used to determine the inner boundary of the interval that can be computed in advance. The scheduler maps the expected start time interval to the directed task graph and marks the earliest available input time and the latest result hold time for each computing node. The computing node enters the stable pre-execution set only when the expected completion time is earlier than the earliest available input time and the effective range of the result covers the expected start time interval.
[0055] The conditional pre-execution set is used to store nodes that have not yet met the stable pre-execution conditions but whose input versions are already closed. When the expected start time interval after the rolling update shrinks and is included in the valid range of intermediate results, the corresponding node is transferred to the stable pre-execution set. When the expected start time interval moves forward so that the expected completion time falls after the target phase, the corresponding node exits the conditional pre-execution set and is restored to an in-phase execution node. Node conversion only changes the scheduling state and does not change its dependency relationship in the directed task graph.
[0056] In a preferred embodiment, the local recalculation entry generates a branch version bound to the latest actual state sub-item. The branch version records the source program segment range, source control cycle, actual state fingerprint, and recalculation entry identifier. Unrevoked intermediate results are registered as the base version. Each computation node in the successor subgraph generates a dependency vector before execution. The dependency vector records the result version in the order of the predecessor node. The execution state is entered only when all result versions have a common input version.
[0057] The result index switching occurs after all boundary outputs connecting the local recalculation entry and the result output node are completed. The scheduler first registers the new dependency vector as a candidate vector, and then checks whether the program segment range, control cycle and state fingerprint in the candidate vector are consistent with each other. After the check is passed, the result index is rewritten from the original dependency vector to the new dependency vector in one go. During the switching process, the original result remains in a read-only state, and the new result is not allowed to be submitted before the index rewriting is completed.
[0058] After the result index switch is completed, the scheduler traverses the reference records of the original branch version. The original branch version that is not referenced by any edge computing task is deleted, while the base version that is still referenced by other result output nodes is retained. When multiple result output nodes share the same base version in different control cycles, the base version is saved until all reference relationships are removed, avoiding the deletion of public intermediate results that are still in use during the local recalculation process.
[0059] In this embodiment, the running status update task can combine the status result of the previous control cycle with the current actual input to form a new status version; the load identification task can read the data shaping result and the spindle command status to form the load change trend; the gear stage switching condition judgment task can read the current gear stage, the target gear stage, the spindle change direction and the load trend; the control compensation amount calculation task can read the status update result and the real-time deviation; the abnormal status judgment task can read the intermediate characteristics of multiple tasks; and the scheduler distinguishes the common calculation prefix and the execution branch within the phase according to the actual input dependency, and does not directly use the task name as the basis for judging whether pre-execution is allowed.
[0060] Specifically, when the look-ahead result of the machining instruction indicates that the spindle will decelerate and switch gear stages in the subsequent program segment, the running phase sequence forms a pre-stabilization segment, a state transition segment, and a post-confirmation segment. The gear stage target code, the direction of spindle instruction change, and the program segment range form a closed version within the pre-stabilization segment. The corresponding data shaping, state reference organization, and some condition expressions can enter the common calculation prefix. The actual load value and gear stage confirmation feedback remain in an open state, and the corresponding discrimination branches are reserved for execution in the state transition segment.
[0061] If the actual program execution is still within the predicted program segment range, the target gear stage remains unchanged, and the spindle command maintains the deceleration direction, the intermediate results of the pre-execution are read by the remaining calculation branches through compatibility matching. If the actual execution enters another program segment range due to the machining path branch, the machining command position sub-item is incompatible. The scheduler determines the node to read the position sub-item based on the reference mapping and forms a set of affected nodes. The common data shaping results of the unread position sub-items are retained, and the new branch version uses the actual program segment position to complete the local recalculation.
[0062] If the confirmation time of gear-level switching is delayed relative to the predicted time, the running phase sequence will identify the delay as a local state deviation, adjust the end boundary of the state transition segment backward, and change the expected start time of the subsequent confirmation segment accordingly. The pre-calculated interval will no longer accept nodes that depend on the confirmation state. Intermediate results that have been completed and depend only on the target gear-level instruction remain valid, and subsequent nodes that depend on the actual confirmation state continue to wait for the input version to close.
[0063] If the previous stable processing phase ends early and causes multiple subsequent phases to move forward as a whole, the scheduler will identify the time difference as a continuous propagation deviation. The expected start time of subsequent composite phase nodes will be moved forward synchronously, the computational demand time sequence envelope will be reconstructed, non-critical pre-execution nodes that have not yet been executed will be unbound from their original time slices, critical chain nodes will continue to execute in the order of dependencies, and nodes in the stable pre-execution set that are not expected to be completed before the start of the target phase will be transferred to the phase execution set.
[0064] In a preferred embodiment, the running phase record, computation node record, and result version record are stored using a mutually referencing data structure. The running phase record includes a phase identifier, program segment range, phase event set, expected time interval, and execution status. The computation node record includes a node identifier, input version set, predecessor set, successor set, expected computation amount, earliest executable time, and result submission deadline. The result version record includes a result index, source node, status fingerprint, completed predecessor set, and reference count. The scheduler binds the task graph to the running phase through the phase identifier and completes the reading of intermediate results through the result index, avoiding using changes in cache address as the basis for judging data version changes.
[0065] In this embodiment, the effective range of the result is jointly defined by the range of program segments that allow the use of the result and the range of control cycles. After the result encapsulation node is completed, it is not directly submitted to the CNC control process. Instead, it compares whether the current actual program segment position is within the allowed program segment range, whether the current control cycle is within the allowed control cycle range, and whether the dependency vector is in a submittable state. When all three conditions are met, the result status is changed from pending verification to pending submission. When any condition is not met, the result index is frozen and the corresponding dependency node check is triggered. This makes the time point of calculation completion and the time point when the result can be used controlled separately.
[0066] Preferably, the number of submission permissions for the w-th result is calculated according to the formula: ; in, This indicates whether the w-th result is allowed to enter the submission queue. This indicates whether the actual program segment location is within the allowed program segment range. This indicates whether the current control cycle is within the allowable control cycle range. This indicates whether the dependency vector is in a committable state. , and Each term takes the value 1 when the condition is true and 0 when the condition is false. For example, if the three terms are 1, 1, and 0 respectively, Set the value to 0, and the result remains in a pending verification state while waiting for the dependency vector to be updated.
[0067] The control impact level is determined based on the location where the result is read. Results that directly form gear-level switching conditions, spindle state limitations, or control compensation inputs are assigned a higher level, while results used only for subsequent state statistics or abnormal trajectory supplementation are assigned a lower level. When the same computing node is referenced by different tasks, the node control impact level is the highest level among all referenced paths. The scheduling priority calculation uses the highest level, and the effective range of the result is still saved separately according to each referenced task to avoid delays in the execution of shared nodes due to a low-level reference.
[0068] The estimated computational load is updated based on the actual number of control cycles occupied by the same type of computing node in the most recently completed record. The scheduler establishes a historical record based on the node's computational expression and input data size, removes the time of abnormal termination, input waiting, and preemption by higher-level nodes from the actual occupancy, and then selects the record adjacent to the current input size to form the estimated value. When there is no historical record of the same type, the initial estimated value is established by using the sum of the computational load of all predecessors of the node and the number of basic operations of the current node's computational expression. After the node is completed, the old record farthest from the current input size is replaced with the current record.
[0069] In a preferred embodiment, if the actual state continues to change during local recalculation, the scheduler does not superimpose multiple incomplete branch versions on the same local recalculation entry point. Instead, it compares the new actual state fingerprint with the input state fingerprint of the branch version being executed. If the changed state sub-item is not referenced by the current recalculation subgraph, the current branch version is executed and the unreferenced state record is updated. If the changed state sub-item is referenced by the current recalculation subgraph, the current branch version is frozen, the calculation node results that are still compatible with the new state are retained, and the updated branch version is established with the nearest compatible boundary node.
[0070] When the branches formed by two local recalculation entries converge at a common successor node, the scheduler checks the program segment range, control cycle range, and source of state items corresponding to the input versions of each branch. State items with the same source are identified by a common version. State items with different sources but belonging to non-overlapping input fields are allowed to be combined at the common successor node. State items with different sources but corresponding to the same input field are prohibited from being combined. The common successor node remains in a waiting state and selects the branch that matches the current actual state fingerprint to continue propagating to the result output node.
[0071] In a preferred embodiment, when the CNC system experiences a program jump, pause followed by resumption of execution, or reloading of machining instructions, the scheduler marks the current look-ahead window as finished and saves the version records of submitted results. Unsubmitted results undergo compatibility matching according to the new execution position. Results whose program segment range still includes the new execution position and whose input version remains closed are migrated to the new look-ahead window. Results whose program segment range no longer includes the new execution position are locally undone along the reference mapping. The new running phase sequence is constructed starting from the new execution position, without using the expected time points of the phases that have not yet started in the original sequence.
[0072] In this embodiment, when task execution is paused, the node calculation cursor, the read input version, and the formed local intermediate values are saved. Before resuming execution, the input version is rechecked to see if it is still in a referential state. If the version has not changed, execution continues from the calculation cursor. If the version has been frozen or undone, the local intermediate values that have not yet formed a formal result version are discarded and the process returns to the nearest predecessor closing node. Intermediate values that have been registered as referential results do not change their state due to the pause of subsequent nodes until a state compatibility check or a change in the reference count triggers an update.
[0073] Specifically, within a continuous and stable cutting phase, the scheduler can read subsequent spindle deceleration and target gear stage switching instructions, establish corresponding composite phase nodes and generate a task graph. Data shaping, program segment range parsing, target gear stage encoding conversion, spindle change direction determination, and cross-task common feature organization are incorporated into the pre-execution subgraph. Actual load reading, gear stage confirmation reading, and real-time deviation calculation are retained in the phase execution subgraph. Available time slices in the stable cutting phase execute the pre-execution subgraph according to priority. After entering the state transition section, real-time data is written to the input truncation node and the remaining branches are completed.
[0074] During the aforementioned continuous execution process, if the actual processing path, target gear stage, and spindle change direction are all compatible with the look-ahead results, the result index directly connects the pre-execution subgraph and the phase-in-execution subgraph. If any of the state items is incompatible, the reference mapping locates the local recalculation entry and freezes the affected result index. Unaffected common calculation results continue to be read. The new branch result replaces the original result index after dependency vector verification. The original branch version is deleted after the reference count reaches zero, forming a complete scheduling closed loop that can be executed repeatedly.
[0075] Through the joint constraints of the above data version, phase boundary, task dependency, state fingerprint and result index, the pre-execution result has a corresponding program segment range and control cycle in each stage of formation, saving, referencing, partial cancellation and resubmission. The scheduling process can use the preceding low-load phase to complete the calculation part that does not depend on future real-time input, and limit the recalculation range when the actual state deviates. The entire implementation process does not require changing the CNC machining instructions and the gear head control object.
Claims
1. A method for optimizing task scheduling of edge computing for CNC machine tool gear heads, characterized in that, include: Extract spindle speed commands, gear stage switching commands, and feed states from the machining command sequence of the CNC system to construct the gear head running phase sequence; Obtain the edge computing tasks corresponding to the running phase sequence, and construct a directed task graph based on the input dependency, earliest executable time point, effective result interval and control influence level of each task; Based on the available computation time slices of the current running phase, a common computation prefix that does not depend on future real-time input is selected from the directed task graph for pre-execution, and the intermediate results are associated with and stored with the state fingerprint generated by the machining command position, the current gear stage, the spindle command state, and the load change trend. After entering the target running phase, the actual state fingerprint is matched with the state fingerprint for compatibility. If the match is successful, the remaining computation branches that depend on real-time input are executed. If the match is unsuccessful, the intermediate results affected by the deviation are canceled and the corresponding computation branches are rescheduled according to the directed task graph.
2. The method for optimizing task scheduling of edge computing for CNC machine tool gear heads according to claim 1, characterized in that, Constructing the gear head operation phase sequence includes: performing look-ahead analysis on the program segments in the machining instruction sequence, and marking spindle start / stop, spindle speed increase / decrease, gear stage switching, feed input, and feed exit as phase event points respectively; Connect adjacent phase event points according to the execution order of the program segments, and merge phase intervals without state transitions based on the speed continuity relationship, gear stage holding relationship and feed state inheritance relationship between adjacent program segments. For phase intervals that include gear-stage switching or speed range changes, a composite phase node consisting of a pre-stabilization segment, a state transition segment, and a post-confirmation segment is established. Each composite phase node is associated with the corresponding program segment range, the expected start time, the expected duration, and the pre-calculated interval to form a running phase sequence that can be updated in a rolling manner as the machining command is executed.
3. The method for optimizing task scheduling of edge computing for CNC machine tool gear heads according to claim 1, characterized in that, Constructing the directed task graph includes: splitting each edge computing task into corresponding computing nodes for data shaping, state updating, feature calculation, discrimination calculation, and result encapsulation, and recording the input version, predecessor node set, reusable intermediate state, and result submission time limit for each computing node; Based on the sharing relationship of the same running status data among different edge computing tasks, computing nodes with the same input version and the same computational expression are merged to form cross-task common nodes; Based on whether the computing node reads the real-time status data generated by the target running phase, the cross-task common node is divided into pre-executable nodes and in-phase execution nodes; Node executable identifiers are generated based on the constraint that all predecessor nodes are completed and the input versions are closed, and the critical chain of the corresponding edge computing task is marked by the longest dependency path from the starting node to the result submission node.
4. The method for optimizing task scheduling of edge computing for CNC machine tool gear heads according to claim 3, characterized in that, Generating the state fingerprint includes: converting the machining instruction position code, the current gear level code, the spindle instruction change direction, and the load change trend into state sub-items with time order, and recording the data version and source phase corresponding to each state sub-item; A combined fingerprint is generated by reading the sequential relationship of each state item according to the common computation prefix in the directed task graph, and a reference mapping between the state item and the computation node is established at the same time. Compatibility matching involves comparing each actual state item with the corresponding state item in the combined fingerprint, and outputting a set of incompatible state items. The computation nodes that directly reference incompatible state items are determined based on the reference mapping, and the set of affected nodes is marked along the successor direction of the directed task graph. Intermediate results that have not entered the set of affected nodes and whose input versions are still closed are retained.
5. The method for optimizing task scheduling of edge computing for CNC machine tool gear heads according to claim 2, characterized in that, The rolling update of the running phase sequence includes: extracting program segment switching points, gear level confirmation points, spindle command stabilization points, and feed state switching points from the execution feedback of the CNC system, and generating an actual phase event sequence; Based on the constraints of consistent event types and monotonic execution order, the actual phase event sequence is aligned with the phase event points to obtain the timing deviation sequence of each phase interval. Based on the event combination and timing deviation direction of the previous composite phase node, the timing deviation sequence is split into continuous transmission deviation and local state deviation. The expected start time of subsequent composite phase nodes is corrected by the continuous transmission deviation, the pre-calculation interval of the corresponding composite phase node is shrunk by the local state deviation, and the phase boundary that has entered the current execution program segment remains unchanged.
6. The method for optimizing task scheduling of edge computing for CNC machine tool gear heads according to claim 4, characterized in that, The selection of the common computation prefix includes: taking the computation node that reads the real-time state data of the target running phase as the input truncation node, traversing backwards from each result submission node along the predecessor direction to obtain the dependency closure connecting the starting node and the input truncation node; Exclude computation nodes that are not yet closed in the input version from the dependency closure, and form a pre-execution subgraph from the remaining computation nodes according to the predecessor closure relationship; For a cross-task common node referenced by multiple edge computing tasks, only one execution instance bound to the input version is generated, and a result index is established for each referencing task. The execution order of nodes in the pre-execution subgraph is determined based on the result submission deadline, critical chain position, and successor node coverage relationship. Intermediate results are submitted in topological order, and the completed predecessor set and uncompleted successor set corresponding to each intermediate result are recorded.
7. The method for optimizing task scheduling of edge calculation for CNC machine tool gear heads according to claim 4, characterized in that, The compatibility matching further includes: configuring program segment inclusion relationship for machining instruction position encoding, configuring consistency relationship for current gear level encoding, configuring ordered relationship for spindle instruction change direction, and configuring trend segment continuation relationship for load change trend according to the reading method of each computing node, forming compatibility rules bound to the computing node; The compatibility rules of the computation nodes associated with the intermediate results being compared are called one by one to generate node-level matching results; When the node-level matching result is not valid, the set of boundary nodes pointing from compatible nodes to incompatible nodes is determined along the directed task graph, and the set of boundary nodes is used as the local recalculation entry point. Merge the successor nodes that are shared by different local recalculation entry points, and rebuild the input version according to the latest actual state sub-item, only rescheduling the merged successor subgraph.
8. The method for optimizing task scheduling of edge computing for CNC machine tool gear heads according to claim 5, characterized in that, Also includes: For each target running phase, the remaining computational load, critical chain length, and result submission deadline of the execution nodes within the phase in the directed task graph are summarized, and a computational requirement time sequence envelope is established according to the expected start time in the running phase sequence. Reverse-load the available computation time slices from the submission deadline of each result, bind the phase execution nodes on the critical chain to continuous time slices, and bind the non-critical chain nodes to discrete time slices that can be preempted by pre-execution nodes. When the actual end point of the current running phase deviates from the expected end point, the time slice boundary is recalculated based on the updated computational requirement time sequence envelope, the binding of non-critical chain nodes that have not yet been executed to discrete time slices is released, and the order of continuous time slices and their nodes that have entered the critical chain execution sequence remains unchanged.
9. The method for optimizing task scheduling of edge computing for CNC machine tool gear heads according to claim 5, characterized in that, Also includes: Based on the transmission relationship of the continuous transmission deviation between adjacent composite phase nodes, an expected start time interval is generated for each subsequent composite phase node, and an inner boundary of the pre-calculated interval is generated for the corresponding composite phase node based on the local state deviation. The expected start time interval is mapped to the directed task graph, and the earliest available input time and the latest result retention time of each computing node are marked respectively; Select computation nodes that can be completed before the earliest start time of the target composite phase node and whose intermediate results cover the expected start time interval to form a stable pre-execution set; The remaining pre-executable nodes are grouped into a conditional pre-executable set, and when the expected start time interval after the rolling update and the effective range of intermediate results are re-established to form an inclusion relationship, the corresponding computing nodes are transferred into the stable pre-executable set.
10. The method for optimizing task scheduling of edge computing for CNC machine tool gear heads according to claim 7, characterized in that, The rescheduled and merged successor subgraph includes: marking the final computing node of each edge computing task as the result output node, establishing a branch version bound to the latest actual state sub-item for each local recalculation entry, and registering the intermediate results that have not been revoked as the base version; According to the dependencies of the directed task graph, a dependency vector consisting of predecessor result versions is generated for each computation node in the successor subgraph, and combined reading is allowed only when the branch version and the base version in the dependency vector have a common input version. After all boundary outputs connecting the local recalculation entry and the result output node are completed, the corresponding result index is switched from the original dependency vector to the new dependency vector in one go; Traverse the result index after the switch, delete the original branch version that is no longer referenced by any edge computing task, and retain the base version that is still referenced by other result output nodes.
