Industrial production automatic scheduling method and system

By combining multi-source data acquisition, cleaning, and clustering with particle swarm optimization and reinforcement learning, the problem of the one-sidedness and inefficiency of existing industrial production scheduling methods under complex production factors is solved, and the scheduling scheme is fully optimized and production management is refined.

CN121882541APending Publication Date: 2026-04-17HUACUI PIM MICRO INDUCTANCE ELECTRONIC(JIANGSU) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-25
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

Existing industrial production scheduling methods suffer from limitations in handling complex production factors, including one-sided scheduling, low efficiency, lack of in-depth analysis of historical data, and inability to meet the actual production needs of modern factories.

Method used

We employ multi-source data acquisition, data cleaning, and clustering, combined with particle swarm optimization (PSO) algorithm for scheduling calculation, design a multi-objective fitness function, utilize PSO algorithm for scheduling optimization, and dynamically adjust the scheduling scheme through reinforcement learning to generate a detailed report.

Benefits of technology

The scheduling scheme has been fully optimized, the precision of production management has been improved, the system's anti-interference ability has been enhanced, and production efficiency and continuity have been improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121882541A_ABST
    Figure CN121882541A_ABST
Patent Text Reader

Abstract

The invention provides an industrial production automatic scheduling method and system. The industrial production automatic scheduling method comprises the following steps: S1, multi-source data acquisition: acquiring corresponding data from a material information table, a production order information table, a material list and a process flow table, and based on an MQTT protocol, equipment sends an operation state, predicted maintenance time and equipment productivity information to a server in real time through an MQTT client to form a database; s2, cleaning and clustering the data in the database; s3, performing scheduling calculation by using a particle swarm algorithm to obtain an optimal scheduling scheme; and S4, transmitting the optimal scheduling scheme to a result output module, and generating a detailed report. Compared with the prior art, the scheduling scheme can be comprehensively optimized, the anti-interference capability of the system is enhanced, and the production management refinement degree is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to an automatic scheduling method and system for industrial production, belonging to the field of production scheduling. Background Technology

[0002] Existing industrial production scheduling methods mainly fall into two categories: manual scheduling relying on human experience and automated scheduling systems based on a single algorithm (such as genetic algorithms). However, manual scheduling, while relying on the scheduler's familiarity with the production process, can only guarantee production continuity to a certain extent. When faced with complex production factors, such as multi-source information and multiple orders, it suffers from shortcomings such as one-sided scheduling, low efficiency, and a lack of in-depth analysis of historical data. While automated scheduling systems based on genetic algorithms improve scientific rigor, they are prone to getting trapped in local optima when dealing with complex production conditions such as re-entry processes, process diversity, uncertainty of outsourced processes, and constraints on process time intervals. They also lack sufficient consideration for data processing and multi-dimensional optimization objectives, failing to meet the actual production needs of modern factories.

[0003] In view of this, it is indeed necessary to improve the existing industrial production scheduling methods to solve the above problems. Summary of the Invention

[0004] The purpose of this invention is to provide an automatic scheduling method for industrial production, which can comprehensively optimize scheduling schemes, enhance the system's anti-interference ability, and improve the precision of production management.

[0005] To achieve the above objectives, the present invention provides an automatic scheduling method for industrial production, comprising:

[0006] S1. Multi-source data acquisition, including: obtaining relevant data from material information table, production order information table, bill of materials and process flow table, and based on MQTT protocol, the equipment sends operating status, estimated maintenance time and equipment capacity information to the server in real time through MQTT client to form a database;

[0007] S2. Clean and cluster the data in the database;

[0008] S3. Utilize the particle swarm optimization algorithm to calculate the optimal scheduling scheme; specifically including:

[0009] Step 1: Convert the production scheduling plan into particle position vectors that can be recognized by the particle swarm algorithm, and initialize the particle swarm size according to the order quantity;

[0010] Step 2: Transform the labeling rules into weights or penalty terms to design a multi-objective fitness function: F(X) i )=w1×F delay +w2×F util+w3×F cycle , where F(X) i w1, w2, and w3 are the fitness values ​​of the particles. Let α be the penalty function for order delays. i Here, N is the penalty coefficient for order delays, and N is the total number of orders. Let F be the order delay penalty function, M be the total number of machines, capacity j be the capacity value of machine j, actual processing time j be the processing time of machine j excluding maintenance and downtime in the production scheduling plan, and F be the order delay penalty function. cycle = Maximum completion time of all orders - Earliest start time of processing, which is the production cycle penalty function;

[0011] Step 3: Update the particle's position and velocity. The velocity update formula is: v i (t+1)=w×v i (t)+c1×r1×(pbest i -x i (t))+c2×r2×(gbest-x i (t)), where w is the inertia weight; c1 and c2 are learning factors, representing the weights for the particle's own optimal and global optimal learning, respectively; r1 and r2 are random numbers in [0,1]; pbest i is the historically optimal production scheduling scheme for particle i; gbest is the globally optimal production scheduling scheme for the entire particle swarm; x i (t) represents the position of particle i at time t;

