Germplasm library task scheduling optimization method based on rule engine and neural network

By combining the rule engine with the Graphormer model of the graph neural network, a task resource graph and a scheduling rule library were constructed, which solved the problems of dynamic optimization and rule constraints in germplasm bank task scheduling, realized intelligent and adaptive scheduling optimization, and improved the feasibility of the scheduling system and resource utilization efficiency.

CN120764951AInactive Publication Date: 2025-10-10ANHUI YIHAIYUN TECH CO LTD
View PDF 0 Cites 5 Cited by

Patent Information

Application Number
CN202510924994.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-04
Publication Date
2025-10-10
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing germplasm bank task scheduling methods lack dynamic optimization capabilities and rule constraint expression capabilities, and are difficult to adapt to changes in task load and fluctuations in resource availability. Traditional rule-driven methods lack learning capabilities, and scheduling models based solely on neural networks lack interpretability and structural control.

Method used

The Graphormer model, which integrates the rule engine and graph neural network, automatically identifies conflicts and generates the optimal scheduling plan by building a task resource graph and a scheduling rule library, combining rule perception with neural network prediction, achieving high scheduling efficiency, strong adaptability, and controllable rules.

Benefits of technology

Intelligent and adaptive scheduling optimization is achieved under the constraints of complex business rules, which improves the feasibility, controllability and resource utilization efficiency of the scheduling system, and can quickly adapt to changes in business rules and generate the optimal scheduling plan.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120764951A_ABST
    Figure CN120764951A_ABST
Patent Text Reader

Abstract

The invention discloses a germplasm library task scheduling optimization method based on a rule engine and a neural network. The germplasm library task scheduling optimization method comprises the following steps: S1, collecting an original data set related to task scheduling in a germplasm library; s2, preprocessing the original data set; s3, constructing a task resource map; s4, constructing a scheduling rule base, and analyzing the scheduling rule based on a rule engine; s5, based on a Grapher model of rule perception, carrying out modeling on a global structure relationship between the task and the resource, and outputting a scheduling prediction scheme; and S6, optimizing and adjusting the scheduling prediction scheme, generating an optimized scheduling scheme, and executing the task scheduling plan according to the optimized scheduling scheme. According to the method, the rule engine and the graph neural network are fused, intelligent optimization of germplasm library task scheduling is achieved, and the method has the advantages of being high in adaptability, controllable in constraint and high in efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of scheduling optimization technology, and in particular to a germplasm bank task scheduling optimization method based on a rule engine and a neural network. Background Art

[0002] As important basic data for agricultural scientific research and breeding improvement, the collection, storage, circulation and processing of germplasm resources are characterized by high process and task intensiveness in scientific research infrastructure such as national germplasm banks. With the rapid increase in the number of samples, the diversification of task types and the complexity of resource structure, traditional manual scheduling and static scheduling schemes can no longer meet the actual operation and maintenance needs. At present, the task scheduling method in germplasm banks generally adopts a rule-driven approach, that is, based on manually set scheduling logic, the execution order and resource allocation of tasks are arranged through static schedulers or scheduling templates. Although this method has strong controllability and clear structure, it lacks dynamic optimization capabilities and cannot cope with scenarios such as changes in task load, fluctuations in resource availability or dynamic adjustment of rules.

[0003] In recent years, the application of neural network models in the fields of task scheduling and resource allocation has gradually increased. As shown in the figure, neural networks can be used to model the structural relationship between tasks, and the Transformer structure has also achieved good results in process optimization and multi-task modeling. However, most of the existing scheduling optimization methods based on neural networks ignore the strong business rule constraints in the industry. Although the model has a certain generalization ability, it lacks interpretability and controllability, and the scheduling results are difficult to meet the business specifications of complex fields, such as the processing order of germplasm samples, equipment concurrency restrictions, resource exclusivity requirements, etc. Therefore, a single scheduling scheme based on neural networks is unstable in actual deployment and lacks a reliable rule guarantee mechanism.

[0004] In summary, existing scheduling technologies face two major challenges: First, rule-driven approaches lack learning and dynamic optimization capabilities, making them difficult to adapt to the complexity and variability of germplasm bank task scheduling; second, scheduling models based solely on neural networks struggle to express and integrate constraints within complex rule systems, lacking structural control capabilities. Therefore, there is an urgent need for a method that combines the interpretability of rule engines with the predictive optimization capabilities of neural networks to achieve intelligent, adaptive optimization of the task scheduling process and ensure its feasibility and controllability within a rule-based system. Summary of the Invention

[0005] One purpose of the present invention is to propose a germplasm bank task scheduling optimization method based on a rule engine and a neural network. The present invention integrates the rule engine and the Graphormer model in the graph neural network to model and predict the relationship between germplasm bank tasks and resources, and realizes scheduling optimization under the constraints of complex business rules. Through structured rule parsing and model joint learning, the system can automatically identify conflicts, adjust priorities and generate optimal solutions. It has the advantages of high scheduling efficiency, strong adaptability, controllable rules, and predictable conflicts. It is particularly suitable for scientific research task scenarios with limited resources and complex rules.

[0006] According to an embodiment of the present invention, a germplasm bank task scheduling optimization method based on a rule engine and a neural network includes the following steps:

[0007] S1. Collect the original data sets related to task scheduling in the germplasm bank;

[0008] S2. Preprocess the original data set to generate structured task feature vectors and resource feature vectors;

[0009] S3, constructing a task resource graph based on the task feature vector and the resource feature vector;

[0010] S4. Build a scheduling rule library and parse the scheduling rules based on the rule engine to generate a scheduling constraint set;

[0011] S5. Input the task resource graph into the rule-aware Graphormer model to model the global structural relationship between tasks and resources and output a scheduling prediction plan.

