Process sequencing method and system for planning scheduling
Patent Information
- Application Number
- CN202611045246.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-14
- Publication Date
- 2026-09-29
AI Technical Summary
[0004]本申请提供一种面向计划排程的工序排序方法及其系统,可以解决现有技术中存在的候选任务集合在频繁变动下排序处理效率较低的问题
本申请实施例提供了一种面向计划排程的工序排序方法及其系统,通过建立基于比较属性值的动态基准值,并在排程迭代过程中根据候选任务集合的变动情况更新基准值,使得排序参考系能够随任务集合状态动态调整;在此基础上,利用预设的阈值容差判定任务状态发生翻转的受影响范围,并据此确定重新排序的起始位置,从而将全量排序转化为从所述起始位置开始的增量排序操作;由于仅对受影响范围后的任务序列执行排序处理,避免了因集合变动而触发的全量任务重排计算,减少了单次迭代过程中的数据处理规模与比较运算次数,使得排序流程能够适应候选任务集合的频繁变动而无需重复执行全局排序逻辑。
Smart Images

Figure CN122840557A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, specifically to a process sequencing method and system for planning and scheduling. Background Technology
[0002] Advanced Planning and Scheduling (APS) systems, as core decision-making tools in intelligent manufacturing, play a crucial role in the rational sequencing and scheduling of production processes. In practical applications involving multiple concurrent strategies and dynamic threshold tolerances, determining process priorities typically relies on real-time calculation and order maintenance of candidate task sets.
[0003] In existing technologies, the maintenance and updating of candidate task lists typically employs conventional sorting mechanisms. However, with the expansion of production scale and the increasing complexity of scheduling strategies, the frequency of data changes in the candidate task set increases significantly. In such high-frequency dynamic adjustment scenarios, traditional processing methods often face challenges such as high computational load, fluctuating memory resource usage, and stability under extreme data conditions. Especially when multiple strategies are in synergy, balancing the correctness of sorting, system response performance, and operational stability has become a pressing technical problem that needs optimization in the current APS (Advanced Planning and Scheduling) field. Summary of the Invention
[0004] This application provides a process sequencing method and system for planning and scheduling, which can solve the problem of low efficiency in sorting candidate task sets under frequent changes in the prior art.
[0005] In a first aspect, embodiments of this application provide a process sequencing method for planning and scheduling, comprising: Obtain a candidate task set, which contains multiple process tasks to be scheduled for production; Based on the comparison attribute values of the tasks in the candidate task set, a baseline value for the candidate task set is determined. During the scheduling iterative processing of the candidate task set, the baseline value is updated according to the changes in the candidate task set; Based on the updated baseline value and the preset threshold tolerance, the affected range of task status reversal in the candidate task set is determined, and the starting position of reordering is determined according to the affected range. Starting from the initial position, perform an incremental sorting operation on the tasks in the candidate task set to obtain a sorted process sequence.
[0006] In conjunction with the first aspect, in one implementation, determining a baseline value for the candidate task set based on the comparison attribute values of tasks in the candidate task set specifically includes: Identify the target ranking strategy for enabling threshold tolerance applied to the candidate task set; Obtain the comparison attribute values of each process task in the candidate task set under the target sorting strategy; According to the sorting direction of the target sorting strategy, the extreme value is selected from the comparison attribute values as the benchmark value, and the identification information of the target process task that generates the extreme value is recorded. The sorting direction includes ascending or descending order, and the extreme value corresponds to the minimum or maximum value among the comparison attribute values.
[0007] In conjunction with the first aspect, in one implementation, identifying a target ranking strategy for enabling threshold tolerance applied to the candidate task set specifically includes: Obtain a preset admission policy sequence applied to the candidate task set; Traverse the preset admission policy sequence and check the threshold tolerance enable flag configured for each admission policy; The threshold tolerance enable is marked as valid, and the strategy that enables threshold tolerance is determined as the target sorting strategy. The comparison process of the attribute values includes: Construct a chained comparator to compare data sequentially according to multiple sorting strategies; A unique key comparison rule is added to the final stage of the chained comparator. When multiple tasks have the same comparison attribute value, a unique task identifier is determined based on the unique key comparison rule, and the unique task identifier is used as the identification information of the target process task that generates the extreme value.
[0008] In conjunction with the first aspect, in one implementation, during the iterative processing of the candidate task set in the scheduling process, the baseline value is updated based on changes in the candidate task set, specifically including: Get the departure task identifiers in the current iteration round, as well as the additional task set newly added to the candidate task set; Save the baseline value before the update as the old baseline value, and obtain the old baseline task identifier that generated the old baseline value before the update; Determine whether the departure task identifier is consistent with the old baseline task identifier; If they are inconsistent, the old benchmark value is kept unchanged and determined as the candidate benchmark value. If they are consistent, the extreme value is reselected from the remaining candidate task set as the candidate benchmark value, and the task identifier that generated the candidate benchmark value is recorded as the candidate benchmark task identifier. Based on the candidate benchmark values and the additional task set, the updated benchmark values are determined.
[0009] In conjunction with the first aspect, in one implementation, determining an updated benchmark value based on the candidate benchmark value and the additional task set specifically includes: If the set of additional tasks is not empty, then an additional extreme value is selected from the set of additional tasks; If the additional extreme value is better than the candidate benchmark value, then the additional extreme value is determined as the updated benchmark value, and the additional task identifier that generated the additional extreme value is recorded as the new benchmark task identifier. If the set of additional tasks is empty, or the additional extreme value is not better than the candidate benchmark value, then the candidate benchmark value is determined as the updated benchmark value, and the candidate benchmark task identifier is determined as the new benchmark task identifier.
[0010] In conjunction with the first aspect, in one implementation, determining the affected range of task state reversals in the candidate task set based on the updated baseline value and a preset threshold tolerance, and determining the starting position for reordering according to the affected range, specifically includes: Get the old baseline value before the update and the new baseline value after the update; Using the preset threshold tolerance, calculate the first state label of each task in the candidate task set relative to the old benchmark value and the second state label relative to the new benchmark value. The state label is used to characterize whether the task attribute value falls within the threshold neighborhood of the benchmark value. By comparing the first state marker and the second state marker, the task of state flipping where the state marker has changed is determined; If there are tasks whose states are reversed, the set of tasks whose states are reversed is determined as the affected range, and the starting position of the reordering is determined according to the minimum index position of the tasks in the affected range. If there is no task that performs the state reversal, the starting position of the reordering is set to an invalid flag.
[0011] In conjunction with the first aspect, in one implementation, starting from the initial position, an incremental sorting operation is performed on the tasks in the candidate task set, specifically including: Determine whether the starting position of the reordering is the invalid identifier; If the identifier is invalid, skip this sorting operation; If the starting position is not the invalid identifier, then obtain the number of valid tasks in the candidate task set and compare the number of valid tasks with the preset batching threshold; If the number of valid tasks is greater than the preset batching threshold, then the preset number of tasks after the starting position are sorted in batches. Otherwise, the tasks from the starting position to the end of the candidate task set are sorted by suffix, and the sorted tasks are merged with the unsorted tasks.
[0012] In conjunction with the first aspect, in one implementation, batch sorting or suffix sorting is performed, specifically including: The system uses a conventional sorting algorithm to sort the data and checks for any anomalies during the sorting process. If no anomalies occur, the output of the conventional sorting algorithm is determined as the sorted process sequence. If an anomaly occurs, the algorithm is switched to a degraded sorting algorithm to re-execute the sorting. The output of the degraded sorting algorithm is determined as the sorted process sequence, and a degraded flag is generated for audit traceability. The degradation sorting algorithm is either merge sort or forced unique key comparison sort.
[0013] In conjunction with the first aspect, in one implementation, after obtaining the candidate task set and before the scheduling iteration process, the method further includes: Initialize the logical offset pointer, which points to the starting storage location of the candidate task set; During the process of polling the candidate task set based on the logical offset pointer, the logical offset pointer is updated in each iteration to point to the storage location of the currently pending task. The task data is accessed based on the logical offset pointer, while keeping the physical storage location of the task data in the candidate task set unchanged. When the accumulated offset of the logical offset pointer reaches a preset compression threshold, a memory compression operation is performed to move the valid task data to the storage start position and reset the logical offset pointer.
[0014] Secondly, embodiments of this application provide a process sequencing system for planning and scheduling, comprising: a candidate task acquisition module, a baseline value determination module, a baseline value update module, an affected range determination module, and an incremental sorting execution module. The candidate task acquisition module is used to acquire a candidate task set, which contains multiple process tasks to be scheduled. The baseline value determination module is used to determine the baseline value of the candidate task set based on the comparison attribute values of the tasks in the candidate task set. The baseline value update module is used to update the baseline value according to the changes in the candidate task set during the iterative processing of the scheduling process. The affected range determination module is used to determine the affected range where the task status in the candidate task set is reversed based on the updated baseline value and a preset threshold tolerance, and to determine the starting position for reordering according to the affected range. The incremental sorting execution module is used to perform incremental sorting operations on the tasks in the candidate task set starting from the starting position to obtain the sorted process sequence.
[0015] The beneficial effects of the technical solutions provided in this application include: This application provides a method and system for process sorting in planning and scheduling. By establishing a dynamic benchmark value based on comparison attribute values and updating the benchmark value according to changes in the candidate task set during scheduling iterations, the sorting reference system can be dynamically adjusted with the state of the task set. Based on this, a preset threshold tolerance is used to determine the affected range of task state reversal, and the starting position of reordering is determined accordingly, thereby transforming the full sorting into an incremental sorting operation starting from the starting position. Since sorting is only performed on the task sequence after the affected range, the full task reordering calculation triggered by set changes is avoided, reducing the data processing scale and comparison operation number in a single iteration, enabling the sorting process to adapt to frequent changes in the candidate task set without repeatedly executing the global sorting logic. Attached Figure Description
[0016] Figure 1 This is a flowchart illustrating the process sequencing method for planning and scheduling in this application. Detailed Implementation
[0017] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present application.
[0018] This application provides a process sequencing method and system for planning and scheduling, which can solve the problem of low efficiency in sorting candidate task sets under frequent changes in the prior art.
[0019] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.
[0020] In a first aspect, embodiments of this application provide a process sequencing method for planning and scheduling, comprising: 101: Obtain the candidate task set, which contains multiple process tasks to be scheduled for production; 102: Determine the baseline value of the candidate task set based on the comparison attribute values of the tasks in the candidate task set; 103: During the scheduling iteration process of the candidate task set, update the baseline value according to the changes in the candidate task set; 104: Based on the updated baseline value and the preset threshold tolerance, determine the affected range of task status reversal in the candidate task set, and determine the starting position of reordering according to the affected range; 105: Starting from the initial position, perform incremental sorting on the tasks in the candidate task set to obtain the sorted process sequence.
[0021] In advanced planning and scheduling systems, the first step is to construct an ordered set of candidate tasks. This set corresponds to a logically valid interval, containing multiple process tasks awaiting production scheduling. For scenarios where multiple admission policies are in effect and some policies enable threshold tolerance, the system determines the appropriate policy based on the task. Comparison of attribute values To enable threshold tolerance The strategy subset dynamically maintains the baseline value The determination of the baseline value not only depends on the extreme value of the attribute, but also associates it with the task identifier that generated the extreme value, so as to ensure that the changes in the baseline state can be accurately identified in subsequent iterations, provide a stable reference anchor point for sorting, and avoid the subsequent flip judgment and rearrangement boundary offset due to the baseline initialization error.
[0022] During the scheduling iteration process, as tasks are dequeued or new tasks are added, the candidate task set changes, and the system updates the baseline value according to these changes. After the update, a preset threshold tolerance is used. Determine whether the task state has been flipped. Specifically, this is done by calculating the threshold neighborhood state of the task attribute values relative to the old and new baseline values. If the status flag changes, the task is determined to be affected. The system linearly scans the valid interval to extract the logical index of the first affected task. This position is then determined as the starting point for the reordering. This step narrows the reordering trigger from a simple change in the baseline value to a semantic flip change in the task. If we can pinpoint where the potential impact point is, we can compress the reordering range and thus accurately determine the left boundary of the reordering.
[0023] After determining the starting position, the system performs incremental sorting on the tasks in the candidate task set from that position. Compared to a full reordering, this operation only performs sorting calculations on the affected scope and its subsequent tasks. The reordering cost matches the scale of the affected tasks, significantly reducing unnecessary computational overhead and memory relocation. After sorting, the sorted process sequence is obtained and written with a sorting identifier for audit traceability. The entire process forms a closed loop of incremental sorting driven by a dynamic baseline value. While maintaining the consistency of business sorting, it also considers computational performance and system stability. It is suitable for high-frequency dynamic scheduling scenarios with hundreds of thousands of processes, shifting the average complexity from a fixed full process to one that is related to the scale of the affected tasks.
[0024] In this application, a dynamic benchmark value based on comparison attribute values is established, and the benchmark value is updated according to the changes in the candidate task set during the scheduling iteration, so that the sorting reference system can be dynamically adjusted with the state of the task set. On this basis, a preset threshold tolerance is used to determine the affected range when the task state is reversed, and the starting position of the reordering is determined accordingly, thereby transforming the full sorting into an incremental sorting operation starting from the starting position. Since sorting is only performed on the task sequence after the affected range, the full task reordering calculation triggered by the change of the set is avoided, the data processing scale and the number of comparison operations in a single iteration are reduced, and the sorting process can adapt to frequent changes in the candidate task set without repeatedly executing the global sorting logic.
[0025] In step 101: Obtain a candidate task set, which contains multiple process tasks to be scheduled. Input the initial task set. . This represents the unsorted raw task list received by the system, which is then sorted to generate... , Let be an ordered set of candidate tasks, corresponding to a logically valid interval, where, This represents a single process task. This indicates the total number of tasks, and the sorting ensures that tasks are arranged according to a predetermined strategy.
[0026] Again initialization and . This represents the policy index in the admission policy sequence. To enable a subset of policies with threshold tolerance, This is the admission policy sequence. A dynamic baseline value is maintained for each policy that enables the threshold. To generate The task identifier. Determined during initialization via extreme value scanning. and ,in This is used to determine whether the baseline task has left the field. If the baseline initialization is incorrect, the subsequent flipping judgment and reordering boundary will be offset. Therefore, it is necessary to record the task identifier that generates the extreme value.
[0027] This step, during the initial candidate construction phase, targets a subset of strategies that enable threshold tolerance. Each strategy in Establish a dynamic benchmark reference. Maintain only... Unable to identify baseline departure, combined with The baseline reselection logic can be triggered correctly. If the baseline initialization is incorrect, subsequent flipping judgments and reordering boundaries will be offset, so it is necessary to record the task identifier that generates the extreme value.
[0028] Based on the above embodiments, in this embodiment, a baseline value for the candidate task set is determined based on the comparison attribute values of the tasks in the candidate task set, specifically including steps 1021 to 1023: Step 1021: Identify the target ranking strategy with enabled threshold tolerance applied to the candidate task set.
[0029] Specifically, the system first obtains a preset admission policy sequence applicable to the candidate task set. This sequence encompasses the set of all rules that could potentially affect task ranking. Subsequently, the preset admission policy sequence is traversed, checking the threshold tolerance enable flag configured for each admission policy. This flag indicates whether the current policy has enabled the threshold tolerance mechanism. Policies with the threshold tolerance enable flag set to active, representing the enabled threshold tolerance, are identified as target ranking policies, forming a subset of these policies. . As the core entry point for subsequent dynamic updates and affected judgments, its state changes are manifested in reading the policy configuration and writing it to the comparator cmp. If the semantic definitions are inconsistent, inconsistencies will arise in subsequent baseline maintenance and reordering; therefore, clarification is necessary. Sets ensure consistency in comparison semantics by first clearly defining how to compare, and then all subsequent sorting is performed according to the same semantics.
[0030] Step 1022: Obtain the comparison attribute values of each process task in the candidate task set under the target sorting strategy; Task In strategy The comparison attribute value is denoted as It can be of type int, long, or char, with threshold tolerance. Derived from policy configuration. When thresholding is enabled, the comparison value under this policy is mapped to... The specific formula is: when hour ,otherwise .in express Otherwise, it is 0. Let the comparison rule under this strategy be: Then proceed to the next strategy.
[0031] The comparison process of attribute values includes: A chained comparator is constructed, sequentially comparing tasks according to multiple sorting strategies. A unique key comparison rule is appended to the end of the chained comparator. When multiple tasks have the same comparison attribute value, a unique task identifier is determined based on the unique key comparison rule. This mapping marks tasks within the threshold neighborhood as having the same priority, facilitating subsequent determination of state reversal. Compared to common parallel extreme values without fixed disambiguation, this application uses a unique key at the end, resulting in higher stability across rounds, ensuring reproducible and auditable sorting, and reducing the risk of instability in parallel items.
[0032] Step 1023: Based on the sorting direction of the target sorting strategy, select the extreme value from the comparison attribute values as the benchmark value, and record the identification information of the target process task that generates the extreme value; wherein, the sorting direction includes ascending or descending order, and the extreme value corresponds to the minimum or maximum value in the comparison attribute values.
[0033] The baseline initialization formula is: , .in Take the maximum value. Take the minimum value; Take the task identifier that generated the extreme value; in case of ties, take the one with the smaller last-level unique key. First, sort the initial queue, then find the current reference anchor point for each threshold strategy. Compared to common methods that only maintain the baseline value and not the baseline task identifier, this application additionally maintains... It can correctly identify baseline departures. The default implementation is a single sorting + extreme value scan; optional implementations include sorting while extracting the baseline and parallel extreme value reduction. Parallel reduction is suitable for large-scale initialization. It provides a stable initial anchor point for subsequent rapid determination, reducing initial jitter. The state change description indicates writing. , , , ,in This indicates that the logically valid range starts from the beginning of the array, providing a basis for subsequent polling.
[0034] Through the above steps, the system completes the entire process from policy definition to baseline initialization. If the baseline initialization is incorrect, subsequent flipping decisions and rearrangement boundaries will be offset; therefore, it is necessary to ensure that the data is written correctly. , , Accurate and error-free. Through maintenance The system can distinguish whether changes in the baseline value are due to fluctuations in task attributes or the departure of the baseline task, thus triggering the correct update path. This process ensures consistent comparison rules when multiple strategies are in effect and threshold tolerance is included, reducing the risk of inconsistent sorting criteria in the future. The introduction of unique keys guarantees that even if attribute values are exactly the same, tasks still have a definite order, avoiding sorting result jitter caused by the instability of parallel items, making the sorting results reproducible and auditable, and ultimately forming a closed loop of incremental sorting driven by dynamic baseline values, balancing computational performance and system stability.
[0035] Based on the above embodiments, in this embodiment, during the scheduling iterative processing of the candidate task set, the baseline value is updated according to the changes in the candidate task set, specifically including steps 1031 to 1035: Step 1031: Obtain the departure task identifiers in the current iteration round, and the additional task set newly added to the candidate task set; the system uses the candidate set as a basis for... With logical offset pointer The execution logic is dequeued, and the formula is as follows: ,in For the current optimal task, an append set is generated simultaneously. This set consists of tasks that are unlocked after the pre-existing constraints are removed.
[0036] Step 1032: Save the baseline value before the update as the old baseline value, and obtain the old baseline task identifier that generated the old baseline value before the update; specifically, save... and ,in This is a subset of policies that enable thresholds. Saving the old state is necessary to calculate state transitions in subsequent affected decision steps. Without the old baseline value, it is impossible to accurately calculate whether the task has undergone a state change within the threshold neighborhood, causing the rearrangement trigger condition to fail.
[0037] Step 1033: Determine whether the departure task identifier is consistent with the old baseline task identifier; Step 1034: If they are inconsistent, keep the old benchmark value unchanged and determine the old benchmark value as the candidate benchmark value. If they are consistent, select the extreme value from the remaining candidate task set as the candidate benchmark value and record the task identifier that generated the candidate benchmark value as the candidate benchmark task identifier.
[0038] In steps 1033 and 1034, the baseline departure determination and update are performed. The system determines whether the departure task identifier is consistent with the old baseline task identifier, i.e., it checks... If there is a discrepancy, it is considered a non-benchmark departure. The old benchmark value is kept unchanged and determined as the candidate benchmark value, using the following formula: If they match, it indicates a baseline departure and reselection. The extreme value is then reselected from the remaining candidate task set as the candidate baseline value, and the task identifier that generated the candidate baseline value is recorded as the candidate baseline task identifier. The formula is as follows: This step ensures that the baseline is not recalculated in every round, but updated by minimizing the event path. Compared with the common practice of rescanning all candidates to update the baseline in every round, this application has lower update overhead and can correctly identify baseline departures, avoiding flipping decisions and rearrangement boundary offsets.
[0039] Step 1035: Based on the candidate baseline value and the additional task set, determine the updated baseline value. Specifically, if the additional task set is not empty, select the additional extreme value from the additional task set, using the following formula: If the additional extreme value is better than the candidate baseline value, then the additional extreme value is determined as the updated baseline value, and the identifier of the additional task that generated the additional extreme value is recorded as the new baseline task identifier, i.e., the additional preemption logic is executed. If the additional task set is empty, or the additional extreme value is not better than the candidate baseline value, then the candidate baseline value is determined as the updated baseline value, and the candidate baseline task identifier is determined as the new baseline task identifier. This step performs a three-path update of "additional preemption / non-baseline exit / baseline exit reselection", reducing unnecessary baseline reconstruction and maintaining the stability of update semantics.
[0040] The entire update process reads the old... and Write new With the set of change strategies . Only truly changing strategies are collected for accurate downstream scanning. Incorrect update path judgments directly cause bias in the affected decisions, leading to invalid reordering or missed sorting. Through this three-path update mechanism, the system can significantly reduce invalid computation when multiple admission strategies are in effect and threshold tolerance is included, providing accurate baseline state input for subsequent incremental reordering and ensuring the stable operation of the dynamic baseline-driven incremental sorting closed loop.
[0041] Based on the above embodiments, in this embodiment, based on the updated baseline value and the preset threshold tolerance, the affected range of task states in the candidate task set that have been flipped is determined, and the starting position for reordering is determined according to the affected range, specifically including steps 1041 to 1043: Step 1041: Obtain the old baseline value before the update and the new baseline value after the update; the system reads the set of change strategies. This set only collects strategies that have actually changed, allowing for precise downstream scanning. Input data includes an ordered set of candidate tasks. Logical offset pointer and baseline state This step aims to prepare the state data required for decision-making, ensuring that the reordering decision is based on actual baseline transformations rather than arbitrary numerical fluctuations. By maintaining the old baseline state, the system can calculate the changes of the task relative to the baseline in subsequent steps, providing accurate input for incremental reordering. This avoids the inability to accurately calculate whether the task has undergone state changes within the threshold neighborhood due to the lack of old baseline values, ensuring data consistency between the decision layer and the execution layer.
[0042] Step 1042: Using a preset threshold tolerance, calculate the first state label of each task in the candidate task set relative to the old benchmark value and the second state label relative to the new benchmark value. The state label is used to characterize whether the task attribute value falls within the threshold neighborhood of the benchmark value; specifically, through the formula... Determination. The formula for determining whether a single strategy is affected is as follows: ,in This represents the XOR operation. The globally affected states are... This mapping transforms numerical changes into semantic state flips, distinguishing between stable tasks that remain within tolerance and tasks that cross threshold boundaries. Compared to common methods that trigger downstream processes solely based on numerical changes, this application triggers based on semantic flips, resulting in higher accuracy. It ensures that only tasks whose states undergo substantial changes are marked as affected, thus converging rearrangement triggering from baseline changes to task flip changes.
[0043] Step 1043: Compare the first state marker and the second state marker to determine the tasks whose state markers have changed and which have undergone state flipping. If there are tasks with state flipping, the set of these tasks is defined as the affected range. Based on the smallest index position of the tasks within the affected range, the starting position for reordering is determined. The formula for calculating the first affected index (logical index) is as follows: If there are no tasks that reverse the state, and the set is empty, then the starting position for reordering is set to an invalid flag, i.e., let... When linearly scanning the effective interval, an early stopping mechanism is employed, stopping the scan as soon as the first affected index is found. Incorrect boundary indexes can lead to local reordering failures or misordering. By shifting the reordering trigger from baseline convergence to task flipping, the system can compress the reordering range, making... or This allows for direct entry into skip branches, significantly reducing invalid sorting calculations and ensuring the accuracy of affected judgments and index extraction.
[0044] Based on the above embodiments, in this embodiment, starting from the starting position, an incremental sorting operation is performed on the tasks in the candidate task set. The system first determines whether the starting position of the reordering is an invalid identifier, which corresponds to the first affected index. In this case, it indicates that no task state has been reversed in the candidate task set, and the affected judgment result is empty. If it is an invalid flag, the skip branch is hit, and the current sorting operation is skipped. This step will trigger the reordering from the baseline change to the task reversal change. If we can locate where it might be affected, we can compress the reordering range. If there are no reversal tasks, the set is empty, and we can directly enter the skip branch to avoid invalid calculations. This ensures that the skip branch is hit in a large number of rounds to reduce overhead, significantly reduce invalid sorting, and prevent local reordering failures or missorting due to boundary index errors.
[0045] If the starting position is not an invalid identifier, then obtain the number of valid tasks in the candidate task set. And the number of valid tasks is compared with the preset batching threshold. Comparison. If the number of valid tasks exceeds the preset batching threshold, i.e. Then, the preset number of tasks after the starting position are sorted in batches. The upper bound of the sorting complexity is then... This approach is suitable for scenarios where no appending is required, necessitating the maintenance of the insertion premise. This step binds the amount of rearrangement to the affected range. The default implementation is a three-branch decision, with optional implementations including dynamic K-batching. Dynamic K-batching is suitable for scenarios with fluctuating traffic, minimizing necessary rearrangements and shifting the average complexity from a fixed total load to one related to the affected scale, thus matching the rearrangement cost to the affected scale. Otherwise, tasks from the starting position to the end of the candidate task set are suffix-sorted, and the sorted tasks are merged with the unsorted tasks. Suffix sorting range complexity ,in This is due to the cost of merging or binary insertion. This step is the core coupling point between the decision layer and the execution layer, and it involves reading... The candidate range is written after rearrangement. Compared to the common full sorting in each round, this application can skip or partially rearrange in a large number of rounds. If the branch execution is wrong, performance fallback or order error will occur. Therefore, it is necessary to ensure that the index-driven logic is accurate.
[0046] In this process, whether performing batch sorting or suffix sorting, the system uses a conventional sorting algorithm and checks for anomalies during the sorting process. Conventional sorting is typically performed using a chained comparator (CMP). If no anomalies occur, the output of the conventional sorting algorithm is used as the sorted sequence. If an anomaly occurs, such as boundary data triggering a sorting contract exception, the system switches to a degraded sorting algorithm to re-execute the sorting. The degraded sorting algorithm is either merge sort or forced unique key comparison sort, and its formula is as follows: If there are no abnormalities, otherwise The output of the degradation sorting algorithm is used to determine the sorted process sequence, and degradation markers are generated for audit traceability. Even if the comparator is unstable under boundary conditions, the scheduling process must be guaranteed to remain unbroken. The default implementation uses a two-level fallback: sort->mergeSort. Pre-validation is suitable for offline operation, while forced degradation is suitable for online keep-alive operation.
[0047] After generating the degradation flag, the system completes the state change, reads the abnormal state and candidate list, and writes the backfill result and degradation flag. The degradation flag can be used for auditing and subsequent strategy optimization, avoiding a single sorting anomaly that could cause a complete process interruption and improving robustness. Compared to common sorting anomalies that lead to direct failure, this application provides a safe fallback path for sustainable execution. Without a fallback, online tasks would be stuck and scheduling would be interrupted; therefore, this step is crucial for maintaining the stability of advanced planning and scheduling systems at a scale of hundreds of thousands of processes. By combining anomaly capture and degradation semantics, the system can significantly reduce the overhead of invalid reordering and memory migration while maintaining business sorting consistency, forming a dynamic baseline-driven incremental sorting closed loop. This ensures that in multi-strategy dynamic threshold scenarios, it simultaneously achieves comprehensive technical effects of controllable overhead, semantic consistency, and reproducible results.
[0048] Based on the above embodiments, this embodiment further includes, after obtaining the candidate task set and before scheduling iteration processing, initializing the logical offset pointer. Point to candidate task set The starting location of the storage is used to establish a mapping between logical indexes and physical indexes, using the following formula: In the process of polling the candidate task set based on logical offset pointers, the logical offset pointer is updated in each iteration to point to the storage location of the currently pending task. Task data is accessed based on the logical offset pointer, keeping the physical storage location of the task data in the candidate task set unchanged. This mechanism avoids the immediate relocation caused by physical deletion, provides infrastructure support for subsequent low-relocation polling, and ensures that data access is achieved through offset calculation rather than physical memory copying.
[0049] By maintaining pointer offsets, the high-frequency "task retrieval" operation is made lighter. A comparison of polling amortized complexity shows that using offset polling... Traditional head deletion method In the process of polling the candidate task set based on logical offset pointers, the system significantly reduces memory copying, stabilizing the complexity of the polling phase at a level close to... Compared to the common method of deleting and moving headers, this application reduces moving costs through offsetting and deduplication, ensuring high throughput in large-scale polling scenarios and avoiding performance degradation caused by frequent memory operations. The state change indicates a read operation. Write .
[0050] When the accumulated offset of the logical offset pointer reaches the preset compression threshold, a memory compression operation is performed. The system moves the valid task data to the starting storage location and resets the logical offset pointer, completing the low-frequency defragmentation memory consolidation process. This is a one-time cost and should not be included in each round's main path. Optional implementations include compression threshold triggering or asynchronous background compression. Without this step, the system will experience significant throughput bottlenecks in large-scale polling scenarios. Through low-movement polling of candidate sets and delayed compression steps, the system maximizes memory access efficiency while ensuring data validity, supporting the stable operation of the dynamic benchmark-driven incremental sorting closed loop. Alternatively, a compressed container can be used to ensure a compact storage structure.
[0051] This application is applicable to scenarios with a scale of hundreds of thousands of processes. Thanks to the incremental reordering driven by the affected index and the low-movement polling mechanism of the candidate set, the system can withstand large-scale ordered sets of candidate tasks. This introduces computational and memory overhead. It is suitable for scenarios with multiple policy dimensions and high threshold coverage, due to the establishment of a dynamic baseline value. With the enable threshold policy subset The maintenance system is capable of handling multiple access control policy sequences. And takes effect and includes threshold tolerance Complex logic. Suitable for injection molding or discrete manufacturing scheduling with high-frequency expansion and contraction of candidate sets, using logical offset pointers. With delayed compression mechanisms, it adapts to additional task sets. Frequent generation and departure tasks The frequent dequeueing change pattern avoids throughput bottlenecks caused by physical head deletion and relocation.
[0052] This application's reordering trigger converges from a baseline change to a task flip change, reducing invalid sorting. Specifically, it calculates the task's state flags relative to the old and new baseline values. Only when the task attribute value crosses the threshold neighborhood boundary Reordering is triggered only when the state changes, not when the base value changes. Any numerical fluctuations. The high-frequency polling phase is approaching. Using the mapping formula between logical indexes and physical indexes This reduces the complexity of polling from the traditional header. Stable at Horizontal. Maintaining sorting stability and traceability in large-scale scenarios by writing identifiers through sorting. Record the global sequence of tasks and combine it with security degradation flags to ensure that the results are auditable and consistent across rounds.
[0053] Compared to common technical approaches, this application offers a more refined update path, converging from baseline changes to task-reversal changes. It exhibits stronger semantic consistency, unifying comparison semantics, baseline maintenance, and affected judgment within the same symbol system, avoiding inconsistencies in subsequent baseline maintenance and rearrangement due to inconsistent semantic definitions. Parallel extreme value handling is reproducible; a unique key comparison rule is added to the final stage of the chained comparator to determine a unique task identifier, disambiguating and preventing cross-wheel jitter. Change outputs are standardized, with the first affected index... It can directly interface with downstream execution and auditing modules through degradation marking. The engineering implementation is more complete, covering the entire chain of judgment, execution, container maintenance and anomaly fallback, providing a safe fallback path for sustainable execution, and ensuring the process does not break down through degradation sorting algorithm, avoiding online task deadlock and scheduling interruption.
[0054] Secondly, embodiments of this application provide a process sequencing system for planning and scheduling, comprising: a candidate task acquisition module, a baseline value determination module, a baseline value update module, an affected range determination module, and an incremental sorting execution module. The candidate task acquisition module is used to acquire a candidate task set, which contains multiple process tasks to be scheduled. The baseline value determination module is used to determine the baseline value of the candidate task set based on the comparison attribute values of the tasks in the candidate task set. The baseline value update module is used to update the baseline value according to the changes in the candidate task set during the iterative processing of the scheduling process. The affected range determination module is used to determine the affected range where the task status in the candidate task set is reversed based on the updated baseline value and a preset threshold tolerance, and to determine the starting position for reordering according to the affected range. The incremental sorting execution module is used to perform incremental sorting operations on the tasks in the candidate task set starting from the starting position to obtain the sorted process sequence.
[0055] The functions of each module in the above-mentioned process sequencing system for planning and scheduling correspond to the steps in the above-mentioned process sequencing method embodiment for planning and scheduling. Their functions and implementation processes will not be described in detail here.
[0056] Thirdly, embodiments of this application provide a process sequencing device for planning and scheduling. The process sequencing device for planning and scheduling can be a personal computer (PC), a laptop computer, a server, or other devices with data processing capabilities.
[0057] In this embodiment of the application, the process sequencing device for planning and scheduling may include a processor, a memory, a communication interface, and a communication bus.
[0058] The communication bus can be of any type and is used to interconnect the processor, memory, and communication interface.
[0059] Communication interfaces include input / output (I / O) interfaces, physical interfaces, and logical interfaces used for interconnecting devices within the scheduling-oriented process sequencing equipment, as well as interfaces used for interconnecting the scheduling-oriented process sequencing equipment with other devices (such as other computing devices or user equipment). Physical interfaces can be Ethernet interfaces, fiber optic interfaces, ATM interfaces, etc.; user equipment can be displays, keyboards, etc.
[0060] Memory can be various types of storage media, such as random access memory (RAM), read-only memory (ROM), non-volatile RAM (NVRAM), flash memory, optical storage, hard disk, programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), etc.
[0061] The processor can be a general-purpose processor, which can call a scheduling-oriented process sequencing program stored in memory and execute the scheduling-oriented process sequencing method provided in the embodiments of this application. For example, the general-purpose processor can be a central processing unit (CPU). The method executed when the scheduling-oriented process sequencing program is called can be referred to in the various embodiments of the scheduling-oriented process sequencing method of this application, and will not be repeated here.
[0062] Fourthly, embodiments of this application also provide a computer-readable storage medium.
[0063] The present application provides a computer-readable storage medium storing a scheduling-oriented process sequencing program, wherein when the scheduling-oriented process sequencing program is executed by a processor, it implements the steps of the scheduling-oriented process sequencing method described above.
[0064] The method implemented when the process sequencing procedure oriented towards planning and scheduling is executed can be referred to in the various embodiments of the process sequencing method oriented towards planning and scheduling in this application, and will not be repeated here.
[0065] It should be noted that the sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0066] The terms "comprising" and "having," and any variations thereof, in the specification, claims, and accompanying drawings of this application are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to such process, method, product, or apparatus. The terms "first," "second," and "third," etc., are used to distinguish different objects, etc., and do not indicate a sequence, nor do they limit "first," "second," and "third" to different types.
[0067] In the description of the embodiments of this application, terms such as "exemplary," "for example," or "for instance" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as "exemplary," "for example," or "for instance" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of terms such as "exemplary," "for example," or "for instance" is intended to present the relevant concepts in a concrete manner.
[0068] In the description of the embodiments of this application, unless otherwise stated, " / " means "or". For example, A / B can mean A or B. The "and / or" in the text is merely a description of the relationship between related objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist simultaneously, and B exists alone. In addition, in the description of the embodiments of this application, "multiple" means two or more.
[0069] In some processes described in the embodiments of this application, multiple operations or steps are included in a specific order. However, it should be understood that these operations or steps may not be executed in the order they appear in the embodiments of this application, or they may be executed in parallel. The sequence number of the operation is only used to distinguish different operations, and the sequence number itself does not represent any execution order. In addition, these processes may include more or fewer operations, and these operations or steps may be executed sequentially or in parallel, and these operations or steps may be combined.
[0070] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes several instructions to cause a terminal device to execute the methods described in the various embodiments of this application.
[0071] The above are merely preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.
Claims
1. A process sequencing method oriented towards planning and scheduling, characterized in that, It includes: Obtain a candidate task set, which contains multiple process tasks to be scheduled for production; Based on the comparison attribute values of the tasks in the candidate task set, a baseline value for the candidate task set is determined. During the scheduling iterative processing of the candidate task set, the baseline value is updated according to the changes in the candidate task set; Based on the updated baseline value and the preset threshold tolerance, the affected range of task status reversal in the candidate task set is determined, and the starting position of reordering is determined according to the affected range. Starting from the initial position, perform an incremental sorting operation on the tasks in the candidate task set to obtain a sorted process sequence.
2. The process sequencing method for planning and scheduling as described in claim 1, characterized in that, Based on the comparison attribute values of the tasks in the candidate task set, a baseline value for the candidate task set is determined, specifically including: Identify the target ranking strategy for enabling threshold tolerance applied to the candidate task set; Obtain the comparison attribute values of each process task in the candidate task set under the target sorting strategy; According to the sorting direction of the target sorting strategy, the extreme value is selected from the comparison attribute values as the benchmark value, and the identification information of the target process task that generates the extreme value is recorded. The sorting direction includes ascending or descending order, and the extreme value corresponds to the minimum or maximum value among the comparison attribute values.
3. The process sequencing method for planning and scheduling as described in claim 2, characterized in that: Identifying the target ranking strategy for enabling threshold tolerance applied to the candidate task set specifically includes: Obtain a preset admission policy sequence applied to the candidate task set; Traverse the preset admission policy sequence and check the threshold tolerance enable flag configured for each admission policy; The threshold tolerance enable is marked as valid, and the strategy that enables threshold tolerance is determined as the target sorting strategy. The comparison process of the comparison attribute values includes: Construct a chained comparator to compare data sequentially according to multiple sorting strategies; A unique key comparison rule is added to the final stage of the chained comparator. When multiple tasks have the same comparison attribute value, a unique task identifier is determined based on the unique key comparison rule, and the unique task identifier is used as the identification information of the target process task that generates the extreme value.
4. The process sequencing method for planning and scheduling as described in claim 1, characterized in that, During the iterative processing of the candidate task set in the scheduling process, the baseline value is updated according to the changes in the candidate task set, specifically including: Get the departure task identifiers in the current iteration round, as well as the additional task set newly added to the candidate task set; Save the baseline value before the update as the old baseline value, and obtain the old baseline task identifier that generated the old baseline value before the update; Determine whether the departure task identifier is consistent with the old baseline task identifier; If they are inconsistent, the old benchmark value is kept unchanged and determined as the candidate benchmark value. If they are consistent, the extreme value is reselected from the remaining candidate task set as the candidate benchmark value, and the task identifier that generated the candidate benchmark value is recorded as the candidate benchmark task identifier. Based on the candidate benchmark values and the additional task set, the updated benchmark values are determined.
5. The process sequencing method for planning and scheduling as described in claim 4, characterized in that: Based on the candidate benchmark values and the set of additional tasks, the updated benchmark values are determined, specifically including: If the set of additional tasks is not empty, then an additional extreme value is selected from the set of additional tasks; If the additional extreme value is better than the candidate benchmark value, then the additional extreme value is determined as the updated benchmark value, and the additional task identifier that generated the additional extreme value is recorded as the new benchmark task identifier. If the set of additional tasks is empty, or the additional extreme value is not better than the candidate benchmark value, then the candidate benchmark value is determined as the updated benchmark value, and the candidate benchmark task identifier is determined as the new benchmark task identifier.
6. The process sequencing method for planning and scheduling as described in claim 1, characterized in that, The process of determining the affected range of task state reversals in the candidate task set based on the updated baseline value and a preset threshold tolerance, and determining the starting position for reordering based on the affected range, specifically includes: Get the old baseline value before the update and the new baseline value after the update; Using the preset threshold tolerance, calculate the first state label of each task in the candidate task set relative to the old benchmark value and the second state label relative to the new benchmark value. The state label is used to characterize whether the task attribute value falls within the threshold neighborhood of the benchmark value. By comparing the first state marker and the second state marker, the task of state flipping where the state marker has changed is determined; If there are tasks whose states are reversed, the set of tasks whose states are reversed is determined as the affected range, and the starting position of the reordering is determined according to the minimum index position of the tasks in the affected range. If there is no task that performs the state reversal, the starting position of the reordering is set to an invalid flag.
7. The process sequencing method for planning and scheduling as described in claim 6, characterized in that, Starting from the initial position, an incremental sorting operation is performed on the tasks in the candidate task set, specifically including: Determine whether the starting position of the reordering is the invalid identifier; If the identifier is invalid, skip this sorting operation; If the starting position is not the invalid identifier, then obtain the number of valid tasks in the candidate task set and compare the number of valid tasks with the preset batching threshold; If the number of valid tasks is greater than the preset batching threshold, then the preset number of tasks after the starting position are sorted in batches. Otherwise, the tasks from the starting position to the end of the candidate task set are sorted by suffix, and the sorted tasks are merged with the unsorted tasks.
8. The process sequencing method for planning and scheduling as described in claim 7, characterized in that, Perform batch sorting or suffix sorting, specifically including: The system uses a conventional sorting algorithm to sort the data and checks for any anomalies during the sorting process. If no anomalies occur, the output of the conventional sorting algorithm is determined as the sorted process sequence. If an anomaly occurs, the algorithm is switched to a degraded sorting algorithm to re-execute the sorting. The output of the degraded sorting algorithm is determined as the sorted process sequence, and a degraded flag is generated for audit traceability. The degradation sorting algorithm is either merge sort or forced unique key comparison sort.
9. The process sequencing method for planning and scheduling as described in claim 1, characterized in that, After obtaining the candidate task set and before the scheduling iteration process, the process also includes: Initialize the logical offset pointer, which points to the starting storage location of the candidate task set; During the process of polling the candidate task set based on the logical offset pointer, the logical offset pointer is updated in each iteration to point to the storage location of the currently pending task. The task data is accessed based on the logical offset pointer, while keeping the physical storage location of the task data in the candidate task set unchanged. When the accumulated offset of the logical offset pointer reaches a preset compression threshold, a memory compression operation is performed to move the valid task data to the storage start position and reset the logical offset pointer.
10. A process sequencing system oriented towards planning and scheduling, characterized in that, It includes: A candidate task acquisition module is used to acquire a set of candidate tasks, which includes multiple process tasks to be scheduled for production. A benchmark value determination module is used to determine a benchmark value for the candidate task set based on the comparison attribute values of the tasks in the candidate task set. A baseline value update module is used to update the baseline value according to the changes in the candidate task set during the scheduling iterative processing of the candidate task set. The affected range determination module is used to determine the affected range of task status flipping in the candidate task set based on the updated baseline value and the preset threshold tolerance, and to determine the starting position of reordering according to the affected range. The incremental sorting execution module is used to perform incremental sorting operations on the tasks in the candidate task set starting from the starting position to obtain the sorted process sequence.