[0012] Step 4: Outputting the optimal solution and dynamically adjusting it;

[0013] S4. Transmit the optimal scheduling scheme to the result output module and generate a detailed report.

[0014] Optionally, step S1 specifically includes:

[0015] S101. Obtain the material code, name, specifications, unit, and inventory quantity from the material information table;

[0016] S102. Obtain the order number, product model, order quantity, delivery date, and order type from the production order information table;

[0017] S103. Obtain the processing steps, component information and usage ratio, relationship between preceding and following processes, standard processing time and required equipment type for different materials from the bill of materials and process flow table;

[0018] S104. Based on the MQTT protocol, the device sends its operating status, estimated maintenance time, and equipment capacity information to the server in real time via an MQTT client.

[0019] Optionally, step S2, the step of cleaning the data in the database, specifically includes:

[0020] S201. Use regular expressions to determine the validity of material codes. If they do not meet the requirements, remove them to ensure the accuracy of material data.

[0021] S202. Check the validity period of the process version, remove expired data, and ensure the reliability of version information;

[0022] S203. After removing invalid data, follow the formula. The data is standardized, where min(x) and max(x) are the maximum and minimum values ​​of the indicator, respectively.

[0023] Optionally, step S2, the step of clustering the data in the database, specifically includes:

[0024] S204. Clustering based on delivery date: Let the current time be t0, and the order delivery date be t0. d If the remaining time for an order is Δt, and Δt1 is set to three days and Δt2 to seven days, then the threshold for urgent orders is t1 = t0 + Δt1, and the threshold for lenient orders is t2 = t0 + Δt2.

[0025] If t d If the value is ≤t1, the order is classified as an urgent order and must be prioritized for production to ensure delivery.

[0026] If t1 <t d If the value is less than or equal to t2, the order will be classified as a regular order and produced in an orderly manner according to the overall plan.

[0027] If t d If the value is >t2, the order is classified as a flexible order, allowing for more flexible allocation of production resources.

[0028] S205. Clustering based on order type and storage location: Orders are divided into rework orders and normal orders, with rework orders given higher priority; this is combined with the available space S at each storage location. a and order storage requirements S r Query the storage table to retrieve conditions that match the requirements. If S r ≤S a Then, the orders will be categorized into the corresponding storage locations to facilitate production.

[0029] Optionally, step one is as follows:

[0030] The production scheduling plan is transformed into particle position vectors recognizable by the particle swarm optimization algorithm: "Order-Equipment-Time-Process" is bound to tag rules through encoding, using a segmented encoding method: Particle Xi = [(Order ID, Equipment ID, Processing Start Time, Process Sequence), ..., (Order N, Equipment M, Processing Start Time Tn, Process Sequence Sn)]. Here, the Order ID is associated with the order's tag; the Equipment ID can only select "Pending Use" status equipment and must match the equipment type required by the order's process; the Processing Start Time must avoid the equipment's expected maintenance period and meet the time constraints of the order tag; the Process Sequence strictly follows the order of the BOM process flow.

[0031] The particle swarm size is initialized based on the number of orders. The initialization rule is to prioritize the allocation of the "ready-to-use" equipment with the highest capacity to urgent orders, and to start the process as early as possible; while regular orders are allocated slightly later processing periods.

[0032] Optional, in step four,

[0033] The optimal solution output includes: the processing equipment for each order, the start and end times of each process; the load distribution of the equipment; and the order tag matching status.

[0034] The dynamic adjustment steps include: if a change in device state occurs, the original global optimal solution is retained as the initial particle, and the iteration is restarted.

[0035] Optionally, step S5, which involves constraining special processes, may be included between steps S3 and S4.

[0036] 1) Re-entry processes: When constructing the scheduling scheme, re-entry processes are identified by process number and workpiece identifier. Let R be the set of re-entry processes. For each re-entry process r∈R, a specific time and resource allocation constraint C is set. r ;

[0037] 2) Process flow version selection: Based on the bill of materials information B and the process route table P, select different process flow versions v for each workpiece j. j A comprehensive evaluation is conducted, with evaluation indicators including processing time T, cost C, and quality Q. A comprehensive evaluation function f is constructed, which is used to quantitatively evaluate different process flow versions. The process flow version that yields the optimal comprehensive evaluation function value is selected.

[0038] Optionally, step S6 is also included: using the Q-learning algorithm as a reinforcement learning framework to perform reinforcement learning in order to handle outsourced processes, specifically including:

[0039] Define a state space S, which includes the outsourced process progress, production capacity, and internal factory production status. It can be represented as S = {outsourced process progress, production capacity, internal factory production status}.

[0040] Define the action space A as the set of operations for adjusting the scheduling plan, which can be represented as A = {adjust process time, change equipment};