[0012] S6. Process the scheduling prediction plan and the scheduling constraint set, optimize and adjust the scheduling prediction plan, generate an optimized scheduling plan, and execute the task scheduling plan according to the optimized scheduling plan.

[0013] Optionally, the original data set includes task characteristics and resource characteristics, the task characteristics include task type, sample category, task priority, time window and expected task execution time, and the resource characteristics include resource type, available status, time interval, unit processing capacity and load status.

[0014] Optionally, the preprocessing includes abnormal data removal, normalization of continuous values, and one-hot encoding of categorical fields or discrete state fields.

[0015] Optionally, the S3 specifically includes:

[0016] S31. Initialize a task resource graph based on the task feature vector and the resource feature vector, wherein the node set of the task resource graph includes a task node set and a resource node set;

[0017] For each task, a task node is added in the task-resource graph, and the corresponding task feature vector is assigned as the node attribute;

[0018] For each resource, a resource node is added in the task-resource graph, and the corresponding resource feature vector is assigned as the node attribute;

[0019] S32, according to the order dependency relationship between tasks, a task dependency edge set is constructed, the task dependency edge represents that a task needs to be completed before another task, and the order difference weight is set to the edge attribute of the task dependency edge:

[0020]

[0021] ω ij represents the order difference weight between task T j and task T i , represents the normalized priority of task T j , represents the normalized priority of task T i ;

[0022] S33, according to the resource information required by the task, an allocation edge set between the task and the resource is constructed, the allocation edge represents that the task depends on the resource, and an edge feature vector is attached to each allocation edge:

[0023]

[0024] e iq represents the edge feature vector between task T i and resource R q , represents the normalized unit processing capacity of resource R q , which describes the processing capacity of the resource, Δt q represents the time period length of resource R q , which is obtained by the difference between the resource start time and the resource end time;

[0025] S34, for the task pair with resource use conflict, a resource conflict edge set is constructed, each resource conflict edge is attached with a conflict flag bit, the conflict flag bit represents whether there is conflict between tasks in the resource, 1 represents conflict, otherwise represents no conflict;

[0026] S35, according to the time constraint condition of the task, a time sequence edge set is constructed, and a time interval weight is attached to the time sequence edge:

[0027]

[0028] τ ij represents the time interval weight between task T jStart with Task T i The time interval weight between completions, Represents task T j The scheduling start time, Represents task T i The scheduling end time;

[0029] S36. The task dependency edge set, the allocation edge set, the resource conflict edge set, and the time sequence edge set are unified and merged into the edge set of the task resource graph, and the final task resource graph is constructed based on the node set and the edge set.

[0030] Optionally, the S4 specifically includes:

[0031] S41. Construct a scheduling rule base, which consists of structured rule entries. Each rule entry is expressed as:

[0032] B k =(Cond k ,Cons k );

[0033] Among them, B k Indicates the kth rule entry, Cond k Indicates the triggering conditions of the rule, Cons k Represents the scheduling constraint expression to be applied when the trigger condition is met, and the trigger condition is a logical expression based on the task feature vector, resource feature vector and their associated attributes;

[0034] S42. Representing rule entries in a structured syntax format and programmatically expressing them in JSON format, wherein the scheduling rules include task dependency rules, sample processing time limit rules, device concurrency restriction rules, resource exclusivity constraint rules, and task execution time window rules;

[0035] S43. Parsing the structured rule entries in the scheduling rule base through a rule engine. The rule engine is based on a forward chain reasoning mechanism and includes:

[0036] Extract all node attributes and edge attributes in the task resource graph as key-value pair structures and load them into the rule engine working memory to form a structured fact set required for rule matching;

[0037] Load all rule entries in the scheduling rule base into the rule storage area of ​​the rule engine;

[0038] Load rule entries one by one and perform pattern matching on the triggering conditions of the rules, and find the data item combination that meets the triggering conditions in the structured fact set;

[0039] The pattern matching enumerates or scans all combinations of node attributes and edge attributes in the task resource graph to determine which combinations meet the triggering conditions in a specific rule;

[0040] For successfully matched rule entries, activate the corresponding scheduling constraint expressions;

[0041] Summarize all activated scheduling constraint expressions into a scheduling constraint set;

[0042] S44. For rule entries containing quantitative constraints, relevant parameters are extracted and parameterized constraints are defined. The parameterized constraints include the task start time, the maximum number of concurrently executed tasks for a resource, the minimum scheduling time interval between tasks, and a conflict flag. The rule entry containing quantitative constraints indicates that the trigger condition or constraint expression contains a numerical field related to the task or resource. When parsing such rule entries, the rule engine performs numerical matching and comparison on the node attributes or edge attributes in the task resource graph to generate a scheduling constraint item with a parameterized expression:

[0043] S45. The parameterized constraints are uniformly classified into a scheduling constraint set in the form of a structured expression of rule entries.

[0044] Optionally, the S5 specifically includes:

[0045] S51. Construct a node feature matrix based on the task feature vector and the resource feature vector, and construct a unified edge attribute matrix based on the edge attributes attached to each edge of the task resource graph;

[0046] S52. Calculate the rule constraint impact on each edge in the task resource graph, and generate a rule perception vector. The rule perception vector represents the constraint characteristics of the scheduling rule on the edge connection relationship.

[0047] The process of generating a rule perception vector includes:

[0048] Perform pattern matching on each edge in the task resource graph and the structured rule entries in the scheduling rule base to identify whether the edge meets the triggering conditions of the rule;

[0049] If the match is successful, the sequential dependency, resource conflict, time interval, and device restriction information of this edge are extracted and encoded into a unified structured vector as the rule-aware vector corresponding to the edge;

