Printing production line dynamic scheduling method and system based on federal learning
Through federated learning, the state drift intensity update model is obtained, the context state vector is constructed, and a stable scheduling strategy is generated, which solves the problem of resource configuration imbalances and frequent equipment start-stops in traditional printing production line scheduling methods under variable orders, and improves the scheduling accuracy.
Patent Information
- Application Number
- CN202510479969.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-17
- Publication Date
- 2025-07-25
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional printing production line scheduling methods are difficult to adapt to the rapid switching of changeable, multi-category, and small batch orders, resulting in unbalanced resource allocation and frequent start-and-stop equipment.
Through federated learning, the state drift intensity is obtained, the initial state prediction model is updated, the context state vector is constructed, and the scheduling strategy with context-awareness is generated, which solves the problem of model lag.
A stable task allocation plan is realized in a high-frequency change environment, avoiding resource configuration imbalance and frequent equipment start-stop, and improving scheduling accuracy.
Smart Images

Figure CN120373901A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of data processing, and in particular, to a dynamic scheduling method and system for a printing production line based on federated learning. Background Art
[0002] In the printing industry, there are more and more customized demand orders with multiple categories and small batches. The traditional centralized production scheduling mode with batches as the core is difficult to adapt to the current operating requirements of changeable, multi-category, and small-batch orders. In related technologies, the printing production line is scheduled by an artificial intelligence-based method, but this method is difficult to keep up with the data distribution changes brought about by the rapid order switching on the printing site. Especially in a high-frequency change environment, the lag of the prediction model will directly affect the scheduling accuracy, and the model lag will lead to problems such as unbalanced resource allocation and frequent start and stop of equipment. Therefore, how to improve the scheduling accuracy on the printing production line has become a technical problem to be solved urgently. Summary of the Invention
[0003] The main purpose of the embodiments of this application is to propose a dynamic scheduling method and system for a printing production line based on federated learning, aiming to improve the scheduling accuracy on the printing production line.
[0004] To achieve the above object, a first aspect of the embodiments of this application proposes a dynamic scheduling method for a printing production line based on federated learning, and the method includes:
[0005] Obtain the state drift intensity; wherein, the state drift intensity characterizes the degree of difference between the current device state data and the previous device state data;
[0006] If the state drift intensity is greater than a preset drift threshold, update a preset initial state prediction model according to a preset task residual retention loss function to obtain a target state prediction model;
[0007] If the state drift intensity is less than or equal to the drift threshold, use the initial state prediction model as the target state prediction model;
[0008] Input the current device state data into the target state prediction model to obtain state prediction data;
[0009] Construct a context state vector according to the state prediction data, preset order task data, and preset historical task execution data;
[0010] Obtain the device performance data of each device;
[0011] Generate a scheduling strategy according to the context state vector and the device performance data.
[0012] In some embodiments, the obtaining the state drift intensity includes:
[0013] Obtain the current device status data of the current task cycle and the previous device status data of the previous task cycle;
[0014] Perform difference comparison based on the current device status data and the previous device status data to obtain the state drift intensity.
[0015] In some embodiments, if the state drift intensity is greater than a preset drift threshold, then update a preset initial state prediction model according to a preset task residual retention loss function to obtain a target state prediction model, including:
[0016] If the state drift intensity is greater than the drift threshold, then construct a task residual retention loss function according to a preset state prediction base loss, a parameter perturbation penalty term, and the variance of the prediction error;
[0017] Update the parameters of the initial state prediction model through the task residual retention loss function to obtain a local rapid update model;
[0018] Construct the target state prediction model according to the local rapid update model, a preset fusion weight, and a preset cloud global model.
[0019] In some embodiments, constructing a context state vector according to the state prediction data, a preset order task data, and a preset historical task execution data includes:
[0020] Perform normalization processing and encoding processing on the state prediction data to obtain target prediction data;
[0021] Perform normalization processing and encoding processing on the order task data to obtain target task data;
[0022] Perform normalization processing and encoding processing on the historical task execution data to obtain target historical execution data;
[0023] Concatenate the target prediction data, the target task data, and the target historical execution data to obtain the context state vector.
[0024] In some embodiments, generating a scheduling strategy according to the context state vector and the device performance data includes:
[0025] Construct a scoring function according to the context state vector and the device performance data; wherein, the scoring function is used to evaluate the adaptability of an order task to each device under the context state vector;
[0026] Obtain the scoring data of the order task assigned to each device according to the scoring function;
[0027] Generate the scheduling policy according to the score data of each device.
[0028] In some embodiments, after generating the scheduling policy according to the context state vector and the device state data, the method further includes:
[0029] Store the context state vector, the scheduling policy, the device performance data, the preset policy network parameters, and the timestamp as snapshot data;
[0030] During the execution of the scheduling policy, if an abnormal state of the device is detected, obtain the type of abnormality;
[0031] Perform interruption processing on the device according to the type of abnormality and the snapshot data.
[0032] In some embodiments, performing interruption processing on the device according to the type of abnormality and the snapshot data includes:
[0033] Judge whether the type of abnormality is within the preset type range;
[0034] If the judgment result is yes, re-execute the scheduling policy; if the judgment result is no, give an abnormality reminder.
[0035] To achieve the above object, a second aspect of the embodiments of the present application proposes a dynamic scheduling system for a printing production line based on federated learning. The system includes:
[0036] A first acquisition module, configured to acquire a state drift intensity; wherein, the state drift intensity represents the degree of difference between the current device state data and the previous device state data;
[0037] An update module: If the state drift intensity is greater than a preset drift threshold, the update module is configured to update a preset initial state prediction model according to a preset task residual retention loss function to obtain a target state prediction model;
[0038] If the state drift intensity is less than or equal to the drift threshold, use the initial state prediction model as the target state prediction model;
[0039] An input module, configured to input the current device state data into the target state prediction model to obtain state prediction data;
[0040] A construction module, configured to construct a context state vector according to the state prediction data, preset order task data, and preset historical task execution data;
[0041] A first acquisition module, configured to acquire the device performance data of each device;
[0042] A generation module, configured to generate a scheduling policy according to the context state vector and the device performance data.
[0043] To achieve the above object, a third aspect of the embodiments of the present application provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, the method described in the first aspect above is implemented.
[0044] To achieve the above object, a fourth aspect of the embodiments of the present application provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the method described in the first aspect above is implemented.
[0045] The dynamic scheduling method and system for a printing production line based on federated learning proposed in the present application obtains the state drift intensity; wherein, the state drift intensity characterizes the degree of difference between the current device state data and the previous device state data. If the state drift intensity is greater than a preset drift threshold, the preset initial state prediction model is updated according to the preset task residual holding loss function to obtain a target state prediction model. The current device state data is input into the target state prediction model to obtain state prediction data. A context state vector is constructed according to the state prediction data, the preset order task data, and the preset historical task execution data. The device performance data of each device is obtained, and a scheduling policy is generated according to the context state vector and the device performance data. It solves the problem of model lag, and has a scheduling policy generation mechanism with context awareness ability, and can generate a stable task allocation plan. Description of the Drawings
[0046] Figure 1 is a flowchart of the dynamic scheduling method for a printing production line based on federated learning provided by the embodiments of the present application;
[0047] Figure 2 is Figure 1 a flowchart of step S101 in
[0048] Figure 3 is Figure 1 a flowchart of step S102 in
[0049] Figure 4 is Figure 1 a flowchart of step S104 in
[0050] Figure 5 is Figure 1 a flowchart of step S106 in
[0051] Figure 6It is a flowchart of a dynamic scheduling method for a printing production line based on federated learning provided by another embodiment of the present application;
[0052] Figure 7 It is Figure 6 a flowchart of step S603 in
[0053] Figure 8 It is a schematic structural diagram of a dynamic scheduling system for a printing production line provided by an embodiment of the present application;
[0054] Figure 9 It is a schematic hardware structure diagram of an electronic device provided by an embodiment of the present application. Detailed implementation manners
[0055] In order to make the objectives, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0056] It should be noted that although functional module division is performed in the system schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order from the module division in the system or the order in the flowchart. Terms such as "first" and "second" in the specification, claims and the above-mentioned drawings are used to distinguish similar objects and do not necessarily need to describe a specific order or sequence.
[0057] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the technical field to which the present application belongs. The terms used herein are only for the purpose of describing the embodiments of the present application and are not intended to limit the present application.
[0058] In the printing industry, there are more and more customized demand orders for multiple categories in small batches. The traditional centralized production scheduling mode centered on batches has become difficult to adapt to the current operating requirements of changeable, multi-category and small-batch orders. In related technologies, printing production line scheduling is carried out by means of artificial intelligence-based methods. However, the task switching frequency in the printing production line is high, the equipment state changes violently, and the abnormal conditions are sudden and associated. These industry characteristics pose great challenges to the generalization ability, response speed and deployment reliability of the model, and there is a problem of model lag. The lag of the prediction model will directly affect the scheduling accuracy, resulting in problems such as unbalanced resource allocation and frequent start and stop of equipment.
[0059] Based on this, the embodiments of the present application provide a dynamic scheduling method and system for a printing production line based on federated learning, aiming to determine whether there is a problem of drastic changes in device status according to the state drift intensity. If so, the initial state prediction model is updated to obtain the target state prediction model. By predicting the current device status data through the target state prediction model, accurate state prediction data can be obtained, solving the problem of model lag. A context state vector is constructed based on the state prediction data, order task data, and historical task execution data, and then a scheduling strategy is generated according to the context state vector and device performance data, thereby realizing a scheduling strategy generation mechanism with context awareness ability and being able to generate a stable task allocation plan.
[0060] The dynamic scheduling method and system for a printing production line based on federated learning provided by the embodiments of the present application are specifically described through the following embodiments. First, the dynamic scheduling method for a printing production line based on federated learning in the embodiments of the present application is described.
[0061] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Among them, Artificial Intelligence (AI) is a theory, method, technology, and application system that uses digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use knowledge to obtain the best results.
[0062] Artificial intelligence basic technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, and mechatronics. Artificial intelligence software technologies mainly include several major directions such as computer vision technology, robotics, biometric technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0063] The dynamic scheduling method for a printing production line based on federated learning provided by the embodiments of the present application can be applied to terminals, can also be applied to the server side, or can also be software running on the terminal or the server side. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc.; the server side can be configured as an independent physical server, can also be configured as a server cluster or distributed system composed of multiple physical servers, or can also be configured as a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application that implements the dynamic scheduling method for a printing production line based on federated learning, etc., but is not limited to the above forms.
[0064] This application can be used in numerous general-purpose or special-purpose computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, and so on. This application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. This application can also be practiced in a distributed computing environment where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0065] Please refer to Figure 1 , Figure 1 which is a flowchart of a dynamic scheduling method for a printing production line based on federated learning provided by an embodiment of this application. Figure 1 The method in
[0066] Step S101, obtain the state drift intensity; where the state drift intensity characterizes the degree of difference between the current device state data and the previous device state data;
[0067] Step S102, if the state drift intensity is greater than a preset drift threshold, update the preset initial state prediction model according to the preset task residual retention loss function to obtain a target state prediction model;
[0068] Step S103, input the current device state data into the target state prediction model to obtain state prediction data;
[0069] Step S104, construct a context state vector according to the state prediction data, the preset order task data, and the preset historical task execution data;
[0070] Step S105, obtain the device performance data of each device;
[0071] Step S106, generate a scheduling strategy according to the context state vector and the device performance data.
[0072] In step S101 of some embodiments, the state drift intensity characterizes the degree of difference between the current device state data and the previous device state data. That is, the state data of the device in the current task cycle is the current device state data, and the state data of the device in the previous task cycle is the previous device state data. The device state data can be collected in real time by device sensors and includes operating characteristics such as motor current, inkjet speed, tension, and temperature.
[0073] It should be noted that in order to adapt to the characteristics of high printing task switching frequency, sensitive state changes but stable dimensions, when calculating the state drift intensity, complex distribution distances (such as KL divergence, Mahalanobis distance) are not used, but a lightweight average difference method is adopted, which can complete rapid determination with extremely low computing resources and is suitable for deployment in printing device embedded controllers or edge gateway devices.
[0074] In step S102 of some embodiments, the drift threshold can be set to 0.2. When the state drift intensity is greater than the drift threshold, it can be considered that there is a significant distribution drift between the current order task and the previous order task, triggering model update. This is illustrated by the following formula (1):
[0075]
[0076] where, δ t represents the state drift intensity, τ represents the drift threshold. When S t > τ, δ t = 1, indicating that the model needs to be updated. When S t ≤ τ, δ t = 0, indicating that there is no need to update the model.
[0077] It should be noted that if the state drift intensity is less than or equal to the drift threshold, the initial state prediction model is used as the target state prediction model, that is, there is no need to update the model, and the state prediction is directly performed through the current initial state prediction model.
[0078] The prediction model in the previous task cycle is the initial state prediction model, and the prediction model in the current task cycle is the target state prediction model. When the current task cycle changes to the previous task cycle, the target state prediction model of this cycle also changes to the initial state prediction model. For example, if the current task cycle is the second task cycle, the prediction model in the first task cycle is the initial state prediction model, and the prediction model in the second task cycle is the target state prediction model. If the current task cycle is the third task cycle, the prediction model in the second task cycle is the initial state prediction model. When it is determined that the model needs to be updated in the current task cycle, the prediction model in the second task cycle is used as the initial state prediction model for update.
[0079] In practical applications, the initial state prediction model is updated according to a preset task residual retention loss function to obtain a target state prediction model. The updated target state prediction model can execute order tasks more quickly and adapt to multi-task switching scenarios. The goal of model update is to generate a state prediction model that is effective for the current task cycle. In the related art, when the prediction model has frequent task switches and drastic state changes, it cannot adapt to these changes in time, resulting in delayed and distorted state prediction and scheduling failure. In step S103 of some embodiments, the current device state data is the state data of the device under the current order task, including operating characteristics such as motor current, inkjet speed, tension, and temperature. The state prediction data includes predicted energy consumption, predicted failure rate, and predicted task completion duration. After inputting the current device state data into the target state prediction model, state prediction data can be obtained.
[0080] In step S104 of some embodiments, the order task data is sent by the scheduling center and includes fields such as paper type, printing quantity, process complexity level, and number of color channels. The historical task execution data is the execution result of historical order tasks, including whether it is interrupted, average task completion time, etc. The state prediction data, the current order task data, and the historical task execution data are combined to construct a unified and structured context state vector for use in generating a scheduling strategy.
[0081] In steps S105 to S106 of some embodiments, the device performance data is provided by the device control layer and includes data such as the remaining capacity of the device, operating temperature, and standby duration. In one example, it is possible to only obtain the set of all devices in the " schedulable " state during the current task cycle, and then obtain the device performance data of each device in the schedulable set. Then, a scheduling strategy is generated based on the context state vector and the device performance data. The scheduling strategy is to assign an order task to a certain device, that is, a task allocation scheme. This scheduling strategy generation method can generate a stable task allocation scheme using the comprehensive information of state prediction data, order task data, historical task execution data, and the device performance data of each device, avoid policy failure caused by sudden changes in device state or environmental changes, and also has context awareness capabilities.
[0082] Steps S101 to S106 shown in the embodiments of the present application obtain the state drift intensity; wherein, the state drift intensity characterizes the degree of difference between the current device state data and the previous device state data. If the state drift intensity is greater than the preset drift threshold, the preset initial state prediction model is updated according to the preset task residual retention loss function to obtain the target state prediction model. The current device state data is input into the target state prediction model to obtain state prediction data. A context state vector is constructed based on the state prediction data, the preset order task data, and the preset historical task execution data. The device performance data of each device is obtained, and a scheduling policy is generated according to the context state vector and the device performance data. This solves the problem of model lag, and has a scheduling policy generation mechanism with context awareness ability, which can generate a stable task allocation plan.
[0083] Please refer to Figure 2 , in some embodiments, step S101 may include but is not limited to steps S201 to S202:
[0084] Step S201, obtain the current device state data of the current task cycle and the previous device state data of the previous task cycle;
[0085] Step S202, perform a difference comparison based on the current device state data and the previous device state data to obtain the state drift intensity.
[0086] In step S201 of some embodiments, in order to determine whether the current order task causes a significant change in the device state distribution, so as to decide whether to trigger a local micro-refresh of the model, it is necessary to obtain the current device state data of the current task cycle and the previous device state data of the previous task cycle.
[0087] In step S202 of some embodiments, perform a difference comparison based on the current device state data and the previous device state data to obtain the state drift intensity.
[0088] In one example, the mean vectors of the state data within two task cycles can be quickly compared by the "sliding window similarity difference judgment method" and to calculate the state drift intensity between them. As shown in the following formula (2):
[0089]
[0090] wherein, S t represents the state drift intensity, represents the mean of the device state data in the current task cycle, represents the mean of the device status data in the previous task cycle, and d represents the number of dimensions of the device status data. For example, when the device status data only includes motor current, inkjet speed, tension, and temperature, d = 4.
[0091] Steps S201 to S202 illustrated in this embodiment obtain the current device status data in the current task cycle and the previous device status data in the previous task cycle. By comparing the differences between the current device status data and the previous device status data, the state drift intensity is obtained. Based on the state drift intensity, it is possible to quickly determine whether the current order task causes a significant change in the device status distribution, thereby deciding whether to trigger the update of the prediction model and preventing the problem of model lag.
[0092] Please refer to Figure 3 , in some embodiments, step S102 may include but is not limited to steps S301 to S303:
[0093] Step S301, if the state drift intensity is greater than the drift threshold, construct a task residual preserving loss function according to the preset basic loss of state prediction, parameter perturbation penalty term, and variance of prediction error;
[0094] Step S302, update the parameters of the initial state prediction model through the task residual preserving loss function to obtain a locally fast updated model;
[0095] Step S303, construct a target state prediction model according to the locally fast updated model, the preset fusion weight, and the preset cloud global model.
[0096] In steps S301 to S302 of some embodiments, if the state drift intensity is greater than the drift threshold, construct a task residual preserving loss function according to the preset basic loss of state prediction, parameter perturbation penalty term, and variance of prediction error. The task residual preserving loss function (Task-Residual Preserving Loss, TRPL) is a short-term adaptive regularization loss function, as shown in the following formula (3):
[0097]
[0098] Among them, represents the task residual preserving loss function, represents the basic loss of state prediction, represents the parameter perturbation penalty term that restricts the fine-tuning amplitude to avoid instability caused by drift, θ t-1 represents the initial state prediction model, represents the locally fast updated model, represents the variance of the prediction error, which is used to maintain the robustness of the model to abnormal states. λ1 and λ2 represent the regularization weights that control the fine-tuning perturbation and stability, and can be set as λ1 = 0.01 and λ2 = 0.1. represents the state prediction data, y t represents the observed value. The parameter of the initial state prediction model is updated through the task residual hold loss function to obtain the local fast update model.
[0099] It should be noted that only the initial state prediction model θ needs to be fine-tuned. t-1 Therefore, the fast gradient update is performed on the output layer and the penultimate layer parameters of the initial state prediction model through the task residual hold loss function to obtain the local fast update model.
[0100] In step S303 of some embodiments, the fusion weight reflects the dominant degree of the local data's adaptability to the current order task, and can be automatically generated by the state drift intensity S. t It is defined as the fusion weight α t = min(1, k·S t ), where k is the scaling coefficient. For example, when k = 3 and S t = 0.2, α t = 0.6. The cloud global model is the aggregation result of all models periodically sent down. The target state prediction model is constructed according to the local fast update model, the fusion weight, and the cloud global model as shown in the following formula (4):
[0101]
[0102] where θ t represents the target state prediction model, α t represents the fusion weight, represents the cloud global model. After obtaining the target state prediction model, the system will upload the update gradient or parameter summary to the cloud to participate in the global model aggregation periodically (such as every 2 hours). The cloud does not retain the original data, but only performs weighted average update on the model differences uploaded by each device to obtain a new round and broadcast it to all devices. All models θ t are three-layer fully connected neural networks, where the last two layers support fast independent fine-tuning, and the reasonable division of federated sharing and local differences is achieved by freezing the previous layers.
[0103] Steps S301 to S303 illustrated in this embodiment obtain the target state prediction model by fine-tuning the initial state prediction model, and solve the problems of fast order task switching and model lag.
[0104] Please refer to Figure 4, in some embodiments, step S104 may include, but is not limited to, steps S401 to S404:
[0105] Step S401, perform normalization processing and encoding processing on the status prediction data to obtain target prediction data;
[0106] Step S402, perform normalization processing and encoding processing on the order task data to obtain target task data;
[0107] Step S403, perform normalization processing and encoding processing on the historical task execution data to obtain target historical execution data;
[0108] Step S404, splice the target prediction data, the target task data, and the target historical execution data to obtain a context status vector.
[0109] In steps S401 to S403 of some embodiments, after the status prediction data, the order task data, and the historical task execution data are all normalized, they are encoded through a lightweight vector encoding module deployed on the device, and finally the target prediction data, the target task data, and the target historical execution data are obtained.
[0110] In practical applications, since the target prediction data includes predicted energy consumption, predicted failure rate, and predicted task completion duration, it is a 3D vector after normalization and encoding. The target task data includes paper type, printing quantity, number of color channels, and process complexity level. The paper type is encoded by one-hot, with a total of 6 types, so it is a 6D vector after encoding, the printing quantity is normalized after compression and is a 1D vector after encoding, the number of color channels is a 1D vector after encoding, and the process complexity level is a 1D vector after encoding. Therefore, the target task data is a 9D vector after normalization and encoding. The target historical execution data includes the average energy consumption, number of interruptions, and task delay rate of historical order tasks, so it is a 3D vector after normalization and encoding.
[0111] In step S404 of some embodiments, the context status vector z t is defined as the target prediction data the target task data and the target historical execution data h t spliced together, as shown in the following formula (5):
[0112]
[0113] where z t represents the context status vector, represents the target prediction data, represents the target task data, h tRepresents the target historical execution data.
[0114] In steps S401 to S404 illustrated in this embodiment, the state prediction data, order task data, and historical task execution data only undergo normalization and encoding processing, without involving any trainable parameters, and can quickly construct a context state vector. Based on the context state vector, a scheduling policy is generated, realizing a scheduling policy generation mechanism with context awareness ability.
[0115] Please refer to Figure 5 , in some embodiments, step S106 includes but is not limited to steps S501 to S503:
[0116] Step S501, constructing a scoring function according to the context state vector and device performance data; wherein, the scoring function is used to evaluate the adaptability of the order task to each device under the context state vector;
[0117] Step S502, obtaining the scoring data of the order task assigned to each device according to the scoring function;
[0118] Step S503, generating a scheduling policy according to the scoring data of each device.
[0119] In step S501 of some embodiments, a scoring function is constructed according to the context state vector and device performance data, as shown in the following formula (6):
[0120]
[0121] Wherein, a t represents the scheduling policy, represents the set of schedulable devices, d k represents a device in the set of schedulable devices, z t represents the context state vector, ψ k represents the device performance data of device d k , and π φ (z t , ψ k ) represents the scoring function. The scoring function is used to evaluate the adaptability of the current order task to device d k under the context state vector. The higher the score, the more reasonable it is to assign the order task to device d k .
[0122] It should be noted that the structure of ψ φ is as shown in the following formula (7):
[0123] ψ φ (z t , ψ k ) = w1·σ1(zt , ψ k ) + w2·σ2(z t , ψ k ) + w3·σ3(z t , ψ k ) - λ·R(z t , ψ k ), (7)
[0125] Among them, w1, w2, and w3 represent the policy score weights and are configurable. σ1(z t , ψ k ) represents the predicted energy consumption adaptation score, which measures the matching degree between the predicted energy consumption and the current remaining capacity of the device. σ2(z t , ψ k ) represents the failure risk suppression score, which reflects the relative acceptability of the predicted failure rate under the current device health state. σ3(z t , ψ k ) represents the task scheduling priority score, which is scored by combining information such as task urgency and historical completion rate. R(z t , ψ k ) represents the scheduling continuity perturbation regularization term, which penalizes unnecessary drastic changes in scheduling, and λ represents the regularization term penalty coefficient, which can be set to 0.1 - 0.3.
[0126] In one example, to solve the problem that the scheduler frequently changes the device selection when the task state fluctuates slightly, a scheduling continuity perturbation regularization term is introduced, as shown in the following formula (8):
[0127]
[0128] Among them, represents the operating state vector of the device currently prepared for allocation, represents the state snapshot when the task was last scheduled to this device in history. The scheduling continuity perturbation regularization term encourages the scheduler to maintain the stability of device allocation when the state changes slightly and reduces high-frequency switching.
[0129] In steps S502 to S503 of some embodiments, after calculating the score data of allocating the order task to each device through the score function, a scheduling policy is generated according to the highest score data. For example, there are 3 schedulable devices. After calculating the score data of allocating the order task to each device respectively, it is found that the score data of the first device is the highest, then the generated scheduling policy is to allocate the order task to the first device for execution.
[0130] Steps S501 to S503 illustrated in this embodiment. The structure of the scoring function not only retains the flexibility of multi-objective combined scores but also allows for manual adjustment of the weights of each indicator during actual deployment. Different from traditional black-box schedulers, this solution has structural interpretability and supports human-machine co-tuning of policy outputs at the business layer.
[0131] Please refer to Figure 6 , in some embodiments, after step S106, the dynamic scheduling method for a printing production line based on federated learning may further include, but is not limited to, steps S601 to S603:
[0132] Step S601, storing the context state vector, scheduling policy, device performance data, preset policy network parameters, and timestamp as snapshot data;
[0133] Step S602, during the execution of the scheduling policy, if an abnormal state of the device is detected, obtain the type of abnormality;
[0134] Step S603, perform interruption processing on the device according to the type of abnormality and snapshot data.
[0135] In step S601 of some embodiments, after generating the scheduling policy, immediately encapsulate all key inputs and intermediate decision states as snapshot data, and the structure is shown in the following formula (9):
[0136]
[0137] Among them, represents the snapshot data, z t represents the context state vector, a t represents the scheduling policy, ψ k represents the device performance data, φ represents the currently used policy network parameters, and timestamp t represents the timestamp, which is used for quick positioning during fault recovery. Cache to the edge controller, and the retention time is set by the system (such as retaining for 30 minutes).
[0138] In step S602 of some embodiments, if an abnormality occurs during the execution of the scheduling policy by the device, detect the abnormal state of the device and obtain the type of abnormality. The types of abnormalities include device failures, minor paper jams, ink depletion, sensor transient abnormalities, and device shutdowns, etc.
[0139] Please refer to Figure 7 , in some embodiments, step S603 may include, but is not limited to, steps S701 to S702:
[0140] Step S701, determine whether the type of abnormality is within the preset type range;
[0141] In step S702, if the judgment result is yes, the scheduling policy is executed again; if the judgment result is no, an exception alert is given.
[0142] In step S701 of some embodiments, the preset type range includes exception types that can be automatically recovered. Examples of exception types that can be automatically recovered are mild paper jams and transient sensor exceptions, and the exception type that cannot be automatically recovered is equipment shutdown.
[0143] In step S702 of some embodiments, when the exception type is within the preset type range, it indicates that the exception can be automatically recovered. Therefore, the corresponding scheduling policy can be executed again. Otherwise, it indicates that it cannot be automatically recovered, and an exception alert is required to notify the manual intervention for rescheduling in a timely manner.
[0144] In an example, when an exception occurs in the device, it can also be judged whether it is within the recoverable time limit. Only when it is within the recoverable time limit and within the preset type range, the context state vector, scheduling policy, device performance data, currently used policy network parameters, and time stamp in the snapshot data are restored, and the scheduling policy is executed again. If it is not within the recoverable time limit or the preset type range, an exception alert is given. As shown in the following formula (10):
[0145]
[0146] where Flag resume represents the flag for whether to execute the scheduling policy again, E t .type represents the exception type, t represents the current moment, timestamp t represents the time stamp recorded during the previous scheduling, which is used to judge the time validity, and ΔT represents the maximum recoverable time window, such as 90 seconds. If Flag resume = 1, the scheduling policy is executed again; if Flag resume = 0, the system marks the corresponding order task as "abnormal termination" and gives an exception alert. In both cases, the system will clear to avoid repeated scheduling.
[0147] Steps S601 to S603 illustrated in this embodiment store the context state vector, scheduling policy, device performance data, policy network parameters, and time stamp as snapshot data, so that when an exception occurs during the execution of the scheduling policy by the device, the scheduling context can be quickly restored according to the snapshot data, and the order task can be completed or the abort confirmation can be made without re-evaluating the policy or constructing a new scheduling policy, thus forming a closed-loop control process of the scheduling system. It enables the scheduling system to reconstruct the state before the production interruption and achieve task continuity after a production interruption, avoiding the efficiency loss and resource conflict caused by scheduling restart.
[0148] Please refer to Figure 8 , this embodiment of the present application also provides a dynamic scheduling system for a printing production line based on federated learning, which can implement the above-mentioned dynamic scheduling method for a printing production line based on federated learning. The system includes:
[0149] A first acquisition module 801, configured to acquire a state drift intensity; wherein, the state drift intensity characterizes the degree of difference between the current device state data and the previous device state data;
[0150] An update module 802, if the state drift intensity is greater than a preset drift threshold, the update module 802 is configured to update a preset initial state prediction model according to a preset task residual holding loss function to obtain a target state prediction model;
[0151] An input module 803, configured to input the current device state data into the target state prediction model to obtain state prediction data;
[0152] A construction module 804, configured to construct a context state vector according to the state prediction data, a preset order task data, and a preset historical task execution data;
[0153] A second acquisition module 805, configured to acquire device performance data of each device;
[0154] A generation module 806, configured to generate a scheduling strategy according to the context state vector and the device performance data.
[0155] The specific implementation manner of the dynamic scheduling system for a printing production line based on federated learning is basically the same as the specific embodiment of the above-mentioned dynamic scheduling method for a printing production line based on federated learning, and will not be elaborated here.
[0156] This embodiment of the present application also provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, it implements the above-mentioned dynamic scheduling method for a printing production line based on federated learning. The electronic device can be any intelligent terminal including a tablet computer, a vehicle-mounted computer, etc.
[0157] Please refer to Figure 9 , Figure 9 schematically shows the hardware structure of an electronic device in another embodiment. The electronic device includes:
[0158] The processor 901 can be implemented in the form of a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, etc., and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;
[0159] The memory 902 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM), etc. The memory 902 can store an operating system and other application programs. When implementing the technical solutions provided in the embodiments of this specification through software or firmware, the relevant program codes are stored in the memory 902 and are called by the processor 901 to execute the dynamic scheduling method for the printing production line based on federated learning in the embodiments of the present application;
[0160] The input / output interface 903 is used to implement information input and output;
[0161] The communication interface 904 is used to implement communication interaction between this device and other devices, and can implement communication through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.);
[0162] The bus 905 transmits information between the various components of the device (such as the processor 901, the memory 902, the input / output interface 903, and the communication interface 904);
[0163] Among them, the processor 901, the memory 902, the input / output interface 903, and the communication interface 904 are communicatively connected to each other inside the device through the bus 905.
[0164] The embodiments of the present application also provide a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned dynamic scheduling method for the printing production line based on federated learning is implemented.
[0165] The memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. In addition, the memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state storage devices. In some embodiments, the memory optionally includes a memory remotely provided with respect to the processor, and these remote memories can be connected to the processor through a network. Examples of the above networks include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0166] The embodiments described in the embodiments of the present application are for more clearly illustrating the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided by the embodiments of the present application. Those skilled in the art will know that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of the present application are equally applicable to similar technical problems.
[0167] Those skilled in the art can understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than those shown in the figures, or combine certain steps, or different steps.
[0168] The system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, that is, they may be located in one place, or may be distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0169] Those of ordinary skill in the art can understand that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, and appropriate combinations thereof.
[0170] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and do not have to be used to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of the present application described here can be implemented in an order different from those illustrated or described here. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units does not have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products, or devices.
[0171] It should be understood that in this application, "at least one (item)" means one or more, and "a plurality" means two or more. "And / or" is used to describe the association relationship of associated objects and indicates that there can be three relationships. For example, "A and / or B" can mean: only A exists, only B exists, and both A and B exist at the same time. Among them, A and B can be singular or plural. The character " / " generally represents an "or" relationship between the associated objects before and after. "At least one (one)" or a similar expression thereof refers to any combination of these items, including any combination of single items (one) or plural items (ones). For example, at least one (one) of a, b, or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0172] In several embodiments provided in this application, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system embodiments described above are merely illustrative. For example, the above division of units is only a logical function division. In actual implementation, there can be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed coupling or direct coupling or communication connection to each other can be through some interfaces. The indirect coupling or communication connection of systems or units can be in electrical, mechanical or other forms.
[0173] The units described above as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they can be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0174] In addition, each functional unit in various embodiments of this application can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
[0175] If an integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes multiple instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods of various embodiments of this application. The aforementioned storage medium includes: various media that can store programs, such as USB flash drives, mobile hard disks, read-only memories (ROM), random access memories (RAM), magnetic disks, or optical discs.
[0176] The preferred embodiments of the embodiments of this application have been described above with reference to the accompanying drawings, but this does not limit the scope of the rights of the embodiments of this application. Any modification, equivalent replacement, and improvement made by those skilled in the art without departing from the scope and essence of the embodiments of this application shall be within the scope of the rights of the embodiments of this application.
Claims
1. A dynamic scheduling method for a printing production line based on federated learning, characterized in that The method includes: Obtaining the state drift intensity; wherein, the state drift intensity characterizes the degree of difference between the current device state data and the previous device state data; If the state drift intensity is greater than a preset drift threshold, updating a preset initial state prediction model according to a preset task residual retention loss function to obtain a target state prediction model; Inputting the current device state data into the target state prediction model to obtain state prediction data; Constructing a context state vector according to the state prediction data, preset order task data, and preset historical task execution data; Obtaining the device performance data of each device; Generating a scheduling policy according to the context state vector and the device performance data.
2. The method according to claim 1, wherein The obtaining the state drift intensity includes: Obtaining the current device state data of the current task cycle and the previous device state data of the previous task cycle; Performing a difference comparison according to the current device state data and the previous device state data to obtain the state drift intensity.
3. The method according to claim 1, wherein The if the state drift intensity is greater than a preset drift threshold, then updating a preset initial state prediction model according to a preset task residual retention loss function to obtain a target state prediction model includes: If the state drift intensity is greater than the drift threshold, constructing a task residual retention loss function according to a preset state prediction basic loss, a parameter perturbation penalty term, and the variance of the prediction error; Performing parameter update on the initial state prediction model through the task residual retention loss function to obtain a local fast update model; Constructing the target state prediction model according to the local fast update model, a preset fusion weight, and a preset cloud global model.
4. The method according to claim 1, wherein The constructing a context state vector according to the state prediction data, preset order task data, and preset historical task execution data includes: Performing normalization processing and encoding processing on the state prediction data to obtain target prediction data; Performing normalization processing and encoding processing on the order task data to obtain target task data; Performing normalization processing and encoding processing on the historical task execution data to obtain target historical execution data; Concatenating the target prediction data, the target task data, and the target historical execution data to obtain the context state vector.
5. The method according to claim 1, characterized in that, The generating a scheduling policy according to the context state vector and the device performance data includes: Constructing a scoring function according to the context state vector and the device performance data; wherein, the scoring function is used to evaluate the adaptability of the order task to each device under the context state vector; Obtaining scoring data of the order task assigned to each device according to the scoring function; Generating the scheduling policy according to the scoring data of each device.
6. The method according to claim 1, characterized in that After the generating a scheduling policy according to the context state vector and the device state data, the method further includes: Storing the context state vector, the scheduling policy, the device performance data, preset policy network parameters, and a timestamp as snapshot data; During the execution of the scheduling policy, if an abnormal state of the device is detected, obtaining the type of abnormality; Perform interruption processing on the device according to the abnormal type and the snapshot data.
7. The method according to claim 6, wherein The performing interruption processing on the device according to the abnormal type and the snapshot data includes: Judge whether the abnormal type is within the preset type range; If the judgment result is yes, re-execute the scheduling policy; if the judgment result is no, give an abnormal reminder.
8. A dynamic scheduling system for a printing production line based on federated learning, characterized in that, The system includes: A first acquisition module for acquiring the state drift intensity; wherein, the state drift intensity characterizes the difference degree between the current device state data and the previous device state data; An update module: if the state drift intensity is greater than a preset drift threshold, the update module is used to update a preset initial state prediction model according to a preset task residual retention loss function to obtain a target state prediction model; An input module for inputting the current device state data into the target state prediction model to obtain state prediction data; A construction module for constructing a context state vector according to the state prediction data, preset order task data, and preset historical task execution data; A second acquisition module for acquiring the device performance data of each device; A generation module for generating a scheduling policy according to the context state vector and the device performance data.
9. An electronic device, characterized in that, The electronic device includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, it implements the dynamic scheduling method for a printing production line based on federated learning according to any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the dynamic scheduling method for a printing production line based on federated learning according to any one of claims 1 to 7.
Citation Information
Cited By
Fault diagnosis method of automatic paper delivery equipment based on AI
CN121167268A
Liquid crystal display screen production line operation management method and system
CN121234027A
Liquid crystal display screen production line operation management method and system
CN121234027B