[0041] Define the Q-value function Q(s,a) to represent the long-term cumulative reward of taking action a in state s, expressed by the formula... Update the Q-value; where α is the learning rate, γ is the discount factor, and r t+1 In state s t Take action a t The reward received later;

[0042] When a subcontracted process experiences a delay, the optimal action that maximizes the value of Q(s,a) is selected from the action space A based on the real-time state s. Dynamically adjust the scheduling plan.

[0043] Optionally, the reports generated in step S4 include: production schedules for each order, equipment usage plans, material requirements lists, outsourced process schedules, and a visual interface displaying the scheduling results;

[0044] The production schedule details the start time t of each process for each order. s End time t e The equipment used, e, is defined by {order number, process number, t}. s ,t e Presented in the form of ,e};

[0045] The equipment usage plan is used to show the usage arrangement of each piece of equipment E in different time periods [t1,t2], and to clarify the process or task performed by equipment E in the time period [t1,t2].

[0046] The material requirements list is used to specify the type m, quantity q and requisition time t of materials required for the production of each order, and is recorded in the form of {order number, n, q, t}.

[0047] The outsourcing schedule records the outsourcing vendor f and the expected start time t for each outsourcing process. s-f End time t e-f That is, {outsourced process number, f, t} s-f ,t e-f};

[0048] The visualization interface displays the scheduling results in the form of a Gantt chart.

[0049] The present invention also aims to provide an automatic scheduling system for industrial production, which can comprehensively optimize scheduling schemes, enhance the system's anti-interference ability, and improve the precision of production management.

[0050] To achieve the above objectives, the present invention provides an automated scheduling system for industrial production, which applies the aforementioned method and includes:

[0051] The data acquisition module is used to collect data from the material information table, production order information table, bill of materials and process flow table, and to receive the equipment's operating status, estimated maintenance time and equipment capacity information sent in real time by the equipment through the MQTT client;

[0052] The control module, connected to the data acquisition module, is used to receive data transmitted by the data acquisition module;

[0053] A data processing module, connected to the control module, is used to clean and cluster the data collected by the data acquisition module, and to perform scheduling calculations using a particle swarm optimization algorithm to obtain the optimal scheduling scheme, and then transmit the optimal scheduling scheme to the control module; and

[0054] The result output module, connected to the control module, is used to receive the optimal scheduling scheme output by the control module and generate a detailed report.

[0055] The beneficial effects of this invention are as follows: The automatic scheduling method for industrial production of this invention integrates multi-source data, providing sufficient data support for scheduling; by adopting the particle swarm optimization algorithm, it can take into account multi-objective optimization, making the scheduling scheme better in terms of time, resource utilization, product quality, etc., thereby improving the overall production efficiency; in addition, by using reinforcement learning to dynamically adjust and respond to production disturbances in real time, the scheduling scheme can be quickly adjusted to ensure production continuity, reduce the impact of emergencies on production, enhance the system's anti-interference ability, and improve the level of precision in production management. Attached Figure Description

[0056] Figure 1 This is a flowchart of the automatic scheduling method for industrial production according to the present invention.

[0057] Figure 2 This is a structural block diagram of the industrial production automatic scheduling system of the present invention. Detailed Implementation

[0058] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be described in detail below with reference to the accompanying drawings and specific embodiments.

[0059] like Figure 1 As shown, this invention discloses an automatic scheduling method for industrial production, which mainly includes the following steps:

[0060] S1. Multi-source data acquisition, including: obtaining relevant data from material information table, production order information table, bill of materials and process flow table, and based on MQTT protocol, the equipment sends operating status, estimated maintenance time and equipment capacity information to the server in real time through MQTT client to form a database;

[0061] S2. Clean and cluster the data in the database;

[0062] S3. Utilize the particle swarm optimization algorithm to calculate the optimal scheduling scheme; specifically including:

[0063] Step 1: Convert the production scheduling plan into particle position vectors that can be recognized by the particle swarm algorithm, and initialize the particle swarm size according to the order quantity;

[0064] Step 2: Transform the labeling rules into weights or penalty terms to design a multi-objective fitness function: F(X) i )=w1×F delay +w2×F util +w3×F cycle , where F(X) i w1, w2, and w3 are the fitness values ​​of the particles. Let α be the penalty function for order delays. i Here, N is the penalty coefficient for order delays, and N is the total number of orders. Let F be the order delay penalty function, M be the total number of machines, capacity j be the capacity value of machine j, actual processing time j be the processing time of machine j excluding maintenance and downtime in the production scheduling plan, and F be the order delay penalty function. cycle = Maximum completion time of all orders - Earliest start time of processing, which is the production cycle penalty function;