[0050] S53. Concatenate the edge attribute vector and the rule-aware vector of each edge to obtain an extended edge attribute vector and form an extended edge attribute matrix. Input the node feature matrix and the extended edge attribute matrix into the rule-aware Graphormer model, and perform feature representation update based on the edge attribute enhanced attention mechanism:

[0051]

[0052] in, represents the feature representation of node v in the l+1th layer, represents the feature representation of the l-th layer node v, W represents the node feature linear mapping matrix, a represents the weight vector of the attention mechanism, || represents the vector splicing operation, σ represents the ReLU activation function, represents the set of neighbor nodes adjacent to node v, LeakyReLU represents the nonlinear activation function, exp represents the natural exponential function, T represents the transposition operation, b vu represents the extended edge attribute vector between node v and node u, b vk The extended edge attribute vector between node v and node k, represents the feature representation of node k in layer l, represents the feature representation of the l-th layer node u, α vu represents the attention score vector between node v and node u, ∈ represents “belongs to”;

[0053] S54. During the Graphormer model training phase, in order to guide the Graphormer model to learn the consistency of scheduling rules, the scheduling structure constraint loss is introduced into the total loss function to penalize the prediction of scheduling order violations:

[0054]

[0055] in, represents the scheduling structure constraint loss, Represents the scheduling order set output by the rule engine, Represents the task T predicted by the Graphormer model i and T j The start time, δ represents the scheduling tolerance factor, and max represents the maximum value;

[0056] The total loss function includes time prediction regression loss, resource allocation classification loss, task execution sequence ranking loss and scheduling structure constraint loss, the time prediction regression loss adopts mean square error loss, the resource allocation classification loss adopts cross entropy loss, and the task execution sequence ranking loss adopts Listwise ranking loss;

[0057] The Graphormer model is trained using supervised learning. The Adam optimizer is used in the training process to train the model parameters by minimizing the total loss function.

[0058] S55. After the trained Graphormer model is propagated through the L-layer network, the feature representation of the L-layer is obtained and input into the scheduling decoder layer. The scheduling decoder layer includes:

[0059] The priority sorting sublayer, based on a multi-layer perceptron, calculates the priority score based on the feature representation;

[0060] The time regression sublayer uses a dual-output regression function to output the predicted start and end times;

[0061] The conflict prediction sublayer uses a binary classification neural network to predict the probability of a conflict for each task, and then sets a threshold to determine whether there is a conflict;

[0062] The resource allocation sublayer concatenates the feature representations of tasks and resources and inputs them into a multi-layer perceptron to obtain the matching value between tasks and resources and select the optimal resource node.

[0063]

[0064] Among them, R i Represents the i-th resource node, argmin represents the variable value that maximizes the function value. Represents task T i With Resource R i The matching value is output by the multi-layer perceptron, where L represents the number of layers of network propagation. Represents task T i In the feature representation of layer L, Represents resource R i Feature representation at layer L;

[0065] Finally, a scheduling prediction plan is generated, which includes task nodes, predicted start time and predicted end time of the task, task priority, conflict prediction flag and optimal resource node.

[0066] Optionally, the S6 specifically includes:

[0067] S61. Based on the predicted start time, predicted end time, and resource allocation number of each task, pattern matching is performed against all rule entries in the scheduling constraint set. If a task violates any rule, the conflict prediction flag is marked as 1, indicating a scheduling conflict. If all rules are met, the flag is marked as 0.

[0068] S62. For tasks with a conflict prediction flag of 1, extract the violated rule entries and adjust the original priority score of the task based on the penalty adjustment coefficient of each rule to generate a revised priority score. The adjusted priority score reflects the actual scheduling priority of the task under the constraint environment:

[0069]

[0070] Among them, Score ′ (T k ) is task T k The corrected priority score, λ represents the penalty adjustment coefficient, ω j represents the constraint strength weight, Represents task T k The set of scheduling constraints violated, C j represents the jth constraint rule that is violated, T k represents the kth task identified as violating the scheduling rule;

[0071] S63. Reorder the tasks according to the revised priority scores of all tasks, and adopt the existing sliding window-based scheduling optimization strategy to jointly adjust the start time, end time and resource allocation of all tasks on the premise of satisfying task dependencies, resource constraints and time constraints to form an optimized scheduling plan.

[0072] The beneficial effects of the present invention are:

[0073] First, the present invention proposes a germplasm bank task scheduling optimization method based on the fusion of rule engine and neural network. Under the premise of ensuring that task execution complies with complex business rules, neural network is introduced for scheduling prediction and optimization, which effectively overcomes the shortcomings of traditional scheduling methods in terms of dynamics, adaptability and intelligence. By using the rule engine in conjunction with the graph structure-aware Graphormer model, it not only retains the controllability and interpretability of the rule-driven method, but also introduces the model's learning and generalization capabilities based on historical task data, thereby improving the optimization level of the scheduling strategy.

[0074] Secondly, compared with the existing scheduling system, the present invention has stronger structural modeling and conflict identification capabilities. The global dependency relationship between tasks and resources is encoded as a task resource graph. Through multi-dimensional feature modeling of nodes and edges, combined with the rule perception mechanism, the model's understanding of scheduling constraints is enhanced, thereby realizing the feasibility judgment of scheduling under complex constraints. At the same time, by introducing conflict prediction flags and priority correction mechanisms, the scheduling results can be reasonably adjusted to avoid potential conflicts and improve the stability of task execution and resource utilization efficiency.

