Mes production plan dynamic optimization method, device and equipment and storage medium
Patent Information
- Application Number
- CN202611202796.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-10
- Publication Date
- 2026-10-27
AI Technical Summary
这使得所有同类型异常均被赋予相同的处理策略,无法随生产情况动态调整,容易出现轻症重治或重症轻判;同时,由于缺乏对响应方案执行效果的反馈,在连续遭遇异常时容易陷入反复重调度却效果不佳的困境,调度稳定性与自适应能力不足
根据执行由调度规划模型生成的第一调度策略后得到的第一生产状态数据,识别生产异常事件,并生成对应的异常特征,能够实时捕获调度策略在实际生产环境中的真实执行反馈,将生产状态转化为数值特征,并量化评估异常的影响程度;将异常特征输入至预训练的代价映射模型,得到各个响应等级对应的预测代价,并根据其中的最小值,确定生产异常事件的目标响应等级,确保所选目标响应等级在当前工况下的代价最优,避免规则映射导致的响应失配;根据目标响应等级对应的智能体和调度规划模型,生成第二调度策略,能够利用智能体对调度模型实施针对性修正,使生成的新策略适配当前异常的处置需求,消除原策略与实际工况之间的偏差,使投入实际生产执行的调度策略脱离异常偏离状态,完成生产优化。
Smart Images