[0065] Step 3: Update the particle's position and velocity. The velocity update formula is: v i (t+1)=w×v i (t)+c1×r1×(pbest i -x i (t))+c2×r2×(gbest-x i (t)), where w is the inertia weight; c1 and c2 are learning factors, representing the weights for the particle's own optimal and global optimal learning, respectively; r1 and r2 are random numbers in [0,1]; pbest i is the historically optimal production scheduling scheme for particle i; gbest is the globally optimal production scheduling scheme for the entire particle swarm; x i (t) represents the position of particle i at time t;

[0066] Step 4: Outputting the optimal solution and dynamically adjusting it;

[0067] S4. Transmit the optimal scheduling scheme to the result output module and generate a detailed report.

[0068] The following will provide a detailed explanation of steps S1 to S4.

[0069] Step S1 is as follows:

[0070] S101. Obtain the material code, name, specifications, unit, and inventory quantity from the material information sheet. The material code serves as a unique identifier, facilitating accurate identification and tracking. The name is easy to understand intuitively, the specifications provide a basis for production and processing, the unit standardizes measurement, and the inventory quantity reflects the current reserve status.

[0071] S102. Obtain the order number, product model, order quantity, delivery date, and order type from the production order information table. Among these, the order number can be traced throughout the entire lifecycle, the product model clarifies the type, the order quantity determines the scale, the delivery date sets a time limit, and the order type helps to formulate differentiated scheduling strategies.

[0072] S103. Obtain the processing steps, component information and usage ratio, relationship between preceding and following processes, standard processing time and required equipment type for different materials from the bill of materials and process flow table; among them, component information and usage ratio are used to determine the optional process version, relationship between preceding and following processes is used to determine the process sequence, standard processing time is used to estimate the time consumption, and required equipment type is used to identify the production equipment.

[0073] S104. Based on the MQTT protocol, the equipment sends real-time information such as operating status, estimated maintenance time, and equipment capacity to the server via an MQTT client. Here, "equipment" refers to the processing machine, and each processing machine has an MQTT client. Operating status includes states such as stopped, in use, ready for use, and faulty. These states indicate which machines are not processing and can be scheduled for use. Estimated maintenance time refers to the machine's regular maintenance schedule, used to exclude machines within their corresponding maintenance periods when calculating scheduling. Equipment capacity is used to prioritize the operation of machines with higher capacity. This step falls under the category of data acquisition for factory equipment.

[0074] Step S2, the specific steps for cleaning the data in the database, include:

[0075] S201. Use regular expressions to determine the validity of material codes, discarding those that do not conform to the rules to ensure the accuracy of material data. The regular expression can be represented as: ^[az A–Z 0-9]+$, which represents characters from lowercase a to z (all lowercase English letters), characters from uppercase A to Z (all uppercase English letters), and numbers 0-9 (all numbers). ^ matches the beginning of a character, $ matches the end of a character, and + indicates that at least one character is present, filtering out those that do not conform to the format or are empty. Of course, this is just the most common representation; in actual use, it can be adjusted according to the material codes in the database, such as using a combination of English and Chinese characters or other special formats.

[0076] S202. Check the validity period of the process version, remove expired data, and ensure the reliability of the version information.

[0077] S203. After removing invalid data, follow the formula. The data is standardized, where min(x) and max(x) are the maximum and minimum values ​​of the indicator, respectively. Standardization makes the data from different indicators more comparable.

[0078] The standardized output becomes the input for the order clustering step. Standardized data can eliminate differences in units (such as the two different indicators of order quantity and processing hours), and avoid the situation where a single indicator dominates the clustering result due to its large value range (such as the order quantity range of 1-10 and the processing hours range of 100-1000, direct clustering will ignore the order quantity indicator).

[0079] Step S2, the specific steps of clustering the data in the database, include:

[0080] S204. Clustering based on delivery date: Let the current time be t0, and the order delivery date be t0. d If the remaining time for an order is Δt, and Δt1 is set to three days and Δt2 to seven days, then the threshold for urgent orders is t1 = t0 + Δt1, and the threshold for lenient orders is t2 = t0 + Δt2.

[0081] If t d If the value is ≤t1, the order is classified as an urgent order and must be prioritized for production to ensure delivery.

[0082] If t1 <t d If the value is less than or equal to t2, the order will be classified as a regular order and produced in an orderly manner according to the overall plan.

[0083] If t d If the value is >t2, the order is classified as a flexible order, allowing for more flexible allocation of production resources.

[0084] S205. Clustering based on order type and storage location: Orders are divided into rework orders and normal orders. Rework orders are given higher priority (e.g., directly labeled as rework for easy identification in subsequent steps) to process them as quickly as possible and minimize their impact on the overall schedule. Then, the available space S at the storage location is considered. a and order storage requirements S r Query the storage table to retrieve conditions that match the requirements. If S r ≤S a Orders will be categorized into the corresponding storage locations to facilitate production and avoid storage difficulties.