[0075] In addition, the present invention also parameterizes the scheduling rules and links them with the graph neural structure, so that the scheduling rules not only participate in constraint generation in a static manner, but also deeply participate in the model training and prediction process in a structured form, thereby improving the consistency between the scheduling results and the rule system, supporting continuous learning and rule evolution, and being able to quickly adapt and generate the optimal scheduling plan after the scheduling mode changes or the business rules are adjusted, thereby meeting the germplasm bank's requirements for high reliability, high adaptability and high execution efficiency in actual operation. BRIEF DESCRIPTION OF THE DRAWINGS

[0076] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:

[0077] Figure 1 This is a flowchart of a germplasm bank task scheduling optimization method based on rule engine and neural network proposed by the present invention;

[0078] Figure 2 This is a schematic diagram of the structure of a rule-aware Graphormer model for a germplasm bank task scheduling optimization method based on a rule engine and a neural network proposed in the present invention;

[0079] Figure 3 This is a schematic diagram of the structured rule entry composition and rule engine parsing mechanism of the scheduling rule library of the germplasm bank task scheduling optimization method based on rule engine and neural network proposed in the present invention. DETAILED DESCRIPTION

[0080] The present invention will now be described in further detail with reference to the accompanying drawings, which are simplified schematic diagrams that illustrate the basic structure of the present invention in a schematic manner.

[0081] refer to Figure 1-3 A germplasm bank task scheduling optimization method based on rule engine and neural network includes the following steps:

[0082] S1. Collect the original data sets related to task scheduling in the germplasm bank;

[0083] S2. Preprocess the original data set to generate structured task feature vectors and resource feature vectors;

[0084] S3, constructing a task resource graph based on the task feature vector and the resource feature vector;

[0085] S4. Build a scheduling rule library and parse the scheduling rules based on the rule engine to generate a scheduling constraint set;

[0086] S5. Input the task resource graph into the rule-aware Graphormer model to model the global structural relationship between tasks and resources and output a scheduling prediction plan.

[0087] S6. Process the scheduling prediction plan and the scheduling constraint set, optimize and adjust the scheduling prediction plan, generate an optimized scheduling plan, and execute the task scheduling plan according to the optimized scheduling plan.

[0088] This paper constructs a scheduling optimization method that integrates a rules engine and a graph neural network, connecting the entire process of task feature modeling, rule constraint expression, neural network prediction, and scheduling solution optimization. This approach enables global modeling and intelligent optimization of complex germplasm bank scheduling tasks. This method not only effectively expresses business rules such as task dependencies and resource conflicts, but also enables continuous learning and optimization decision-making based on historical data. Compared to traditional static scheduling methods, this method possesses higher intelligence, adaptability, and controllability, significantly improving resource utilization efficiency and the overall performance of task scheduling.

[0089] In this embodiment, the original data set includes task characteristics and resource characteristics. The task characteristics include task type, sample category, task priority, time window and expected task execution time. The resource characteristics include resource type, available status, time interval, unit processing capacity and load status.

[0090] By defining the structural composition of task characteristics and resource characteristics, the present invention enables standardized expression of key information such as task type, priority, time window and resource processing capability during data collection, providing a clear data basis for subsequent feature encoding, graph construction and scheduling optimization. By expressing scheduling-related elements in vector form, it not only improves the consistency of data expression, but also enhances the adaptability of the neural network model to business scenarios, thereby making scheduling predictions more targeted and effective, and improving the accuracy and flexibility of the overall scheduling system.

[0091] In this embodiment, the preprocessing includes abnormal data removal, normalization of continuous values, and one-hot encoding of categorical fields or discrete state fields.

[0092] The present invention performs structured preprocessing on the raw data, including outlier removal, numerical normalization, and categorical field encoding, effectively improving data quality and consistency with model input, and solving problems such as inconsistent germplasm bank data formats and complex field types. The use of standardized encoding and normalization processing not only helps to improve the stability of neural network training, but also ensures the comparability of features of different types of tasks and resources in the vector space, providing a reliable feature basis for subsequent graph construction and model training, thereby enhancing the model's predictive and generalization capabilities.

[0093] In this embodiment, S3 specifically includes:

[0094] S31. Initialize a task resource graph based on the task feature vector and the resource feature vector, wherein the node set of the task resource graph includes a task node set and a resource node set;

[0095] For each task, add a task node to the task resource graph and assign the corresponding task feature vector as the node attribute;

[0096] For each resource, add a resource node in the task resource graph and assign the corresponding resource feature vector as the node attribute;

[0097] S32. Construct a set of task dependency edges based on the sequential dependency relationship between tasks. The task dependency edges indicate that a task must be completed before another task. Set a sequence difference weight for the edge attributes of the task dependency edges:

[0098]

[0099] Among them, ω ij Represents task T j With Task T i The order difference weight between Represents task T j The normalized priority of Represents task T i The normalized priority of

[0100] S33. Based on the resource information required by the task, a set of allocation edges between the task and the resource is constructed. The allocation edges represent the resource dependencies of the task, and an edge feature vector is added to each allocation edge:

[0101]

[0102] Among them, e iq Represents task T i With Resource R q The edge eigenvectors between Represents resource R q The normalized unit processing capacity, describing the processing capacity of resources, Δt q Represents resource R q The length of the time period is obtained by the difference between the resource start time and the resource end time;

[0103] S34. For task pairs with resource usage conflicts, a resource conflict edge set is constructed. A conflict flag is added to each resource conflict edge. The conflict flag indicates whether there is a resource conflict between the tasks. 1 indicates conflict, and otherwise indicates no conflict.

[0104] S35. Based on the time constraints of the task, a time sequence edge set is constructed, and time interval weights are added to the time sequence edges:

[0105]

[0106] Among them, τ ij Represents task T j Start with Task T i The time interval weight between completions, Represents task T j The scheduling start time, Represents task T i The scheduling end time;