Figure CN122988847A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of production scheduling, and in particular to a method, apparatus, equipment and storage medium for dynamic optimization of MES production planning. Background Technology
[0002] With the high-quality development of the manufacturing industry, Manufacturing Execution Systems (MES) are becoming increasingly important in production planning and scheduling. Modern manufacturing workshops generally use artificial intelligence or operations research methods to generate MES production plans to cope with complex production needs.
[0003] However, the actual production process is highly dynamic and uncertain, with frequent occurrences of events such as equipment failures, emergency order insertions, and material delays. Therefore, how to quickly and accurately assess the impact of events and select appropriate response methods to correct deviations in a timely manner while avoiding overreaction has become a key issue that urgently needs to be addressed in the field of MES dynamic scheduling.
[0004] In existing technologies, responses to production anomalies typically employ a tiered processing mechanism based on fixed rules or threshold triggers, statically mapping a single attribute of an event (such as failure duration or order delay) to a predefined response plan. This results in all anomalies of the same type being assigned the same handling strategy, making it impossible to dynamically adjust according to production conditions. This can easily lead to over-treatment of minor issues or under-treatment of major issues. Furthermore, due to the lack of feedback on the effectiveness of the response plan, repeated rescheduling with poor results is prone to occur when anomalies are encountered consecutively, indicating insufficient scheduling stability and adaptability.
[0005] Therefore, there is an urgent need for a dynamic optimization method for MES production planning that can dynamically assess anomalies and generate response solutions, so as to improve the production efficiency of MES under complex and dynamic working conditions. Summary of the Invention
[0006] In view of this, embodiments of the present invention provide a method, apparatus, device and storage medium for dynamic optimization of MES production planning, so as to quickly and accurately assess the impact of abnormal events on the production plan executed by MES and make appropriate adjustments.
[0007] In a first aspect, embodiments of the present invention provide a method for dynamic optimization of MES production planning, including: Obtain the first production status data obtained by MES executing the first scheduling strategy; the first scheduling strategy is generated by the scheduling planning model. Based on the first production status data, identify whether a production anomaly event has occurred; if so, generate the corresponding anomaly characteristics. The abnormal features are input into a pre-trained cost mapping model to obtain the predicted cost corresponding to each response level; the target response level of the production anomaly is determined based on the minimum value among the predicted costs corresponding to each response level; each response level corresponds to an agent. A second scheduling strategy is generated based on the agent corresponding to the target response level and the scheduling planning model; the second scheduling strategy is sent to the MES, causing the MES to execute the second scheduling strategy and complete production optimization.
[0008] In one possible implementation, the response levels include a first level, a second level, a third level, and a fourth level; the step of generating a second scheduling strategy based on the agent corresponding to the target response level and the scheduling planning model includes: When the target response level is the first level, the machine-level intelligent agent is invoked to adjust the machine-level constraints and / or machine-level tasks of the scheduling planning model, and the second scheduling strategy is generated according to the adjusted scheduling planning model. When the target response level is the second level, the production line-level agent is invoked to adjust the production line-level constraints and / or production line-level tasks of the scheduling planning model, and the second scheduling strategy is generated according to the adjusted scheduling planning model. When the target response level is the third level, the workshop-level intelligent agent is invoked to regenerate the scheduling strategy based on the first production status data according to the scheduling planning model, and use it as the second scheduling strategy. When the target response level is the fourth level, the overall planning agent is invoked to retrain the scheduling planning model offline, and the second scheduling strategy is generated based on the retrained scheduling planning model.
[0009] In one possible implementation, the cost mapping model includes a first sub-mapping model, a second sub-mapping model, a third sub-mapping model, and a fourth sub-mapping model, respectively used to predict the response costs corresponding to the first level, the second level, the third level, and the fourth level; the step of inputting the abnormal features into the pre-trained cost mapping model to obtain the predicted cost corresponding to each response level includes: The abnormal features are respectively input into the first sub-mapping model, the second sub-mapping model, the third sub-mapping model, and the fourth sub-mapping model to obtain the response cost corresponding to each response level; The current load factor and near-expiration penalty factor are determined based on the first production status data; the confidence factor is determined based on the scheduling planning model. Based on the current load factor, the near-term penalty factor, and the confidence factor, the response cost is adjusted to obtain the predicted cost corresponding to each response level.
[0010] In one possible implementation, the cost mapping model is trained based on historical abnormal event samples; the label vector of the historical abnormal event samples includes the response level of the historical event and the corresponding actual cost; the actual cost is obtained by statistically analyzing the response time cost, order delay cost, quality loss cost and resource consumption cost after the historical event ends.
[0011] In one possible implementation, the first production status data includes equipment status data, order status data, quality inspection data, and manually reported data; the step of identifying whether a production anomaly event has occurred based on the first production status data, and if so, generating corresponding anomaly features, includes: When any one of the equipment status data, the order status data, the quality inspection data, and the manually reported data meets the preset anomaly discrimination rules, it is determined to be the production anomaly event, and the anomaly feature is generated based on the equipment status data, the order status data, the quality inspection data, and the manually reported data; The abnormal features include attribute features, device features, order features, and global features.
[0012] In one possible implementation, sending the second scheduling policy to the MES, causing the MES to execute the second scheduling policy and complete production optimization, includes: Send the second scheduling policy to the MES, so that the MES executes the second scheduling policy, and obtain the second production status data obtained by the MES executing the second scheduling policy; Based on the comparison results between the first production status data and the second production status data, determine whether to perform re-optimization; If re-optimization is not performed, then production optimization is complete; If re-optimization is performed, a third scheduling strategy is generated based on the target response level and the scheduling planning model; the third scheduling strategy is then executed to complete production optimization.
[0013] In one possible implementation, the levels of the first, second, third, and fourth levels increase sequentially; the step of generating a third scheduling strategy based on the target response level and the scheduling planning model includes: If the target response level is not the fourth level, then the target response level is increased, and the third scheduling strategy is generated based on the agent corresponding to the increased target response level and the scheduling planning model. If the target response level is the fourth level, a fault warning is issued, and the third scheduling strategy is generated based on the manually updated scheduling planning model.
[0014] Secondly, embodiments of the present invention provide a dynamic optimization device for MES production planning, comprising: The status data acquisition module is used to acquire the first production status data obtained by the MES executing the first scheduling strategy; the first scheduling strategy is generated by the scheduling planning model. The abnormal feature generation module is used to identify whether a production abnormal event has occurred based on the first production status data; if so, it generates the corresponding abnormal feature. The response level selection module is used to input the abnormal features into a pre-trained cost mapping model to obtain the predicted cost corresponding to each response level; and to determine the target response level of the production abnormal event based on the minimum value among the predicted costs corresponding to each response level; each response level corresponds to an agent. The scheduling strategy generation module is used to generate a second scheduling strategy based on the agent corresponding to the target response level and the scheduling planning model; send the second scheduling strategy to the MES, so that the MES executes the second scheduling strategy to complete production optimization.
[0015] Thirdly, embodiments of the present invention provide an electronic device, including a memory and a processor, wherein the memory stores a computer program and the processor executes the steps of the method as described in the first aspect or any implementation thereof.
[0016] Fourthly, embodiments of the present invention provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the method as described in the first aspect or any implementation thereof.
[0017] The beneficial effects of the embodiments of the present invention compared with the prior art are as follows: Based on the first production state data obtained after executing the first scheduling strategy generated by the scheduling planning model, production anomalies are identified, and corresponding anomaly features are generated. This allows for real-time capture of the actual execution feedback of the scheduling strategy in the real production environment, transforming the production state into numerical features and quantifying the impact of the anomalies. The anomaly features are input into a pre-trained cost mapping model to obtain the predicted costs corresponding to each response level. The minimum cost among these costs is used to determine the target response level for the production anomaly, ensuring that the selected target response level has the optimal cost under the current operating conditions and avoiding response mismatch caused by rule mapping. Based on the agent corresponding to the target response level and the scheduling planning model, a second scheduling strategy is generated. This strategy allows for targeted modifications to the scheduling model using the agent, adapting the generated new strategy to the current anomaly handling requirements, eliminating the deviation between the original strategy and the actual operating conditions, and enabling the scheduling strategy implemented in actual production to escape the anomaly deviation state, thus completing production optimization.
[0018] This invention, through the construction of an optimization mechanism that includes anomaly feature quantification, cost prediction, response level optimization, and strategy correction, enables the MES to adaptively select the target response level with the lowest overall cost based on the actual impact of the anomaly under the current operating conditions, and to accurately correct the scheduling model. This ensures the effectiveness of anomaly handling while avoiding production line disturbances and wasted computing resources caused by excessive adjustments. It significantly improves the production efficiency, scheduling stability, and adaptive optimization capability of the production plan executed by the MES. Attached Figure Description
[0019] Figure 1 This is a schematic diagram illustrating the implementation process of a dynamic optimization method for MES production planning provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of the structure of a dynamic optimization device for MES production planning provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0020] The present application will be described more clearly below with reference to specific embodiments. These embodiments will help those skilled in the art to further understand the function of the present application, but do not limit the present application in any way. It should be noted that those skilled in the art can make several modifications and improvements without departing from the concept of the present application. These all fall within the protection scope of the present application.
[0021] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.
[0022] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0023] In the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0024] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.
[0025] Furthermore, the term "multiple" mentioned in the embodiments of this application should be interpreted as two or more.
[0026] See Figure 1 This invention provides a method for dynamic optimization of MES production planning, detailed below: Step S101: Obtain the first production status data obtained by MES executing the first scheduling strategy; the first scheduling strategy is generated by the scheduling planning model.
[0027] In one possible implementation, the scheduling planning model is a multi-agent collaborative decision-making model based on hierarchical reinforcement learning, comprising a shop floor-level policy network, a production line-level policy network, and a machine-level policy network. The shop floor-level policy network generates global production batch partitioning, production line assignment, and work order priority ranking, serving as production line-level constraints and tasks. The production line-level policy network generates work order-equipment mappings and process execution sequences under the constraints and tasks output by the shop floor-level policy network, serving as machine-level constraints and tasks. The machine-level policy network adaptively adjusts the single-machine process execution parameters under the constraints and tasks output by the production line-level policy network.
[0028] The scheduling strategy is generated as follows: the inference is initiated by the strategy network corresponding to the target response level. If the level is workshop level, the global scheduling strategy is directly output. If the level is production line level or machine level, the local constraints or tasks are adjusted and the updated scheduling strategy is output based on the existing scheduling constraints of the upper layer network. The strategy networks at each level can obtain initial weights through offline reinforcement learning pre-training and are continuously updated based on feedback during online operation.
[0029] Specifically, after the first scheduling strategy is generated by the scheduling planning model and sent to the MES, the MES drives the production line equipment, order material management system, and quality inspection system to execute the first scheduling strategy. During execution, this embodiment of the invention uses an industrial IoT gateway, MES standard interface, and manual reporting channel to collect first production status data reflecting the scheduling execution effect in real time. For example, the first production status data includes equipment status data, order status data, quality inspection data, and manually reported data.
[0030] For example, equipment status data is used to characterize the actual operating status of each device during the execution of the first scheduling strategy by the MES. Equipment status data may include equipment operation / stop / fault status codes, spindle load rate, vibration amplitude, temperature value, and current process execution progress. Equipment status data can be collected from the device's programmable logic controller (PLC) and sensors via OPC UA, Modbus TCP, or MQTT protocols, with a collection latency of less than 200ms. When the first scheduling strategy assigns a work order to a specific device, the actual processing time and downtime of that device directly reflect the effectiveness of the first scheduling strategy.
[0031] For example, order status data is used to characterize the actual flow and delivery status of orders during the execution of the first scheduling strategy by the MES. Order status data may include new order information, order delivery date change records, material availability rate, and urgent order insertion flags. Order status data can be obtained from the MES / ERP / WMS system via a REST API or database triggers, with a collection latency of less than 1 second. When there is a deviation between the production schedule generated by the first scheduling strategy and the actual order arrival order, the order status data can reflect the degree of impact of this deviation on subsequent processes.
[0032] For example, quality inspection data is used to characterize the quality status of products during the execution of the first scheduling strategy by the MES. Quality inspection data may include AOI / SPI inspection defect rates, functional test results, and rework markings. Quality inspection data can be obtained from the quality inspection system via the SECS / GEM protocol or file interface, with a collection latency of less than 2 seconds. Once the first scheduling strategy allocates a batch of products to a specific production line, the actual defect rate of that production line becomes the key basis for evaluating the quality dimension of the first scheduling strategy.
[0033] For example, manually reported data is used to characterize abnormal situations discovered by operators during the execution of the first scheduling strategy by the MES that cannot be automatically collected. Manually reported data may include maintenance work orders, operator pause requests, and material support requests. Manually reported data can be obtained from the human-machine interface or mobile terminal via WebSocket or form submission, with a collection latency of less than 10 seconds. Manually reported data is a necessary supplement to the aforementioned three types of automatically collected data, capable of capturing unstructured anomalies encountered at the execution level of the first scheduling strategy.
[0034] The aforementioned equipment status data, order status data, quality inspection data, and manually reported data are aligned with the execution cycle of the first scheduling strategy on the timeline, together forming a complete feedback on the execution effect of the first scheduling strategy.
[0035] In this embodiment of the invention, after cleaning, deduplication, and time-series alignment of the collected original first production state data, step S102 is executed to identify abnormal events and extract features from the processed first production state data.
[0036] Step S102: Based on the first production status data, identify whether a production anomaly event has occurred. If so, generate the corresponding anomaly feature.
[0037] In one possible implementation, based on the first production status data, it is identified whether a production anomaly event has occurred; if so, corresponding anomaly characteristics are generated, including: When any one of the equipment status data, order status data, quality inspection data, and manually reported data meets the preset anomaly discrimination rules, it is determined to be a production anomaly event, and anomaly features are generated based on the equipment status data, order status data, quality inspection data, and manually reported data. Anomaly characteristics include attribute characteristics, device characteristics, order characteristics, and global characteristics.
[0038] This embodiment of the invention can distinguish the first production status data obtained in step S101. When data from different sources meets their corresponding anomaly discrimination rules, it is determined that different types of production anomaly events have occurred. The preset anomaly discrimination rules are set separately for different types of data sources, and may specifically include: Anomaly detection rules based on equipment status data: When the equipment status code indicates an abnormal operating state and the duration exceeds a preset duration threshold (e.g., 2 seconds), it is determined as an equipment failure event; when the actual time consumed by the current process exceeds the product of the standard working time and the allowable deviation coefficient, it is determined as a process timeout event; when the percentage of remaining life output by the equipment consumable part life prediction model is lower than a preset threshold (e.g., 10%), or when the vibration / temperature sensor value exceeds a dynamic threshold determined based on a historical baseline (e.g., the sum of the historical average and the historical standard deviation), it is determined as an equipment warning event. The equipment consumable part life prediction model refers to a prediction model established based on the historical replacement records, real-time operating parameters, and cumulative usage of equipment consumable parts, using regression analysis or time-series prediction algorithms to estimate the percentage of remaining usable life of the consumable part; equipment consumable parts include, but are not limited to, components that gradually wear out due to equipment operation, such as cutting tools, molds, filter elements, and sealing rings.
[0039] Anomaly detection rules based on order status data: When an order has an urgent priority mark or the delivery date is less than a preset time window (e.g., 4 hours) from the current time, it is determined to be an urgent order insertion event; when the quantity, delivery date, or bill of materials of an order changes, it is determined to be an order change event; when the material inventory is lower than the sum of the safety stock and the demand for the future preset period, it is determined to be a material shortage event.
[0040] Anomaly detection rules based on quality inspection data: When the defect rate output by the inspection equipment exceeds the preset threshold and the number of consecutive non-conforming products reaches the preset quantity, it is judged as a defect exceeding the limit event; when the test result is a failure, it is judged as a test failure event; when the quality management system generates a rework order, it is judged as a rework event.
[0041] Anomaly detection rules based on manually reported data: When an operator submits an anomaly report through a human-computer interaction interface or mobile terminal, this embodiment of the invention parses the report content and maps it to the corresponding type of anomaly event.
[0042] When any of the above-mentioned anomaly discrimination rules are met, the embodiments of the present invention record the type code, occurrence timestamp, associated equipment identifier and / or order identifier of the production anomaly event, and obtain the estimated recovery time and the list of affected orders from the corresponding data source according to the event type, as input data for subsequent feature extraction.
[0043] After determining that a production anomaly has occurred, embodiments of the present invention can generate anomaly features of a preset dimension based on the feature extraction input data in the following manner: Event attribute features: Extract the event type code as the first feature; normalize the estimated recovery time to obtain the second feature; logarithmically compress and normalize the number of affected orders to obtain the third feature; count and normalize the number of similar production anomaly events within a preset time period to obtain the fourth feature.
[0044] Equipment characteristics: Obtain the number of equipment associated with the current production anomaly and normalize it to obtain the fifth characteristic; obtain the utilization rate of the currently associated equipment in the most recent preset time period, calculate the linear regression slope to obtain the sixth characteristic; obtain the average waiting time of the currently associated equipment and transform it through an exponential saturation function to obtain the seventh characteristic; call the equipment health assessment model to determine the health score of the currently associated equipment, and fill in the missing values with the global mean to obtain the eighth characteristic.
[0045] Order characteristics: Traverse the list of affected orders, calculate the urgency value of each order, normalize the mean of urgency values of all orders to obtain the ninth characteristic; calculate the rate of change of the mean of urgency values of orders within the most recent preset time period to obtain the tenth characteristic; take the maximum value of urgency values of all orders and normalize it to obtain the eleventh characteristic; count the number of orders with urgency values exceeding a preset threshold to obtain the twelfth characteristic.
[0046] Global features: Obtain the global load rate of the current workshop as the thirteenth feature; obtain the energy price index of the current time period as the fourteenth feature; obtain the model confidence of the current scheduling planning model as the fifteenth feature; obtain the time period code of the current moment to obtain the sixteenth feature.
[0047] Furthermore, the above sixteen features are concatenated in the order of attribute features, device features, order features, and global features to generate a 16-dimensional anomaly feature vector. The anomaly feature vector and event identifier can also be associated and stored in a temporary cache.
[0048] Furthermore, this embodiment of the invention controls the entire feature extraction process to within 30 milliseconds, meeting the real-time requirements of production scheduling.
[0049] In this embodiment of the invention, the abnormal features may further include global situation indicators, which are used to drive the dynamic adjustment of sub-target weights.
[0050] Specifically, a hybrid architecture of fuzzy logic controller and lightweight rule engine is adopted to monitor the following five global status indicators in the first production status data in real time at a preset update frequency (e.g., every 10 seconds): the number of devices associated with the current production anomaly event, the rate of change of the average order urgency, the occurrence rate of equipment failure events, the energy consumption exceeding the standard index, and the replacement frequency.
[0051] The overall planning level intelligent agent fuzzifies the above five global situation indicators, maps them to fuzzy sets through predefined membership functions, and then obtains the adjustment amount of each sub-objective weight through fuzzy rule engine reasoning. The sub-objective weights may include delivery weight, completion time weight, load balancing weight, energy consumption weight, and replacement cost weight.
[0052] The fuzzy rule engine has multiple built-in IF-THEN rules. For example, when the number of devices associated with the current production anomaly is large and the rate of change of the average order urgency is increasing, the delivery option weight is increased while the completion time weight and load balancing weight are decreased; when the energy consumption exceedance index is high and the bottleneck device queue length is low, the energy consumption weight and replacement cost weight are increased; when the global device failure rate is high and the rate of change of order urgency is stable, the load balancing weight is increased while the delivery option weight is decreased.
[0053] Step S103: Input the abnormal features into the pre-trained cost mapping model to obtain the predicted cost corresponding to each response level; determine the target response level of the abnormal event based on the minimum value of the predicted cost corresponding to each response level; each response level corresponds to an agent.
[0054] Specifically, response levels can include Level 1, Level 2, Level 3, and Level 4.
[0055] Furthermore, the levels of the first, second, third, and fourth grades increase sequentially.
[0056] In one possible implementation, the cost mapping model includes a first sub-mapping model, a second sub-mapping model, a third sub-mapping model, and a fourth sub-mapping model, which are used to predict the response costs corresponding to the first, second, third, and fourth levels, respectively. Anomaly features are input into the pre-trained cost mapping model to obtain the predicted costs corresponding to each response level, including: The abnormal features are input into the first sub-mapping model, the second sub-mapping model, the third sub-mapping model and the fourth sub-mapping model respectively to obtain the response cost corresponding to each response level; Determine the current load factor and near-expiration penalty factor based on the first production status data; determine the confidence factor based on the scheduling planning model; Based on the current load factor, near-term penalty factor, and confidence factor, the response cost is adjusted to obtain the predicted cost corresponding to each response level.
[0057] In one possible implementation, the cost mapping model is trained based on historical anomaly event samples; the label vector of the historical anomaly event samples includes the response level of the historical event and the corresponding actual cost; the actual cost is obtained by statistically analyzing the response time cost, order delay cost, quality loss cost and resource consumption cost after the historical event ends.
[0058] Specifically, the cost mapping model adopts a multi-output regression architecture, including a first sub-mapping model, a second sub-mapping model, a third sub-mapping model, and a fourth sub-mapping model, corresponding to the first level (L1), the second level (L2), the third level (L3), and the fourth level (L4), respectively. Each sub-mapping model can be a lightweight gradient boosting tree model, which features fast training speed, robustness to missing values, and strong interpretability.
[0059] The 16-dimensional anomaly feature vector generated in step S102 is input in parallel into the four sub-mapping models to obtain the first-level response cost, the second-level response cost, the third-level response cost, and the fourth-level response cost, respectively. The response cost is the original output of each sub-mapping model, representing the mapping pattern learned by each sub-mapping model from historical anomaly event samples, and can reflect the expected cost generated by performing actions at the corresponding response level.
[0060] After obtaining the response costs for each response level, the current load factor, near-expiration penalty factor, and confidence factor are determined based on the first production status data and the scheduling planning model. The current load factor can be used to characterize the amplification effect of the overall production line load level on response costs. The current load factor is calculated by obtaining the percentage of running time for all equipment within the current time window, calculating their arithmetic mean as the global equipment utilization rate, and using this as the current load factor, with a value ranging from 0 to 1. When the overall production line load is high, the cascading effects of response actions increase. This factor amplifies the response costs, making response decisions more cautious.
[0061] The near-delivery penalty factor can be used to characterize the increased cost of delays as orders approach their delivery date. The calculation method is as follows: the ratio of urgent orders with remaining time less than 1.2 times the standard working hours to the total number of orders in progress; multiplying this ratio by the average urgency of all orders in progress; and taking the smaller of this ratio and a preset upper limit. Here, order urgency is the ratio of remaining time to standard working hours, with a cutoff upper limit of 2.0. The final value of the near-delivery penalty factor ranges from 0 to 2. The higher the proportion of urgent orders or the more pressing the orders, the larger this factor becomes, causing response decisions to tend to choose a faster, but potentially slightly more costly, response level.
[0062] The confidence factor can be used to characterize the impact of the reliability of the current scheduling planning model on response risk. The confidence factor is calculated as follows: obtain the average reward value of the scheduling planning model on the offline test set in the most recent week, divide it by the expected reward baseline value on the validation set when the model training is completed, and truncate the resulting ratio to the range of 0.5 to 1.0 as the model confidence factor. When the confidence factor is low, it indicates that the current scheduling strategy model itself may have biases, and the risk of the response leading to solution deterioration increases. This factor amplifies the absolute value of each response cost, making the decision more inclined towards conservative, low-level responses. When the confidence factor is close to 1, the response cost is reduced, enhancing the advantage of aggressive, high-level responses.
[0063] The response costs at each level are jointly corrected to obtain the predicted cost corresponding to each response level. Specifically, for any response level... L Its predicted cost The calculation formula is: in, Let L be the response cost, workload be the current load factor, and deadline be the impending penalty factor. This is the confidence factor.
[0064] After obtaining the predicted costs for the four response levels, the following decision logic is executed to determine the target response level: First, levels with negative or non-numerical predicted costs are marked as invalid, and their costs are set to infinity. Second, the response level with the smallest predicted cost is selected as the target response level. If the difference between the predicted cost and the minimum value of multiple response levels is less than a preset buffer threshold (e.g., 5% of the minimum predicted cost), the level with the lowest value within that range is selected as the target response level to avoid frequent switching of the target response level due to small fluctuations in value. If only one response level has a predicted cost significantly lower than the other levels, it is directly determined as the target response level.
[0065] In addition, when the confidence factor is lower than the preset confidence threshold (e.g., 0.55), the fourth level can be directly selected as the target response level, triggering the retraining process of the scheduling strategy model by the overall planning agent; when the confidence factor is lower than a lower limit threshold (e.g., 0.5) and the prediction cost of the fourth level exceeds the preset cost upper limit threshold, manual intervention can be prompted to pause automatic optimization.
[0066] Specifically, the cost mapping model is trained based on historical anomalous event samples. The historical anomalous event samples are constructed as follows: Extract at least 1000 production anomaly event records from the past six months from the MES historical database. For each record, extract the anomaly feature vector as sample input according to step S102; use the actual response level triggered by the event and the actual cost calculated afterward as sample labels. The actual cost is calculated retrospectively after the event (usually with a 24-hour lag), and includes the sum of four cost components: response time cost, which is the time from the occurrence of the event to the completion of the first response action multiplied by the production loss coefficient per second; order delay cost, which is the actual delay time of the affected orders multiplied by the delay penalty per minute; quality loss cost, which is the additional rework or scrap cost caused by scheduling adjustments; and resource consumption cost, which is the additional cost of computing power, manpower, electricity, etc. consumed during the response process. When generating training samples, for each historical record, a four-dimensional cost label vector is constructed: the cost dimension corresponding to the actual response level of the production anomaly event is assigned the actual cost, and the other three cost dimensions are assigned the historical average cost of the corresponding response level, to avoid model training bias caused by missing labels for other response levels. The four sub-mapping models are trained with the label values of the cost dimension corresponding to the response level as supervision signals, so that the output of each sub-mapping model is aligned with the real historical cost data.
[0067] In this embodiment of the invention, when determining the target response level, if the response level is level four, it can be further verified whether the quantitative judgment condition for strategy failure is met. The quantitative judgment condition includes at least one of the following three indicators: The continuous rescheduling improvement rate metric is calculated as follows: It measures the relative improvement rate of the global reward for each agent after the most recent N (e.g., N=3) dynamic optimizations of the MES production plan. The formula is: ,in Let ε be the global reward for the k-th dynamic optimization, and ε be the minimum value. If the improvement rate is less than a preset threshold (e.g., 0.01), the strategy is deemed to be ineffective.
[0068] Scheduling solution diversity index: Calculate the standard deviation of the rewards of the scheduling strategies generated after the most recent M (e.g., M=10) dynamic optimizations of the MES production plan. with the mean ratio When the CV is less than the preset diversity threshold (e.g., 0.02), the strategy is deemed to be ineffective, indicating that the output of the scheduling strategy tends to be homogeneous and loses its exploratory ability.
[0069] Model performance degradation metrics: The key prediction errors of the scheduling planning model are periodically evaluated on an offline test set consisting of historical scheduling strategy execution logs from the most recent preset time period. When the mean absolute percentage error of the process processing time prediction exceeds a preset error threshold (e.g., 15%), or the completion time prediction error exceeds a preset error threshold (e.g., 10%), and continues for more than a preset number of evaluation periods, the strategy is deemed to have failed.
[0070] The fourth level will be confirmed as the target response level only if at least one of the above indicators is met; otherwise, even if the model confidence is lower than the threshold, the third level will be maintained or manual review will be triggered to avoid unnecessary retraining costs.
[0071] Step S104: Generate a second scheduling strategy based on the agent and scheduling planning model corresponding to the target response level; send the second scheduling strategy to the MES so that the MES can execute the second scheduling strategy and complete the production optimization.
[0072] For example, the first level corresponds to machine-level intelligent agents, the second level corresponds to production line-level intelligent agents, the third level corresponds to workshop-level intelligent agents, and the fourth level corresponds to overall planning-level intelligent agents.
[0073] In one possible implementation, a second scheduling strategy is generated based on the agent and scheduling planning model corresponding to the target response level, including: When the target response level is the first level, the machine-level intelligent agent is invoked to adjust the machine-level constraints and / or machine-level tasks of the scheduling planning model, and a second scheduling strategy is generated based on the adjusted scheduling planning model. When the target response level is the second level, the production line-level agent is invoked to adjust the production line-level constraints and / or production line-level tasks of the scheduling planning model, and a second scheduling strategy is generated based on the adjusted scheduling planning model. When the target response level is the third level, the workshop-level intelligent agent is invoked to regenerate the scheduling strategy based on the first production status data according to the scheduling planning model, which serves as the second scheduling strategy. When the target response level is level four, the overall planning agent is invoked to retrain the scheduling planning model offline, and a second scheduling strategy is generated based on the retrained scheduling planning model.
[0074] For example, the sub-objective weights are the weighted average of different sub-objectives in the reward function of each agent.
[0075] Specifically, based on the target response level determined in step S103, the corresponding intelligent agent is invoked to perform differentiated operations on the scheduling planning model to generate a second scheduling strategy, which may include: (1) When the target response level is Level 1 The machine-level agent is invoked to adjust the machine-level constraints and / or machine-level tasks executed by the machine-level policy network. This adjustment may include: adjusting the execution order of only a preset number of subsequent operations in the waiting queue on the affected equipment, without changing the equipment to which the work order belongs; inserting idle buffer time before and after the affected operation, not exceeding a preset proportion of the original operation time; temporarily reducing the production cycle rate of flexible equipment to avoid overload; and automatically executing equipment reset or retry commands for transient faults. The machine-level agent can read the current equipment queue and real-time status, generate a fine-tuned operation sequence through the machine-level policy network, ensuring that operation dependencies and equipment capacity constraints are not violated, and use the adjusted operation sequence as the second scheduling strategy.
[0076] (2) When the target response level is Level 2 The production line-level agent is invoked to adjust the production line-level constraints and / or tasks executed by the production line-level policy network. This adjustment includes at least one of the following operations: reallocating affected work orders to other similar equipment within the current production line, taking into account equipment load, changeover time, and work order matching; adjusting the processing order of work orders within the production line, prioritizing urgent orders; and transferring some work orders to production lines with lighter loads. The production line-level agent receives first production status data, generates a new work order-equipment mapping table through the production line-level policy network, and issues this mapping table as a second scheduling strategy to the machine-level agent for execution, while simultaneously reporting to the shop floor-level agent. If cross-production line coordination is required, a request can be sent to the shop floor-level agent to obtain approval.
[0077] (3) When the target response level is Level 3 The process involves invoking a workshop-level agent, which, based on the workshop-level policy network and the first production status data, regenerates the scheduling strategy as the second scheduling strategy. This regeneration process includes: re-executing global production batch division, production line assignment, and global work order sorting; outputting a new production plan containing detailed schedules for all production lines and all work orders, i.e., the second scheduling strategy; deploying the new production plan to the digital twin model of the MES and broadcasting it to all production line-level and machine-level agents; synchronously updating the production order sequence in the MES, and simultaneously notifying the material delivery system and the automated guided vehicle (AGV) scheduling system to execute the corresponding production actions. For work orders already in progress, the currently processing steps are preserved without interruption; only steps that have not yet started are adjusted.
[0078] (4) When the target response level is Level 4 A coordinating agent is invoked to retrain the scheduling planning model offline. Based on the retrained model, a second scheduling strategy is generated. The specific offline retraining process is as follows: the weights of the current scheduling planning model are frozen to maintain production scheduling or downgraded to a rule-based conservative scheduling mode; the scheduling planning model is retrained using production status data and scheduling strategy execution logs from the most recent preset time period as training data; model performance is periodically evaluated on a validation set during training, and the retrained model is compared and tested in a digital twin environment; if the comparison test confirms that the retrained model outperforms the frozen model in production performance indicators, the retrained model is confirmed as the new model and a hot-swap operation is performed, making the new model replace the current model as the new online scheduling decision-making entity; a second scheduling strategy is generated based on the hot-swap model. If offline retraining fails to produce a better scheduling planning model, a manual intervention request is issued.
[0079] In one possible implementation, a second scheduling policy is sent to the MES, causing the MES to execute the second scheduling policy and complete production optimization, including: Send the second scheduling policy to MES, so that MES can execute the second scheduling policy, and obtain the second production status data obtained by MES in executing the second scheduling policy; Based on the comparison results between the first production status data and the second production status data, determine whether to perform re-optimization; If re-optimization is not performed, then production optimization is complete; If re-optimization is performed, a third scheduling strategy is generated based on the target response level and the scheduling planning model; the third scheduling strategy is then executed to complete production optimization.
[0080] Specifically, a second scheduling policy is sent to the MES, causing the MES to execute the policy. The second production status data generated by the MES after executing the second scheduling policy is obtained. Within a predefined evaluation time window, the comparison results between the first production status data and the second production status data are used to determine whether to perform re-optimization.
[0081] Different target response levels correspond to different evaluation time windows. Level 1 corresponds to 30 seconds to 2 minutes; Level 2 corresponds to 2 minutes to 10 minutes; Level 3 corresponds to 10 minutes to 30 minutes; and Level 4 corresponds to approximately 1 hour after the end of each training cycle. A rolling window approach is used to collect performance indicators to avoid misjudgments caused by single-point anomalies. If a new production anomaly occurs within the evaluation time window, the monitored performance indicators are merged to avoid duplicate evaluations.
[0082] For example, the calculation method for performance indicators may include: Actual delay reduction percentage: This is calculated by subtracting the actual cumulative delay minutes in the second production status data from the cumulative delay minutes of affected orders in the first production status data, and then dividing by the sum of the cumulative delay minutes in the first production status data and a preset minimum value. If this percentage is greater than a preset threshold (e.g., 0.15), or if for both the first and second levels this percentage is greater than a preset leniency threshold (e.g., 0.05), then it is considered a delay improvement.
[0083] Actual reward change: The weighted total reward before the response is subtracted from the weighted total reward of the first production state data. The weighted total reward is the negative of the weighted sum of completion time cost, delay cost, energy cost, load balancing cost, and changeover cost. The weighting weights are the sub-objective weights at the time of the production anomaly. If the actual reward change is greater than zero, it is considered a cost improvement.
[0084] Stability index: If a new production anomaly event of a higher level than the current target response level occurs on the same production line or equipment within the evaluation time window, it is considered that the stability has not improved; otherwise, it is considered that the stability has improved.
[0085] For example, methods for determining whether to perform re-optimization based on performance indicators and comparison results may include: Using a majority voting mechanism, if two of the three performance indicators show improvement, it is determined that re-optimization will not be performed, and the second scheduling strategy and second production status data will be recorded for subsequent offline training. If less than two of the three performance indicators show improvement, or the actual delay reduction ratio is negative and its absolute value exceeds the preset delay deterioration threshold (e.g., 0.1), or the actual reward change is lower than the preset cost deterioration threshold (e.g., -1000), it is determined that re-optimization will be performed.
[0086] In one possible implementation, a third scheduling strategy is generated based on the target response level and the scheduling planning model, including: If the target response level is not the fourth level, then the target response level is increased, and a third scheduling strategy is generated based on the agent and scheduling planning model corresponding to the increased target response level. If the target response level is level four, a fault warning is issued, and a third scheduling strategy is generated based on the manually updated scheduling planning model.
[0087] Specifically, when it is determined that re-optimization should be performed, a third scheduling strategy is generated based on the target response level and the scheduling planning model, which may include: If the target response level is not level four, then the target response level is upgraded by one level: level one is upgraded to level two, level two to level three, and level three to level four. Before the upgrade, the response action at the current response level is paused and marked as upgraded. The current second production status data and the execution log of the second scheduling strategy are recorded. Simultaneously, a historical penalty factor can be added to the predicted cost of the current response level to prevent the same abnormal situation from causing the target response level selected in this embodiment of the invention to repeatedly loop in an invalid low-level cycle. After the upgrade, the corresponding agent is invoked to generate the third scheduling strategy according to the upgraded target response level.
[0088] Furthermore, for the same production anomaly, after the target response level is gradually upgraded to the fourth level, a manual adjustment is directly prompted, and the intelligent agent is no longer invoked for optimization, thus avoiding redundant operations and wasting resources.
[0089] If the target response level is Level 4, a fault alert is issued, notifying technical personnel via SMS, email, or monitoring screen. The notification includes details of the production anomaly, the output target response level, monitoring data, and scheduling strategy execution logs. Simultaneously, the MES can automatically switch to a rule-based conservative scheduling mode to ensure uninterrupted production and generate a diagnostic report for technical personnel to analyze the root cause. Rescheduling will not be performed until manually updated (e.g., adjusting process parameters, fixing model errors, or replacing hardware) and confirmed. After the manually updated scheduling planning model is deployed, a third scheduling strategy is generated based on this model.
[0090] In this embodiment of the invention, generating a second scheduling strategy based on the agent corresponding to the target response level and the scheduling planning model may further include: When the target response level is level three, the workshop-level agent can also output structured guidance data containing three core fields: a sub-target weight vector field, used to dynamically adjust the priority of each optimization target of the production line-level agent; a batch partitioning granularity suggestion field, providing batch splitting suggestions and a recommended production line list, but not binding to specific production lines; and a constraint relaxation instruction field, allowing temporary relaxation of hard constraints such as production line overtime restrictions or delay tolerance. This structured guidance data enables the production line-level agent to autonomously adapt to the local real-time state within the high-level intent framework, improving robustness.
[0091] Specifically, the production line-level policy network of the scheduling and planning model can receive and respond to structured instructions from shop floor agents through the following three-layer mechanism: State space injection mechanism: The structured guidance data is encoded into embedded vectors of a preset dimension through a multilayer perceptron, concatenated into the local state feature vectors of the production line-level agent, and input into the production line-level policy network, so that it makes decisions based on high-level guidance, thereby achieving differentiable soft collaboration.
[0092] Reward function reshaping mechanism: The sub-objective weight vector in the structured guidance data is directly overwritten with the original value of the local reward function of the production line-level agent, thereby transmitting the global optimization direction.
[0093] Action masking mechanism: When the structured guidance data contains hard constraints, the production line-level agent dynamically generates an action mask during the action sampling phase, sets the logits corresponding to actions that violate the constraints to negative infinity, and prevents the violating actions from being selected.
[0094] The scheduling planning model is trained using a multi-agent proximal policy optimization framework, where production line-level agents share a centralized global Critic network. The input to the global Critic network is the concatenation of the joint state feature vector of all production lines and the embedded vector of the structured guidance; the output is the estimated cumulative discount reward starting from the current production state. The training process employs an alternating freeze strategy: the parameters of the shop floor-level agents are fixed, and the global Critic network is used to train the production line-level agents; the parameters of the production line-level agents are also fixed, and the cumulative rewards from the production line-level execution feedback are used to update the shop floor-level agents. The global Critic network only participates in gradient updates during the production line-level agent training phase and does not participate in gradient calculation during the shop floor-level agent training phase.
[0095] For example, machine-level agents can extract millisecond-level raw features based on graph isomorphic networks without transmitting them back to production line-level or workshop-level agents, thus avoiding information overload and timing misalignment. Feedback from machine-level agents is achieved through the following two indirect paths: Online partial closed-loop path: When the machine-level agent detects that the deviation between the actual processing time and the planned value exceeds a preset threshold, it triggers the second scheduling strategy corresponding to the first level to adjust the production without notifying the upper-level agent.
[0096] Strategy update feedback path: After the machine-level agent completes its execution, the actual scheduling strategy execution log is aggregated at the second level and used to update the global Critic network of the production line-level agent; after being aggregated at the minute level, it is stored in the experience pool of the workshop-level agent and used to regenerate the scheduling strategy.
[0097] In this embodiment of the invention, when determining the target response level in step S103, trigger conditions for each level can be set, and the target response level can be selected directly based on the trigger conditions. The trigger conditions follow the following quantification rules: The triggering conditions for the first level may include: the time deviation of a single process does not exceed a preset deviation threshold (e.g., 10%), the expected recovery time of a transient fault does not exceed a preset short-term threshold (e.g., 5 minutes), or the duration of a brief material shortage does not exceed a preset material shortage threshold (e.g., 2 minutes).
[0098] The triggering conditions for the second level include: the estimated recovery time of a short-term recoverable fault is between a preset short-term threshold and a preset long-term threshold (e.g., 5 minutes to 30 minutes); the urgency of an urgent order exceeds a preset urgency threshold (e.g., 0.8); or the number of production abnormal events classified as first level within a preset time window exceeds a preset frequency threshold (e.g., ≥3 times within 5 minutes).
[0099] The triggering conditions for the third level include: the estimated recovery time of a long-term downtime failure exceeds a preset long-term threshold (e.g., 30 minutes), the weighting coefficient of expedited orders from large customers exceeds a preset weighting threshold (e.g., 0.9), or the cumulative delay exceeds a preset delay threshold (e.g., 2 hours).
[0100] The aforementioned triggering conditions are determined in real time by the rule engine in conjunction with a sliding window accumulation mechanism to ensure the objectivity and reproducibility of the target response level and avoid inconsistencies in decision-making caused by reliance on subjective experience.
[0101] In this embodiment of the invention, sub-objective weights are dynamically generated by a coordinating agent and synchronously injected into the reward function of each agent. This allows the three-layer agent to adaptively optimize without retraining or interrupting inference, ensuring the penetration of global priority in emergency scenarios while retaining the flexibility of lower-layer autonomous adaptation. This significantly improves the collaborative efficiency and robustness under multi-objective conflicts. The prediction cost is jointly corrected with load, near-expiration, and confidence factors, and triple verification of improvement rate, solution diversity, and performance degradation is added for the highest level, forming a "prediction-correction-verification" closed loop. This enables the system to automatically suppress overreaction under complex conditions such as high load and dense near-expiration, and accurately trigger retraining when the model truly fails, greatly reducing the frequency of ineffective rescheduling and the cost of manual intervention. The original features at the machine level are not directly transmitted back; only aggregated performance indicators are allowed for indirect feedback. The workshop-level agent uses structured guidance to flexibly transmit to the production line level through a three-layer mechanism of state injection, reward reshaping, and action masking. This paradigm ensures response time while avoiding the upper layer being overwhelmed by high-frequency noise, preventing systemic scheduling paralysis caused by single-point failures. By automatically determining re-optimization through multi-dimensional performance comparison, the response level is gradually increased and a penalty factor is applied to the failure level to prevent cyclical oscillation; if it is still ineffective after raising to the highest level, conservative scheduling is switched and a diagnostic report is generated, so that the embodiments of the present invention have a complete "trial-evaluation-upgrade-feedback" link, which takes into account both the exploration of optimization potential and the bottom line of production safety when dealing with unknown disturbances.
[0102] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0103] See Figure 2This invention provides a MES production planning dynamic optimization device 2, comprising: The status data acquisition module 21 is used to acquire the first production status data obtained by the MES executing the first scheduling strategy; the first scheduling strategy is generated by the scheduling planning model. The abnormal feature generation module 22 is used to identify whether a production abnormal event has occurred based on the first production status data; if so, it generates the corresponding abnormal feature. The response level selection module 23 is used to input abnormal features into a pre-trained cost mapping model to obtain the predicted cost corresponding to each response level; and to determine the target response level of the abnormal event based on the minimum value among the predicted costs corresponding to each response level; each response level corresponds to an agent. The scheduling strategy generation module 24 is used to generate a second scheduling strategy based on the agent and scheduling planning model corresponding to the target response level; send the second scheduling strategy to the MES so that the MES can execute the second scheduling strategy and complete the production optimization.
[0104] In one possible implementation, the scheduling strategy generation module 24 is used to call the machine-level agent to adjust the machine-level constraints and / or machine-level tasks of the scheduling planning model when the target response level is the first level, and generate a second scheduling strategy based on the adjusted scheduling planning model. When the target response level is the second level, the production line-level agent is invoked to adjust the production line-level constraints and / or production line-level tasks of the scheduling planning model, and a second scheduling strategy is generated based on the adjusted scheduling planning model. When the target response level is the third level, the workshop-level intelligent agent is invoked to regenerate the scheduling strategy based on the first production status data according to the scheduling planning model, which serves as the second scheduling strategy. When the target response level is level four, the overall planning agent is invoked to retrain the scheduling planning model offline, and a second scheduling strategy is generated based on the retrained scheduling planning model.
[0105] In one possible implementation, the response level selection module 23 is used to input the abnormal features into the first sub-mapping model, the second sub-mapping model, the third sub-mapping model and the fourth sub-mapping model respectively to obtain the response cost corresponding to each response level. Determine the current load factor and near-expiration penalty factor based on the first production status data; determine the confidence factor based on the scheduling planning model; Based on the current load factor, near-term penalty factor, and confidence factor, the response cost is adjusted to obtain the predicted cost corresponding to each response level.
[0106] In one possible implementation, the anomaly feature generation module 22 is used to determine a production anomaly event when any one of the equipment status data, order status data, quality inspection data, and manually reported data meets the preset anomaly discrimination rules, and to generate anomaly features based on the equipment status data, order status data, quality inspection data, and manually reported data. Anomaly characteristics include attribute characteristics, device characteristics, order characteristics, and global characteristics.
[0107] In one possible implementation, the scheduling strategy generation module 24 is also used to send a second scheduling strategy to the MES, so that the MES executes the second scheduling strategy and obtains the second production status data obtained by the MES in executing the second scheduling strategy. Based on the comparison results between the first production status data and the second production status data, determine whether to perform re-optimization; If re-optimization is not performed, then production optimization is complete; If re-optimization is performed, a third scheduling strategy is generated based on the target response level and the scheduling planning model; the third scheduling strategy is then executed to complete production optimization.
[0108] In one possible implementation, the scheduling strategy generation module 24 is further configured to, if the target response level is not the fourth level, increase the target response level and generate a third scheduling strategy based on the agent and scheduling planning model corresponding to the increased target response level. If the target response level is level four, a fault warning is issued, and a third scheduling strategy is generated based on the manually updated scheduling planning model.
[0109] In this embodiment of the invention, a modular architecture is used to generate anomaly features, map costs, and generate tiered response strategies, achieving a fully automated closed-loop process from state awareness to scheduling optimization. Its core lies in unifying the optimization direction of agents at all levels and combining a multi-factor correction cost prediction mechanism to accurately match response levels, realizing data-driven automatic decision-making for anomaly response levels, replacing manual experience-based judgment. Each module supports parallel processing, ensuring low-latency closed-loop execution from anomaly awareness to scheduling. Combined with re-optimization judgment and a level escalation mechanism, the device can automatically escalate the handling level when a single response is ineffective, improving fault tolerance for unknown anomalies and operational continuity.
[0110] See Figure 3 The diagram shows a schematic of the electronic device 3 provided in an embodiment of the present invention, which is described in detail below: like Figure 3As shown, the electronic device 3 in this embodiment includes a processor 30 and a memory 31. The memory 31 stores a computer program 32. When the processor 30 executes the computer program 32, it implements the steps in the various method embodiments described above. Alternatively, when the processor 30 executes the computer program 32, it implements the functions of each module in the various device embodiments described above.
[0111] For example, computer program 32 may be divided into one or more modules / units, which are stored in memory 31 and executed by processor 30 to complete the present invention. The one or more modules / units may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of computer program 32 in electronic device 3.
[0112] Electronic device 3 may include, but is not limited to, processor 30 and memory 31. Those skilled in the art will understand that... Figure 3 This is merely an example of electronic device 3 and does not constitute a limitation on electronic device 3. It may include more or fewer components than shown, or combine certain components, or different components. For example, electronic device 3 may also include input / output devices, network access devices, buses, etc.
[0113] The processor 30 can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor.
[0114] The memory 31 can be an internal storage unit of the electronic device 3, such as a hard disk or memory of the electronic device 3. The memory 31 can also be an external storage device of the electronic device 3, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the electronic device 3. Furthermore, the memory 31 can include both internal and external storage units of the electronic device 3. The memory 31 is used to store the computer program 32 and other programs and data required by the electronic device 3. The memory 31 can also be used to temporarily store data that has been output or will be output.
[0115] For the sake of simplicity and clarity, only the above-described functional modules / units are used as examples. In practical applications, the functions described above can be assigned to different functional modules / units as needed. These modules / units can be implemented in hardware, software, or a combination of both.
[0116] This invention also provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the methods described in the above-described method embodiments.
[0117] This invention also provides a computer program product, including a computer program. When the computer program is executed by a processor, it implements the methods described in the above-described method embodiments.
[0118] Computer programs include computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. Computer-readable media can include: any entity or device capable of carrying computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc.
[0119] In the above embodiments, the descriptions of each embodiment have their own emphasis. Parts not detailed or described in a particular embodiment can be referred to in the relevant descriptions of other embodiments. Unless otherwise specified or in conflict with logic, the terminology and / or descriptions between different embodiments are consistent and can be referenced interchangeably. Technical features in different embodiments can be combined to form new embodiments based on their inherent logical relationships.
[0120] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.
Claims
1. A dynamic optimization method for MES production planning, characterized in that, include: Obtain the first production status data obtained by executing the first scheduling strategy in MES; The first scheduling strategy is generated by the scheduling planning model; Based on the first production status data, identify whether a production anomaly event has occurred; if so, generate the corresponding anomaly characteristics. The abnormal features are input into a pre-trained cost mapping model to obtain the predicted cost corresponding to each response level; the target response level of the production anomaly is determined based on the minimum value among the predicted costs corresponding to each response level; each response level corresponds to an agent. A second scheduling strategy is generated based on the agent corresponding to the target response level and the scheduling planning model. The second scheduling policy is sent to the MES, causing the MES to execute the second scheduling policy and complete production optimization.
2. The MES production planning dynamic optimization method according to claim 1, characterized in that, The response levels include a first level, a second level, a third level, and a fourth level; the generation of a second scheduling strategy based on the agent corresponding to the target response level and the scheduling planning model includes: When the target response level is the first level, the machine-level intelligent agent is invoked to adjust the machine-level constraints and / or machine-level tasks of the scheduling planning model, and the second scheduling strategy is generated according to the adjusted scheduling planning model. When the target response level is the second level, the production line-level agent is invoked to adjust the production line-level constraints and / or production line-level tasks of the scheduling planning model, and the second scheduling strategy is generated according to the adjusted scheduling planning model. When the target response level is the third level, the workshop-level intelligent agent is invoked to regenerate the scheduling strategy based on the first production status data according to the scheduling planning model, and use it as the second scheduling strategy. When the target response level is the fourth level, the overall planning agent is invoked to retrain the scheduling planning model offline, and the second scheduling strategy is generated based on the retrained scheduling planning model.
3. The MES production planning dynamic optimization method according to claim 2, characterized in that, The cost mapping model includes a first sub-mapping model, a second sub-mapping model, a third sub-mapping model, and a fourth sub-mapping model, which are used to predict the response costs corresponding to the first level, the second level, the third level, and the fourth level, respectively; the step of inputting the abnormal features into the pre-trained cost mapping model to obtain the predicted cost corresponding to each response level includes: The abnormal features are respectively input into the first sub-mapping model, the second sub-mapping model, the third sub-mapping model, and the fourth sub-mapping model to obtain the response cost corresponding to each response level; The current load factor and near-expiration penalty factor are determined based on the first production status data; the confidence factor is determined based on the scheduling planning model. Based on the current load factor, the near-term penalty factor, and the confidence factor, the response cost is adjusted to obtain the predicted cost corresponding to each response level.
4. The MES production planning dynamic optimization method according to claim 3, characterized in that, The cost mapping model is trained based on historical abnormal event samples; the label vector of the historical abnormal event samples includes the response level of the historical event and the corresponding actual cost; the actual cost is obtained by statistically analyzing the response time cost, order delay cost, quality loss cost and resource consumption cost after the historical event ends.
5. The MES production planning dynamic optimization method according to claim 1, characterized in that, The first production status data includes equipment status data, order status data, quality inspection data, and manually reported data; the step of identifying whether a production anomaly event has occurred based on the first production status data, and if so, generating corresponding anomaly characteristics, including: When any one of the equipment status data, the order status data, the quality inspection data, and the manually reported data meets the preset anomaly discrimination rules, it is determined to be the production anomaly event, and the anomaly feature is generated based on the equipment status data, the order status data, the quality inspection data, and the manually reported data; The abnormal features include attribute features, device features, order features, and global features.
6. The MES production planning dynamic optimization method according to claim 2, characterized in that, Sending the second scheduling policy to the MES, causing the MES to execute the second scheduling policy and complete production optimization, includes: Send the second scheduling policy to the MES, so that the MES executes the second scheduling policy, and obtain the second production status data obtained by the MES executing the second scheduling policy; Based on the comparison results between the first production status data and the second production status data, determine whether to perform re-optimization; If re-optimization is not performed, then production optimization is complete; If re-optimization is performed, a third scheduling strategy is generated based on the target response level and the scheduling planning model; the third scheduling strategy is then executed to complete production optimization.
7. The MES production planning dynamic optimization method according to claim 6, characterized in that, The levels of the first, second, third, and fourth levels increase sequentially; the generation of the third scheduling strategy based on the target response level and the scheduling planning model includes: If the target response level is not the fourth level, then the target response level is increased, and the third scheduling strategy is generated based on the agent corresponding to the increased target response level and the scheduling planning model. If the target response level is the fourth level, a fault warning is issued, and the third scheduling strategy is generated based on the manually updated scheduling planning model.
8. A dynamic optimization device for MES production planning, characterized in that, include: The status data acquisition module is used to acquire the first production status data obtained by the MES executing the first scheduling strategy; The first scheduling strategy is generated by the scheduling planning model; The abnormal feature generation module is used to identify whether a production abnormal event has occurred based on the first production status data; if so, it generates the corresponding abnormal feature. The response level selection module is used to input the abnormal features into a pre-trained cost mapping model to obtain the predicted cost corresponding to each response level; and to determine the target response level of the production abnormal event based on the minimum value among the predicted costs corresponding to each response level; each response level corresponds to an agent. The scheduling strategy generation module is used to generate a second scheduling strategy based on the agent corresponding to the target response level and the scheduling planning model; send the second scheduling strategy to the MES, so that the MES executes the second scheduling strategy to complete production optimization.
9. An electronic device, characterized in that, It includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method as described in any one of claims 1 to 7.