[0085] In step S205, the specific steps of querying the storage table to obtain conditions and matching requirements are as follows: extract order storage requirements from the order information table or material specification table, such as storage volume V and storage duration L; obtain the available space V of the warehouse and storage location. 库 Remaining storage time L 库 If V≤V 库 And L≤L 库 It can be directly stored in the corresponding warehouse as Class A storage, and storage restrictions do not need to be considered during production scheduling; if V≤V 库 But L>L 库 If the storage condition is incorrect, it will be marked as Class B storage, and production will be delayed during scheduling. All other cases will be marked as Class C storage during scheduling.

[0086] Furthermore, steps S204 and S205 are arranged sequentially. Each order undergoes these two clustering processes before obtaining labels such as "Urgent | Rework | Class A Storage" and "Relaxed | Normal | Class B Storage". By strengthening and cleaning the data and clustering orders based on multi-information, accurate data is provided for scheduling, improving the accuracy and reliability of the subsequent particle swarm optimization algorithm.

[0087] Step one in step S3 specifically refers to:

[0088] 1) Transform the production scheduling plan into particle position vectors recognizable by the particle swarm optimization algorithm: Bind "order-equipment-time-process" to tag rules through encoding, using a segmented encoding particle Xi = [(order ID, equipment ID, processing start time, process sequence), ..., (order N, equipment M, processing start time Tn, process sequence Sn)]. Here, the order ID is associated with the order's tag (e.g., urgent | rework | Class A); the equipment ID can only select equipment in the "pending use" state and must match the equipment type required by the order's process; the processing start time must avoid the equipment's expected maintenance period and meet the time constraints of the order tag (e.g., urgent orders should be allocated to the earliest time slot); the process sequence strictly follows the order of the BOM process flow (e.g., the order must process process 1 first, then process 2).

[0089] 2) Initialize the particle swarm size based on the number of orders (the possible range is [number of orders * 0.6, number of orders * 1.2]). The initialization rule is to prioritize allocating the highest capacity "ready-to-use" equipment to urgent orders (such as "urgent | rework | Class A" labels) and start the process as early as possible; and allocate slightly later processing time slots to ordinary orders (such as "Class B storage") to meet the requirements of the "delayed production" label.

[0090] It should be noted that the initial position of all particles must exclude "faulty / downtime equipment" and "equipment maintenance periods" to avoid the initial scheme violating hard constraints and to ensure product quality and production efficiency.

[0091] In step two, w1, w2, and w3 are weights. For example, when urgent orders account for a high proportion, w1 = 0.5, w2 = 0.3, and w3 = 0.2. α i The penalty coefficient for order delays, such as: high penalty for rework + urgency + Category A (e.g., α). i =10), Emergency + Class A settings with moderate penalties (such as α) i =6), Normal + A type sets low to medium penalties (such as α) i =3), lenient + C-class settings with low penalties (such as α) i =1).

[0092] In step three, the particle's position corresponds to a complete production scheduling plan, and its velocity corresponds to the adjustment range and direction of the production scheduling plan. In the velocity update formula, w is the inertia weight, which is 0.9 in the initial iteration and decreases to 0.4 in the later stages to balance global exploration and local optimization.

[0093] In step four, the optimal solution output includes: the processing equipment for each order, the start and end times of each process; the load distribution of the equipment; and the order tag matching status. The dynamic adjustment step includes: if there is a change in equipment status (such as sudden failure, the addition of emergency or rework orders, or adjustments to equipment maintenance time), the original global optimal solution is retained as the initial particle, and the iteration is restarted.

[0094] Step S5, which includes constraint processing for special processes, is located between steps S3 and S4.

[0095] 1) Re-entry processes: When constructing the scheduling scheme, re-entry processes are identified by process number and workpiece identifier. Let R be the set of re-entry processes. For each re-entry process r∈R, a specific time and resource allocation constraint C is set. r(For example: the maximum time interval between processes, the available machine types, and the requirement for specific machines to complete specific processes). These constraints ensure that re-entry processes for the same workpiece strictly adhere to process requirements in terms of time and resource allocation, avoiding process conflicts and guaranteeing smooth production flow. For instance, a re-entry process may require processing on specific equipment in a specific order and at specific time intervals; these process requirements can be met by setting constraints.

[0096] 2) Process flow version selection: Based on the bill of materials information B and the process route table P, select different process flow versions v for each workpiece j. j A comprehensive evaluation is conducted, with evaluation indicators including processing time T, cost C, and quality Q. A comprehensive evaluation function f is constructed, which is used to quantitatively evaluate different process flow versions. The process flow version that yields the optimal comprehensive evaluation function value is selected. For example, some process flow versions may have shorter processing time but higher costs, while others may have better quality but longer processing time. By using a comprehensive evaluation function, various factors can be weighed to select the most suitable process flow version in order to improve production efficiency and product quality.