[0107] S36. The task dependency edge set, the allocation edge set, the resource conflict edge set, and the time sequence edge set are unified and merged into the edge set of the task resource graph, and the final task resource graph is constructed based on the node set and the edge set.

[0108] By constructing a task-resource graph, this method transforms the key semantics of the scheduling process, such as task nodes and resource nodes, as well as their dependencies, conflicts, and time constraints, into a structured graph representation. This provides a learnable and modelable graph structure for the scheduling problem. Different types of edges carry rich edge attributes, helping neural networks capture the constraint logic and structural information in scheduling rules. Compared to traditional task tables or scheduling matrices, this method better preserves the temporal order and structural dependencies of scheduling elements, providing a highly abstract and operational representation foundation for scheduling models.

[0109] In this embodiment, the S4 specifically includes:

[0110] S41. Construct a scheduling rule base, which consists of structured rule entries. Each rule entry is expressed as:

[0111] B k =(Cond k ,Cons k );

[0112] Among them, B k Indicates the kth rule entry, Cond k Indicates the triggering conditions of the rule, Cons k Represents the scheduling constraint expression to be applied when the trigger condition is met, and the trigger condition is a logical expression based on the task feature vector, resource feature vector and their associated attributes;

[0113] S42. Representing rule entries in a structured syntax format and programmatically expressing them in JSON format, wherein the scheduling rules include task dependency rules, sample processing time limit rules, device concurrency restriction rules, resource exclusivity constraint rules, and task execution time window rules;

[0114] S43. Parsing the structured rule entries in the scheduling rule base through a rule engine. The rule engine is based on a forward chain reasoning mechanism and includes:

[0115] Extract all node attributes and edge attributes in the task resource graph as key-value pair structures and load them into the rule engine working memory to form a structured fact set required for rule matching;

[0116] Load all rule entries in the scheduling rule base into the rule storage area of ​​the rule engine;

[0117] Load rule entries one by one and perform pattern matching on the triggering conditions of the rules, and find the data item combination that meets the triggering conditions in the structured fact set;

[0118] The pattern matching enumerates or scans all combinations of node attributes and edge attributes in the task resource graph to determine which combinations meet the triggering conditions in a specific rule;

[0119] For successfully matched rule entries, activate the corresponding scheduling constraint expressions;

[0120] Summarize all activated scheduling constraint expressions into a scheduling constraint set;

[0121] S44. For rule entries containing quantitative constraints, relevant parameters are extracted and parameterized constraints are defined. The parameterized constraints include the task start time, the maximum number of concurrently executed tasks for a resource, the minimum scheduling time interval between tasks, and a conflict flag. The rule entry containing quantitative constraints indicates that the trigger condition or constraint expression contains a numerical field related to the task or resource. When parsing such rule entries, the rule engine performs numerical matching and comparison on the node attributes or edge attributes in the task resource graph to generate a scheduling constraint item with a parameterized expression:

[0122] S45. The parameterized constraints are uniformly classified into a scheduling constraint set in the form of a structured expression of rule entries.

[0123] The present invention proposes a rule engine parsing process based on a forward chain reasoning mechanism, which can logically match structured rule entries with task resource graphs and dynamically generate a scheduling constraint set, thereby realizing programmatic management and automatic identification of complex scheduling rules. By expressing rule entries as structured logical statements and parsing and applying them in JSON form, the standardization and extensibility of rule expression are improved. This method enables the rule system to co-evolve with the scheduling model, realizes the intelligent identification and parameterized expression of conditions such as rule conflicts and numerical restrictions, and enhances the controllability and compliance of the scheduling system.

[0124] In this embodiment, the S5 specifically includes:

[0125] S51. Construct a node feature matrix based on the task feature vector and the resource feature vector, and construct a unified edge attribute matrix based on the edge attributes attached to each edge of the task resource graph;

[0126] S52. Calculate the rule constraint impact on each edge in the task resource graph, and generate a rule perception vector. The rule perception vector represents the constraint characteristics of the scheduling rule on the edge connection relationship.

[0127] The process of generating a rule perception vector includes:

[0128] Perform pattern matching on each edge in the task resource graph and the structured rule entries in the scheduling rule base to identify whether the edge meets the triggering conditions of the rule;

[0129] If the match is successful, the sequential dependency, resource conflict, time interval, and device restriction information of this edge are extracted and encoded into a unified structured vector as the rule-aware vector corresponding to the edge;

[0130] S53. Concatenate the edge attribute vector and the rule-aware vector of each edge to obtain an extended edge attribute vector and form an extended edge attribute matrix. Input the node feature matrix and the extended edge attribute matrix into the rule-aware Graphormer model, and perform feature representation update based on the edge attribute enhanced attention mechanism:

[0131]

[0132] in, represents the feature representation of node v in the l+1th layer, represents the feature representation of the l-th layer node v, W represents the node feature linear mapping matrix, a represents the weight vector of the attention mechanism, || represents the vector splicing operation, σ represents the ReLU activation function, represents the set of neighbor nodes adjacent to node v, LeakyReLU represents the nonlinear activation function, exp represents the natural exponential function, T represents the transposition operation, bvu represents the extended edge attribute vector between node v and node u, b vk The extended edge attribute vector between node v and node k, represents the feature representation of node k in layer l, represents the feature representation of the l-th layer node u, α vu represents the attention score vector between node v and node u, ∈ represents “belongs to”;

[0133] S54. During the Graphormer model training phase, in order to guide the Graphormer model to learn the consistency of scheduling rules, the scheduling structure constraint loss is introduced into the total loss function to penalize the prediction of scheduling order violations:

[0134]

