Color master batch production process recording method and system applied to quality traceability
By reconstructing the process event records and analyzing the material flow path of the color masterbatch production line, a detailed production process traceability record is generated, which solves the problem of difficult quality traceability in the existing technology and achieves efficient and accurate quality traceability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- DONGGUAN GUANGFENGXING PLASTIC CO LTD
- Filing Date
- 2026-03-26
- Publication Date
- 2026-06-23
AI Technical Summary
The existing methods of recording the production process of color masterbatch lack detailed sorting and complete recording of production process events, which makes it difficult to trace quality problems. Furthermore, the scattered and unrelated data leads to low efficiency and information omissions in quality traceability.
By acquiring the initial process event records of multiple production process nodes on the color masterbatch production line, the production process event flow is reconstructed to generate a complete set of production process event flow data spanning the process time. The material flow path parsing model is called to construct a material batch flow link diagram and bind the equipment operating status to generate a set of traceability records for the color masterbatch production process.
It enables precise traceability of the masterbatch production process, improves the accuracy and efficiency of quality traceability, enriches the information dimensions of quality traceability, and enhances the comprehensiveness and efficiency of quality traceability.
Smart Images

Figure CN122264299A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and more specifically, to a method and system for recording the production process of masterbatch for quality traceability. Background Technology
[0002] In the color masterbatch production industry, quality traceability is a crucial aspect of ensuring product quality, meeting customer needs, and responding to market regulations. Existing methods for recording the color masterbatch production process have many shortcomings.
[0003] On the one hand, some production process records only record some key production data, such as production time and approximate equipment operating parameters, lacking detailed analysis and complete recording of production process events. This recording method makes it difficult to accurately trace which specific production link, equipment, or batch of materials caused the problem when quality issues arise, thus failing to provide a strong basis for quality improvement.
[0004] On the other hand, while some recording methods do record a significant amount of production data, this data is scattered and unrelated. For example, data such as material batch information, equipment operating parameters, and production process times are not effectively integrated and correlated. This results in a significant amount of time and effort being spent searching for and organizing relevant information during quality traceability, leading to low efficiency and a high risk of information omissions or errors, thus failing to meet the needs for fast and accurate quality traceability. Summary of the Invention
[0005] In view of the aforementioned problems, and in conjunction with the first aspect of the present invention, embodiments of the present invention provide a method for recording the production process of color masterbatch for quality traceability, the method comprising: Obtain the initial process event record set corresponding to multiple production process nodes on the color masterbatch production line. The initial process event record set includes process start signal records, process operation parameter records, and process end signal records generated by each production process node on the continuous production time axis with time identifiers. The initial process event record set is reconstructed into a production process event flow. The process boundary is divided according to the time sequence of the process start signal record and the process end signal record on the continuous production time axis. The process running parameter record is filled into the corresponding process time interval according to the process boundary division result, and a production process event flow data set with a complete process time span is generated. The pre-configured production material batch tracking model is invoked to parse the material flow path of the production process event flow data set, extract the input material batch identifier and output material batch identifier corresponding to each production process node in the production process event flow data set, and construct a material batch flow link diagram from the initial material feeding process node to the final finished product process node according to the sequential relationship between the input material batch identifier and the output material batch identifier on the continuous production time axis. For each material batch flow node in the material batch flow link diagram, the production equipment operation status record is bound, and the process operation parameter record in the production process event flow data set is matched and associated according to the corresponding time period of the material batch flow node on the continuous production time axis to generate the equipment operation status parameter sequence corresponding to each material batch flow node. Based on the material batch flow link diagram and the equipment operation status parameter sequence corresponding to each material batch flow node, a set of traceability records for the color masterbatch production process is generated, and the set of traceability records for the color masterbatch production process is stored in the traceability database for subsequent quality traceability query. The set of traceability records for the color masterbatch production process includes material batch identifier, process execution time point, production equipment identifier, and equipment operation status parameter sequence.
[0006] Furthermore, embodiments of the present invention also provide a color masterbatch production process recording system for quality traceability, characterized in that it includes: A processor; a machine-readable storage medium for storing machine-executable instructions of the processor; wherein the processor is configured to execute the above-described method for recording the masterbatch production process for quality traceability by executing the machine-executable instructions.
[0007] In another aspect, embodiments of the present invention also provide a computer program product, the computer program product including machine-executable instructions, the machine-executable instructions being stored in a computer-readable storage medium, a processor of a computer device reading the machine-executable instructions from the computer-readable storage medium, the processor executing the machine-executable instructions, causing the computer device to execute the above-described method for recording the production process of masterbatch for quality traceability.
[0008] Based on the above, by acquiring the initial process event record set corresponding to multiple production process nodes on the masterbatch production line and reconstructing the production process event flow, the process boundaries can be accurately defined, and the process operation parameters can be accurately filled into the corresponding time intervals. This generates a production process event flow data set with a complete process time span. A pre-configured production material batch tracking model is then used to parse the material flow path of the production process event flow data set, constructing a material batch flow link diagram. This clearly presents the material flow process from initial feeding to the final finished product, enabling quality traceability to proceed along the main line of material batches, greatly improving the accuracy and efficiency of traceability. Each node in the material batch flow link diagram is bound to the production equipment operation status record, generating a sequence of equipment operation status parameters, further enriching the information dimensions of quality traceability. The final generated masterbatch production process traceability record set contains key information such as material batch identifiers, process execution time points, production equipment identifiers, and equipment operation status parameter sequences, and is stored in the traceability database, effectively improving the comprehensiveness, accuracy, and efficiency of masterbatch production quality traceability. Attached Figure Description
[0009] Figure 1 This is a schematic diagram of the execution flow of the color masterbatch production process recording method for quality traceability provided in an embodiment of the present invention.
[0010] Figure 2 This is a schematic diagram of exemplary hardware and software components of a color masterbatch production process recording system for quality traceability provided in an embodiment of the present invention. Detailed Implementation
[0011] Figure 1 This is a flowchart illustrating a method for recording the production process of masterbatch for quality traceability, provided by an embodiment of the present invention. A detailed description follows.
[0012] Step S110: Obtain the initial process event record set corresponding to multiple production process nodes on the color masterbatch production line. The initial process event record set includes the process start signal record, process operation parameter record and process end signal record generated by each production process node on the continuous production time axis with time identifier.
[0013] In this embodiment, a masterbatch production line is described, which consists of multiple production process nodes arranged sequentially in space and time. To construct a complete production process traceability system, it is first necessary to acquire the raw event data generated by these production process nodes during operation. The production line is equipped with a distributed control system, which continuously monitors and captures signals emitted by the controllers of each production process node with millisecond-level precision through the data acquisition interface of the distributed control system.
[0014] For example, for the mixing process node, when the programmable logic controller (PLC) of the mixing process node receives a start command, it generates a process start signal record. The data structure of this process start signal record is a triple, containing a node identifier Node_ID_Mixer, an event type identifier Event_Type_Start, and a high-precision timestamp T_start_mixer, which is synchronously provided by the global clock server within the control system. Similarly, when the mixing process ends, the controller generates a process end signal record, which also contains a node identifier Node_ID_Mixer, an event type identifier Event_Type_End, and a timestamp T_end_mixer. Throughout the production process, the mixing process node also continuously reports process operation parameter records at a fixed sampling period, such as once per second. The data structure of these process operation parameter records is a tuple containing a node identifier Node_ID_Mixer, a timestamp T_param_i, and a parameter value vector P_vector. Among them, the parameter value vector P_vector is a multi-dimensional vector. The first dimension of the parameter value vector P_vector is the main screw speed, the second dimension of the parameter value vector P_vector is the mixing chamber temperature, the third dimension of the parameter value vector P_vector is the melt pressure, and the fourth dimension of the parameter value vector P_vector is the main motor current.
[0015] Therefore, through the above method, on the continuous production time axis T_axis, for all production process nodes, such as batching nodes, mixing nodes, extrusion nodes, and pelletizing nodes, the three types of records with precise time identifiers—process start signal records, process operation parameter records, and process end signal records—collected together constitute the initial process event record set S_0. During data acquisition and transmission, to ensure the security of sensitive process parameters, all process operation parameter records containing specific parameter values are encrypted before transmission using a lightweight encryption module employing a symmetric encryption algorithm. The symmetric encryption algorithm key is uniformly distributed and managed by the production management system to prevent data from being illegally intercepted and parsed during network transmission.
[0016] Step S120: Perform production process event flow reconstruction processing on the initial process event record set. Divide the process boundaries according to the time sequence of the process start signal record and the process end signal record on the continuous production time axis. Fill the process running parameter records into the corresponding process time interval according to the process boundary division results to generate a production process event flow data set with a complete process time span.
[0017] After obtaining the initial process event record set S_0, the data in this set exists in the form of discrete events, which cannot be directly used to analyze continuous state changes within a complete process cycle. Therefore, it is necessary to reconstruct the initial process event record set S_0, converting the discrete event points into continuous event stream data with clear time boundaries. This reconstruction process includes the following sub-steps to achieve the transformation from raw signals to a structured process event stream.
[0018] Step S121: parse the process start signal record of each production process node in the initial process event record set, and extract the time identifier contained in the process start signal record as the process start time point parameter.
[0019] First, from the initial process event record set S_0, all records with the event type identifier Event_Type_Start are selected. For each production process node, such as the mixing process node, all process start signal records of the mixing process node are traversed. For each start, the data structure of the process start signal record is parsed, and the timestamp field is extracted. The value of this timestamp field is defined as the process start time point parameter T_start_N for this production, where N represents the Nth production cycle under this production process node. For example, if the timestamp field value of the process start signal record of the mixing process node is T_s_mixer_20230720_093015 when the mixing process node starts production, then this value is assigned to the process start time point parameter T_start_1, indicating that the start time point of the first production cycle of the mixing process node is 093015.
[0020] Step S122: parse the process end signal record of each production process node in the initial process event record set, and extract the time identifier contained in the process end signal record as the process end time point parameter.
[0021] In parallel with the above steps, all records with the event type identifier Event_Type_End are filtered from the initial process event record set S_0. Similarly, for each production process node, its process end signal record is parsed, and the timestamp field is extracted. The value of this timestamp field is defined as the process end time point parameter T_end_N for that production. For example, for the same production cycle of the mixing process node, if the timestamp of the subsequent process end signal record of the mixing process node is T_e_mixer_20230720_102245, then this value is assigned to the process end time point parameter T_end_1, indicating that the end time point of this production cycle is 102245.
[0022] Step S123: Pair the process start time parameter and the process end time parameter corresponding to the same production process node on the continuous production time axis, and determine the process execution duration range of the production process node according to the time interval between the process start time parameter and the process end time parameter.
[0023] For each complete production process at each production process node, the corresponding start and end events need to be associated. Using the node identifier Node_ID_Mixer and the production cycle number N, the process start time parameter T_start_1 obtained in step S121 and the process end time parameter T_end_1 obtained in step S122 are paired. The process start time parameter T_start_1 and the process end time parameter T_end_1 are marked as two endpoints on the continuous production time axis T_axis. The time difference between the process end time parameter T_end_1 and the process start time parameter T_start_1 is calculated, and this time difference is defined as the length of the process execution duration interval Delta_T_1. Therefore, the process execution duration interval for this production is defined as a time window starting from the process start time parameter T_start_1 and ending at the process end time parameter T_end_1, denoted as the closed interval [T_start_1, T_end_1].
[0024] Step S124: Mark the interval on the continuous production time axis according to the start time of the process execution duration interval and the end time of the process execution duration interval, and generate the process boundary division identifier corresponding to the production process node. The process boundary division identifier includes the process start boundary marker point and the process end boundary marker point.
[0025] To quickly locate and reference the time boundaries of each process cycle in subsequent data processing, standardized identifiers need to be generated. For the first production cycle of the mixing process node, a process boundary delineation identifier B_mixer_1 is generated based on the process execution duration interval [T_start_1, T_end_1] of the mixing process node. This process boundary delineation identifier B_mixer_1 is implemented in the system as a data object containing two attribute fields: the first attribute field of the process boundary delineation identifier B_mixer_1 is the process start boundary marker point, and the value of the process start boundary marker point is assigned to the process start time point parameter T_start_1; the second attribute field of the process boundary delineation identifier B_mixer_1 is the process end boundary marker point, and the value of the process end boundary marker point is assigned to the process end time point parameter T_end_1. This process boundary delineation identifier B_mixer_1 is uniquely bound to the mixing process node and its first production cycle.
[0026] Step S125: Traverse all process operation parameter records in the initial process event record set, extract the time identifier attached to each process operation parameter record as the parameter record time point, and determine the process execution duration interval to which it belongs based on the position of the parameter record time point on the continuous production time axis.
[0027] Next, it is necessary to assign the massive number of discrete process operation parameter records to specific process cycles. This involves iterating through all data items of type process operation parameter record in the initial process event record set S_0. For each process operation parameter record, such as a process operation parameter record R_param_k, the timestamp field T_param_k is extracted. Then, for the mixing process node, all defined process boundary delimiters for the mixing process node are queried, such as the process boundary delimiter B_mixer_1. The timestamp field T_param_k is checked to see if it meets the following conditions: the timestamp field T_param_k is greater than or equal to the process start boundary marker of the process boundary delimiter B_mixer_1, and the timestamp field T_param_k is less than or equal to the process end boundary marker of the process boundary delimiter B_mixer_1. If these conditions are met, the process operation parameter record R_param_k is determined to belong to the first production cycle of the mixing process node. In this way, all process operation parameter records are assigned to the corresponding production cycle intervals based on their timestamps.
[0028] Step S126: Associate and map the specific parameter values in the process operation parameter record with the process execution duration interval to which they belong, sort the specific parameter values according to the time sequence of the parameter record time points within the process execution duration interval, and generate the operation parameter time sequence within the process execution duration interval.
[0029] After assigning the process operation parameter records to specific process execution duration intervals, such as the process execution duration interval [T_start_1, T_end_1], it is necessary to further organize the temporal order of these parameter records. For all process operation parameter records assigned to the process execution duration interval [T_start_1, T_end_1], extract the parameter record time point from each process operation parameter record, such as the timestamp field T_param_i, and the corresponding parameter value vector, such as the parameter value vector P_vector_i. Then, sort these parameter record time points T_param_i in ascending order according to their numerical values. After sorting, concatenate the parameter record time points T_param_i with the corresponding parameter value vector P_vector_i to form an ordered list. This ordered list is the time sequence TS_mixer_1 of the operation parameters for the first production cycle of the mixing process node within its process execution duration interval [T_start_1, T_end_1]. Each element in this time sequence TS_mixer_1 is a multi-dimensional parameter value vector collected at a specific moment.
[0030] Step S127: Perform missing value processing on the time series of the operating parameters, detect the actual interval between the time points within the duration interval of the process execution and the time points of adjacent parameter records in the time series of the operating parameters. If the actual interval exceeds a preset sampling interval threshold, then for the numerical parameter records in the process operating parameter records, perform linear interpolation to fill them according to the specific parameter values of the numerical parameters corresponding to the time points of the preceding and following parameter records in the time series of the operating parameters. For non-numerical parameter records, use the nearest valid record value among the preceding and following records to fill them, and obtain the complete time series of operating parameters after parameter filling.
[0031] Due to fluctuations in fieldbus communication or momentary malfunctions in the acquisition module, the operating parameter time series TS_mixer_1 generated in step S126 may contain missing data points, meaning the actual interval between parameter recording time points is greater than the theoretical sampling interval. To ensure the continuity and integrity of the data stream, missing value processing is required for the operating parameter time series TS_mixer_1. First, obtain the system's preset sampling interval threshold; for example, if the theoretical sampling period is 1 second, the preset sampling interval threshold can be set to 1.5 seconds. Then, iterate through the operating parameter time series TS_mixer_1 and calculate the actual interval Delta_T_interval between the parameter recording time points T_param_i and T_param_{i+1} of two adjacent records, such as record point i and record point i+1. If Delta_T_interval is greater than the preset sampling interval threshold of 1.5 seconds, it is considered that there is a data gap. For the missing time points, padding values need to be generated. For the numerical parameter dimension in the parameter value vector P_vector, such as the main screw speed dimension, the specific parameter values of the two nearest valid record points before and after the missing time point, i.e., record point i and record point i+1, are extracted and denoted as speed value S_i and speed value S_{i+1}. Then, linear interpolation is performed on the missing time point T_missing. The calculation logic for the interpolated speed value S_missing is: S_missing = S_i + ((T_missing - T_param_i) / (T_param_{i+1} - T_param_i)). (S_{i+1}-S_i). For non-numerical parameters in the parameter value vector P_vector, such as an enumerated parameter representing the device state, a forward padding method is used to set the state value of the missing time point T_missing to be the same as the state value of the most recent valid record point, i.e., record point i, in that dimension. Through the above processing, all missing time periods in the running parameter time series TS_mixer_1 are filled, finally resulting in a parameter-filled complete running parameter time series C_TS_mixer_1 where each theoretical sampling point has a complete parameter value vector within the process execution duration interval [T_start_1, T_end_1].
[0032] Step S128: Combine and encapsulate the process boundary division identifier of each production process node, the process execution duration interval, and the complete time series of running parameters after parameter filling to generate a production process event flow data unit with the process as the basic unit.
[0033] After the above steps, a complete time boundary and continuous parameter data are available for a single production cycle of a production process node. Next, this information is encapsulated into an independent data unit. For the first production cycle of the mixing process node, the process boundary delimiter B_mixer_1, the process execution duration interval [T_start_1, T_end_1], and the complete time sequence of the parameters after parameter filling are combined. This combination is achieved by creating a new data structure containing three core fields: the first field is the boundary identifier field, storing the process boundary delimiter B_mixer_1; the second field is the time interval field, storing the start and end times of the process execution duration interval [T_start_1, T_end_1]; and the third field is the parameter sequence field, storing the complete time sequence of the parameters after parameter filling C_TS_mixer_1. This encapsulated data structure is the production process event flow data unit E_mixer_1, with the process as the basic unit. The event flow data unit E_mixer_1 for this production process fully describes all relevant information within the first production cycle of the mixing process node.
[0034] Step S129: Connect the production process event flow data units corresponding to all production process nodes on the continuous production time axis in sequence according to time order, retain the process switching gap mark between the process execution duration intervals of adjacent production process nodes, and generate a production process event flow data set covering the entire production process.
[0035] The final step involves concatenating all production process nodes, including batching, mixing, extrusion, and pelletizing nodes, according to the actual order in which they occur on the continuous production time axis (T_axis). For example, the production process event flow data units E_batching_1 for the batching node are arranged chronologically, followed by E_mixer_1 for the mixing node, then E_extruder_1 for the extrusion node, and finally E_pelletizing_1 for the pelletizing node. Between adjacent production process event flow data units, such as E_batching_1 and E_mixer_1, there may be a time interval. This interval corresponds to the transition time for materials to move from one process to the next, or the equipment waiting time. To accurately reflect the entire production process at the data level, a process switching gap marker, Gap_batch_to_mix, needs to be inserted between these two data units during concatenation. The process switching gap marker `Gap_batch_to_mix` is a special data object containing only a timestamp interval. This interval extends from the process end boundary marker of the previous production process event stream data unit to the process start boundary marker of the next production process event stream data unit. In this way, all production process event stream data units and their process switching gap markers are connected in chronological order into a linear, continuous data sequence. This data sequence ultimately constitutes the production process event stream data set `F_Set`, covering the entire production process from initial material input to final product output.
[0036] Step S130: Call the pre-configured production material batch tracking model to parse the material flow path of the production process event flow data set, extract the input material batch identifier and output material batch identifier corresponding to each production process node in the production process event flow data set, and construct a material batch flow link diagram from the initial material feeding process node to the final finished product process node according to the sequential relationship between the input material batch identifier and the output material batch identifier on the continuous production time axis.
[0037] After obtaining the production process event flow data set F_Set covering the entire production process, it is necessary to parse the specific material flow paths from it. This process is accomplished by calling a pre-configured production material batch tracking model. This production material batch tracking model is a software module specifically designed for processing and analyzing production process data. Internally, it encapsulates a material batch identifier parsing rule base and a material flow relationship topology template. The parsing of the production process event flow data set F_Set and the construction of the material batch flow path diagram include the following sub-steps.
[0038] Step S131: Access the pre-configured production material batch tracking model, which has a built-in material batch identifier parsing rule base and material flow relationship topology template.
[0039] First, the system instantiates and accesses a pre-deployed production material batch tracking model, M_trace, from the application programming interface (API). The core components of this M_trace model include two predefined modules. The first module is a material batch identifier parsing rule base, which stores a series of regular expressions and context keywords used to identify and extract material batch codes in different formats. For example, a rule in the rule base can identify strings starting with "BATCH," followed by the year, month, day, and a 4-digit serial number. The second module is a material flow relationship topology template, which defines a directed graph data structure to describe how materials flow from one process node to another. This template includes attribute definitions for nodes and edges; for example, nodes must contain input material batch identifier fields and output material batch identifier fields, and edges must contain source and target node references.
[0040] Step S132: Input the production process event flow data set into the production material batch tracking model, trigger the material batch identifier parsing rule base to scan and match the process operation parameter records of each production process node, identify the parameter fields in the process operation parameter records that conform to the material batch code format, and extract the identified parameter fields as candidate material batch identifiers.
[0041] Next, the production process event flow data set F_Set generated in step S129 is used as input and fed into the production material batch tracking model M_trace. The production material batch tracking model M_trace traverses each production process event flow data unit in the production process event flow data set F_Set, such as production process event flow data unit E_mixer_1. For each production process event flow data unit, the model accesses its internal parameter-filled complete time series of operating parameters, such as parameter-filled complete time series of operating parameters C_TS_mixer_1. Then, the model calls the material batch identifier parsing rule base to scan each parameter value vector in the parameter-filled complete time series of operating parameters C_TS_mixer_1, such as the parameter value vector P_vector_t at a certain time t. The scanning process is performed dimension by dimension. For example, it checks if the rotation speed value in the first dimension is in batch code format, which is obviously not the case. It continues checking other dimensions until a string value in a certain dimension is found, such as the value "BATCH2023072001" in a virtual dimension named "Input Material ID," which perfectly matches the regular expression defined in the material batch identifier parsing rule base. When a match is successful, the model extracts the value "BATCH2023072001" of that dimension along with its timestamp t, as a candidate material batch identifier C_Batch_ID.
[0042] Step S133: Perform material flow direction attribute judgment on the candidate material batch identifiers of each production process node, determine whether the candidate material batch identifier belongs to the input material type or the output material type according to the context position of the candidate material batch identifier in the process operation parameter record, mark the candidate material batch identifier belonging to the input material type as the input material batch identifier, and mark the candidate material batch identifier belonging to the output material type as the output material batch identifier.
[0043] Simply extracting the candidate material batch identifier C_Batch_ID is insufficient; it's also necessary to determine whether the identifier represents material input into the process or material output from the process. When extracting the candidate material batch identifier C_Batch_ID, the production material batch tracking model M_trace simultaneously records the context position of this identifier within the parameter value vector P_vector_t. This context position information includes the parameter name containing the field. For example, if the field is parsed from a parameter named "Feed_Material_ID," or appears within a short period at the beginning of the process, the model classifies it as an input material. Conversely, if the field is parsed from a parameter named "Product_Batch_ID," or appears near the end of the process, the model classifies it as an output material. Based on the above discrimination logic, for the first production cycle of the mixing process node, the candidate material batch identifier C_Batch_ID identified at the beginning of the process, such as "BATCH2023072001", is marked as the input material batch identifier I_mixer_1; while another candidate material batch identifier C_Batch_ID identified at the end of the process, such as "BATCH2023072002", is marked as the output material batch identifier O_mixer_1.
[0044] Step S134: Obtain the process boundary division identifier of each production process node in the production process event flow data set, and determine the time position of each production process node on the continuous production time axis based on the process start boundary marker and process end boundary marker in the process boundary division identifier.
[0045] To arrange these material batch identifiers on the timeline, it is necessary to know the time position corresponding to each production process event flow data unit. The production material batch tracking model M_trace reads the process boundary delimiter from each production process event flow data unit in the production process event flow data set F_Set. For example, it reads the process boundary delimiter B_mixer_1 from the production process event flow data unit E_mixer_1. Then, it extracts the process start boundary marker T_start_1 and the process end boundary marker T_end_1 from the process boundary delimiter B_mixer_1. This pair of time points T_start_1 and T_end_1 precisely defines the start and end positions of the first production cycle of the mixing process node on the continuous production timeline T_axis.
[0046] Step S135: Based on the continuous production timeline, arrange the input material batch identifiers and output material batch identifiers of each production process node according to the time position to form a material batch identifier sequence with the production process node as the node unit.
[0047] Next, the production material batch tracking model M_trace sorts the information of all production process nodes based on the continuous production time axis T_axis. For the mixing process node, the model creates a record containing the node identifier Node_ID_Mixer, the process start boundary marker T_start_1, the process end boundary marker T_end_1, the input material batch identifier I_mixer_1, and the output material batch identifier O_mixer_1. Similarly, similar record entries are created for the batching, extrusion, and pelletizing nodes. Then, the model sorts these record entries according to the chronological order of their process start boundary markers, forming a time-expanded material batch identifier sequence Seq_Batch with production process nodes as the node units.
[0048] Step S136: In the material batch identifier sequence, downstream tracking is performed on the output material batch identifier of each production process node. All subsequent production process nodes with a time position later than the current production process node on the continuous production time axis are searched. It is checked whether there is an identifier string in the input material batch identifier of the subsequent production process node that is exactly the same as the output material batch identifier of the current production process node. If so, a directed edge connection for material flow is established between the current production process node and the corresponding subsequent production process node.
[0049] The material batch identifier sequence Seq_Batch merely arranges material batch information by process, but does not establish the flow relationship between processes. The core task of this step is to find the next destination for each output material batch identifier in the material batch identifier sequence Seq_Batch. This downstream tracing process involves more detailed operations, which are completed by steps S1361 to S1366.
[0050] Step S1361: Obtain the process end time point parameter of the current production process node on the continuous production time axis, and use the process end time point parameter as the time starting reference for downstream node search.
[0051] First, retrieve a current production process node from the material batch identifier sequence Seq_Batch, such as the mixing process node. Obtain the process end time parameter T_end_1 of the mixing process node. Set this process end time parameter T_end_1 as the starting time base for searching downstream nodes after the current production process node. This means that only among other process nodes that occur strictly later than this time point will we search for subsequent processes that may receive the output of the mixing process.
[0052] Step S1362: Based on the time start reference, scan backward on the continuous production time axis to identify all production process nodes whose time position of the process start boundary marker point is later than the process end time parameter, and use the production process nodes as a potential downstream node candidate set.
[0053] Starting with the process end time parameter T_end_1, scan along the continuous production time axis T_axis in the direction of increasing time. Scan the process start boundary markers of all production process nodes, such as the process start boundary marker T_start_extruder_1 for extrusion nodes, and the process start boundary marker T_start_pelletizing_1 for pelletizing nodes. Filter out all production process nodes whose process start boundary markers are strictly later than the process end time parameter T_end_1. Combine these production process nodes that meet the above conditions, such as extrusion nodes (if T_start_extruder_1 is later than T_end_1) and pelletizing nodes (if T_start_pelletizing_1 is later than T_end_1), into a potential downstream node candidate set Set_Candidate.
[0054] Step S1363: Sequentially extract each production process node from the potential downstream node candidate set and read the input material batch identifier of the production process node.
[0055] From the potential downstream node candidate set Set_Candidate, each candidate production process node is retrieved sequentially in chronological order, for example, the extrusion node is retrieved first. Then, from the material batch identifier sequence Seq_Batch, the record corresponding to the extrusion node is found, and the input material batch identifier I_extruder_1 in the record is read.
[0056] Step S1364: Compare the output material batch identifier of the current production process node with the input material batch identifier of the extracted production process node character by character to determine whether the encoded string of the output material batch identifier is completely consistent with the encoded string of the input material batch identifier.
[0057] Next, a crucial comparison operation is performed. The batch identifier O_mixer_1 of the output material from the current production process node, i.e., the mixing process node, with the value "BATCH2023072002", is compared character by character with the batch identifier I_extruder_1 of the input material from the extracted production process node, i.e., the extrusion process node. The comparison process starts from the first character and compares each character in turn to see if they are the same, until the end of the string.
[0058] Step S1365: If the encoded string of the output material batch identifier is completely consistent with the encoded string of the input material batch identifier, then it is confirmed that the output material batch of the current production process node and the input material batch of the production process node are the same material batch. A directed edge connection for material flow is created between the current production process node and the production process node to be taken out. The direction of the directed edge connection for material flow is from the current production process node to the production process node to be taken out.
[0059] If, after character-by-character comparison, the encoded string "BATCH2023072002" of the output material batch identifier O_mixer_1 is found to be exactly the same as the encoded string of the input material batch identifier I_extruder_1 (for example, the value of I_extruder_1 is also "BATCH2023072002"), then it can be confirmed that the material batch produced by the mixing process node is exactly the material batch input by the extrusion node. Therefore, in the graph represented by the material batch identifier sequence Seq_Batch, a directed material flow edge E_mix_to_extru needs to be created between the node unit representing the mixing process node and the node unit representing the extrusion node. The direction of this directed material flow edge connection E_mix_to_extru is defined as from the mixing process node to the extrusion node.
[0060] Step S1366: If the encoded string of the output material batch identifier is not completely consistent with the encoded string of the input material batch identifier, then continue to select the next production process node from the potential downstream node candidate set and repeat the character-by-character comparison operation.
[0061] If the comparison results are inconsistent, for example, the value of the input material batch identifier I_extruder_1 at the extrusion node is "BATCH2023072003", which is different from "BATCH2023072002", it indicates that the material did not flow to the extrusion node. Then, continue to retrieve the next node from the potential downstream node candidate set Set_Candidate, such as the pelletizing node, and repeat the comparison operations of steps S1363 to S1365 until a matching downstream node is found, or until the entire potential downstream node candidate set Set_Candidate is traversed.
[0062] Step S137: Repeat the downstream tracking operation for the output material batch identifier of each production process node until all production process nodes on the continuous production time axis have been traversed, and generate an initial material batch flow directed graph consisting of the production process nodes and the directed edges of the material flow.
[0063] After completing the search for all potential downstream nodes of the current production process node (such as the mixing node), all created directed material flow edges are recorded, forming the outgoing edge list of the mixing node. Then, the next production process node in the material batch identifier sequence Seq_Batch, such as the extrusion node, is taken as the new current production process node, and all downstream tracking operations from steps S1361 to S1366 are repeated. This process traverses every production process node on the entire continuous production time axis T_axis. Finally, by finding the downstream destination of the output material batch for each production process node, or confirming that it has no downstream destination, a network structure consisting of all production process nodes and the directed material flow edges between them is established in the system. This network structure is the initial directed material batch flow graph G_raw.
[0064] Step S138: Perform connectivity analysis on the initial material batch flow directed graph. Starting from the initial feeding process node, perform a breadth-first traversal along the material flow directed edge connection to filter out all connected paths that can reach the final finished product process node. Remove isolated production process nodes that are not in any connected path and their corresponding material flow directed edge connections to obtain the optimized material batch flow link graph.
[0065] To ensure the accuracy and completeness of material traceability paths, the initial directed graph G_raw of material batch flow needs to be optimized. The system starts with the initial feeding process node, such as the batching node, and applies a breadth-first traversal algorithm. Starting from the batching node, it visits its direct downstream nodes, such as the mixing node, along all directed edges connecting the material flow from the batching node. Then, starting from the mixing node, it continues to visit downstream nodes, such as the extrusion node, along the list of outgoing edges from the mixing node, and so on, until no new nodes can be visited. During this process, the system records all paths that can start from the batching node and reach the final finished product process node, such as the pelletizing node, through a series of directed edges connecting the material flow. Production process nodes that cannot be reached from the batching node, or whose directed edges do not ultimately lead to the pelletizing node—such as an isolated node due to data errors—are considered invalid nodes. The system removes these invalid nodes and all their connected directed edges from the initial directed graph G_raw. After the above connectivity analysis and pruning, only complete, continuous and effective paths from initial material input to final product are retained. These paths together constitute the optimized material batch flow link graph L_final.
[0066] Step S140: Bind the production equipment operation status record to each material batch flow node in the material batch flow link diagram, match and associate the process operation parameter records in the production process event flow data set according to the corresponding time period of the material batch flow node on the continuous production time axis, and generate the equipment operation status parameter sequence corresponding to each material batch flow node.
[0067] After constructing the material batch flow graph L_final, it is necessary to bind the detailed equipment operating status data corresponding to each node to that node. This process combines the abstract material flow with specific equipment operating conditions. The specific binding and generation process includes the following sub-steps.
[0068] Step S141: Parse the material batch flow link diagram, and extract the production process node identifier corresponding to each material batch flow node and the process execution duration interval of the material batch flow node on the continuous production time axis.
[0069] First, each material batch flow node in the optimized material batch flow graph L_final is traversed, such as Node_mixer_1, which represents the first production cycle of the mixing process. From the attributes of Node_mixer_1, the corresponding production process node identifier, Node_ID_Mixer, is parsed out. Simultaneously, the process execution duration interval [T_start_1, T_end_1] corresponding to Node_mixer_1 on the continuous production time axis T_axis is extracted. These two pieces of information are key indexes for subsequent data association.
[0070] Step S142: Obtain the production process event flow data unit corresponding to the production process node identifier in the production process event flow data set, and read the complete time series of running parameters after parameter filling from the production process event flow data unit.
[0071] Next, using the production process node identifier Node_ID_Mixer and the process execution duration interval [T_start_1, T_end_1] as query conditions, a search is performed in the production process event stream data set F_Set. Since each production process event stream data unit in the production process event stream data set F_Set contains its corresponding node identifier and time interval information, the production process event stream data unit matching node Node_mixer_1 can be accurately located, namely the production process event stream data unit E_mixer_1. Then, from the data structure of the production process event stream data unit E_mixer_1, its parameter sequence field is read, namely the complete time sequence of the running parameters after parameter filling C_TS_mixer_1.
[0072] Step S143: Align and verify the recording time of each parameter in the complete time series of the operation parameters after parameter filling with the process execution duration interval to ensure that all parameter recording time points fall between the start and end time of the process execution duration interval.
[0073] To ensure data consistency, the complete time series of runtime parameters C_TS_mixer_1 after parameter filling needs to be validated. Each record point in the complete time series C_TS_mixer_1 is traversed, and the parameter recording time point carried by each record point, such as T_param_i, is checked to see if it is greater than or equal to the lower limit T_start_1 of the process execution duration interval [T_start_1, T_end_1], and less than or equal to the upper limit T_end_1. Theoretically, since interval assignment processing has already been performed in step S127, all points should meet this condition. This alignment check is a redundant fault-tolerance step. Once an abnormal point that does not meet the condition is found, the system will trigger an alarm and, based on the relationship between its timestamp and the interval endpoint, forcibly assign it to the interval boundary to ensure the stability of subsequent processing.
[0074] Step S144: Classify the complete time series of operating parameters after parameter filling by parameter type, and extract the equipment speed parameter record, equipment temperature parameter record, equipment pressure parameter record, and equipment current parameter record contained in the process operating parameter record into independent parameter type subsequences.
[0075] Each data point in the complete time series of operational parameters C_TS_mixer_1 after parameter filling is a multidimensional vector P_vector_t. To facilitate subsequent analysis of different parameter types, this multidimensional vector needs to be decomposed. The system decomposes the parameter value vector P_vector_t for each time point in the complete time series C_TS_mixer_1 according to a predefined parameter type mapping table. For example, for vector P_vector_t, the value of its first dimension is extracted and combined with the time point T_param_t to form a new sequence element. All elements in the first dimension at all time points, arranged in chronological order, form the equipment rotational speed parameter subsequence SubSeq_RPM. Similarly, the values of all time points in the second dimension are extracted to form the equipment temperature parameter subsequence SubSeq_Temp; the values in the third dimension are extracted to form the equipment pressure parameter subsequence SubSeq_Press; and the values in the fourth dimension are extracted to form the equipment current parameter subsequence SubSeq_Current. Through this step, a multidimensional time series is decomposed into multiple single-dimensional parameter type subsequences.
[0076] Step S145: Assign a corresponding parameter type identifier to each parameter type subsequence, and associate the parameter type identifier with the specific parameter values and corresponding parameter recording time points contained in the parameter type subsequence to form the original parameter time series of that parameter type.
[0077] To clearly distinguish the physical meaning of each subsequence in subsequent processing, each subsequence needs to be labeled. The system assigns a parameter type identifier `Type_RPM` to the equipment rotational speed parameter subsequence `SubSeq_RPM`, a parameter type identifier `Type_Temp` to the equipment temperature parameter subsequence `SubSeq_Temp`, a parameter type identifier `Type_Press` to the equipment pressure parameter subsequence `SubSeq_Press`, and a parameter type identifier `Type_Current` to the equipment current parameter subsequence `SubSeq_Current`. Then, each parameter type identifier is associated with its corresponding subsequence data for storage. This association can be achieved by creating a key-value pair, where the key is the parameter type identifier and the value is the subsequence itself. The subsequence itself is a list, and each element in the list is a tuple containing the parameter recording time point and the specific parameter value. In this way, a well-structured raw parameter time series is formed for each parameter type. For example, for rotational speed, there is a raw parameter time series `Raw_TS_RPM`, which consists of a series of (T_param_t, RPM_value_t).
[0078] Step S146: Perform sequence normalization processing on each of the original parameter time series, and detect whether the time interval between adjacent parameter record time points in the original parameter time series is uniform. If there is an uneven time interval, the original parameter time series is resampled using a time-weighted average method to generate a normalized parameter time series with uniform time intervals.
[0079] Due to the complexity of the on-site conditions, even after missing value imputation, the time intervals between adjacent recording points in the original parameter time series may still not be absolutely uniform. To facilitate subsequent matrix processing and multidimensional alignment, each original parameter time series needs to be normalized to provide a unified time reference. Taking the original parameter time series Raw_TS_RPM as an example, the system first sets a resampling period, for example, 1 second. Then, it generates a theoretical time point sequence from the process execution duration interval T_start_1 to T_end_1, with the resampling period as the interval. For each theoretical time point T_uniform_k, the system needs to find its nearest actual recording point in Raw_TS_RPM. If T_uniform_k happens to coincide with an actual recording point, the rotational speed value at that point is directly used. If T_uniform_k falls between two actual recording points T_a and T_b, the rotational speed value at that point is calculated using a time-weighted average method. The specific calculation logic is: RPM_k = ((T_b - T_uniform_k) / (T_b - T_a)). RPM_a+((T_uniform_k-T_a) / (T_b-T_a)) RPM_b. After performing the above operations on all theoretical time points, a normalized parametric time series Norm_TS_RPM with uniform time intervals is generated. The same resampling operation is performed on the original parametric time series for each parameter type to obtain the corresponding normalized parametric time series, such as Norm_TS_Temp, Norm_TS_Press, and Norm_TS_Current.
[0080] Step S147: Align the normalized parameter time series of all parameter types corresponding to the same material batch flow node in multiple dimensions according to the parameter recording time point, and generate a device operation status parameter matrix with the parameter recording time point as the row index and the parameter type as the column index.
[0081] After obtaining all normalized parameter time series for the same node (e.g., Node_mixer_1), they need to be integrated into a unified data structure to facilitate subsequent analysis and querying. This multidimensional alignment and matrix generation process includes the following more detailed operations, which are completed by steps S1471 to S1476.
[0082] Step S1471: Obtain the normalized parameter time series of all parameter types corresponding to the same material batch flow node. Each normalized parameter time series contains multiple parameter recording time points and the specific parameter values corresponding to each parameter recording time point.
[0083] First, obtain the set of normalized parameter time series generated for node Node_mixer_1, including the normalized parameter time series Norm_TS_RPM, Norm_TS_Temp, Norm_TS_Press, and Norm_TS_Current. Each normalized parameter time series, such as Norm_TS_RPM, contains an ordered list where each element is the specific rotational speed value at a particular theoretical time point.
[0084] Step S1472: Extract all occurrences of parameter record time points from all normalized parameter time series, merge and deduplicate the parameter record time points to generate a time point set containing all unique parameter record time points.
[0085] Since all normalized parameter time series are generated based on the same resampling period, their theoretical time point sequences should be identical. However, to handle minor errors in extreme cases, the system performs a merge and deduplication operation. The system iterates through the normalized parameter time series Norm_TS_RPM, Norm_TS_Temp, Norm_TS_Press, and Norm_TS_Current, extracting all time points from each. These time points are then placed into a temporary set, and any duplicate time points are automatically removed using the uniqueness of set elements. Finally, the time points in this temporary set are sorted in ascending order to generate a time point set Set_T_uniform containing all unique parameter record time points.
[0086] Step S1473: Determine the column index of the device operating status parameter matrix according to the number of types of parameter type identifiers. Each parameter type identifier corresponds to a column of the device operating status parameter matrix, and the column indexes are arranged according to a preset parameter type priority.
[0087] There are four types of parameter type identifiers: Type_RPM, Type_Temp, Type_Press, and Type_Current. Therefore, the generated equipment operating status parameter matrix will have four columns. The system determines the column index order according to a preset parameter type priority, for example, rotational speed is the most important process parameter with the highest priority; temperature is next; pressure is next; and current is last. Therefore, the first column of the equipment operating status parameter matrix corresponds to the parameter type identifier Type_RPM, the second column to Type_Temp, the third column to Type_Press, and the fourth column to Type_Current.
[0088] Step S1474: Initialize a blank device operation status parameter matrix, wherein the number of rows in the device operation status parameter matrix is equal to the number of parameter record time points contained in the time point set, and the number of columns in the device operation status parameter matrix is equal to the number of types of parameter type identifiers.
[0089] Based on the size of the time point set Set_T_uniform, assuming there are M unique time points and N types of parameter type identifiers, the system initializes a blank device operating state parameter matrix Matrix_state in memory. This device operating state parameter matrix Matrix_state is an M-row, N-column two-dimensional data structure. The row numbers of the matrix range from 1 to M, corresponding to the specific time point in the time point set Set_T_uniform; the column numbers range from 1 to N, corresponding to the N sorted parameter types mentioned above.
[0090] Step S1475: Traverse each parameter record time point in the time point set. For the currently traversed parameter record time point, sequentially access the normalized parameter time series of each parameter type, and search in each normalized parameter time series for a parameter record time point that is exactly the same as the current parameter record time point.
[0091] Next, the system begins filling the device operating state parameter matrix Matrix_state with values. First, it retrieves the first time point T_1 from the time point set Set_T_uniform. Then, for the parameter type Type_RPM corresponding to the first column, it accesses its normalized parameter time series Norm_TS_RPM. Within the normalized parameter time series Norm_TS_RPM, it checks if there exists a record point whose timestamp is exactly equal to T_1.
[0092] Step S1476: If a parameter record time point that is exactly the same as the current parameter record time point is found in the normalized parameter time series of the current parameter type, then the specific parameter value corresponding to the parameter record time point in the normalized parameter time series is filled into the current row and the column position corresponding to the current parameter type of the device operating status parameter matrix.
[0093] If a time point exactly the same as T_1 is found in the normalized parameter time series Norm_TS_RPM, then the specific rotational speed value corresponding to that time point in the normalized parameter time series Norm_TS_RPM, such as RPM_1, is retrieved and filled into the first row and first column of the device operating state parameter Matrix_state.
[0094] Step S1477: If no parameter record time point exactly the same as the current parameter record time point is found in the normalized parameter time series of the current parameter type, then perform linear interpolation calculation based on the two parameter record time points adjacent to the current parameter record time point in the normalized parameter time series of the current parameter type and their corresponding specific parameter values, and fill the calculated interpolation result into the current row and the column position corresponding to the current parameter type of the device operating status parameter matrix.
[0095] If no time point exactly matching T_1 is found in the normalized parameter time series Norm_TS_RPM, interpolation is required. The system will find the preceding record point T_prev and the following record point T_next that are temporally adjacent to T_1 in the normalized parameter time series Norm_TS_RPM, along with their corresponding rotational speed values RPM_prev and RPM_next. Then, the interpolated rotational speed value RPM_interp at time T_1 is calculated using the linear interpolation formula: RPM_interp = RPM_prev + ((T_1 - T_prev) / (T_next - T_prev)). (RPM_next-RPM_prev). The calculated interpolation result RPM_interp is filled into the first row and first column of the device operating state parameter matrix Matrix_state. After performing the above lookup or interpolation filling operation on the first row and second column, the first row and third column, and the first row and fourth column, the data in the first row is filled. Then, the next time point T_2 is processed until all time points in the time point set Set_T_uniform have been processed.
[0096] Step S148: Dimensionally label the device operation status parameter matrix, mark the corresponding parameter type identifier at the column index position of the device operation status parameter matrix, and mark the corresponding parameter record time point at the row index position of the device operation status parameter matrix to obtain a device operation status parameter sequence containing a complete time span and multi-dimensional parameter types.
[0097] After all values in the equipment operating status parameter matrix Matrix_state are filled in, the final step is to add metadata labels to this matrix, making it a self-describing and complete sequence of equipment operating status parameters. The system labels each column of the equipment operating status parameter matrix Matrix_state with its corresponding parameter type identifier at its column index: Type_RPM, Type_Temp, Type_Press, and Type_Current. Simultaneously, for each row of the equipment operating status parameter matrix Matrix_state, the corresponding time point is labeled at its row index, i.e., T_1, T_2, ..., T_M in the time point set Set_T_uniform. After these annotations, this two-dimensional matrix with row labels and time point column labels, along with parameter type identifiers, constitutes the equipment operating status parameter sequence Seq_state_mixer_1 corresponding to the material batch transfer node Node_mixer_1.
[0098] Step S150: Based on the material batch flow link diagram and the equipment operation status parameter sequence corresponding to each material batch flow node, generate a set of traceability records for the color masterbatch production process, and store the set of traceability records for the color masterbatch production process in the traceability database for subsequent quality traceability query. The set of traceability records for the color masterbatch production process includes material batch identifier, process execution time point, production equipment identifier and equipment operation status parameter sequence.
[0099] After constructing the material batch flow diagram L_final and binding a detailed sequence of equipment operating status parameters to each material batch flow node, the final core step is to integrate, format, and persistently store all this information in the database, forming a queryable collection of production process traceability records. This generation and storage process includes the following sub-steps.
[0100] Step S151: Traverse each material batch flow node in the material batch flow chain diagram, and read the production process node identifier and process execution duration range corresponding to the current material batch flow node.
[0101] First, perform a depth-first or breadth-first traversal on the optimized material batch flow graph L_final. For each material batch flow node encountered during the traversal, such as node_mixer_1, read the corresponding production process node identifier Node_ID_Mixer and the process execution duration interval [T_start_1,T_end_1] from the node's attributes.
[0102] Step S152: Extract the equipment operating status parameter matrix from the equipment operating status parameter sequence corresponding to the current material batch flow node, and convert the equipment operating status parameter matrix into an equipment operating status parameter record table with a standard format. The equipment operating status parameter record table includes a parameter recording time point field, a parameter type field, and a parameter value field.
[0103] Next, from the data associated with node Node_mixer_1, the device operating state parameter sequence Seq_state_mixer_1 generated in step S148 is obtained, and the core data part, namely the device operating state parameter matrix Matrix_state, is extracted from this sequence. To facilitate storage and querying in a relational database, this two-dimensional matrix-like device operating state parameter matrix Matrix_state needs to be converted into a more standardized tabular form. The conversion process is as follows: traverse each cell of the device operating state parameter matrix Matrix_state. For the cell located in row i and column j, its row label is the time point T_i, its column label is the parameter type identifier Type_j, and its cell value is the numerical value V_ij. Based on this information, a new record is generated. This record contains three fields: the first field is the parameter record time point field, filled with T_i; the second field is the parameter type field, filled with Type_j; and the third field is the parameter value field, filled with V_ij. Performing this operation on all cells in the matrix will generate a list consisting of multiple records as described above. This list is the device operating status parameter record table Tab_params_mixer_1.
[0104] Step S153: Obtain the input material batch identifier and the output material batch identifier corresponding to the current material batch flow node, and combine the input material batch identifier and the output material batch identifier into a material batch identifier pair.
[0105] From the attributes of node_mixer_1, retrieve again the input material batch identifier I_mixer_1 and the output material batch identifier O_mixer_1 determined in step S133. Combine these two identifiers into a material batch identifier pair Pair_Batch_mixer_1. The data structure of this material batch identifier pair Pair_Batch_mixer_1 can be a tuple, used to explicitly identify the material input and output of this node in the traceability record.
[0106] Step S154: Access the production equipment ledger database, query the production equipment identifier for executing the production process node based on the production process node identifier corresponding to the current material batch flow node, and use the queried production equipment identifier as the associated equipment identifier for the current material batch flow node.
[0107] Although the process node identifier Node_ID_Mixer indicates a mixing process, there may be multiple parallel mixing machines in the same workshop. To pinpoint the specific physical device, it is necessary to query the production equipment ledger database. The system uses the production process node identifier Node_ID_Mixer as the key to search the production equipment ledger database for the specific physical device assigned to execute that process node within the corresponding time period. The query result returns a production equipment identifier, such as Device_ID_Mixer_03. This production equipment identifier Device_ID_Mixer_03 is then used as the associated device identifier for the current material batch flow node Node_mixer_1.
[0108] Step S155: Associate and encapsulate the production process node identifier corresponding to the current material batch flow node, the material batch identifier pair, the process start time point parameter and process end time point parameter in the process execution duration interval, the associated equipment identifier, and the equipment operation status parameter record table to generate a traceability record entry with the material batch flow node as the basic unit.
[0109] Now, summarize and encapsulate all the information obtained in the previous steps. Create a new traceability record entry, Entry_mixer_1. This traceability record entry, Entry_mixer_1, is a complex data object containing the following fields: Production process node identifier field, filled with Node_ID_Mixer; Material batch identifier pair field, filled with Pair_Batch_mixer_1; Process start time parameter field, filled with T_start_1; Process end time parameter field, filled with T_end_1; Associated equipment identifier field, filled with Device_ID_Mixer_03; Equipment operating status parameter record table field, filled with Tab_params_mixer_1. This traceability record entry, Entry_mixer_1, completely describes all relevant information for one production process of a specific material batch at the mixing process node.
[0110] Step S156: Assign a unique trace record identifier to each generated trace record entry, and bind the trace record identifier to each field in the trace record entry to form a structured trace record data object.
[0111] To uniquely identify and reference each trace record entry in the database, a unique identifier needs to be generated for each entry. The system uses a globally unique identifier generation algorithm to generate a string "Trace_ID_mixer_1" for the trace record entry "Entry_mixer_1". Then, this trace record identifier "Trace_ID_mixer_1" is used as the primary key and bound to each field in the trace record entry "Entry_mixer_1" to form a complete, structured trace record data object "Record_mixer_1". The core structure of this trace record data object "Record_mixer_1" is a collection of key-value pairs. The keys include "Trace_ID", "Node_ID", "Batch_Pair", "Start_Time", "End_Time", "Device_ID", and "Params_Table", with the values being the corresponding specific content.
[0112] Step S157: Convert the upstream and downstream node relationship of the current material batch flow node in the material batch flow link diagram into the preceding node pointer field and the following node pointer field in the traceability record data object. The preceding node pointer field points to the traceability record identifier of the upstream material batch flow node of the current material batch flow node, and the following node pointer field points to the traceability record identifier of the downstream material batch flow node of the current material batch flow node.
[0113] The core of material traceability is the ability to trace upstream and downstream along the supply chain. Therefore, the topological relationships between nodes need to be reflected in the traceability record data object. From the material batch flow supply chain graph L_final, find all upstream nodes of node Node_mixer_1. For example, if there is an edge from the batching node Node_batching_1 to Node_mixer_1, then Node_batching_1 is an upstream node of Node_mixer_1. Obtain the traceability record identifier corresponding to Node_batching_1, let's say Trace_ID_batching_1. Fill this identifier Trace_ID_batching_1 into the preceding node pointer field of the traceability record data object Record_mixer_1. Similarly, find all downstream nodes of node Node_mixer_1, such as the extrusion node Node_extruder_1, obtain its traceability record identifier Trace_ID_extruder_1, and fill it into the following node pointer field of the traceability record data object Record_mixer_1. If the node is the initial feeding node, its predecessor node pointer field is empty; if the node is the final finished product node, its successor node pointer field is empty.
[0114] Step S158: Organize the traceability record data objects corresponding to all material batch flow nodes according to the topology of the material batch flow link diagram to generate a set of traceability records for the color masterbatch production process containing complete link relationships.
[0115] For all material batch flow nodes, such as batching, mixing, extrusion, and pelletizing nodes, steps S151 to S157 are repeated to generate their respective traceability record data objects, such as Record_batching_1, Record_mixer_1, Record_extruder_1, and Record_pelletizing_1. These traceability record data objects reference each other through their respective preceding and following node pointer fields, implicitly forming the topology described by the material batch flow link diagram L_final. The set of all these traceability record data objects, i.e., Set_Records={Record_batching_1,Record_mixer_1,Record_extruder_1,Record_pelletizing_1,...}, is the set of traceability records for the masterbatch production process containing complete link relationships.
[0116] Step S159: Write each traceability record data object in the masterbatch production process traceability record set into the corresponding data table of the traceability database, and after writing, establish a primary key index with material batch identifier as the index and an auxiliary index with process execution time point as the index in the traceability database.
[0117] Finally, the generated set of traceability records for the masterbatch production process, Set_Records, is persistently stored in the traceability database. The system creates a dedicated table, for example, named "Production_Trace," whose columns correspond to the structured fields of the traceability record data objects. Each traceability record data object, such as Record_mixer_1, is converted into a row and inserted into this table. After all data writing operations are completed, indexes need to be created on key fields in the database to optimize subsequent query performance. First, a primary key index is created using the material batch identifier as the index. Since the material batch identifier pair contains both input and output batch identifiers, the database will create separate indexes for these two fields, or a composite index, to quickly locate the relevant traceability record entry based on any material batch identifier. Second, an auxiliary index is created using the process execution time point, including process start time parameters and process end time parameters, to quickly retrieve production records based on a time range. At this point, a complete and efficiently queryable traceability database for the masterbatch production process is constructed.
[0118] Step S160: Obtain the raw quality inspection data stream output by the online quality inspection instrument corresponding to the key quality control node in the masterbatch production process. The raw quality inspection data stream contains multiple test sample data units arranged in order of detection time points. Each test sample data unit carries the sample collection timestamp and test item identifier corresponding to the detection.
[0119] In this embodiment, to correlate the final product quality with production process parameters, quality inspection data needs to be introduced. At key quality control nodes in the masterbatch production line, such as after the extrusion granulation process, online quality inspection instruments, such as near-infrared spectrometers or melt flow indexers, are installed. These online quality inspection instruments continuously output a raw quality inspection data stream, Q_stream. This raw quality inspection data stream, Q_stream, is a data sequence arranged chronologically according to the inspection time points. Each element in the sequence is called a sample data unit, for example, sample_k. Each sample data unit, Sample_k, is a tuple containing three core fields: the first field is the sample acquisition timestamp, T_sample_k, which is synchronized with the global clock server of the distributed control system with millisecond-level accuracy; the second field is the test item identifier, Test_ID_k, for example, "MFR" represents melt flow index, "Ash" represents ash content, and "Color" represents color difference value; the third field is the measured quality index value, Q_value_k, which is a floating-point number or a vector, such as the specific melt flow index value, or a three-dimensional vector composed of L, a, and b values in the color difference Lab space. This raw quality test data stream, Q_stream, is acquired in real time and temporarily stored in a data buffer, awaiting subsequent processing.
[0120] Step S161: Parse each test sample data unit in the original quality inspection data stream, extract the sample collection timestamp and test item identifier contained in the test sample data unit, and read the corresponding upper limit value and lower limit value of the quality indicator standard range from the preset test item standard parameter library according to the test item identifier.
[0121] The system initiates a data processing thread to sequentially parse the raw quality inspection data stream Q_stream. For the currently retrieved inspection sample data unit Sample_k, it first parses out its sample collection timestamp T_sample_k and inspection item identifier Test_ID_k. Then, using the inspection item identifier Test_ID_k as the key, it accesses a pre-configured inspection item standard parameter library stored in a relational database. In this standard parameter library, for each possible inspection item identifier, a corresponding quality standard range is defined. For example, for the inspection item identifier "MFR", the standard parameter library stores the upper limit value U_MFR and the lower limit value L_MFR of the quality indicator standard range; for the inspection item identifier "Ash", it stores U_Ash and L_Ash. Based on the value of Test_ID_k, the system reads the corresponding upper limit value U_bound and lower limit value L_bound of the quality indicator standard range from the inspection item standard parameter library.
[0122] Step S162: Compare the measured quality index values carried in the test sample data unit with the upper limit and lower limit of the quality index standard range item by item, and generate a quality deviation quantification value corresponding to the test sample data unit based on the degree to which the measured quality index values exceed the upper limit or fall below the lower limit of the quality index standard range.
[0123] After obtaining the upper limit value U_bound and the lower limit value L_bound of the standard range, the measured quality index value Q_value_k in the test sample data unit Sample_k is compared with these two boundary values. If Q_value_k is a scalar, such as the melt index value, the deviation is calculated. An intermediate variable Deviation is defined. If Q_value_k is greater than U_bound, then Deviation = (Q_value_k - U_bound) / (U_bound - L_bound). If Q_value_k is less than L_bound, then Deviation = (L_bound - Q_value_k) / (U_bound - L_bound). If Q_value_k is between L_bound and U_bound, then Deviation = 0. Finally, the quality deviation quantification value Q_dev_k corresponding to the test sample data unit Sample_k is defined as Deviation. If Q_value_k is a multi-dimensional vector, such as the Lab color difference value, then the deviation needs to be calculated for each dimension separately, and then the sum of the squares and the square root is taken, i.e., Q_dev_k=√((ΔL)²+(Δa)²+(Δb)²), where ΔL, Δa, and Δb are the offsets of the measured values of each dimension from the standard range (0 is taken if there is no deviation). This quality deviation quantification value Q_dev_k is a non-negative real number, reflecting the degree of deviation between the product quality and the standard requirements.
[0124] Step S163: Obtain the equipment operating status parameter sequence corresponding to the production process node that is temporally adjacent to the sample collection timestamp in the material batch flow link diagram, and extract the equipment speed parameter record, equipment temperature parameter record, and equipment pressure parameter record corresponding to multiple parameter record time points adjacent to the sample collection timestamp in the equipment operating status parameter sequence.
[0125] To analyze production process factors that may lead to quality deviations, it is necessary to correlate quality inspection data with the production process parameters at that time. Using the sample collection timestamp T_sample_k of the inspection sample data unit Sample_k as a baseline, the production process node that is closest in time to T_sample_k is found in the material batch flow diagram L_final. Typically, quality inspection occurs after the last process node (such as the pelletizing node), therefore, the last production process node, such as the pelletizing node Node_pelletizing_1, is most relevant. The equipment operating state parameter sequence Seq_state_pelletizing_1 corresponding to this node Node_pelletizing_1 is obtained. From this equipment operating state parameter sequence Seq_state_pelletizing_1, several parameter record time points that are closest in time to the sample collection timestamp T_sample_k are located. For example, two parameter records are taken before and after T_sample_k, namely time points T_p_1, T_p_2, T_p_3, and T_p_4, where T_p_2 and T_p_3 are the two closest points to T_sample_k. Then, the corresponding equipment rotation speed parameter records for these time points are extracted from the equipment operating state parameter sequence Seq_state_pelletizing_1, such as RPM_p_1, RPM_p_2, RPM_p_3, and RPM_p_4; equipment temperature parameter records, such as Temp_p_1, Temp_p_2, Temp_p_3, and Temp_p_4; and equipment pressure parameter records, such as Press_p_1, Press_p_2, Press_p_3, and Press_p_4.
[0126] Step S164: Perform parameter value trend change analysis on the extracted equipment speed parameter record, equipment temperature parameter record, and equipment pressure parameter record; calculate the slope change of the equipment speed parameter record, the slope change of the equipment temperature parameter record, and the slope change of the equipment pressure parameter record within a preset time window before and after the sample collection timestamp; and generate the production process parameter fluctuation feature vector corresponding to the detection sample data unit.
[0127] To quantify the fluctuations of production process parameters around the quality inspection time, trend analysis is required. A preset time window is set, for example, centered at the sample collection timestamp T_sample_k, with W minutes before and after it, for example, W = 2 minutes. In step S163 above, several discrete parameter points within this time window have been extracted. For the equipment rotation speed, the least squares method is used to perform linear fitting on the discrete points to obtain a fitted straight line with a slope of K_RPM. This slope K_RPM represents the trend of rotation speed change within this time window. Similarly, linear fitting is performed on the discrete points of the temperature parameter to obtain the slope K_Temp; linear fitting is performed on the discrete points of the pressure parameter to obtain the slope K_Press. Then, the absolute values of these three slopes are calculated as parameter fluctuation features. Thus, the production process parameter fluctuation feature vector V_fluc_k corresponding to the inspection sample data unit Sample_k is generated. This vector is a 3-dimensional vector, with the first dimension being |K_RPM|, the second dimension being |K_Temp|, and the third dimension being |K_Press|.
[0128] Step S165: Input the quality deviation quantification value of the detection sample data unit and the corresponding production process parameter fluctuation feature vector into the pre-constructed quality anomaly tracing analysis model, and calculate the correlation strength coefficient between the quality deviation quantification value and the parameters of each dimension in the production process parameter fluctuation feature vector through the association rule mining module in the quality anomaly tracing analysis model.
[0129] To identify which process parameter fluctuation is most likely to cause quality deviation, a quality anomaly tracing analysis model needs to be established. This model is pre-trained using historical data. During the inference phase, the quality deviation metric Q_dev_k obtained in step S162 (as the target variable) and the production process parameter fluctuation feature vector V_fluc_k obtained in step S164 (as the feature variable, containing 3 dimensions) are combined into an input sample and fed into the pre-built quality anomaly tracing analysis model M_analysis. This model M_analysis includes an association rule mining module. The core of this module is a feature importance evaluator based on a gradient boosting decision tree. After the input sample enters the model, the gradient boosting decision tree traverses all decision trees. For the first dimension |K_RPM| of feature V_fluc_k, it records the number of times it is used as a splitting feature at each node split and the resulting sum of squared gains, ultimately calculating the feature importance score Imp_RPM. Similarly, Imp_Temp and Imp_Press are calculated. These three importance scores are the correlation strength coefficients between the quality deviation metric Q_dev_k and the corresponding parameter fluctuation characteristics. These three coefficients satisfy the normalization relationship, that is, Imp_RPM+Imp_Temp+Imp_Press=1.
[0130] Step S166: Based on the correlation strength coefficient, select dimensional parameters that exceed the preset correlation threshold from the production process parameter fluctuation feature vector as suspected causal parameters, and mark the positions of the equipment speed parameter record, equipment temperature parameter record, or equipment pressure parameter record corresponding to the suspected causal parameters in the equipment operating status parameter sequence as quality anomaly correlation parameter location points.
[0131] Set a preset correlation threshold, for example, Thresh_corr=0.4. Compare the three correlation strength coefficients Imp_RPM, Imp_Temp, and Imp_Press calculated in step S165 with the preset correlation threshold Thresh_corr. Assume Imp_RPM=0.6, Imp_Temp=0.3, and Imp_Press=0.1. Then, only Imp_RPM exceeds the preset correlation threshold Thresh_corr. Therefore, the first dimension parameter in the production process parameter fluctuation feature vector V_fluc_k, i.e., the equipment rotation speed parameter, is selected as a suspected causative parameter. Then, backtrack to the equipment rotation speed parameter records extracted in step S163, such as RPM_p_1, RPM_p_2, RPM_p_3, and RPM_p_4. Mark the specific positions of these records in the equipment operating state parameter sequence Seq_state_pelletizing_1, i.e., the timestamps of these record points and their row indices in the matrix, as the quality anomaly correlation parameter location points Pos_RPM_k. If multiple dimensions exceed the threshold, all dimension parameters that exceed the threshold are marked as suspected causative parameters.
[0132] Step S167: Perform parameter change pattern recognition on the equipment operating status parameter sequence segment where the quality anomaly associated parameter location point is located, extract the change start time point, change peak time point and change duration length of the suspected causative parameter in the equipment operating status parameter sequence segment, and generate a parameter anomaly change pattern descriptor corresponding to the quality anomaly associated parameter location point.
[0133] To more precisely describe the parameter changes during anomalies, it is necessary to analyze the sequence segment containing the marked quality anomaly-related parameter location point Pos_RPM_k. A segment of the equipment operating state parameter sequence centered on Pos_RPM_k is extracted, for example, from time point T_start_window to T_end_window. Within this segment, the time series of the equipment rotational speed parameter RPM is analyzed. Local minimum and local maximum points are identified within this sequence segment. The parameter recording time point corresponding to the local minimum point is taken as the change start time point T_start_change. The parameter recording time point corresponding to the local maximum point is taken as the change peak time point T_peak_change. The time difference from the change start time point T_start_change to the change peak time point T_peak_change is calculated as the change duration length Delta_T_change. The above information is combined into a parameter anomaly change pattern descriptor Pattern_RPM_k, which is a triple (T_start_change, T_peak_change, Delta_T_change).
[0134] Step S168: Associate and encapsulate the detection item identifier, the quality deviation quantification value, the suspected causal parameter, the parameter abnormal change pattern descriptor, and the sample collection timestamp of the detection sample data unit to generate a quality anomaly traceability anchor record, and insert the quality anomaly traceability anchor record into the traceability record entry corresponding to the sample collection timestamp in the masterbatch production process traceability record set.
[0135] Finally, the results of this analysis are summarized into a quality anomaly traceability anchor record. A new data object Anchor_k is created. This data object Anchor_k contains the following fields: Detection item identifier field, filled with Test_ID_k; Quality deviation quantification value field, filled with Q_dev_k; Suspected causative parameter field, filled with a list containing the names of the filtered suspected causative parameters, such as ["RPM"]; Parameter anomaly change pattern descriptor field, filled with the corresponding descriptor, such as Pattern_RPM_k; Sample collection timestamp field, filled with T_sample_k. Then, in the masterbatch production process traceability record set Set_Records already stored in the database, the traceability record entry corresponding to the sample collection timestamp T_sample_k is found. Since T_sample_k usually falls within the execution duration range [T_start_pel_1, T_end_pel_1] of the last production process node, such as the pelletizing node Node_pelletizing_1, the corresponding traceability record data object Record_pelletizing_1 is found. The generated quality anomaly traceability anchor record Anchor_k is inserted as a sub-object into a new field "Quality_Anchors" in the traceability record data object Record_pelletizing_1. This binds the quality anomaly information to specific production process information.
[0136] For example, in step S170: after the traceability record set of the masterbatch production process is stored in the traceability database, a quality traceability query request instruction with the target material batch identifier string is received from an external quality traceability query terminal.
[0137] Once the set of production process traceability records (Set_Records) has been stored in the traceability database, the system enters external service mode. An external quality traceability query terminal, such as a client computer located in the quality inspection department, sends a quality traceability query request command (Req_query) to the server. The data structure of this quality traceability query request command (Req_query) is a text string, and its content follows a specific protocol format. For example, the format of the request command is "QUERY_BATCH=<target material batch identifier string>". After receiving the quality traceability query request command (Req_query), the server-side network listening module passes it to the request parsing module for processing.
[0138] Step S171: Parse the quality traceability query request instruction, extract the target material batch identifier string carried therein, and use the target material batch identifier string as the primary key to perform precise matching and retrieval in the masterbatch production process traceability record set in the traceability database.
[0139] The request parsing module parses the received quality traceability query request instruction `Req_query`. According to the predefined protocol format, it extracts the part after the "=" sign from the instruction string, which is the target material batch identifier string, assuming its value is `Target_Batch_ID="BATCH2023072002"`. Then, it constructs a database query statement. This query statement uses the target material batch identifier string `Target_Batch_ID` as the key to search the "Production_Trace" table in the traceability database. Since indexes have already been created on the two fields of the material batch identifier pair, the retrieval efficiency is high. The query conditions are: either the input material batch identifier in the "material batch identifier pair" field of the table is equal to `Target_Batch_ID`, or the output material batch identifier is equal to `Target_Batch_ID`.
[0140] Step S172: Locate all traceability record entries in the masterbatch production process traceability record set that completely match the target material batch identifier string in the material batch input field or material batch output field, and use the traceability record entries as the initial query result set.
[0141] After executing the above database query, the database returns all traceability record entries that meet the conditions. Since a material batch (e.g., BATCH2023072002) may appear as an output material at one process node (such as the mixing node) and as an input material at the next process node (such as the extrusion node), the query results may contain multiple entries. For example, the returned initial query result set Result_initial may contain two records: a traceability record data object Record_mixer_1 (whose output material batch identifier is BATCH2023072002) and a traceability record data object Record_extruder_1 (whose input material batch identifier is BATCH2023072002).
[0142] Step S173: Read the preceding node pointer field and the following node pointer field contained in each traceability record entry from the initial query result set, and recursively search for the corresponding upstream and downstream traceability record entries in the traceability database according to the traceability record identifier stored in the preceding node pointer field and the following node pointer field.
[0143] After obtaining the initial query result set Result_initial, it is necessary to trace the entire production process upstream and downstream nodes along the material flow path to form a complete chain. Starting with each traceability record entry in Result_initial, for example, Record_mixer_1, read the preceding node pointer field in Record_mixer_1, finding its value to be Trace_ID_batching_1. Then, using Trace_ID_batching_1 as the key, query the traceability database again to find the corresponding traceability record data object Record_batching_1. Similarly, read the following node pointer field in Record_mixer_1, finding its value to be Trace_ID_extruder_1, and query the database again to find Record_extruder_1. Then, for the newly found Record_extruder_1, continue reading its following node pointer field, finding its value to be Trace_ID_pelletizing_1, and then query to obtain Record_pelletizing_1. Querying the successor node pointer field of Record_pelletizing_1 reveals it to be empty, indicating the end of the link has been reached. Perform the same recursive search for each entry in Result_initial until all predecessor and successor pointer fields point to null. Collect all trace record data objects obtained during the recursive search process into a set Set_full_trace.
[0144] Step S174: Sort the upstream and downstream traceability record entries obtained by recursion according to their node order in the material batch flow link diagram, and generate a complete link traceability record sequence centered on the material batch flow node corresponding to the target material batch identifier string.
[0145] The entries in the recursive search set `Set_full_trace` are unordered. They need to be sorted according to their actual order in the material batch flow path diagram `L_final`. The sorting is based on the process start time parameter in each traceability record entry. Extract the process start time parameters of all entries and sort them in ascending order of time. The sorted sequence, for example, `Seq_full_trace=[Record_batching_1,Record_mixer_1,Record_extruder_1,Record_pelletizing_1]`, is the complete traceability record sequence centered on the material batch flow node (here, mixing and extrusion) corresponding to the target material batch identifier string `Target_Batch_ID`. This sequence completely describes the entire production process of this material batch from ingredient preparation to the final product.
[0146] Step S175: Traverse each traceability record entry in the complete traceability record sequence, and extract the node identifier field, material batch input field, material batch output field, process start time field, process end time field, equipment identifier field, and equipment parameter record sub-table field from each traceability record entry to form a traceability information summary for that node.
[0147] To generate an easy-to-read and display traceability report, a summary extraction is required for each traceability record entry. Iterate through each traceability record data object in the complete traceability record sequence Seq_full_trace. For example, for Record_mixer_1, extract its node identifier field Node_ID_Mixer, material batch input field I_mixer_1, material batch output field O_mixer_1, process start time field T_start_1, process end time field T_end_1, device identifier field Device_ID_Mixer_03, and device parameter record sub-table field Tab_params_mixer_1. Combine this information into a new, more concise traceability information summary object Sum_mixer_1. Perform this operation for each entry in Seq_full_trace to obtain a series of traceability information summary objects, such as Sum_batching_1, Sum_mixer_1, Sum_extruder_1, and Sum_pelletizing_1.
[0148] Step S176: Perform data aggregation processing on the list of parameter record sub-entries stored in the equipment parameter record sub-table field of each traceability record entry, calculate the average, maximum and minimum values of each parameter type within the corresponding process execution duration interval, and generate the statistical characteristics of the equipment operation status of that node.
[0149] To provide users with a more comprehensive overview of equipment operation status, it is necessary to aggregate and statistically analyze the detailed equipment parameter record sub-tables. For the traceability information summary object Sum_mixer_1, access its associated equipment parameter record sub-table Tab_params_mixer_1. This sub-table contains records for all time points and all parameter types within the process cycle. The system groups this sub-table by parameter type field. For all records with parameter type "RPM", extract their parameter value fields and calculate the arithmetic mean Avg_RPM, maximum value Max_RPM, and minimum value Min_RPM of these values. Similarly, calculate Avg_Temp, Max_Temp, and Min_Temp for parameter type "Temp"; and Avg_Press, Max_Press, and Min_Press for "Press". Combine the calculation results, such as Avg_RPM_mixer_1, Max_RPM_mixer_1, and Min_RPM_mixer_1, into a new data object, namely the equipment operation status statistical feature Stat_mixer_1 for this node. The device's operating status statistical feature Stat_mixer_1 is appended to the corresponding traceability information summary object Sum_mixer_1.
[0150] Step S177: Merge the traceability information summaries of all nodes in the complete link traceability record sequence and the statistical characteristics of the equipment operating status according to the node order to generate a link traceability data packet containing complete production process backtracking information.
[0151] The traceability information summary generated in step S175 and the equipment operating status statistical features generated in step S176 are merged according to the order of the nodes in the complete link traceability record sequence Seq_full_trace. A new data structure, namely the link traceability data packet Packet_trace, is created. The link traceability data packet Packet_trace is a list. The first element of the list is the traceability information summary Sum_batching_1 containing the equipment operating status statistical feature Stat_batching_1, the second element is the traceability information summary Sum_mixer_1 containing the equipment operating status statistical feature Stat_mixer_1, and so on. The link traceability data packet Packet_trace contains summary information and statistical information for each process node in the entire link from input to output.
[0152] Step S178: Align the process start time field and the process end time field of each node in the link traceability data packet with the time axis to generate a production time sequence Gantt chart with time as the horizontal axis and node identifier as the vertical axis, and embed the production time sequence Gantt chart data into the link traceability data packet.
[0153] To more intuitively display the timeline of the entire production process, Gantt chart data needs to be generated. Each node summary in the Packet_trace data package is traversed, extracting its process start time and process end time fields. For example, for Sum_batching_1, T_start_bat and T_end_bat are extracted; for Sum_mixer_1, T_start_1 and T_end_1 are extracted. All these time points are used as raw data to generate a data format suitable for a front-end plotting library. The structure of this production timeline Gantt chart data, Gantt_data, can be a JSON array, where each object represents a process node, containing the node name (e.g., "Ingredient Batching"), start time (T_start_bat), and end time (T_end_bat). The generated production timeline Gantt chart data, Gantt_data, is then embedded as a new field into the Packet_trace data package.
[0154] Step S179: Encapsulate the final generated link traceability data packet containing the production time sequence Gantt chart data into a quality traceability query response message, and transmit the quality traceability query response message back to the external quality traceability query terminal through the industrial network for visualization display.
[0155] Finally, the Packet_trace data packet, containing all information, especially the Gantt_data embedded in the production timeline, is used as the body of the response content. According to the network communication protocol, it is encapsulated into a standard quality traceability query response message, Resp_query. The header of this Resp_query message includes a status code (e.g., 200 for success) and data length, while the body is the serialized Packet_trace data packet. The server sends this Resp_query message back to the external quality traceability query terminal that initially initiated the request via an industrial network, such as an Ethernet connection within the factory. Upon receiving the Resp_query message, the external quality traceability query terminal parses it and renders the text information from the Packet_trace data packet and the Gantt_data production timeline data onto the user interface for quality control or production management personnel to view and analyze.
[0156] Based on the same inventive concept, please refer to Figure 2 The diagram shows a schematic block diagram of a color masterbatch production process recording system 100 for quality traceability provided in an embodiment of this application. The color masterbatch production process recording system 100 for quality traceability may include a communication unit 110, a machine-readable storage medium 120, and a processor 130.
[0157] In this embodiment, the machine-readable storage medium 120 can also be integrated into the processor 130 and can communicate and interact with external systems through the communication unit 110. The machine-readable storage medium 120 stores machine-executable instructions for executing the scheme of this application, and the processor 130 executes the machine-executable instructions stored in the machine-readable storage medium 120 to implement the inspection video stream processing method provided in the aforementioned method embodiments.
[0158] It should be noted that, in order to simplify the description of the present invention and thus help to understand one or more embodiments of the invention, multiple features may sometimes be grouped into one embodiment, drawing or description thereof in the foregoing description of the embodiments of the present invention.
Claims
1. A method for recording the production process of masterbatch for quality traceability, characterized in that, The method includes: Obtain the initial process event record set corresponding to multiple production process nodes on the color masterbatch production line. The initial process event record set includes process start signal records, process operation parameter records, and process end signal records generated by each production process node on the continuous production time axis with time identifiers. The initial process event record set is reconstructed into a production process event flow. The process boundary is divided according to the time sequence of the process start signal record and the process end signal record on the continuous production time axis. The process running parameter record is filled into the corresponding process time interval according to the process boundary division result, and a production process event flow data set with a complete process time span is generated. The pre-configured production material batch tracking model is invoked to parse the material flow path of the production process event flow data set, extract the input material batch identifier and output material batch identifier corresponding to each production process node in the production process event flow data set, and construct a material batch flow link diagram from the initial material feeding process node to the final finished product process node according to the sequential relationship between the input material batch identifier and the output material batch identifier on the continuous production time axis. For each material batch flow node in the material batch flow link diagram, the production equipment operation status record is bound, and the process operation parameter record in the production process event flow data set is matched and associated according to the corresponding time period of the material batch flow node on the continuous production time axis to generate the equipment operation status parameter sequence corresponding to each material batch flow node. Based on the material batch flow link diagram and the equipment operation status parameter sequence corresponding to each material batch flow node, a set of traceability records for the color masterbatch production process is generated, and the set of traceability records for the color masterbatch production process is stored in the traceability database for subsequent quality traceability query. The set of traceability records for the color masterbatch production process includes material batch identifier, process execution time point, production equipment identifier, and equipment operation status parameter sequence.
2. The method for recording the production process of masterbatch for quality traceability according to claim 1, characterized in that, The process of reconstructing the production process event flow by reconstructing the initial process event record set involves dividing the process boundaries according to the chronological order of the process start signal record and the process end signal record on the continuous production time axis, and filling the process operation parameter records into the corresponding process time intervals according to the process boundary division results, thereby generating a production process event flow data set with a complete process time span, including: The process start signal record of each production process node in the initial process event record set is parsed, and the time identifier contained in the process start signal record is extracted as the process start time point parameter; The process end signal record of each production process node in the initial process event record set is parsed, and the time identifier contained in the process end signal record is extracted as the process end time point parameter; The process start time point parameter and the process end time point parameter corresponding to the same production process node are paired on the continuous production time axis. The process execution duration range of the production process node is determined according to the time interval between the process start time point parameter and the process end time point parameter. Based on the start and end times of the execution duration interval of the process, intervals are marked on the continuous production time axis to generate process boundary division identifiers corresponding to the production process node. The process boundary division identifiers include process start boundary markers and process end boundary markers. Traverse all process operation parameter records in the initial process event record set, extract the time identifier attached to each process operation parameter record as the parameter record time point, and determine the process execution duration interval to which it belongs based on the position of the parameter record time point on the continuous production time axis; The specific parameter values in the process operation parameter record are associated and mapped with the process execution duration interval to which they belong. The specific parameter values are sorted according to the time sequence of the parameter record time points within the process execution duration interval to generate the operation parameter time sequence within the process execution duration interval. Missing value processing is performed on the time series of the operating parameters. The actual interval between the time points within the execution duration interval of the process and the time points of adjacent parameter records in the time series of the operating parameters is detected. If the actual interval exceeds the preset sampling interval threshold, then for the numerical parameter records in the process operating parameter records, linear interpolation is performed to fill them according to the specific parameter values of the numerical parameters corresponding to the time points of the preceding and following parameter records in the time series of the operating parameters. For non-numerical parameter records, the nearest valid record value among the preceding and following records is used for filling, so as to obtain the complete time series of operating parameters after parameter filling. The process boundary delineation identifier of each production process node, the execution duration interval of the process, and the complete time series of the running parameters after parameter filling are combined and encapsulated to generate a production process event flow data unit with the process as the basic unit. The production process event flow data units corresponding to all production process nodes on the continuous production time axis are concatenated and spliced in chronological order. Process switching gap markers are retained between the process execution duration intervals of adjacent production process nodes to generate a production process event flow data set covering the entire production process.
3. The method for recording the production process of masterbatch for quality traceability according to claim 1, characterized in that, The process involves calling a pre-configured production material batch tracking model to parse the material flow path of the production process event flow data set, extracting the input material batch identifier and output material batch identifier corresponding to each production process node in the production process event flow data set, and constructing a material batch flow link diagram from the initial material input process node to the final finished product process node based on the sequential relationship between the input material batch identifier and the output material batch identifier on the continuous production time axis, including: Access the pre-configured production material batch tracking model, which has a built-in material batch identifier parsing rule base and material flow relationship topology template; The production process event flow data set is input into the production material batch tracking model, which triggers the material batch identifier parsing rule base to scan and match the process operation parameter records of each production process node, identify parameter fields in the process operation parameter records that conform to the material batch code format, and extract the identified parameter fields as candidate material batch identifiers. Material flow direction attribute is determined for candidate material batch identifiers at each production process node. Based on the context position of the candidate material batch identifier in the process operation parameter record, it is determined whether it belongs to the input material type or the output material type. Candidate material batch identifiers belonging to the input material type are marked as input material batch identifiers, and candidate material batch identifiers belonging to the output material type are marked as output material batch identifiers. Obtain the process boundary delineation identifier of each production process node in the production process event flow data set, and determine the time position of each production process node on the continuous production time axis based on the process start boundary marker and process end boundary marker in the process boundary delineation identifier. Based on the continuous production timeline, the input material batch identifiers and output material batch identifiers of each production process node are arranged according to the time position to form a material batch identifier sequence with the production process node as the node unit. In the material batch identifier sequence, the output material batch identifier of each production process node is traced downstream. All subsequent production process nodes on the continuous production time axis whose time position is later than the current production process node are searched. It is checked whether there is an identifier string in the input material batch identifier of the subsequent production process node that is exactly the same as the output material batch identifier of the current production process node. If there is, a directed edge connection for material flow is established between the current production process node and the corresponding subsequent production process node. Repeatedly execute the downstream tracking operation for the output material batch identifier of each production process node until all production process nodes on the continuous production time axis are traversed, generating an initial material batch flow directed graph composed of production process nodes and the directed edges of material flow. A connectivity analysis is performed on the initial material batch flow directed graph. Starting from the initial feeding process node, a breadth-first traversal is performed along the directed edges of the material flow to filter out all connected paths that can reach the final finished product process node. Isolated production process nodes that are not in any connected path and their corresponding directed edges of the material flow are removed to obtain the optimized material batch flow link graph.
4. The method for recording the production process of masterbatch for quality traceability according to claim 3, characterized in that, In the material batch identifier sequence, downstream tracking is performed on the output material batch identifier of each production process node. All subsequent production process nodes with a time position later than the current production process node on the continuous production timeline are searched. It is then checked whether the input material batch identifier of the subsequent production process node contains an identifier string that is completely identical to the output material batch identifier of the current production process node. If so, a directed edge connection for material flow is established between the current production process node and the corresponding subsequent production process node, including: Obtain the process end time parameter of the current production process node on the continuous production time axis, and use the process end time parameter as the time starting reference for downstream node search; Based on the time start reference, scan backward on the continuous production time axis to identify all production process nodes whose time position of the process start boundary marker point is later than the process end time point parameter, and use the process nodes as a potential downstream node candidate set. Each production process node is sequentially retrieved from the potential downstream node candidate set, and the batch identifier of the input material of the production process node is read. The output material batch identifier of the current production process node is compared character by character with the input material batch identifier of the extracted production process node to determine whether the encoded string of the output material batch identifier is completely consistent with the encoded string of the input material batch identifier. If the encoded string of the output material batch identifier is completely consistent with the encoded string of the input material batch identifier, then it is confirmed that the output material batch of the current production process node and the input material batch of the production process node are the same material batch. A directed edge connection for material flow is created between the current production process node and the production process node to be taken out. The direction of the directed edge connection for material flow is from the current production process node to the production process node to be taken out. If the encoded string of the output material batch identifier is not completely consistent with the encoded string of the input material batch identifier, then the next production process node is taken from the potential downstream node candidate set and the character-by-character comparison operation is repeated. After completing the search and comparison of all potential downstream nodes for the batch identifier of the output material of the current production process node, record all the directed edges of the material flow pointed to by the current production process node to form the outgoing edge list of the current production process node. Each of the material flow directed edges connected to the outgoing edge list of the current production process node is taken as the new current production process node, and the downstream tracking operation is repeated until all reachable downstream production process nodes have been traversed and the corresponding material flow directed edges have been established.
5. The method for recording the production process of masterbatch for quality traceability according to claim 1, characterized in that, The process involves binding production equipment operating status records to each material batch flow node in the material batch flow chain diagram, matching and associating process operating parameter records in the production process event flow data set according to the corresponding time period of the material batch flow node on the continuous production time axis, and generating a sequence of equipment operating status parameters corresponding to each material batch flow node, including: The material batch flow link diagram is analyzed to extract the production process node identifier corresponding to each material batch flow node and the process execution duration range of the material batch flow node on the continuous production time axis; Obtain the production process event flow data unit corresponding to the production process node identifier in the production process event flow data set, and read the complete time series of running parameters after parameter filling from the production process event flow data unit; The time point of each parameter record in the complete time series of the running parameters after the parameters are filled is aligned and verified with the process execution duration interval to ensure that the time point of all parameter records falls between the start and end time of the process execution duration interval. The complete time series of operating parameters after parameter filling is classified by parameter type, and the equipment speed parameter records, equipment temperature parameter records, equipment pressure parameter records, and equipment current parameter records contained in the process operating parameter records are extracted into independent parameter type subsequences; Assign a corresponding parameter type identifier to each parameter type subsequence, and associate the parameter type identifier with the specific parameter values and corresponding parameter recording time points contained in the parameter type subsequence to form the original parameter time series of that parameter type; For each of the original parameter time series, sequence normalization processing is performed, and it is detected whether the time interval between adjacent parameter record time points in the original parameter time series is uniform. If there is an uneven time interval, the original parameter time series is resampled using a time-weighted average method to generate a normalized parameter time series with uniform time intervals. The normalized parameter time series of all parameter types corresponding to the same material batch flow node are aligned in multiple dimensions according to the parameter recording time point to generate a device operation status parameter matrix with the parameter recording time point as the row index and the parameter type as the column index. The device operation status parameter matrix is dimension-labeled, the corresponding parameter type identifier is marked at the column index position of the device operation status parameter matrix, and the corresponding parameter record time point is marked at the row index position of the device operation status parameter matrix, so as to obtain a device operation status parameter sequence containing a complete time span and multi-dimensional parameter types.
6. The method for recording the production process of masterbatch for quality traceability according to claim 5, characterized in that, The step of aligning the normalized parameter time series of all parameter types corresponding to the same material batch flow node in a multidimensional manner according to the parameter recording time point to generate a device operating status parameter matrix with the parameter recording time point as the row index and the parameter type as the column index includes: Obtain the normalized parameter time series of all parameter types corresponding to the same material batch flow node. Each normalized parameter time series contains multiple parameter record time points and the specific parameter value corresponding to each parameter record time point. Extract all occurrences of parameter record time points from all normalized parameter time series, merge and deduplicate the parameter record time points to generate a time point set containing all unique parameter record time points; The time points of each parameter record in the time point set are sorted by time, and the row index sequence of the device operating status parameter matrix is generated according to the chronological order. The column index of the device operating status parameter matrix is determined according to the number of types of parameter type identifiers. Each parameter type identifier corresponds to a column of the device operating status parameter matrix, and the column indexes are arranged according to a preset parameter type priority. Initialize a blank device operation status parameter matrix, wherein the number of rows in the device operation status parameter matrix is equal to the number of parameter record time points contained in the time point set, and the number of columns in the device operation status parameter matrix is equal to the number of types of parameter type identifiers; Iterate through each parameter record time point in the set of time points. For the currently iterated parameter record time point, access the normalized parameter time series of each parameter type in turn, and check in each normalized parameter time series whether there is a parameter record time point that is exactly the same as the current parameter record time point. If a parameter record time point that is exactly the same as the current parameter record time point is found in the normalized parameter time series of the current parameter type, then the specific parameter value corresponding to the parameter record time point in the normalized parameter time series is filled into the current row and the column position corresponding to the current parameter type of the device operating status parameter matrix. If no parameter record time point exactly the same as the current parameter record time point is found in the normalized parameter time series of the current parameter type, then linear interpolation is performed based on the two parameter record time points adjacent to the current parameter record time point in the normalized parameter time series of the current parameter type and their corresponding specific parameter values. The calculated interpolation result is then filled into the current row and the column position corresponding to the current parameter type of the device operating status parameter matrix. After filling in all parameter recording time points and all parameter types, a complete equipment operating status parameter matrix is obtained, in which each element has a definite value.
7. The method for recording the production process of masterbatch for quality traceability according to claim 1, characterized in that, The step of generating a set of traceability records for the masterbatch production process based on the material batch flow diagram and the sequence of equipment operating status parameters corresponding to each material batch flow node, and storing the set of traceability records for the masterbatch production process in a traceability database for subsequent quality traceability queries, includes: Traverse each material batch flow node in the material batch flow chain diagram and read the production process node identifier and process execution duration range corresponding to the current material batch flow node; Extract the equipment operating status parameter matrix from the equipment operating status parameter sequence corresponding to the current material batch flow node, and convert the equipment operating status parameter matrix into an equipment operating status parameter record table with a standard format. The equipment operating status parameter record table includes a parameter recording time point field, a parameter type field, and a parameter value field. Obtain the input material batch identifier and the output material batch identifier corresponding to the current material batch flow node, and combine the input material batch identifier and the output material batch identifier into a material batch identifier pair; Access the production equipment ledger database, query the production equipment identifier for the production process node corresponding to the current material batch flow node, and use the queried production equipment identifier as the associated equipment identifier for the current material batch flow node. The production process node identifier corresponding to the current material batch flow node, the material batch identifier pair, the process start time point parameter and process end time point parameter in the process execution duration interval, the associated equipment identifier, and the equipment operation status parameter record table are associated and encapsulated to generate a traceability record entry with the material batch flow node as the basic unit. Each generated traceability record entry is assigned a unique traceability record identifier, and the traceability record identifier is bound to each field in the traceability record entry to form a structured traceability record data object; The upstream and downstream node relationships of the current material batch flow node in the material batch flow link diagram are converted into the preceding node pointer field and the following node pointer field in the traceability record data object. The preceding node pointer field points to the traceability record identifier of the upstream material batch flow node of the current material batch flow node, and the following node pointer field points to the traceability record identifier of the downstream material batch flow node of the current material batch flow node. All traceability record data objects corresponding to the material batch flow nodes are organized according to the topology of the material batch flow link diagram to generate a set of traceability records for the masterbatch production process containing complete link relationships. Each traceability record data object in the masterbatch production process traceability record set is written into the corresponding data table of the traceability database. After writing, a primary key index with material batch identifier and an auxiliary index with process execution time point are established in the traceability database.
8. The method for recording the production process of masterbatch for quality traceability according to claim 1, characterized in that, The method further includes: The raw quality inspection data stream output by the online quality inspection instrument corresponding to the key quality control node in the production process of color masterbatch is obtained. The raw quality inspection data stream contains multiple test sample data units arranged in order of test time points. Each test sample data unit carries the sample collection timestamp and test item identifier corresponding to the test. Each test sample data unit in the original quality inspection data stream is parsed, and the sample collection timestamp and test item identifier contained in the test sample data unit are extracted. Based on the test item identifier, the upper limit value and lower limit value of the corresponding quality indicator standard range are read from the preset test item standard parameter library. The measured quality index values carried in the test sample data unit are compared item by item with the upper limit of the quality index standard range and the lower limit of the quality index standard range. Based on the degree to which the measured quality index values exceed the upper limit of the quality index standard range or fall below the lower limit of the quality index standard range, a quality deviation quantification value corresponding to the test sample data unit is generated. Obtain the equipment operating status parameter sequence corresponding to the production process node that is temporally adjacent to the sample collection timestamp in the material batch flow link diagram, and extract the equipment speed parameter record, equipment temperature parameter record, and equipment pressure parameter record corresponding to multiple parameter record time points adjacent to the sample collection timestamp in the equipment operating status parameter sequence; The extracted equipment speed parameter records, equipment temperature parameter records, and equipment pressure parameter records are analyzed for parameter value trend changes. The slope changes of the equipment speed parameter records, equipment temperature parameter records, and equipment pressure parameter records within a preset time window before and after the sample collection timestamp are calculated to generate the production process parameter fluctuation feature vector corresponding to the detection sample data unit. The quality deviation quantification value of the detected sample data unit and the corresponding production process parameter fluctuation feature vector are input into the pre-constructed quality anomaly tracing analysis model. The association rule mining module in the quality anomaly tracing analysis model calculates the correlation strength coefficient between the quality deviation quantification value and the parameters of each dimension in the production process parameter fluctuation feature vector. Based on the correlation strength coefficient, dimensional parameters exceeding the preset correlation threshold are selected from the production process parameter fluctuation feature vector as suspected causal parameters, and the positions of the equipment speed parameter record, equipment temperature parameter record, or equipment pressure parameter record corresponding to the suspected causal parameters in the equipment operating status parameter sequence are marked as quality anomaly correlation parameter location points. Perform parameter change pattern recognition on the equipment operating status parameter sequence segment where the quality anomaly associated parameter location point is located, extract the start time point of change, peak time point of change and duration of change of the suspected causative parameter in the equipment operating status parameter sequence segment, and generate a parameter anomaly change pattern descriptor corresponding to the quality anomaly associated parameter location point; The detection item identifier, the quality deviation quantification value, the suspected causal parameter, the parameter abnormal change pattern descriptor, and the sample collection timestamp of the detection sample data unit are associated and encapsulated to generate a quality anomaly traceability anchor record. The quality anomaly traceability anchor record is then inserted into the traceability record entry corresponding to the sample collection timestamp in the masterbatch production process traceability record set.
9. A color masterbatch production process recording system for quality traceability, characterized in that, include: processor; A machine-readable storage medium for storing machine-executable instructions of the processor; The processor is configured to execute the color masterbatch production process recording method for quality traceability as described in any one of claims 1 to 8 by executing the machine-executable instructions.
10. A computer program product, characterized in that, The computer program product includes machine-executable instructions stored in a computer-readable storage medium. A processor of a computer device reads the machine-executable instructions from the computer-readable storage medium and executes the machine-executable instructions, causing the computer device to perform the color masterbatch production process recording method for quality traceability as described in any one of claims 1 to 8.