[0097] Therefore, this invention employs a particle swarm optimization algorithm, leveraging its global search capability to rationally allocate time and resources for complex processes, thereby improving production efficiency. Simultaneously, based on bill of materials and process route information, it accurately matches process flow versions to workpieces and plans the sequence of processes, enhancing scheduling effectiveness. This solves the problems of difficult scheduling of complex processes and difficulty in adapting process flows in existing systems.

[0098] It also includes step S6: using the Q-learning algorithm as a reinforcement learning framework to perform reinforcement learning in order to deal with outsourced processes, specifically including:

[0099] 1) Define a state space S, which includes information such as the progress of outsourced processes, production capacity, and the internal production status of the factory. This can be represented as S = {outsourced process progress, production capacity, internal factory production status, etc.}. This information comprehensively reflects the real-time status of outsourced processes and internal factory production, providing a basis for decision-making.

[0100] 2) Define the action space A as the set of operations for adjusting the scheduling plan, which can be represented as A = {adjusting process time, changing equipment, etc.}. These actions are the specific means of adjusting the scheduling plan when faced with changes in outsourced processes.

[0101] 3) Define the Q-value function Q(s,a), which represents the long-term cumulative reward for taking action a in state s, using the formula... Update the Q-value; where α is the learning rate, used to control the step size of each update, affecting learning speed and stability; γ is the discount factor, used to measure the importance of future rewards, determining the algorithm's trade-off between long-term and short-term rewards; r t+1 In state s t Take action a t The rewards obtained later (such as on-time delivery rewards, cost-saving rewards, etc.). By continuously updating the Q-value, the algorithm can learn which actions to take in different states will yield the greatest long-term cumulative reward.

[0102] 4) Dynamically adjust the scheduling plan: When outsourced processes experience delays, select the optimal action in the action space A that maximizes the value of Q(s,a) based on the real-time status s. Dynamically adjust scheduling plans. For example, if outsourced processes are delayed, the particle swarm optimization algorithm can choose to adjust the timing of subsequent processes or replace equipment to ensure production continuity and on-time delivery.

[0103] The reports generated in step S4 include: production schedules for each order, equipment usage plans, material requirements lists, outsourced process schedules, and a visual interface displaying the scheduling results.

[0104] The production schedule details the start time t of each process for each order. s End time t e Information such as the equipment used (e), in the format of {order number, process number, t} s ,t e Presented in the form of ,e}. The production schedule provides production personnel with the specific time and equipment arrangements for each process of each order, facilitating the tracking and management of the production process.

[0105] The equipment usage plan clearly shows the usage schedule of each piece of equipment E in different time periods [t1, t2], specifying the procedures or tasks performed by equipment E within the [t1, t2] time period. The equipment usage plan helps to rationally allocate equipment resources, improve equipment utilization, and facilitate equipment maintenance and management.

[0106] The Material Requirements List (MRP) is used to specify the type m, quantity q, and requisition time t of materials required for each order's production, and is recorded in the form of {order number, m, q, t}. The MRP provides an accurate basis for material procurement and preparation, ensuring timely material supply during production and avoiding production delays due to material shortages.

[0107] The outsourcing schedule records the outsourcing vendor f and the expected start time t for each outsourcing process. s-f End time t e-f Information such as {outsourced process number, f, t}s-f ,t e-f Outsourced process scheduling helps monitor and manage outsourced processing, ensuring timely completion and close integration with internal production processes.

[0108] The visualization interface displays the scheduling results in the form of a Gantt chart. The horizontal axis represents time (t), and the vertical axis represents process (p) or equipment (E). Different colored bars indicate the process progress of different orders. The Gantt chart clearly and intuitively shows the time arrangement of the entire production plan and the relationship between each process, allowing production managers to fully understand the production plan, identify potential problems in a timely manner, and make adjustments. Production managers can print the report or export it as Excel, PDF, or other formats to guide actual production operations, depending on their needs.

[0109] like Figure 2 As shown, the present invention also provides an automated industrial production scheduling system for applying the above-described method. The automated industrial production scheduling system mainly includes a data acquisition module, a control module, a data processing module, and a result output module.

[0110] The data acquisition module collects data from material information tables, production order information tables, bills of materials, and process flow tables. It also receives real-time information from equipment via MQTT clients, including operating status, estimated maintenance time, and equipment capacity. In other words, the data acquisition module can proactively collect information from various tables and lists uploaded to the system by users, and also receive status information sent by production equipment, thus integrating multi-source data to provide sufficient data support for subsequent scheduling.

[0111] The control module is connected to the data acquisition module and is used to receive data transmitted by the data acquisition module. In other words, all data collected by the data acquisition module is transmitted to the control module, which then controls the next step of the process.

[0112] The data processing module is connected to the control module and is used to clean and cluster the data collected by the data acquisition module. It then uses a particle swarm optimization algorithm to calculate the optimal scheduling scheme and transmits this scheme to the control module. In other words, the control module sends all received data to the data processing module for processing. The data processing module first cleans and clusters all data, removing invalid data. Then, it optimizes the work process allocation using a particle swarm optimization algorithm and dynamically adjusts the scheduling through reinforcement learning to obtain the optimal scheduling scheme. Finally, it transmits this optimal scheduling scheme to the control module.