[0135] in, represents the scheduling structure constraint loss, Represents the scheduling order set output by the rule engine, Represents the task T predicted by the Graphormer model i and T j The start time, δ represents the scheduling tolerance factor, and max represents the maximum value;

[0136] The total loss function includes time prediction regression loss, resource allocation classification loss, task execution sequence ranking loss and scheduling structure constraint loss, the time prediction regression loss adopts mean square error loss, the resource allocation classification loss adopts cross entropy loss, and the task execution sequence ranking loss adopts Listwise ranking loss;

[0137] The Graphormer model is trained using supervised learning. The Adam optimizer is used in the training process to train the model parameters by minimizing the total loss function.

[0138] S55. After the trained Graphormer model is propagated through the L-layer network, the feature representation of the L-layer is obtained and input into the scheduling decoder layer. The scheduling decoder layer includes:

[0139] The priority sorting sublayer, based on a multi-layer perceptron, calculates the priority score based on the feature representation;

[0140] The time regression sublayer uses a dual-output regression function to output the predicted start and end times;

[0141] The conflict prediction sublayer uses a binary classification neural network to predict the probability of a conflict for each task, and then sets a threshold to determine whether there is a conflict;

[0142] The resource allocation sublayer concatenates the feature representations of tasks and resources and inputs them into a multi-layer perceptron to obtain the matching value between tasks and resources and select the optimal resource node.

[0143]

[0144] Among them, R i Represents the i-th resource node, argmin represents the variable value that maximizes the function value. Represents task T i With Resource R i The matching value is output by the multi-layer perceptron, where L represents the number of layers of network propagation. Represents task T i In the feature representation of layer L, Represents resource R i Feature representation at layer L;

[0145] Finally, a scheduling prediction plan is generated, which includes task nodes, predicted start time and predicted end time of the task, task priority, conflict prediction flag and optimal resource node.

[0146] This paper improves the Graphormer model to enable rule-awareness. By combining the node characteristics and edge attributes of the task resource graph with scheduling rules, this paper generates a rule-aware vector. Furthermore, an edge-attribute-enhanced attention mechanism is used to model scheduling relationships and learn task sequences. The model introduces a structured loss function constraint to penalize scheduling structures that violate the rules, guiding the network to learn scheduling strategies that conform to collective business logic. Compared to general graph neural network models, this structure is more suitable for complex constrained scheduling problems, and its prediction results are more feasible and consistent with the rules, improving model interpretability and execution efficiency.

[0147] In this embodiment, S6 specifically includes:

[0148] S61. Based on the predicted start time, predicted end time, and resource allocation number of each task, pattern matching is performed against all rule entries in the scheduling constraint set. If a task violates any rule, the conflict prediction flag is marked as 1, indicating a scheduling conflict. If all rules are met, the flag is marked as 0.

[0149] S62. For tasks with a conflict prediction flag of 1, extract the violated rule entries and adjust the original priority score of the task based on the penalty adjustment coefficient of each rule to generate a revised priority score. The adjusted priority score reflects the actual scheduling priority of the task under the constraint environment:

[0150]

[0151] Among them, Score ′ (T k ) is task T k The corrected priority score, λ represents the penalty adjustment coefficient, ω j represents the constraint strength weight, Represents task T k The set of scheduling constraints violated, C j represents the jth constraint rule that is violated, T k represents the kth task identified as violating the scheduling rule;

[0152] S63. Reorder the tasks according to the revised priority scores of all tasks, and adopt the existing sliding window-based scheduling optimization strategy to jointly adjust the start time, end time and resource allocation of all tasks on the premise of satisfying task dependencies, resource constraints and time constraints to form an optimized scheduling plan.

[0153] The present invention introduces a conflict prediction feedback mechanism and a priority correction strategy, so that the scheduling prediction plan output by the neural network can be dynamically optimized and adjusted based on the scheduling rules. The system imposes penalties on conflicting tasks according to the rule matching results and adjusts their priorities according to the rule weights, thereby making the final sorting more feasible and business-matching. Combined with the sliding window scheduling optimization strategy, multi-task parallel processing and resource optimization allocation are achieved under the premise of ensuring that the constraints are met, thereby improving the overall scheduling efficiency and enhancing the system's response to resource bottlenecks and conflict events.

[0154] Example 1:

[0155] In order to verify the feasibility of the present invention in implementation, the present invention is applied to a certain germplasm resource preservation center, which is responsible for the collection, storage, outbound, packaging and review of various types of crop germplasm samples. The average daily processing tasks exceed 100 items, and the task process is complicated and highly dependent on equipment resources. The traditional scheduling system relies on preset rule templates and lacks learning ability. Task congestion and resource conflicts occur frequently, especially during peak periods (such as before spring sowing). The scheduling efficiency is significantly reduced, resulting in delays in some tasks or high resource idle rates.

[0156] In this context, the research team deployed the task scheduling optimization system based on the fusion of rule engine and neural network proposed in this invention to restructure the scheduling of 15 key scheduling tasks in the morning shift (8:00-12:30) on a certain day.

[0157] First, the system collected the original data of the batch of tasks, including the task type, sample category, priority, time window and expected execution time, as well as information such as the equipment operating status, resource available time period and processing capacity on that day, and uniformly preprocessed them into task and resource feature vectors.

[0158] The system then constructs a task resource graph based on the preprocessed data. Nodes represent tasks and equipment resources, while edges depict task sequencing constraints, resource competition, and time window conflicts. The system also loads a scheduling rule library, including formal rules such as "similar samples cannot be reviewed in parallel," "each refrigeration unit can handle a maximum of two tasks at a time," and "scanning tasks must be completed before review." The rule engine uses forward-chaining reasoning to parse the constraint set and integrate it with the Graphormer model for predictive modeling.

