Computational task scheduling method and system applied to numerical control machining system
By obtaining the processing complexity and resource requirements characteristics of the task request set, calling the task priority evaluation model to generate a priority sequence, and adjusting the scheduling scheme, it solves the problems of long task waiting time and low resource utilization in traditional CNC machining systems, and realizes efficient and stable CNC machining.
Patent Information
- Application Number
- CN202510848157.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-24
- Publication Date
- 2025-08-26
- Estimated Expiration
- 2045-06-24
AI Technical Summary
The calculation task scheduling method of traditional CNC machining systems is difficult to fully consider the complexity, resource requirements and real-time constraints of the task, resulting in too long waiting time for the task and low resource utilization, which affects processing efficiency and quality.
By obtaining the task request collection, extracting processing complexity and resource requirements characteristics, calling the task priority evaluation model to generate a priority sequence, and adjusting the scheduling scheme based on real-time feedback to ensure dynamic matching of tasks and resources and optimized configuration.
The processing efficiency and resource utilization of the CNC machining system are improved, ensuring that the system always maintains an efficient and stable operating state.
Smart Images

Figure CN120355196B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of numerical control machining task scheduling, and in particular to a computing task scheduling method and system applied to a numerical control machining system. Background Art
[0002] In CNC machining systems, computing task scheduling is a key link that affects machining efficiency and system performance. With the continuous development of CNC machining technology, machining tasks are becoming increasingly complex and diverse, involving multiple types of machining processes, and different tasks have different real-time requirements. Traditional CNC machining system computing task scheduling methods are often based on simple task priority rules or a first-come, first-served principle, which makes it difficult to fully consider multiple factors such as task complexity, resource requirements, and real-time constraints. As a result, in the actual machining process, problems such as long task waiting times, low resource utilization, and inability to complete machining tasks on time may occur, seriously affecting the overall operating efficiency and machining quality of the CNC machining system. Summary of the Invention
[0003] In view of the above-mentioned problems, in combination with the first aspect of the present invention, an embodiment of the present invention provides a computing task scheduling method applied to a numerical control machining system, the method comprising:
[0004] Obtaining a task request set of a numerical control machining system, wherein the task request set includes a plurality of computing task units to be scheduled, and each computing task unit to be scheduled is associated with machining process type information and a real-time constraint identifier;
[0005] Performing task feature extraction processing on the task request set to obtain processing complexity features and resource requirement features of each computing task unit to be scheduled, wherein the processing complexity features reflect the computing scale of the task unit, and the resource requirement features reflect the adaptability requirements of the task unit to the computing resource type;
[0006] Calling a pre-built task priority evaluation model to perform a joint priority evaluation process on the processing complexity characteristics and the resource demand characteristics, and generating a priority sequence including a priority ranking of task units;
[0007] Performing dynamic matching processing between tasks and resources based on the priority sequence and currently available resource information of the numerical control machining system to generate an initial scheduling plan including correspondences between task units and computing resources;
[0008] Based on the real-time feedback of the task execution status information, the initial scheduling plan is adaptively adjusted to generate a final scheduling plan including the task unit execution sequence and resource allocation parameters.
[0009] On the other hand, an embodiment of the present invention also provides a computing task scheduling system for a CNC machining system, comprising a processor and a machine-readable storage medium, wherein the machine-readable storage medium is connected to the processor, the machine-readable storage medium is used to store programs, instructions or codes, and the processor is used to execute the programs, instructions or codes in the machine-readable storage medium to implement the above method.
[0010] Based on the above aspects, the embodiment of the present invention obtains a set of task requests containing processing technology type information and real-time constraint identifiers, and performs task feature extraction processing to comprehensively obtain the processing complexity characteristics and resource requirement characteristics of each computing task unit to be scheduled, performs joint priority evaluation processing for calling a pre-built task priority evaluation model, and generates a priority sequence including the priority sorting of task units, fully considering the complexity and resource requirements of the tasks, ensuring the rationality and efficiency of task scheduling, and performs dynamic matching processing of tasks and resources according to the priority sequence and the current available resource information of the CNC machining system to generate an initial scheduling plan, thereby realizing the optimal configuration of tasks and resources. Finally, based on the real-time feedback of task execution status information, the initial scheduling plan is adaptively adjusted to generate a final scheduling plan, which can respond to various changes in the machining process in a timely manner, ensure that the CNC machining system always maintains an efficient and stable operating state, and significantly improves the machining efficiency and resource utilization of the CNC machining system. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] Figure 1 The present invention provides a flowchart of a method for scheduling computing tasks in a numerical control machining system.
[0012] Figure 2 Schematic diagram of exemplary hardware and software components of a computing task scheduling system for a numerical control machining system provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0013] The present invention will be described in detail below with reference to the accompanying drawings. Figure 1 This is a flow chart of a method for scheduling computing tasks applied to a numerical control machining system provided by an embodiment of the present invention. The method for scheduling computing tasks applied to a numerical control machining system is introduced in detail below.
[0014] Step S110: obtaining a task request set of a numerical control machining system, wherein the task request set includes a plurality of computing task units to be scheduled, and each computing task unit to be scheduled is associated with machining process type information and a real-time constraint identifier.
[0015] In the real world of CNC machining, during operation, a CNC machining system receives computing task requests from various production processes. These requests arise from various machining needs. For example, when manufacturing complex mechanical parts, these tasks include surface flatness calculation, tool path planning, and machining parameter optimization. The CNC machining system collects and integrates these received task requests to form a task request set.
[0016] Each computational task unit to be scheduled has corresponding processing technology type information. There are many different types of processing technologies, including but not limited to turning, milling, grinding, boring, etc. Different processing technology types determine the nature and characteristics of the task. For example, turning is mainly used to process rotating parts, and its related computational tasks may involve the calculation of parameters such as rotation speed, feed rate, and cutting depth; while milling is often used to process planes, steps, grooves, etc., and the corresponding computational tasks may include tool path planning, cutting force calculation, etc.
[0017] Each scheduled computing task unit is also associated with a real-time constraint flag. This flag is used to distinguish tasks' time sensitivity, categorizing them into urgent tasks with high real-time requirements and non-urgent tasks with relatively low real-time requirements. For example, on an automated production line, if the result of a computing task directly affects the start of the next processing step, the task's real-time constraint flag indicates that it is urgent and requires prompt processing. On the other hand, computing tasks used for production statistics and analysis have relatively low real-time requirements and can be processed at an appropriate time.
[0018] Step S120: Perform task feature extraction processing on the task request set to obtain the processing complexity characteristics and resource requirement characteristics of each computing task unit to be scheduled. The processing complexity characteristics reflect the computing scale of the task unit, and the resource requirement characteristics reflect the adaptability requirements of the task unit to the computing resource type.
[0019] Step S121: parsing the processing technology type information of each to-be-scheduled computing task unit in the task request set, and extracting the algorithm execution process information corresponding to the processing technology type.
[0020] To extract the processing complexity and resource requirements of each scheduled computing task unit, we first need to conduct an in-depth analysis of the processing technology type information. Taking the task of calculating the outer diameter dimensional accuracy of a part in a turning process as an example, we first need to obtain the process knowledge base corresponding to this processing technology type. The process knowledge base is a database that stores a large amount of processing technology-related information, including the mapping relationship between different processing technology types and algorithm execution processes.
[0021] Step S1211: Acquire a process knowledge base corresponding to the processing technology type information, wherein the process knowledge base stores a mapping relationship between different processing technology types and algorithm execution processes.
[0022] The process knowledge base is built on extensive machining experience and research. Within this knowledge base, each machining process type corresponds to a corresponding algorithm execution process. For example, for a turning process, the algorithm execution process might include steps such as data input, tool selection, cutting parameter calculation, machining path planning, and result output. By querying the knowledge base, one can find information on the algorithm execution process related to a specific machining process type.
[0023] Step S1212: querying the process knowledge base according to the processing technology type information, and extracting the algorithm execution process description document matching the processing technology type.
[0024] After determining the process type for the task unit to be scheduled, the process knowledge base is searched using this process type information. This search can be performed through methods such as keyword matching to find an algorithm execution flow description document that fully matches the process type. This algorithm execution flow description document details the algorithm steps and operational procedures required to complete the process.
[0025] Step S1213: performing semantic parsing on the algorithm execution process description document to identify data input nodes, intermediate calculation nodes, and result output nodes in the process.
[0026] After obtaining the algorithm execution process description document, it needs to be semantically parsed. The purpose of semantic parsing is to convert the text information in the document into recognizable node information. The data input node is the starting point of the algorithm execution process, which receives raw data from the outside. For example, in the part outer diameter dimensional accuracy calculation task, the data input node may receive data such as the design dimensions of the part and the actual dimensions collected by the measuring equipment. The intermediate calculation node is the core part of the algorithm execution, which performs various calculations and processing on the input data. For the part outer diameter dimensional accuracy calculation task, the intermediate calculation node may perform operations such as dimensional deviation calculation and error analysis. The result output node is the end point of the algorithm execution, which outputs the calculated results to the subsequent application links. In this part outer diameter dimensional accuracy calculation task, the result output node may output the part's dimensional accuracy evaluation results, whether it meets the design requirements, and other information.
[0027] Step S1214: extracting the operation type identifier of each node and the data transmission path information between nodes, wherein the operation type identifier includes a numerical calculation operation, a geometric modeling operation or a path planning operation.
[0028] After identifying the data input nodes, intermediate calculation nodes, and result output nodes, it is necessary to further extract the operation type identifier of each node and the data transfer path information between nodes. The operation type identifier is used to clarify the type of operation performed by each node. For example, in a task to calculate the outer diameter dimensional accuracy of a part, the operation type identifier of the intermediate calculation node may be a numerical calculation operation, because it primarily performs numerical calculations of dimensional deviations. The data transfer path information between nodes describes the direction and method of data flow between each node. For example, data is transferred from the data input node to the intermediate calculation node, and then, after computational processing, is transferred to the result output node.
[0029] Step S1215: Based on the operation type identifier and data transmission path information of the node, construct an algorithm execution process topology diagram of the computing task unit to be scheduled.
[0030] Based on the node operation type identifiers and the data transfer paths between nodes, a topological graph of the algorithm execution process for the scheduled computing task unit can be constructed. This graph is a graphical representation of the entire algorithm execution process using nodes and edges. In this graph, nodes represent individual operation nodes, and edges represent data transfer paths. This graph provides an intuitive understanding of the algorithm execution sequence and the direction of data flow.
[0031] Step S122: Calculate the computational scale parameter of the computing task unit to be scheduled as a processing complexity feature based on the number of operation nodes and the amount of data transferred between nodes in the algorithm execution process information.
[0032] Step S1221: Count the total number of operation nodes in the algorithm execution process topology diagram, where the total number of operation nodes reflects the number of calculation steps of the task unit.
[0033] The total number of operation nodes is an important indicator for measuring the number of calculation steps in a task unit. In the algorithm execution process topology diagram, all data input nodes, intermediate calculation nodes, and result output nodes are counted. The greater the total number of operation nodes, the more complex the calculation steps of the task unit, and the greater the amount of calculation. For example, in a complex part processing path planning task, the algorithm execution process topology diagram may contain multiple intermediate calculation nodes. Each node represents a specific calculation step, such as tool posture adjustment calculation, path optimization calculation, etc., and the total number of operation nodes will be relatively large.
[0034] Step S1222: Calculate the data transfer volume between adjacent nodes in the algorithm execution process topology diagram, where the data transfer volume is determined by the product of the output data dimension of the preceding node and the input data dimension of the succeeding node.
[0035] The amount of data transferred between adjacent nodes is a measure of the scale of data flow between nodes. For each pair of adjacent nodes in the algorithm execution process topology, the product of the output data dimension of the preceding node and the input data dimension of the succeeding node is calculated. Data dimension can be understood as the number of data features. For example, in a material stress analysis task, the preceding node may output data of multiple dimensions, such as the material's elastic modulus and Poisson's ratio. The succeeding node may need to input this data for stress calculation. The amount of data transferred between the two adjacent nodes is calculated by multiplying the output data dimension of the preceding node by the input data dimension of the succeeding node.
[0036] Step S1223: performing weighted processing on the total number of operation nodes to obtain a weighted total number of operation nodes, wherein the weight coefficient is determined by the operation type identifier corresponding to the node, and the weight coefficient of the numerical calculation operation node is greater than the weight coefficient of the geometric modeling operation node.
[0037] In order to more accurately reflect the computational complexity of the task unit, the total number of operation nodes needs to be weighted. The weight coefficient is determined based on the operation type identifier corresponding to the node. Since numerical computing operations usually involve a large number of mathematical operations and have relatively high computational complexity, the weight coefficient of the numerical computing operation node is greater than the weight coefficient of the geometric modeling operation node. For example, in a task that includes numerical computing operations and geometric modeling operations, the weight coefficient of the numerical computing operation node may be set to a relatively large value, while the weight coefficient of the geometric modeling operation node is set to a relatively small value. By multiplying the weight coefficient corresponding to the operation type identifier of each operation node by the total number of operation nodes, the weighted total number of operation nodes is obtained.
[0038] Step S1224: performing cumulative summing processing on the data transfer amount to obtain a total data transfer amount parameter of the computing task unit to be scheduled.
[0039] After calculating the data transfer volume between each pair of adjacent nodes, the data transfer volume between all adjacent nodes is cumulatively summed. The total data transfer volume parameter reflects the scale of data flow throughout the algorithm execution process. A larger data transfer volume indicates more data is transferred between nodes, potentially requiring more computing resources and time to complete data transmission and processing. For example, in a multi-step machining process simulation task, the data transfer volume between each node is large. When these data transfer volumes are cumulatively summed, the resulting total data transfer volume parameter will also be larger.
[0040] Step S1225: linearly combine the weighted total number of operation nodes and the total data transfer amount parameter to generate a computational scale parameter of the computational task unit to be scheduled as a processing complexity feature.
[0041] The linear combination of the weighted total number of operating nodes and the total data transfer volume parameter yields the computational scale parameter of the computational task unit to be scheduled, which serves as a processing complexity characteristic. The linear combination process can perform a weighted summation of the weighted total number of operating nodes and the total data transfer volume parameter using set coefficients. For example, a coefficient is set for the weighted total number of operating nodes and another coefficient is set for the total data transfer volume parameter. These are multiplied by their corresponding parameters and then added together to obtain the computational scale parameter. This computational scale parameter comprehensively considers the number of computational steps and data transfer scale of the task unit, and can more accurately reflect the processing complexity of the task unit.
[0042] Step S123: classifying the real-time constraint identifier of each to-be-scheduled computing task unit in the task request set, and identifying the resource type adaptation rule corresponding to the real-time constraint identifier.
[0043] Real-time constraint identifiers can be divided into different categories, such as urgent real-time tasks, general real-time tasks, and non-real-time tasks. Different categories of real-time constraint identifiers correspond to different resource type adaptation rules. For urgent real-time tasks, due to their high sensitivity to time, resources with fast computing speed and strong processing capabilities, such as dedicated computing chip resources, need to be allocated first. General real-time tasks can be allocated graphics processor resources or central processing unit resources according to specific circumstances. Non-real-time tasks can be processed when system resources are idle, and the real-time requirements for resources are relatively low. By classifying the real-time constraint identifiers, the resource type adaptation rules applicable to each computing task unit to be scheduled can be clarified.
[0044] Step S124: Based on the resource type adaptation rule, the adaptability requirement parameters of the computing task unit to be scheduled to the central processing unit resources, graphics processing unit resources or dedicated computing chip resources are extracted as resource demand characteristics.
[0045] After identifying the resource type adaptation rules corresponding to the real-time constraint identifier, the adaptability requirement parameters of the computing task unit to be scheduled for the central processing unit resources, graphics processing unit resources or dedicated computing chip resources are extracted according to these rules. The adaptability requirement parameters include the resource type adaptation identifier and the resource performance lower limit. The resource type adaptation identifier clarifies the resource type that the task unit is suitable for use. For example, for a task that requires a large amount of graphics processing, its resource type adaptation identifier may be graphics processor resources. The resource performance lower limit specifies the minimum requirement of the task unit for resource performance. For example, for a task that requires fast calculation, its performance lower limit for the central processing unit resources may require the processor to have a higher main frequency and multi-core processing capability. These adaptability requirement parameters constitute the resource demand characteristics of the computing task unit to be scheduled.
[0046] Step S125: Input the processing complexity feature and the resource requirement feature into a feature normalization module, and perform normalization on feature parameters of different dimensions through a linear scaling method to obtain a target feature set with a unified numerical range.
[0047] The processing complexity feature and resource requirement feature may have different dimensions and numerical ranges. In order to facilitate subsequent processing and analysis, they need to be input into the feature normalization module for standardization. The linear scaling method is a commonly used standardization processing method, which maps the feature parameters to a unified numerical range, such as the [0, 1] interval. For each parameter in the processing complexity feature and resource requirement feature, a linear transformation is performed according to its maximum and minimum values so that the transformed parameter values are all within the [0, 1] interval. After standardization, all feature parameters in the target feature set have a unified numerical range, which is convenient for subsequent model processing and analysis.
[0048] Step S130: calling a pre-built task priority evaluation model, performing a joint priority evaluation process on the processing complexity characteristics and the resource requirement characteristics, and generating a priority sequence including a priority ranking of task units.
[0049] Step S131: input the processing complexity feature and the resource requirement feature into the feature input layer of the task priority evaluation model, perform nonlinear transformation processing on the features through a fully connected neural network, and generate a fused feature vector.
[0050] The task priority assessment model is a pre-trained artificial intelligence model composed of multiple modules and layers. The feature input layer is the first layer of the model, which receives processing complexity features and resource requirement features as input. A fully connected neural network is a commonly used neural network structure that performs nonlinear transformations on input features. In the feature input layer, processing complexity features and resource requirement features are input into the fully connected neural network. The neurons in the network perform a weighted summation of the input features and perform a nonlinear transformation using an activation function. The activation function maps the neuron output value to a set range, increasing the model's nonlinear expression capabilities. After processing by the fully connected neural network, a fused feature vector is generated. The fused feature vector integrates information from the processing complexity features and resource requirement features.
[0051] Step S132: extracting context information of the time dimension from the fused feature vector through the time perception layer of the task priority evaluation model to generate a time-series enhanced feature vector containing real-time constraint information.
[0052] Step S1321: input the fused feature vector into the long short-term memory network module of the time perception layer, and perform selective memory and forgetting processing on the historical feature information through the memory gate, input gate and output gate.
[0053] The time-aware layer is a crucial component of the task priority assessment model, used to extract the temporal context of the fused feature vector. The Long Short-Term Memory (LSTM) module is a core component of the time-aware layer, effectively processing long-term dependencies in sequential data. After the fused feature vector is input into the LSTM module, the module's memory gates, input gates, and output gates selectively memorize and forget historical feature information. The memory gate controls whether the hidden state information from the previous moment is retained until the current moment; the input gate controls whether the currently input feature information is added to the current cell state; and the output gate controls whether the current cell state information is output to the hidden state. Through this approach, the LSTM module selectively retains and forgets historical feature information, thereby capturing the temporal context of the fused feature vector.
[0054] Step S1322: extracting the hidden state vector output by the long short-term memory network module, where the hidden state vector contains the context information of the fused feature vector at the historical time step.
[0055] After processing the fused feature vector, the LSTM module outputs a hidden state vector. This hidden state vector contains the contextual information of the fused feature vector at each historical time step. This contextual information provides a comprehensive representation of the fused feature vector over time. By extracting the hidden state vector, we can determine the changing trends and dependencies of the fused feature vector over time.
[0056] Step S1323: Obtain a time threshold parameter corresponding to the real-time constraint identifier of the computing task unit to be scheduled, where the time threshold parameter represents the maximum execution delay allowed by the task unit.
[0057] The real-time constraint identifier of each computing task unit to be scheduled corresponds to a time threshold parameter. The time threshold parameter indicates the maximum execution delay allowed for the task unit. For example, for an urgent real-time task, its time threshold parameter may be set to a smaller value, meaning that the task needs to be completed in a shorter time; while for a non-real-time task, its time threshold parameter may be set to a larger value, allowing the task to be completed in a longer time. By obtaining the time threshold parameter corresponding to the real-time constraint identifier of the computing task unit to be scheduled, the time constraint information can be introduced into the priority evaluation process.
[0058] Step S1324: concatenate the time threshold parameter with the latent state vector to generate a joint feature vector containing time constraint information.
[0059] To incorporate time constraint information into the feature vector, the time threshold parameter is concatenated with the latent state vector. Concatenation involves connecting two vectors in a set order to form a new vector. During this process, the time threshold parameter is added to the end of the latent state vector, forming a joint feature vector that includes time constraint information. This joint feature vector combines the temporal context of the fused feature vector and the time constraint information of the task unit, providing a more comprehensive feature representation for subsequent priority evaluation.
[0060] Step S1325: normalize the joint feature vector to eliminate the dimensional difference between the time threshold parameter and the hidden state vector, and generate a time-enhanced feature vector containing real-time constraint information.
[0061] The time threshold parameter and the hidden state vector may have different dimensions and numerical ranges. To eliminate this dimensionality difference, the joint feature vector needs to be normalized. Normalization can use a linear scaling method to map each parameter in the joint feature vector to a uniform numerical range, such as the interval [0, 1]. After normalization, a time-enhanced feature vector containing real-time constraint information is generated. While retaining the information of the fused feature vector, the time-enhanced feature vector also incorporates the time constraint information and eliminates dimensionality differences, providing more appropriate feature input for subsequent priority evaluation.
[0062] Step S133: Utilizing the attention mechanism module of the task priority evaluation model, attention weights are respectively assigned to the processing complexity features and resource requirement features in the timing enhancement feature vector, where the attention weights reflect the degree of influence of the features on the priority evaluation.
[0063] The attention mechanism module is a key component of the task priority assessment model. It is used to assign attention weights to the processing complexity and resource requirement features in the time-enhanced feature vector. The attention weight reflects the influence of each feature on the priority assessment. In the attention mechanism module, the model automatically learns the importance of each feature based on the input time-enhanced feature vector and assigns a corresponding attention weight to it. For example, for a task with high computational resource requirements, the resource requirement feature may be assigned a higher attention weight; for a task with high computational complexity, the processing complexity feature may be assigned a higher attention weight. By assigning attention weights, the importance of different features in the priority assessment can be highlighted, improving the accuracy of the priority assessment.
[0064] Step S134: performing weighted aggregation processing on the temporal enhancement feature vector based on the attention weight to generate a priority evaluation feature vector.
[0065] After assigning attention weights to the processing complexity and resource requirement features in the time-series enhancement feature vector, the time-series enhancement feature vector needs to be weighted aggregated. Weighted aggregation combines the features in the time-series enhancement feature vector according to their corresponding attention weights. Specifically, for each feature element in the time-series enhancement feature vector, it is multiplied by the corresponding attention weight, and then these weighted feature elements are combined together in a set manner.
[0066] Assume that the time-enhanced feature vector can be represented as a vector containing multiple dimensions, where each dimension represents a specific feature, such as a sub-feature of the processing complexity feature or an aspect of the resource requirement feature. The attention weight is also a vector with the same dimensions as the feature vector, where each element corresponds to the importance of the element at the same position in the time-enhanced feature vector. When performing weighted aggregation, the first element of the time-enhanced feature vector is multiplied by the first element of the attention weight, the second element is multiplied by the second element of the attention weight, and so on.
[0067] These weighted elements can then be combined using concatenation. Concatenation involves arranging these elements in a predetermined order to form a new vector. This approach avoids the potential problems of directly adding features of different dimensions, as these features may represent different physical meanings and dimensions, potentially rendering the result meaningless. Concatenation preserves the information of each feature and weights it according to its importance.
[0068] After this weighted aggregation and concatenation process, a priority assessment feature vector is generated. This priority assessment feature vector comprehensively considers processing complexity, resource requirements, and time constraints. Using an attention mechanism, it highlights the impact of each feature on priority assessment, providing a more comprehensive and targeted feature representation for subsequent accurate assessment of task unit priorities.
[0069] Step S135: calling the sorting output layer of the task priority evaluation model, performing sorting score calculation processing on the priority evaluation feature vector, generating a priority score value for each computing task unit to be scheduled, and generating a priority sequence according to the size relationship of the priority score values.
[0070] The sorting output layer is the final layer of the task priority assessment model. Its primary task is to process the priority assessment feature vector and calculate the priority score for each task unit to be scheduled. A predefined scoring mechanism can be used in the sorting output layer. This scoring mechanism may be based on various factors, such as the combined impact of each element in the feature vector on the priority.
[0071] The ranking output layer feeds the priority evaluation feature vector into a specific computational process. This process might involve weighted summation of each element in the feature vector or other complex calculations. For example, each element in the feature vector might be assigned an additional coefficient based on the importance of the feature to the priority, and then the elements are multiplied by the corresponding coefficient before the sum is calculated.
[0072] After obtaining the priority score for each task to be scheduled, the tasks can be sorted based on the relative size of these scores. The scores are arranged from high to low, with the higher-scoring tasks first and the lower-scoring tasks last. This generates a priority sequence that includes the task unit priority rankings. This priority sequence clearly shows the order of priority of each task to be scheduled.
[0073] Step S140: performing dynamic matching processing between tasks and resources according to the priority sequence and the currently available resource information of the CNC machining system, and generating an initial scheduling scheme including a correspondence between task units and computing resources.
[0074] Step S141: parse the priority sequence to determine the priority order of each computing task unit to be scheduled.
[0075] After obtaining the priority sequence, it needs to be parsed to determine the priority order of each computing task unit to be scheduled. The priority sequence is typically an ordered list, where each element represents a computing task unit to be scheduled, and is arranged from high to low priority. By traversing this list, the priority order of each task unit can be determined in turn. For example, the task unit corresponding to the first element in the list has the highest priority, the task unit corresponding to the second element has the next highest priority, and so on. This clear priority order provides clear guidance for subsequent resource allocation, ensuring that high-priority tasks are processed first.
[0076] Step S142: obtaining currently available resource information of the numerical control machining system, wherein the currently available resource information includes the number of remaining computing cores of the central processing unit, the remaining video memory capacity of the graphics processing unit, and the remaining processing bandwidth of the dedicated computing chip.
[0077] To match tasks with resources, it's necessary to obtain information about the currently available resources of the CNC machining system. CNC machining system resources primarily include the central processing unit (CPU), graphics processing unit (GPU), and dedicated computing chips. For the CPU, the number of remaining computing cores is a key resource indicator. This number of cores determines the number of tasks the CPU can handle simultaneously and its processing power. For example, if the CPU has multiple cores and some are currently occupied by other tasks, the remaining number of cores represents the resources available for new tasks.
[0078] The GPU's remaining video memory capacity is also a key resource. Video memory is used to store data during graphics processing. For tasks requiring extensive graphics computation, such as 3D modeling and image rendering, the amount of video memory available directly impacts task efficiency. If the GPU's video memory is partially occupied, the remaining memory capacity becomes available for allocation to new tasks.
[0079] The remaining processing bandwidth of a dedicated computing chip is equally important. Dedicated computing chips typically have specific computing capabilities, such as high-speed data processing and complex algorithm calculations. This represents the remaining computing power a dedicated computing chip can provide. For tasks requiring extremely high computing speeds, the remaining processing bandwidth of a dedicated computing chip is a crucial factor in determining whether the task can be assigned.
[0080] Step S143: Match computing resources to each computing task unit to be scheduled in sequence according to the priority order. The matching rules include: preferentially allocating dedicated computing chip resources to high-priority task units, second-best allocating graphics processor resources, and finally allocating central processing unit resources.
[0081] After determining the priority order of each scheduled computing task unit and the currently available resources of the CNC machining system, computing resources are matched to each task unit in order of priority. The matching rules follow the established priority strategy. First, dedicated computing chip resources are allocated to high-priority task units. Dedicated computing chips typically offer high performance and speed, enabling them to quickly process complex computing tasks. For high-priority tasks, using dedicated computing chips ensures that the tasks are completed in the shortest possible time, meeting their real-time requirements.
[0082] If dedicated computing chips are insufficient or unsuitable for the task, the next best option is to allocate graphics processing units (GPUs). GPUs have advantages in graphics processing and parallel computing, and can provide better processing performance for tasks involving graphics processing and large-scale data parallel computing.
[0083] Finally, if neither the dedicated computing chip nor the graphics processor resources can meet the needs of the task unit, or if all resources are already occupied, then the central processing unit (CPU) resources will be considered. The CPU is a general-purpose computing resource. Although its computing power may be weaker than that of dedicated computing chips and graphics processors, it can still handle some relatively simple computing tasks when resources are limited.
[0084] Step S144: During the matching process, the resource requirement characteristics of the computing task unit to be scheduled are checked for compatibility with the candidate computing resources. If the candidate computing resources meet the compatibility requirements of the resource requirement characteristics, resource allocation is completed.
[0085] When matching computing resources for each scheduled task, the compatibility of the task's resource requirements with candidate computing resources must be checked. Resource requirements include information such as the task's compatibility requirements for the computing resource type and the resource's performance threshold. Candidate computing resources are selected based on matching rules as potential resources for allocation to the task, such as dedicated computing chips, graphics processors, or central processing units.
[0086] Specifically, the adaptability requirement parameters are first extracted from the resource demand characteristics of the computing task unit to be scheduled, including the resource type adaptation identifier and the resource performance lower limit. The resource type adaptation identifier specifies the resource type that the task unit is suitable for. For example, for a task that requires extensive graphics processing, its resource type adaptation identifier may be graphics processor resources. The resource performance lower limit specifies the task unit's minimum resource performance requirements, such as the minimum CPU frequency and the minimum graphics processor memory capacity.
[0087] Then, the resource type identifier and current resource performance value of the candidate computing resource are obtained. The resource type identifier corresponds to a central processing unit, graphics processing unit, or dedicated computing chip, and the current resource performance value is the current performance indicator of the resource, such as the current number of available computing cores of the central processing unit or the current remaining video memory capacity of the graphics processing unit.
[0088] Determine whether the resource type identifier of the candidate computing resource is consistent with the resource type adaptation identifier of the resource requirement characteristics. If they are inconsistent, it means that the candidate computing resource is not suitable for the task unit and another candidate resource needs to be reselected. If they are consistent, further determine whether the current value of the resource performance of the candidate computing resource is greater than or equal to the resource performance lower limit of the resource requirement characteristics. If both are satisfied, that is, the type of the candidate computing resource is appropriate and the performance meets the requirements, then determine that the candidate computing resource meets the adaptability requirements of the resource requirement characteristics and allocate the candidate computing resource to the computing task unit to be scheduled.
[0089] Step S1441: extracting adaptability requirement parameters from the resource demand characteristics of the computing task unit to be scheduled, wherein the adaptability requirement parameters include a resource type adaptation identifier and a resource performance lower limit value.
[0090] The resource requirement characteristics of the computing task unit to be scheduled include the specific requirements of the task for computing resources. The adaptability requirement parameter is a key part of the resource requirement characteristics, which consists of the resource type adaptation identifier and the resource performance lower limit. The resource type adaptation identifier is determined based on the nature and characteristics of the task, which clarifies the resource type suitable for the task. For example, for a task that mainly performs numerical calculations, its resource type adaptation identifier may be central processing unit resources; while for a task involving a large amount of image rendering, the resource type adaptation identifier may be graphics processing unit resources.
[0091] The resource performance lower limit is the minimum resource performance requirement for the task. Different tasks have different resource performance requirements. For a task requiring fast computation, a high CPU frequency and multi-core processing capability may be required. In this case, the resource performance lower limit will specify the minimum CPU frequency and core count. For a task that processes large amounts of graphics data, the resource performance lower limit may specify the minimum graphics processor memory capacity and bandwidth. By extracting these adaptability requirement parameters, we can accurately understand the specific computing resource requirements of the task unit.
[0092] Step S1442: Obtain the resource type identifier and current value of resource performance of the candidate computing resource, where the resource type identifier corresponds to a central processing unit, a graphics processing unit, or a dedicated computing chip.
[0093] When performing resource matching, information about candidate computing resources is required. Candidate computing resources are resources selected based on matching rules for possible allocation to a task unit. The resource type identifier specifies the type of candidate computing resource, which corresponds to a central processing unit, graphics processing unit, or dedicated computing chip. This resource type identifier allows for a quick determination of whether the candidate computing resource meets the resource type adaptation requirements of the task unit.
[0094] The current resource performance value is the current performance indicator of the candidate computing resource. For a CPU, this value may include the number of remaining computing cores and the current main frequency; for a GPU, this value may include the remaining video memory capacity and video memory bandwidth; for a dedicated computing chip, this value may include the remaining processing bandwidth and computing speed. Obtaining these current resource performance values accurately provides an understanding of the candidate computing resource's actual available performance, enabling comparison with the task unit's resource performance floor.
[0095] Step S1443: Determine whether the resource type identifier of the candidate computing resource is consistent with the resource type adaptation identifier of the resource demand feature.
[0096] This is the first step in the resource adaptability check. Compare the resource type identifier of the candidate computing resource with the resource type adaptation identifier in the resource requirement characteristics of the computing task unit to be scheduled. If the two are consistent, it means that the candidate computing resource meets the requirements of the task unit in type and may be allocated to the task unit; if they are inconsistent, it means that the candidate computing resource is not suitable for the task unit and other candidate resources need to be reselected. For example, if the resource type adaptation identifier of the task unit is a graphics processor resource, and the resource type identifier of the candidate computing resource is a central processing unit resource, then the candidate computing resource does not meet the requirements and it is necessary to continue looking for other suitable resources.
[0097] Step S1444: If they are consistent, further determine whether the current value of the resource performance of the candidate computing resource is greater than or equal to the lower limit value of the resource performance of the resource demand characteristic.
[0098] When the resource type identifier of the candidate computing resource is consistent with the resource type adaptation identifier of the resource demand feature, it is necessary to further check whether the resource performance meets the requirements. Compare the current value of the resource performance of the candidate computing resource with the lower limit value of the resource performance of the task unit. If the current value of the resource performance of the candidate computing resource is greater than or equal to the lower limit value of the resource performance, it means that the candidate computing resource can meet the minimum requirements of the task unit in terms of performance; if it is less than the lower limit value of the resource performance, it means that although the type of the candidate computing resource is suitable, the performance is insufficient and cannot be allocated to the task unit, and other resources also need to be reselected. For example, if the task unit requires a certain value for the lower limit value of the video memory capacity of the graphics processor, and the current remaining video memory capacity of the candidate graphics processor is less than the lower limit value, then the candidate graphics processor cannot be allocated to the task unit.
[0099] Step S1445: If all conditions are met, it is determined that the candidate computing resource meets the adaptability requirements of the resource demand characteristics, the candidate computing resource is allocated to the computing task unit to be scheduled, and the current available resource information of the CNC machining system is updated.
[0100] If the resource type identifier of the candidate computing resource is consistent with the resource type adaptation identifier of the resource requirement feature, and the current resource performance value of the candidate computing resource is greater than or equal to the resource performance lower limit of the resource requirement feature, the candidate computing resource is determined to meet the adaptability requirements of the resource requirement feature. At this time, the candidate computing resource is allocated to the computing task unit to be scheduled.
[0101] At the same time, the CNC machining system's currently available resource information needs to be updated. Because resources have been allocated to task units, the corresponding resource quantity will be reduced. For example, if a CPU core is allocated to a task unit, the number of remaining CPU cores will need to be reduced accordingly. If a portion of a graphics processor's video memory is allocated to a task unit, the remaining GPU memory capacity will also need to be updated. By promptly updating the currently available resource information, we ensure that subsequent resource matching processes are based on accurate resource status.
[0102] Step S145: Record the resource type and resource occupancy of each computing task unit to be scheduled, and generate an initial scheduling plan including the correspondence between the task units and the computing resources.
[0103] After allocating resources to each scheduled computing task unit, it's necessary to record the resource type and resource usage for each task unit. The resource type specifies whether the task unit is allocated CPU resources, GPU resources, or dedicated computing chip resources; the resource usage records the specific amount of resources occupied by the task unit, such as the number of CPU cores occupied or the amount of GPU memory occupied.
[0104] This recorded information is collated and summarized to form an initial scheduling plan that includes the mapping between task units and computing resources. This initial scheduling plan shows the correspondence between each scheduled computing task unit and the allocated computing resources, providing clear guidance for subsequent task execution. For example, the initial scheduling plan may indicate that a task unit is allocated a certain number of computing cores on the CPU and a certain amount of video memory on the GPU, as well as the allocation of other task units and computing resources.
[0105] Step S150: Based on the real-time feedback of the task execution status information, the initial scheduling plan is adaptively adjusted to generate a final scheduling plan including the task unit execution sequence and resource allocation parameters.
[0106] Step S151: obtaining real-time execution status information of the task units that have been started in the initial scheduling scheme, wherein the real-time execution status information includes the actual execution progress and resource usage of the task units.
[0107] After the initial scheduling plan begins executing, it's necessary to obtain real-time execution status information for the task units that have already started. This real-time execution status information is crucial data reflecting the current execution status of the task units. The actual execution progress indicates the proportion of the total workload completed by the task unit at the current moment. For example, for a part machining parameter optimization task, the actual execution progress might indicate the proportion of parameter calculation steps completed compared to the total number of calculation steps.
[0108] Resource usage refers to the actual amount of computing resources consumed by a task unit during execution. Examples include the number of CPU cores and GPU memory used by the task unit. By obtaining this real-time execution status information, we can accurately understand the actual execution status of the task unit.
[0109] Step S152: Calculate the deviation between the actual execution progress of the task unit and the planned execution progress, where the planned execution progress is determined by the execution sequence and time arrangement of the initial scheduling solution.
[0110] The planned execution schedule is determined based on the execution order and timing of the initial schedule. The initial schedule typically specifies an estimated execution time and schedule for each task unit. For example, for a task consisting of multiple steps, the initial schedule might specify that a set percentage of steps should be completed by a certain time point.
[0111] Compare the task unit's actual progress with the planned progress and calculate the deviation between them. The deviation is calculated by subtracting the planned progress from the actual progress. A positive deviation indicates that the task unit's actual progress is faster than planned; a negative deviation indicates that the task unit's actual progress is slower than planned. This deviation reflects whether the task unit's execution is meeting expectations.
[0112] Step S153: Calculate the deviation between the actual resource occupancy of the task unit and the planned resource occupancy, where the planned resource occupancy is determined by the resource allocation parameters of the initial scheduling solution.
[0113] The planned resource usage is determined based on the resource allocation parameters of the initial scheduling plan. The initial scheduling plan allocates a set amount of computing resources to each task unit, such as the number of CPU cores and GPU memory. These allocated resources are the planned resource usage.
[0114] Compare the task unit's actual resource usage with the planned resource usage and calculate the deviation between them. The deviation is calculated by subtracting the planned resource usage from the actual resource usage. A positive deviation indicates that the task unit's actual resource usage exceeds the planned resource usage; a negative deviation indicates that the task unit's actual resource usage is less than the planned resource usage. This deviation value can reflect whether the task unit's resource usage meets expectations.
[0115] Step S154: Evaluate the execution effect of the initial scheduling solution according to the progress deviation value and the resource occupancy deviation value. If the progress deviation value or the resource occupancy deviation value exceeds the corresponding preset threshold, trigger an adjustment mechanism.
[0116] To evaluate the effectiveness of the initial scheduling plan, it's necessary to comprehensively consider both the progress deviation and resource utilization deviation values. Preset thresholds are pre-set criteria for determining whether the scheduling plan is performing well. The progress deviation threshold represents the maximum allowable progress deviation, while the resource utilization deviation threshold represents the maximum allowable resource utilization deviation.
[0117] Compare the progress deviation and resource utilization deviation values to their corresponding preset thresholds. First, calculate the absolute value of the progress deviation to obtain the absolute value of the progress deviation; and then calculate the absolute value of the resource utilization deviation to obtain the absolute value of the resource utilization deviation. This is because the deviation value can be positive or negative, and we are interested in the magnitude of the deviation, so we use the absolute value.
[0118] Determine whether the absolute value of the progress deviation is greater than the progress deviation threshold, or whether the absolute value of the resource utilization deviation is greater than the resource utilization deviation threshold. If either condition holds, the initial scheduling plan is not performing as expected, possibly due to slow task execution or inappropriate resource usage. This triggers the adjustment mechanism. If neither condition holds, the task unit's execution progress and resource usage are within acceptable ranges, and the initial scheduling plan is retained as the final one.
[0119] For example, step S1541: performing absolute value calculation processing on the progress deviation value to obtain the absolute value of the progress deviation.
[0120] After obtaining the progress deviation value, since the deviation value can be positive or negative, and when evaluating the execution performance of the initial scheduling plan, we focus on the magnitude of the deviation, not its direction, so we need to calculate the absolute value of the progress deviation value. The absolute value calculation process can be simply understood as follows: if the progress deviation value is positive, it remains unchanged; if the progress deviation value is negative, it is converted to the corresponding positive number. Through this process, the absolute value of the progress deviation obtained can accurately reflect the degree of deviation between the actual execution progress of the task unit and the planned execution progress.
[0121] For example, a schedule deviation for a task unit to be scheduled might be due to unexpected circumstances during execution, such as data acquisition delays or minor glitches during the computation, resulting in a negative progress deviation. Alternatively, the actual execution efficiency of the task unit might be higher than expected, resulting in a positive progress deviation. In either case, taking the absolute value provides a clear indication of the progress deviation.
[0122] Step S1542: performing absolute value calculation processing on the resource occupancy deviation value to obtain the absolute value of the resource occupancy deviation.
[0123] Similar to schedule deviation, resource utilization deviation can be positive or negative. A positive resource utilization deviation indicates that the actual resource usage of a task unit exceeds the planned resource usage. This may mean that the resource demand during task execution exceeded expectations, perhaps because the task complexity was higher than expected, or because resource allocation was not reasonable. A negative resource utilization deviation indicates that the actual resource usage of a task unit is less than the planned resource usage. This may mean that the task execution was smoother than expected, or that there was an over-allocation of resources.
[0124] To assess the degree of resource usage deviation, the absolute value of the resource usage deviation is calculated. Similarly, if the resource usage deviation is positive, its absolute value is the value itself; if it is negative, it is converted to the corresponding positive number. The absolute value of the resource usage deviation obtained in this way can clearly show the difference between the actual resource usage of the task unit and the planned resource usage.
[0125] Step S1543: obtaining a preset progress deviation threshold and a resource occupancy deviation threshold, wherein the progress deviation threshold indicates the maximum allowable progress deviation, and the resource occupancy deviation threshold indicates the maximum allowable resource occupancy deviation.
[0126] The preset schedule deviation threshold and resource utilization deviation threshold are pre-defined metrics used to determine whether the initial scheduling plan's execution performance is within acceptable limits. The schedule deviation threshold is determined based on factors such as the nature and importance of the task, as well as the overall production process's timing. For tasks with very strict time constraints, the schedule deviation threshold may be set relatively low, as even a small schedule deviation can affect subsequent production processes. For tasks with more relaxed time constraints, the schedule deviation threshold can be appropriately set higher.
[0127] The resource usage deviation threshold is set based on factors such as resource availability, cost, and the task's dependency on the resource. If a resource is scarce or costly, the resource usage deviation threshold may be set lower to ensure proper resource use. Conversely, if resources are plentiful, the resource usage deviation threshold can be relaxed appropriately.
[0128] The process of obtaining these preset thresholds can be reading from a pre-stored configuration file or querying from a database. These thresholds are an important basis for determining whether to trigger the adjustment mechanism in the future.
[0129] Step S1544: Determine whether the absolute value of the progress deviation is greater than the progress deviation threshold, or whether the absolute value of the resource occupancy deviation is greater than the resource occupancy deviation threshold.
[0130] After obtaining the absolute values of the schedule deviation and resource utilization deviation, as well as the corresponding preset thresholds, a judgment operation is required. This judgment process is a key step in evaluating the effectiveness of the initial scheduling plan. The absolute value of the schedule deviation is compared with the schedule deviation threshold, and the absolute value of the resource utilization deviation is compared with the resource utilization deviation threshold.
[0131] If either the absolute value of the progress deviation is greater than the progress deviation threshold or the absolute value of the resource utilization deviation is greater than the resource utilization deviation threshold, it indicates that a major problem has occurred during the execution of the initial scheduling plan. This could be due to a significant delay in task execution, affecting the overall production process schedule; or resource utilization may have exceeded reasonable limits, resulting in wasted resources or a shortage of resources for other tasks.
[0132] Step S1545: If any one of the conditions is met, it is determined that the execution effect of the initial scheduling plan does not meet the requirements, and the adjustment mechanism is triggered; if none of the conditions is met, the initial scheduling plan is retained as the final scheduling plan.
[0133] If, in step S1544, the absolute value of the progress deviation is greater than the progress deviation threshold or the absolute value of the resource utilization deviation is greater than the resource utilization deviation threshold, then the initial scheduling solution is determined to be unsatisfactory. At this point, an adjustment mechanism needs to be triggered to optimize the scheduling solution. This adjustment mechanism can include re-evaluating the priority of task units and reallocating resources to ensure that tasks are executed according to the expected schedule and that resources are utilized effectively.
[0134] Conversely, if the absolute value of the progress deviation is less than or equal to the progress deviation threshold, and the absolute value of the resource utilization deviation is less than or equal to the resource utilization deviation threshold, the initial scheduling plan performs well, and the task's execution progress and resource usage are within acceptable ranges. In this case, the initial scheduling plan is retained as the final scheduling plan, and the task can continue to execute according to this plan.
[0135] Step S155: For the task unit that triggers the adjustment mechanism, re-evaluate its processing complexity characteristics and resource requirement characteristics, call the task priority evaluation model to regenerate the priority sequence, and re-execute the dynamic matching processing of tasks and resources based on the updated current available resource information to generate an adjusted scheduling plan as the final scheduling plan.
[0136] When the adjustment mechanism is triggered, the processing complexity and resource requirements of the task units involved must first be reassessed. This is because tasks can change during execution. For example, the originally estimated computational load may change due to data changes or algorithm optimization, which can lead to changes in processing complexity. Furthermore, resource usage may differ from the initial estimate, requiring a re-determination of resource requirements.
[0137] When reassessing the processing complexity characteristics, we again used the previous method to analyze the processing technology type information of the task unit, extract the algorithm execution process information, count the total number of operation nodes, calculate the amount of data transferred between adjacent nodes, and perform weighted processing and linear combination to obtain a new processing complexity characteristic. For the resource requirement characteristics, we reclassified the real-time constraint identifiers, identified the resource type adaptation rules, and extracted the new adaptability requirement parameters.
[0138] The re-evaluated processing complexity and resource requirement features are input into the task priority assessment model. The model further processes these features, using a fully connected neural network in the feature input layer for nonlinear transformation to generate a fused feature vector. The time-aware layer extracts contextual information from the temporal dimension to generate a time-enhanced feature vector. The attention mechanism module assigns attention weights, performing weighted aggregation to generate a priority assessment feature vector. Finally, the sorting output layer calculates the priority score and generates a new priority sequence.
[0139] Based on the updated currently available resource information—that is, resource information that has changed during resource allocation and task execution—the dynamic matching process between tasks and resources is re-executed. Computing resources are matched to each task unit in turn according to the new priority sequence. The resource requirements and the compatibility of the candidate computing resources are checked. Resource allocation is completed, and the resource type and resource usage of each task unit are recorded. The resulting adjusted scheduling plan is the final scheduling plan that meets the current task execution requirements.
[0140] The construction and training process of the task priority evaluation model is introduced as follows.
[0141] The task priority evaluation model mainly consists of a feature input layer, a time perception layer, an attention mechanism module, and a sorting output layer.
[0142] The feature input layer is the entry point of the model, receiving processing complexity and resource requirement features as input. It uses a fully connected neural network structure, where each neuron is connected to all neurons in the previous layer. Its function is to perform nonlinear transformations on the input features, fusing different types of features to generate a fused feature vector. When constructing the feature input layer, the number of neurons must be determined. This is determined by the dimensionality of the input features and the complexity of the model. Generally speaking, a larger number of neurons improves the model's expressiveness, but also increases computational complexity and training time.
[0143] The time-aware layer includes a long short-term memory (LSTM) module, which extracts contextual information from the fused feature vector along the temporal dimension. The LSTM module selectively memorizes and forgets historical feature information through memory gates, input gates, and output gates. The memory gate controls whether the hidden state information from the previous moment is passed to the current moment; the input gate determines whether the current input feature information is added to the current cell state; and the output gate controls whether the current cell state information is output to the hidden state. Through this mechanism, the LSTM module can capture long-term dependencies between feature vectors along the temporal dimension. When constructing the time-aware layer, it is important to determine the number of LSTM units, which affects the model's ability to process time series information.
[0144] The attention mechanism module assigns attention weights to the processing complexity and resource requirement features in the time-enhanced feature vector. The attention weights reflect the influence of each feature on the priority assessment. When building an attention mechanism module, it is necessary to design an appropriate attention calculation method. For example, a fully connected layer can be used to map the time-enhanced feature vector to a low-dimensional space, calculate an attention score, and then convert the score into a weight using the softmax function.
[0145] The sorting output layer is used to calculate the sorting scores of the priority evaluation feature vectors, generate priority scores for each task unit to be scheduled, and generate a priority sequence based on the magnitude of the scores. The sorting output layer can use a simple fully connected layer to map the priority evaluation feature vectors into a one-dimensional space to obtain the priority scores.
[0146] During model training, a large amount of historical task data must be collected, including the processing complexity characteristics, resource requirements, real-time constraints, and final priority ranking results of each task unit. This data is divided into training, validation, and test sets. The training set is used to learn model parameters, the validation set is used to adjust model hyperparameters during training, and the test set is used to evaluate the model's final performance.
[0147] Furthermore, it's necessary to determine the parameters required for training, such as the learning rate, batch size, and number of training epochs. The learning rate controls the step size for updating model parameters. Excessively large learning rates can prevent the model from converging, while too small a learning rate can slow down training. The batch size refers to the number of data samples used in each training run. A larger batch size improves training stability but increases memory requirements. The number of training epochs refers to the number of times the model is trained on the entire training set. Excessive training epochs can lead to model overfitting, while too few epochs can prevent the model from fully learning the data characteristics.
[0148] Therefore, the data in the training set can be input into the task priority assessment model and processed sequentially according to the task priority assessment model's structure. In each round of training, the loss between the model's output and the actual priority ranking result is calculated. The loss function can use cross-entropy loss or other loss functions suitable for the ranking task. Through the backpropagation algorithm, the model parameters are updated according to the gradient of the loss function, so that the model output gradually approaches the actual result.
[0149] During training, the model is regularly evaluated using the validation set, and model hyperparameters, such as the learning rate, are adjusted based on the performance of the validation set. Training is stopped when the number of training rounds reaches the preset value or the performance of the validation set no longer improves.
[0150] Finally, the trained task priority evaluation model is evaluated using the test set. Evaluation metrics for the task priority evaluation model on the test set, such as sorting accuracy and average sorting error, are calculated. These metrics reflect the performance of the task priority evaluation model on unknown data. If these metrics meet the expected requirements, the task priority evaluation model is considered successfully trained and can be used for actual task priority evaluation.
[0151] The data collection process may involve privacy-sensitive data, such as key parameters of the production process associated with a task unit. To protect this privacy-sensitive data, it is encrypted during the data collection phase. Symmetric encryption algorithms, such as the AES algorithm, can be used to generate an encryption key. The privacy-sensitive data is then encrypted with the encryption key to produce the encrypted data. Encrypted data is used during both storage and transmission, and only decrypted with the corresponding decryption key when needed. Furthermore, a strict access control mechanism is established to restrict access to privacy-sensitive data. Only authorized personnel or system components can access this data. Access control can be implemented through user authentication and role-based permission management. For example, different roles can be assigned to different users, each with different access permissions. Only roles with the appropriate permissions can access privacy-sensitive data.
[0152] Figure 2 A schematic diagram illustrating exemplary hardware and software components of a computing task scheduling system 100 for a numerically controlled machining system, provided in some embodiments of the present application and capable of implementing the concepts of the present application, is shown. For example, a processor 120 may be used in the computing task scheduling system 100 for a numerically controlled machining system and configured to execute the functions described in the present application.
[0153] The computing task scheduling system 100 applied to a numerical control machining system can be a general-purpose server or a special-purpose server, both of which can be used to implement the computing task scheduling method applied to a numerical control machining system of the present application. Although only one server is shown in this application, for convenience, the functions described in this application can be implemented in a distributed manner on multiple similar platforms to balance the processing load.
[0154] For example, the computing task scheduling system 100 applied to a numerical control machining system may include a network port 110 connected to a network, one or more processors 120 for executing program instructions, a communication bus 130, and storage media 140 in different forms, such as a disk, ROM, or RAM, or any combination thereof. Exemplarily, the computing task scheduling system 100 applied to a numerical control machining system may also include program instructions stored in ROM, RAM, or other types of non-transitory storage media, or any combination thereof. The method of the present application can be implemented according to these program instructions. The computing task scheduling system 100 applied to a numerical control machining system also includes an I / O interface 150 between the computer and other input and output devices.
[0155] For ease of explanation, only one processor is described in the computing task scheduling system 100 applied to a numerical control machining system. However, it should be noted that the computing task scheduling system 100 applied to a numerical control machining system in the present application may also include multiple processors, so the steps performed by one processor described in the present application may also be performed jointly or individually by multiple processors. For example, if the processor of the computing task scheduling system 100 applied to a numerical control machining system executes step A and step B, it should be understood that step A and step B may also be performed jointly by two different processors or individually in one processor. For example, the first processor executes step A, the second processor executes step B, or the first processor and the second processor execute steps A and B together.
[0156] In addition, an embodiment of the present invention further provides a readable storage medium, in which computer-executable instructions are preset. When a processor executes the computer-executable instructions, the computing task scheduling method applied to a numerical control machining system as described above is implemented.
[0157] It should be noted that in order to simplify the description of the present invention and thus help understand one or more embodiments of the invention, in the foregoing description of the embodiments of the present invention, multiple features are sometimes combined into one embodiment, figure or description thereof.
Claims
1. A computing task scheduling method applied to a numerical control machining system, characterized in that: The method comprises: Obtaining a task request set of a numerical control machining system, wherein the task request set includes a plurality of computing task units to be scheduled, and each computing task unit to be scheduled is associated with machining process type information and a real-time constraint identifier; Performing task feature extraction processing on the task request set to obtain processing complexity features and resource requirement features of each computing task unit to be scheduled, wherein the processing complexity features reflect the computing scale of the task unit, and the resource requirement features reflect the adaptability requirements of the task unit to the computing resource type; Calling a pre-built task priority evaluation model to perform a joint priority evaluation process on the processing complexity characteristics and the resource demand characteristics, and generating a priority sequence including a priority ranking of task units; Performing dynamic matching processing between tasks and resources based on the priority sequence and currently available resource information of the numerical control machining system to generate an initial scheduling plan including correspondences between task units and computing resources; Based on the real-time feedback of task execution status information, the initial scheduling plan is adaptively adjusted to generate a final scheduling plan including the execution order of task units and resource allocation parameters; The task feature extraction process is performed on the task request set to obtain the processing complexity feature and resource requirement feature of each computing task unit to be scheduled, including: Parsing the processing technology type information of each to-be-scheduled computing task unit in the task request set, and extracting the algorithm execution process information corresponding to the processing technology type; Calculate the computational scale parameter of the to-be-scheduled computation task unit as a processing complexity feature based on the number of operation nodes and the amount of data transferred between nodes in the algorithm execution process information; Classify the real-time constraint identifier of each to-be-scheduled computing task unit in the task request set, and identify the resource type adaptation rule corresponding to the real-time constraint identifier; Based on the resource type adaptation rule, extracting the adaptability requirement parameters of the computing task unit to be scheduled to the central processing unit resources, graphics processing unit resources or dedicated computing chip resources as resource demand characteristics; The processing complexity feature and the resource requirement feature are input into a feature normalization module, and feature parameters of different dimensions are normalized by a linear scaling method to obtain a target feature set with a unified numerical range.
2. The computing task scheduling method applied to a numerical control machining system according to claim 1, characterized in that: The parsing of the processing technology type information of each to-be-scheduled computing task unit in the task request set to extract algorithm execution process information corresponding to the processing technology type includes: Acquire a process knowledge base corresponding to the processing technology type information, wherein the process knowledge base stores a mapping relationship between different processing technology types and algorithm execution processes; Querying the process knowledge base according to the processing technology type information, and extracting the algorithm execution process description document matching the processing technology type; Perform semantic parsing on the algorithm execution process description document to identify data input nodes, intermediate calculation nodes, and result output nodes in the process; Extracting an operation type identifier of each node and data transmission path information between nodes, wherein the operation type identifier includes a numerical calculation operation, a geometric modeling operation, or a path planning operation; Based on the operation type identifier and data transmission path information of the node, an algorithm execution process topology diagram of the computing task unit to be scheduled is constructed.
3. The computing task scheduling method applied to a numerical control machining system according to claim 2, characterized in that: The step of calculating the computational scale parameter of the to-be-scheduled computation task unit as a processing complexity feature based on the number of operation nodes and the amount of data transferred between nodes in the algorithm execution process information includes: Counting the total number of operation nodes in the algorithm execution process topology diagram, where the total number of operation nodes reflects the number of calculation steps of the task unit; Calculating the amount of data transferred between adjacent nodes in the algorithm execution process topology graph, where the amount of data transferred is determined by the product of the output data dimension of the preceding node and the input data dimension of the succeeding node; Performing weighted processing on the total number of operation nodes to obtain a weighted total number of operation nodes, wherein the weight coefficient is determined by the operation type identifier corresponding to the node, and the weight coefficient of the numerical calculation operation node is greater than the weight coefficient of the geometric modeling operation node; Accumulating and summing the data transfer amounts to obtain a total data transfer amount parameter of the computing task unit to be scheduled; The total number of weighted operation nodes and the total data transfer amount parameter are linearly combined to generate a computational scale parameter of the computational task unit to be scheduled as a processing complexity feature.
4. The computing task scheduling method applied to a numerical control machining system according to claim 1, characterized in that: The calling of a pre-built task priority evaluation model to perform a joint priority evaluation process on the processing complexity characteristics and the resource requirement characteristics to generate a priority sequence including a priority ranking of task units includes: Inputting the processing complexity feature and the resource requirement feature into the feature input layer of the task priority evaluation model, performing nonlinear transformation processing on the features through a fully connected neural network, and generating a fused feature vector; The time perception layer of the task priority evaluation model is used to extract context information of the time dimension of the fused feature vector to generate a time-series enhanced feature vector containing real-time constraint information; Using the attention mechanism module of the task priority evaluation model, attention weights are assigned to the processing complexity feature and the resource requirement feature in the timing enhancement feature vector, respectively, wherein the attention weights reflect the degree of influence of the feature on the priority evaluation; Performing weighted aggregation processing on the temporal enhancement feature vector based on the attention weight to generate a priority evaluation feature vector; The sorting output layer of the task priority evaluation model is called to perform sorting score calculation processing on the priority evaluation feature vector to generate a priority score value for each computing task unit to be scheduled, and a priority sequence is generated according to the size relationship of the priority score values.
5. The computing task scheduling method applied to a numerical control machining system according to claim 4, characterized in that: The step of extracting context information of the time dimension from the fused feature vector through the time perception layer of the task priority evaluation model to generate a time-series enhanced feature vector containing real-time constraint information includes: Inputting the fused feature vector into the long short-term memory network module of the time perception layer, and performing selective memory and forgetting processing on the historical feature information through the memory gate, input gate and output gate; Extracting a hidden state vector output by the long short-term memory network module, wherein the hidden state vector includes context information of the fused feature vector at a historical time step; Obtaining a time threshold parameter corresponding to the real-time constraint identifier of the computing task unit to be scheduled, wherein the time threshold parameter represents a maximum execution delay allowed by the task unit; Concatenating the time threshold parameter with the hidden state vector to generate a joint feature vector containing time constraint information; The joint feature vector is normalized to eliminate the dimensional difference between the time threshold parameter and the hidden state vector, and a time-series enhanced feature vector containing real-time constraint information is generated.
6. The computing task scheduling method for a numerical control machining system according to claim 1, characterized in that: The method of performing dynamic matching processing between tasks and resources based on the priority sequence and the currently available resource information of the numerical control machining system to generate an initial scheduling scheme including a correspondence between task units and computing resources includes: Parsing the priority sequence to determine the priority order of each computing task unit to be scheduled; Acquiring currently available resource information of the numerical control machining system, wherein the currently available resource information includes the number of remaining computing cores of the central processing unit, the remaining video memory capacity of the graphics processing unit, and the remaining processing bandwidth of the dedicated computing chip; Matching computing resources to each to-be-scheduled computing task unit in sequence according to the priority order, wherein the matching rules include: allocating dedicated computing chip resources to high-priority task units first, allocating graphics processor resources second best, and finally allocating central processing unit resources; During the matching process, the resource requirement characteristics of the computing task unit to be scheduled are checked for compatibility with the candidate computing resources. If the candidate computing resources meet the compatibility requirements of the resource requirement characteristics, resource allocation is completed. Record the resource type and resource usage of each task unit to be scheduled, and generate an initial scheduling plan that includes the correspondence between task units and computing resources.
7. The computing task scheduling method for a numerical control machining system according to claim 6, characterized in that: In the matching process, the resource requirement characteristics of the computing task unit to be scheduled are checked for compatibility with the candidate computing resources. If the candidate computing resources meet the compatibility requirements of the resource requirement characteristics, resource allocation is completed, including: Extracting adaptability requirement parameters from the resource demand characteristics of the computing task unit to be scheduled, wherein the adaptability requirement parameters include a resource type adaptation identifier and a resource performance lower limit value; Obtaining a resource type identifier and a current value of resource performance of a candidate computing resource, wherein the resource type identifier corresponds to a central processing unit, a graphics processing unit, or a dedicated computing chip; Determining whether the resource type identifier of the candidate computing resource is consistent with the resource type adaptation identifier of the resource demand characteristic; If they are consistent, further determine whether the current value of the resource performance of the candidate computing resource is greater than or equal to the resource performance lower limit of the resource demand characteristic; If all of them are satisfied, it is determined that the candidate computing resource meets the adaptability requirement of the resource demand feature, the candidate computing resource is allocated to the computing task unit to be scheduled, and the current available resource information of the numerical control machining system is updated.
8. The computing task scheduling method applied to a numerical control machining system according to claim 1, characterized in that: The adaptive adjustment process of the initial scheduling scheme based on the task execution status information fed back in real time to generate a final scheduling scheme including the execution order of task units and resource allocation parameters includes: Acquire real-time execution status information of the task units that have been started in the initial scheduling scheme, wherein the real-time execution status information includes the actual execution progress and resource usage of the task units; Calculating a progress deviation between the actual execution progress of the task unit and the planned execution progress, wherein the planned execution progress is determined by the execution order and time arrangement of the initial scheduling plan; Calculating a resource occupancy deviation between an actual resource occupancy of the task unit and a planned resource occupancy, wherein the planned resource occupancy is determined by a resource allocation parameter of the initial scheduling scheme; Evaluate the execution effect of the initial scheduling plan according to the progress deviation value and the resource occupancy deviation value, and trigger an adjustment mechanism if the progress deviation value or the resource occupancy deviation value exceeds a corresponding preset threshold; For the task unit that triggers the adjustment mechanism, its processing complexity characteristics and resource requirement characteristics are re-evaluated, the task priority evaluation model is called to regenerate the priority sequence, and the dynamic matching processing of tasks and resources is re-executed based on the updated current available resource information to generate an adjusted scheduling plan as the final scheduling plan.
9. A computing task scheduling system applied to a numerical control machining system, characterized in that: It includes a processor and a memory, the memory is connected to the processor, the memory is used to store programs, instructions or codes, and the processor is used to execute the programs, instructions or codes in the memory to implement the computing task scheduling method applied to a CNC machining system as described in any one of claims 1 to 8.
Citation Information
Patent Citations
Optimized scheduling method and system for hardware mold production process
CN119272932A
Multi-line cooperative scheduling method and device based on artificial intelligence
CN120179366A