[0113] The results output module is connected to the control module and is used to receive the optimal scheduling plan output by the control module and generate a detailed report. In other words, after receiving the optimal scheduling plan, the control module will promptly send it to the results output module for display and / or export.

[0114] Of course, the industrial production automatic scheduling system of the present invention also includes other modules, such as: storage module, data backup module, communication module, data interaction module, etc., and is not limited thereto, as long as it can realize automatic scheduling.

[0115] In summary, the automated industrial production scheduling method of this invention integrates multi-source data, providing ample data support for scheduling. By employing a particle swarm optimization algorithm, it can balance multi-objective optimization, making the scheduling scheme more efficient in terms of time, resource utilization, and product quality, thereby improving overall production efficiency and achieving comprehensive optimization of the scheduling scheme. Furthermore, by using reinforcement learning to dynamically adjust and respond in real-time to production disturbances, such as equipment failures and changes in outsourced processes, the scheduling scheme can be quickly adjusted to ensure production continuity, reduce the impact of unexpected situations on production, and enhance the system's anti-interference capability. In addition, it can also consider various complex production factors, such as different order types, process time intervals, and storage space, making production management more refined and improving the level of precision in production management to meet the complex production needs of modern factories.

[0116] The above 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 preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.

Claims

1. An industrial production automatic scheduling method, characterized in that, include: S1. Multi-source data acquisition, including: obtaining relevant data from material information table, production order information table, bill of materials and process flow table, and based on MQTT protocol, the equipment sends operating status, estimated maintenance time and equipment capacity information to the server in real time through MQTT client to form a database; S2. Clean and cluster the data in the database; S3. Utilize the particle swarm optimization algorithm to calculate the optimal scheduling scheme; specifically including: Step 1: Convert the production scheduling plan into particle position vectors that can be recognized by the particle swarm algorithm, and initialize the particle swarm size according to the order quantity; Step 2: Transform the labeling rules into weights or penalty terms to design a multi-objective fitness function: F(X) i )=w1×F delay +w2×F util +w3×F cycle , where F(X) i w1, w2, and w3 are the fitness values ​​of the particles. Let α be the penalty function for order delays. i Here, N is the penalty coefficient for order delays, and N is the total number of orders. Here is the order delay penalty function, where M is the total number of machines and production capacity. j The actual processing time is the production capacity value of machine j. j F is the processing time for machine j in the production scheduling plan, excluding maintenance and downtime. cycle = Maximum completion time of all orders - Earliest start time of processing, which is the production cycle penalty function; Step 3: Update the particle's position and velocity. The velocity update formula is: v i (t+1)=w×v i (t)+c1×r1×(pbest i -x i (t))+c2×r2×(gbest-x i (t)), where w is the inertia weight; c1 and c2 are learning factors, representing the weights for the particle's own optimal and global optimal learning, respectively; r1 and r2 are random numbers in [0,1]; pbest i is the historically optimal production scheduling scheme for particle i; gbest is the globally optimal production scheduling scheme for the entire particle swarm; x i (t) represents the position of particle i at time t; Step 4: Outputting the optimal solution and dynamically adjusting it; S4. Transmit the optimal scheduling scheme to the result output module and generate a detailed report.

2. The method of claim 1, wherein, Step S1 is as follows: S101. Obtain the material code, name, specifications, unit, and inventory quantity from the material information table; S102. Obtain the order number, product model, order quantity, delivery date, and order type from the production order information table; S103. Obtain the processing steps, component information and usage ratio, relationship between preceding and following processes, standard processing time and required equipment type for different materials from the bill of materials and process flow table; S104. Based on the MQTT protocol, the device sends its operating status, estimated maintenance time, and equipment capacity information to the server in real time via an MQTT client.

3. The method of claim 2, wherein, Step S2, the specific steps for cleaning the data in the database, include: S201. Use regular expressions to determine the validity of material codes. If they do not meet the requirements, remove them to ensure the accuracy of material data. S202. Check the validity period of the process version, remove expired data, and ensure the reliability of version information; S203, after completing invalid data elimination, according to formula The data is normalized, wherein min(x) and max(x) are the maximum and minimum values of the index, respectively.

4. The method of claim 2, wherein, Step S2, the specific steps of clustering the data in the database, include: S204. Clustering based on delivery date: Let the current time be t0, and the order delivery date be t0. d If the remaining time for an order is Δt, and Δt1 is set to three days and Δt2 to seven days, then the threshold for urgent orders is t1 = t0 + Δt1, and the threshold for lenient orders is t2 = t0 + Δt2. If t d ≤ t1, then the order is classified as an urgent order, which needs to be produced and delivered as soon as possible; If t1 < t d ≤ t2, the order is classified as a normal order and produced in sequence according to the overall plan. If t d t2, the order is classified as a loose order, and the production resource allocation is relatively flexible; S205, order type and storage location clustering: divide the order into rework and normal order, set a higher priority for rework order; combine the available space S a and order storage demand S r , query the storage table to match the conditions and requirements, if S r ≤ S a , the order is classified into the corresponding storage location category, and the production is reasonably arranged.