[0159] Model training is completed based on the center's historical task data in the past two years. The scheduling prediction outputs the start and end time, conflict risk flag and resource matching node of each task. For tasks with conflicts, the system dynamically adjusts their priority scores according to the type of rules violated, and adopts a sliding window scheduling strategy to jointly optimize the execution timing and resource allocation of all tasks.

[0160] In order to verify the performance of the method of the present invention, a comparison of experimental effects before and after germplasm bank scheduling optimization was carried out. The comparison results are shown in Table 1.

[0161] Table 1. Comparison of experimental results before and after optimization of germplasm bank scheduling

[0162] Experimental indicators Traditional scheduling scheme Optimization scheme of the present invention Total number of tasks 15 15 Number of tasks that conflict with the original plan 5 5 Number of conflicting tasks after optimization 5 0 Average task delay time (minutes) 42 16 Total scheduling execution time (minutes) 290 225 Resource idle rate 31% 14% Resource efficiency 69% 86% Number of scheduling rule violations 6 0 Average scheduling response time (seconds) 3.2 2.1 Average task waiting time (minutes) 19 7

[0163] First, in terms of task conflict control, the two schemes initially faced the same total number of scheduling tasks (15 items), but there were 5 tasks in the traditional scheme that conflicted in the original schedule, and 5 tasks were still not successfully resolved after optimization. The present invention successfully reduced the number of conflicting tasks to 0 based on the application of rule engine parsing constraints and graph neural network prediction, effectively ensuring the feasibility and rule consistency of the scheduling process.

[0164] In terms of scheduling efficiency, the average task delay time in the traditional solution is 42 minutes, while the present invention shortens this value to 16 minutes through optimized priority correction and sliding window adjustment, showing that the system is more responsive and has more execution accuracy. At the same time, the total scheduling execution time is compressed from the original 290 minutes to 225 minutes, achieving speed-up optimization of the overall execution process while keeping the number of tasks unchanged.

[0165] In terms of resource utilization, the present invention is also superior to traditional solutions in controlling resource idle rate. The idle rate drops from the original 31% to 14%, and the resource utilization efficiency increases from 69% to 86%, indicating that the present invention can allocate resources more evenly and avoid the problem of high load and resource waste coexisting.

[0166] In addition, there were 6 rule violation records in the traditional solution, while the present invention achieved zero violations between the scheduling prediction results and the business rules. At the same time, the average scheduling response time was shortened from 3.2 seconds to 2.1 seconds, and the average task waiting time was reduced from 19 minutes to 7 minutes, which further demonstrates that the system has comprehensive advantages in rule rationality and response speed.

[0167] The above description is only a preferred specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any technician familiar with the technical field, within the technical scope disclosed by the present invention, who makes equivalent replacements or changes based on the technical solution and inventive concept of the present invention, should be covered by the scope of protection of the present invention.

Claims

1. A germplasm bank task scheduling optimization method based on rule engine and neural network, characterized in that: The steps include: S1. Collect the original data sets related to task scheduling in the germplasm bank; S2. Preprocess the original data set to generate structured task feature vectors and resource feature vectors; S3, constructing a task resource graph based on the task feature vector and the resource feature vector; S4. Build a scheduling rule library and parse the scheduling rules based on the rule engine to generate a scheduling constraint set; S5. Input the task resource graph into the rule-aware Graphormer model to model the global structural relationship between tasks and resources and output a scheduling prediction plan. S6. Process the scheduling prediction plan and the scheduling constraint set, optimize and adjust the scheduling prediction plan, generate an optimized scheduling plan, and execute the task scheduling plan according to the optimized scheduling plan.

2. The germplasm bank task scheduling optimization method based on rule engine and neural network according to claim 1, characterized in that: The original data set includes task features and resource features. The task features include task type, sample category, task priority, time window and expected task execution time. The resource features include resource type, available status, time interval, unit processing capacity and load status.

3. The germplasm bank task scheduling optimization method based on rule engine and neural network according to claim 1, characterized in that: The preprocessing includes abnormal data removal, normalization of continuous values, and one-hot encoding of categorical fields or discrete state fields.

4. The germplasm bank task scheduling optimization method based on rule engine and neural network according to claim 1, characterized in that: The S3 specifically includes: S31. Initialize a task resource graph based on the task feature vector and the resource feature vector, wherein the node set of the task resource graph includes a task node set and a resource node set; For each task, add a task node to the task resource graph and assign the corresponding task feature vector as the node attribute; For each resource, add a resource node in the task resource graph and assign the corresponding resource feature vector as the node attribute; S32. Construct a set of task dependency edges based on the sequential dependency relationship between tasks. The task dependency edges indicate that a task must be completed before another task, and set a sequence difference weight for the edge attributes of the task dependency edges. S33. Construct a set of allocation edges between tasks and resources based on the resource information required by the tasks. The allocation edges represent the resources on which the tasks depend, and an edge feature vector is added to each allocation edge. S34. For task pairs with resource usage conflicts, a resource conflict edge set is constructed. A conflict flag is added to each resource conflict edge. The conflict flag indicates whether there is a resource conflict between the tasks. 1 indicates conflict, and otherwise indicates no conflict. S35. Construct a time sequence edge set according to the time constraint of the task, and add a time interval weight to the time sequence edge; S36. The task dependency edge set, the allocation edge set, the resource conflict edge set, and the time sequence edge set are unified and merged into the edge set of the task resource graph, and the final task resource graph is constructed based on the node set and the edge set.