5. The method of claim 1, wherein, Step one is as follows: The production scheduling scheme is transformed into particle position vectors recognizable by the particle swarm optimization algorithm: "Order-Equipment-Time-Process" is bound to tag rules through encoding, and a segmented encoding particle Xi = [(Order ID, Equipment ID, Processing Start Time, Process Sequence), ..., (Order N, Equipment M, Processing Start Time Tn, Process Sequence Sn)] is used, where the order ID is associated with the tag of the order; the equipment ID can only select equipment in the "Pending Use" state and must match the equipment type required by the order process; the processing start time must avoid the equipment's expected maintenance period and meet the time constraints of the order tag; the process sequence strictly follows the order of the BOM process flow. The particle swarm size is initialized based on the number of orders. The initialization rule is to prioritize the allocation of the "ready-to-use" equipment with the highest capacity to urgent orders, and to start the earliest possible time; while regular orders are allocated slightly later processing periods.

6. The method of claim 1, wherein, In step four, The optimal solution output includes: the processing equipment for each order, the start and end times of each process; the load distribution of the equipment; and the order tag matching status. The dynamic adjustment steps include: if a change in device state occurs, the original global optimal solution is retained as the initial particle, and the iteration is restarted.

7. The method of claim 1, wherein, Step S5, which includes constraint processing for special processes, is located between steps S3 and S4. 1) Re-entry processes: When constructing the scheduling scheme, re-entry processes are identified by process number and workpiece identifier. Let R be the set of re-entry processes. For each re-entry process r∈R, a specific time and resource allocation constraint C is set. r ; 2) Process flow version selection: Based on the bill of materials information B and the process route table P, select different process flow versions v for each workpiece j. j A comprehensive evaluation is conducted, with evaluation indicators including processing time T, cost C, and quality Q. A comprehensive evaluation function f is constructed, which is used to quantitatively evaluate different process flow versions. The process flow version that yields the optimal comprehensive evaluation function value is selected.

8. The method of claim 7, wherein, It also includes step S6: using the Q-learning algorithm as a reinforcement learning framework to perform reinforcement learning in order to deal with outsourced processes, specifically including: Define a state space S, which includes the outsourced process progress, production capacity, and internal factory production status. It can be represented as S = {outsourced process progress, production capacity, internal factory production status}. Define the action space A as the set of operations for adjusting the scheduling plan, which can be represented as A = {adjust process time, change equipment}; A Q-value function Q(s, a) is defined to represent the long-term cumulative reward of taking action a in state s, by the formula updating the Q-value; where a is a learning rate, g is a discount factor, and r t+1 is the reward obtained after taking action a t in state s t . When the outsourcing process appears time delay, according to the real-time state s, the optimal action which makes the Q(s, a) value maximum is selected in the action space A Dynamic adjustment of scheduling plan.

9. The method of claim 1, wherein, The reports generated in step S4 include: production schedules for each order, equipment usage plans, material requirements lists, outsourced process schedules, and a visual interface displaying the scheduling results; The production schedule details the start time t of each process for each order. s End time t e The equipment used, e, is defined by {order number, process number, t}. s ,t e Presented in the form of ,e}; The equipment usage plan is used to show the usage arrangement of each piece of equipment E in different time periods [t1,t2], and to clarify the process or task performed by equipment E in the time period [t1,t2]. The material requirements list is used to specify the type m, quantity q, and requisition time t of materials required for the production of each order, and is recorded in the form of {order number, m, q, t}. The outsourcing schedule records the outsourcing vendor f and the expected start time t for each outsourcing process. s-f End time t e-f That is, {outsourced process number, f, t} s-f ,t e-f }; The visualization interface displays the scheduling results in the form of a Gantt chart.

10. An industrial production automatic scheduling system applying the method according to any one of claims 1 to 9, characterized in that, include: The data acquisition module is used to collect data from the material information table, production order information table, bill of materials and process flow table, and to receive the equipment's operating status, estimated maintenance time and equipment capacity information sent in real time by the equipment through the MQTT client; The control module, connected to the data acquisition module, is used to receive data transmitted by the data acquisition module; The data processing module, connected to the control module, is used to clean and cluster the data collected by the data acquisition module, and to perform scheduling calculations using the particle swarm optimization algorithm to obtain the optimal scheduling scheme, and then transmit the optimal scheduling scheme to the control module. as well as The result output module, connected to the control module, is used to receive the optimal scheduling scheme output by the control module and generate a detailed report.