5. The germplasm bank task scheduling optimization method based on rule engine and neural network according to claim 1, characterized in that: The S4 specifically includes: S41. Construct a scheduling rule base, wherein the scheduling rule base is composed of structured rule entries, and each rule entry is expressed as; S42. Represent rule entries in a structured syntax format and express them programmatically in JSON format; S43. Parsing the structured rule entries in the scheduling rule base through a rule engine. The rule engine is based on a forward chain reasoning mechanism and includes: Extract all node attributes and edge attributes in the task resource graph as key-value pair structures and load them into the rule engine working memory to form a structured fact set required for rule matching; Load all rule entries in the scheduling rule base into the rule storage area of ​​the rule engine; Load rule entries one by one and perform pattern matching on the triggering conditions of the rules, and find the data item combination that meets the triggering conditions in the structured fact set; The pattern matching enumerates or scans all combinations of node attributes and edge attributes in the task resource graph to determine which combinations meet the triggering conditions in a specific rule; For successfully matched rule entries, activate the corresponding scheduling constraint expressions; Summarize all activated scheduling constraint expressions into a scheduling constraint set; S44. For rule entries containing quantitative constraints, extract relevant parameters and define parameterized constraints. The parameterized constraints include the task start time, the maximum number of concurrently executed tasks for a resource, the minimum scheduling time interval between tasks, and a conflict flag. S45. The parameterized constraints are uniformly classified into a scheduling constraint set in the form of a structured expression of rule entries.

6. The germplasm bank task scheduling optimization method based on rule engine and neural network according to claim 1, characterized in that: The S5 specifically includes: S51. Construct a node feature matrix based on the task feature vector and the resource feature vector, and construct a unified edge attribute matrix based on the edge attributes attached to each edge of the task resource graph; S52. Calculate the rule constraint impact on each edge in the task resource graph, and generate a rule perception vector. The rule perception vector represents the constraint characteristics of the scheduling rule on the edge connection relationship. The process of generating a rule perception vector includes: Perform pattern matching on each edge in the task resource graph and the structured rule entries in the scheduling rule base to identify whether the edge meets the triggering conditions of the rule; If the match is successful, the sequential dependency, resource conflict, time interval, and device restriction information of this edge are extracted and encoded into a unified structured vector as the rule-aware vector corresponding to the edge; S53. Concatenate the edge attribute vector and the rule-aware vector of each edge to obtain an extended edge attribute vector, and form an extended edge attribute matrix. Input the node feature matrix and the extended edge attribute matrix into the rule-aware Graphormer model, and perform feature representation update based on the edge attribute enhanced attention mechanism. S54. During the Graphormer model training phase, in order to guide the Graphormer model to learn the consistency of scheduling rules, the scheduling structure constraint loss is introduced into the total loss function to penalize the prediction of scheduling order violations: in, represents the scheduling structure constraint loss, Represents the scheduling sequence set output by the rule engine, Represents the task T predicted by the Graphormer model i and T j The start time, δ represents the scheduling tolerance factor, and max represents the maximum value; The total loss function includes time prediction regression loss, resource allocation classification loss, task execution sequence ranking loss and scheduling structure constraint loss, the time prediction regression loss adopts mean square error loss, the resource allocation classification loss adopts cross entropy loss, and the task execution sequence ranking loss adopts Listwise ranking loss; The Graphormer model is trained using supervised learning. The Adam optimizer is used in the training process to train the model parameters by minimizing the total loss function. S55. After the trained Graphormer model is propagated through the L-layer network, the feature representation of the L-layer is obtained and input into the scheduling decoder layer. The scheduling decoder layer includes: The priority sorting sublayer, based on a multi-layer perceptron, calculates the priority score based on the feature representation; The time regression sublayer uses a dual-output regression function to output the predicted start and end times; The conflict prediction sublayer uses a binary classification neural network to predict the probability of a conflict for each task, and then sets a threshold to determine whether there is a conflict; The resource allocation sublayer concatenates the feature representations of tasks and resources and inputs them into a multi-layer perceptron to obtain the matching value between tasks and resources and select the optimal resource node. Finally, a scheduling prediction plan is generated, which includes task nodes, predicted start time and predicted end time of the task, task priority, conflict prediction flag and optimal resource node.

7. The germplasm bank task scheduling optimization method based on rule engine and neural network according to claim 1, characterized in that: The S6 specifically includes: S61. Based on the predicted start time, predicted end time, and resource allocation number of each task, pattern matching is performed against all rule entries in the scheduling constraint set. If a task violates any rule, the conflict prediction flag is marked as 1, indicating a scheduling conflict. If all rules are met, the flag is marked as 0. S62. For tasks with a conflict prediction flag of 1, extract the violated rule entries and adjust the original priority score of the task based on the penalty adjustment coefficient of each rule to generate a revised priority score. The adjusted priority score reflects the actual scheduling priority of the task under the constraint environment: Among them, Score ′ (T k ) is task T k The corrected priority score, λ represents the penalty adjustment coefficient, ω j represents the constraint strength weight, Represents task T k The set of scheduling constraints violated, C j represents the jth constraint rule that is violated, T k represents the kth task identified as violating the scheduling rule; S63. Reorder the tasks according to the revised priority scores of all tasks, and adopt the existing sliding window-based scheduling optimization strategy to jointly adjust the start time, end time and resource allocation of all tasks on the premise of satisfying task dependencies, resource constraints and time constraints to form an optimized scheduling plan.

Citation Information

Cited By

  • Asynchronous task control method

    CN120950264A

  • BIM model and WBS hitching diagnosis method and system

    CN121031125A

  • Data management platform for smart park construction

    CN121073171A

  • A data governance platform for smart park construction

    CN121073171B

  • Grapher-based open cell-free access network baseband computing power and communication resource joint optimization method

    CN121888279A