Non-standard part dynamic batch and serial number double-track tracing system based on digital twinning
By constructing a dynamic batch and serial number dual-track traceability system for non-standard parts using digital twin technology, the problem of information and path breakage of multi-source data in the production process of non-standard parts is solved. It realizes joint modeling of batch and sequence dimensions, and improves the accuracy and stability of traceability results.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- 宿州学院
- Filing Date
- 2026-05-12
- Publication Date
- 2026-07-31
AI Technical Summary
Existing technologies struggle to achieve accurate alignment and unified representation of multi-source business data during the production of non-standard parts, resulting in broken traceability records and incomplete associations. Single batch or serial number management methods are insufficient to depict fine-grained changes and batch hierarchy relationships in complex manufacturing scenarios. Traditional methods also suffer from poor consistency and inaccuracy in traceability results under multi-path scenarios.
A dual-track traceability system based on digital twins for non-standard parts, consisting of dynamic batches and serial numbers, is adopted. This system utilizes modules for data acquisition, batch generation, sequence generation, graph construction, graph generation, and path solving. By combining an improved GraphSAGE model and the Viterbi algorithm, a dual-track graph is constructed to generate batch codes and serial numbers, enabling joint modeling of batch and sequence dimensions. The traceability results are then output through path filtering.
It improves the completeness of the traceability map and the continuity of the link structure, solves the problem of path breakage in the disassembly and processing of non-standard parts, and improves the accuracy and stability of the traceability results.
Smart Images

Figure CN122492239A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of digital twin and product traceability management technology, and in particular to a dual-track traceability system for non-standard parts based on digital twin dynamic batch and serial number. Background Technology
[0002] With the increasing demand for digital transformation and personalized customization in discrete manufacturing, multi-source business data fusion and end-to-end traceability technologies for non-standard parts production processes have received widespread attention. Existing manufacturing enterprises typically rely on single methods such as batch management or serial number management for product traceability. In complex manufacturing scenarios, it is often necessary to simultaneously consider batch flow information and individual piece processing information. However, the following problems commonly exist in practical applications: The production process of non-standard parts involves multi-source business data, including order data, material data, process data, splitting data, and quality inspection data. These data sources are scattered and have inconsistent time granularities. Existing data integration methods struggle to achieve accurate alignment and unified representation of multi-source data, leading to information gaps and incomplete correlations in traceability records. Single-batch management only reflects the overall flow of batch production and cannot depict the fine-grained changes of individual products during splitting, reassembly, and multi-process processing. While single-serial-number management can describe individual paths, it lacks the ability to express the overall relationship of batch hierarchy, resulting in unclear correlations when tracing across batches and processes. In splitting processing and multi-level flow scenarios, product status dynamically changes with both batch and sequence dimensions. Existing traceability methods struggle to maintain both batch continuity and sequence integrity simultaneously, easily leading to path breaks, status mismatches, and information redundancy. For path reasoning in complex link structures, traditional rule-based or simple graph traversal methods lack the ability to effectively express and filter multi-path relationships. When multiple possible paths exist, it is difficult to accurately determine the true flow path, resulting in poor consistency and accuracy in traceability results.
[0003] Therefore, how to provide a dynamic batch and serial number dual-track traceability system for non-standard parts based on digital twins is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0004] One objective of this invention is to propose a dynamic batch and serial number dual-track traceability system for non-standard parts based on digital twins. This invention utilizes a data acquisition module, batch generation module, sequence generation module, graph construction module, graph generation module, sub-code generation module, and path solving module. It combines an improved trajectory latent expansion mechanism in the GraphSAGE model and a Viterbi algorithm incorporating a constrained trajectory trimming and recursion mechanism to uniformly process order data, material data, process data, splitting data, and quality inspection data during the manufacturing process of non-standard parts. This constructs a traceability ledger, generates batch codes and serial numbers, establishes a dual-track graph and forms a traceability map, further generates link structures and state trajectories, and completes path filtering. It possesses advantages such as strong dual-dimensional correlation capabilities between batch codes and serial numbers, high continuity of traceability links, and high accuracy of traceability results.
[0005] According to an embodiment of the present invention, a dual-track traceability system for non-standard parts based on digital twins, consisting of dynamic batch and serial number tracking, includes: The data acquisition module is used to collect business data during the manufacturing process of non-standard parts, perform time-scale alignment and field standardization processing, and generate traceability ledgers. The batch generation module is used to extract order attributes and material attributes based on the traceability ledger, construct batch rules, and generate batch codes; The sequence generation module is used to extract size parameters, material parameters, and precision parameters based on order attributes and material attributes, construct feature codes, generate count identifiers based on the generation order under the same batch code, and combine the batch code, feature code, and count identifier to generate a sequence number; The graph construction module is used to establish a mapping relationship between the batch code and the serial number through a dual-track mapping mechanism based on the record identification relationship in the traceability ledger, and to construct a dual-track graph. The graph generation module is used to input the dual-track graph into the improved GraphSAGE model, introduce a trajectory latent domain expansion mechanism in the neighborhood aggregation layer, perform path expansion processing on the node neighborhood of the dual-track graph, and generate a tracing graph. The sub-code generation module is used to extend and associate the batch code and serial number based on the split records in the traceability ledger to generate a link structure; The path solving module is used to extract batch status, split status and processing status based on the link structure, construct the status trajectory, and use the Viterbi algorithm with a constraint trajectory pruning recursion mechanism to perform path filtering on the status trajectory and output dual-track tracing results.
[0006] Optionally, the data acquisition module specifically comprises: Acquire business data during the manufacturing process of non-standard parts, including order data, material data, process data, breakdown data, and quality inspection data; The business data is time-stamped, and resampling and time alignment are performed according to a unified time base to generate aligned data records; The aligned data records are processed to perform field standardization, mapped to a uniform field format, and the field values are standardized to generate standardized data records. The standardized data records are linked and integrated in chronological order to generate a traceability ledger containing order attributes and material attributes.
[0007] Optionally, the batch generation module specifically comprises: Extract order attributes and material attributes from the traceability ledger. The order attributes include order number and order type, and the material attributes include material category and material specifications. Perform field mapping processing on order attributes and material attributes to generate batch rule fields; The batch rule fields are combined according to a preset order to generate batch rules; Extract batch fields based on batch rules, and generate batch codes according to batch fields.
[0008] Optionally, the step of extracting size parameters, material parameters, and precision parameters based on order attributes and material attributes to construct a feature code specifically involves: Extract the length, width, and height parameters from the material specifications in the material properties to form the dimension parameters; Extract the material type field from the material category in the material attributes to form material parameters; Extract the precision level field from the order type in the order attributes to form precision parameters; Perform field encoding processing on the dimensional parameters, material parameters, and precision parameters respectively to generate dimensional codes, material codes, and precision codes; The feature code is generated by splicing the size code, material code, and precision code in a preset order.
[0009] Optionally, the step of generating a count identifier based on the generation order under the same batch code, and combining the batch code, feature code, and count identifier to generate a serial number, specifically involves: Extract the sequence corresponding to the same batch code from the traceability ledger to generate records, and sort them in chronological order to form a sequence of sequential records; Extract the sequential index value from the arrangement position in the sequential record sequence to generate a counting identifier; The counting identifier is encoded with a set number of bits. The sequential index value is converted into a fixed-length number string, and zeros are padded to the beginning of any insufficient bits to generate the counting code. The batch code, feature code, and count code are concatenated in a preset coding order to generate a serial number.
[0010] Optionally, the graph construction module specifically comprises: Extract record identifiers from order data, material data, process data, breakdown data, and quality inspection data from the traceability ledger, and extract batch codes and serial numbers; Match the record identifier, batch code, and serial number to determine the serial number record corresponding to the batch code, and determine the order data, material data, process data, split data, and quality inspection data corresponding to the serial number; Batch tracks are constructed according to the hierarchical relationship between batch codes, and sequence tracks are constructed according to the sequential relationship between serial numbers; Establish an inter-track connection between the batch code and the corresponding serial number, and establish an intra-track connection between the serial number and the corresponding order data, material data, process data, split data and quality inspection data to generate a dual-track mapping relationship; Based on the batch track, sequence track, and dual-track mapping relationship, a dual-track graph is constructed by using the batch code and sequence number as graph nodes and the inter-track connection relationship and intra-track connection relationship as graph edges.
[0011] Optionally, the improved GraphSAGE model specifically includes a dual-track coding layer, a neighborhood construction and acquisition layer, a neighborhood aggregation layer, and a graph mapping layer; The dual-track encoding layer maps batch codes and serial numbers in the dual-track graph to graph nodes, maps batch tracks, sequence tracks, inter-track connections, and intra-track connections to graph edges, and converts field values in batch codes, serial numbers, order data, material data, process data, split data, and quality inspection data into node features to generate initial node features. The neighborhood construction layer determines the batch code node directly connected to the target node from the batch track corresponding to the target node according to the inter-track connection relationship, forming a first-order batch neighborhood. Then, according to the intra-track connection relationship, it determines the sequence number node directly connected to the target node from the sequence track corresponding to the target node, as well as the corresponding nodes of order data, material data, process data, split data, and quality inspection data connected to the sequence number node, forming a first-order sequence neighborhood. The first-order batch neighborhood and the first-order sequence neighborhood continue to expand outward to form second-order batch neighborhood and second-order sequence neighborhood. The neighborhood aggregation layer introduces a trajectory latent domain extension mechanism during the neighborhood aggregation process. Specifically, it arranges the batch code nodes, sequence number nodes, and corresponding nodes of order data, material data, process data, split data, and quality inspection data connected to the target node in the order of connection of the first-order neighborhood of the batch, the second-order neighborhood of the batch, the first-order neighborhood of the sequence, and the second-order neighborhood of the sequence, forming multiple path segments corresponding to the target node. Then, according to the node arrangement order in the path segments, the node features in each path segment are sequentially concatenated to form path features. The path features are categorized according to batch tracks and sequence tracks respectively, forming batch track path features and sequence track path features. The batch track path features and sequence track path features are mapped to the same target node according to the inter-track connection relationship, forming trajectory latent domain features. Finally, the trajectory latent domain features are concatenated with the initial node features corresponding to the target node to form a node representation. The graph mapping layer integrates node representations according to the graph edge relationships between graph nodes, and maps the integrated node representations to graph nodes and graph edges in the dual-track graph to generate a traceability graph.
[0012] Optionally, the subcode generation module specifically comprises: Extract the split records from the traceability ledger, and extract the batch code, serial number, split quantity, and split order corresponding to the split records; Match the split records, batch codes, and serial numbers to determine the batch code and serial number corresponding to the same split record; Extract the sub-code field according to the splitting order, and combine the batch code and the sub-code field according to the preset encoding order to generate the split sub-code; Establish a sub-code association relationship between the split sub-code and the corresponding sequence number, and map the split quantity to the split sub-code to generate a split association record; Based on the correspondence between batch code, sub-code, and serial number, the split associated records are sequentially connected to generate a link structure.
[0013] Optionally, the step of extracting batch status, splitting status, and processing status based on the link structure to construct a status trajectory specifically involves: Extract the connection records corresponding to the batch code, split sub-code, and sequence number from the link structure, and sort them according to the order in the connection records to form a link record sequence; Extract batch fields based on the batch code correspondence in the link record sequence to generate batch status; Extract the splitting field based on the correspondence between the splitting subcode and the splitting quantity in the link record sequence, and generate the splitting status; Based on the correspondence between process data and quality inspection data in the link record sequence, process fields and quality inspection fields are extracted to generate processing status; The state trajectory is generated by sequentially connecting the batch status, split status, and processing status in the link record sequence according to their order of appearance.
[0014] Optionally, the Viterbi algorithm, which incorporates a constraint trajectory pruning recursion mechanism, performs path filtering on the state trajectory and outputs a dual-track tracing result, specifically as follows: Based on the batch status, split status and processing status in the status trajectory, construct candidate status paths in the order of status appearance; Based on the correspondence between batch status and batch code, consistency matching is performed on the batch status in the candidate status path, and candidate status paths that satisfy the batch code correspondence are retained. Based on the correspondence between split states and split sub-codes, continuous matching of split states in candidate state paths is performed, and candidate state paths that satisfy the correspondence between split sub-codes are retained. Based on the correspondence between processing status and process data and quality inspection data, the processing status in the candidate status path is matched sequentially, and the candidate status path that satisfies the order of process field and quality inspection field is retained. The cumulative path value is calculated step by step for the retained candidate state paths, and the candidate state path with the largest cumulative path value is retained at each step to generate the target state path; Output the dual-track traceability result based on the batch code, sub-code, and serial number corresponding to the target status path.
[0015] The beneficial effects of this invention are: By constructing a dual-track graph containing batch tracks, sequence tracks, and dual-track mapping relationships through the graph construction module, and combining the improved GraphSAGE model, a trajectory latent domain expansion mechanism is introduced in the neighborhood aggregation layer to expand the execution path of the node neighborhood, forming a traceability graph. This enables joint modeling of the batch and sequence dimensions, solves the problem that a single traceability method is difficult to express multi-level relationships, and improves the completeness of the traceability graph representation. The sub-code generation module generates split sub-codes based on the split records and constructs a link structure. It extends and associates batch codes, split sub-codes, and serial numbers to realize the expression of multi-level flow relationships in the split process, solves the problems of path breakage and discontinuous association in the split processing of non-standard parts, and improves the continuity and traceability of the link structure. The Viterbi algorithm, which introduces a constraint trajectory pruning and recursive mechanism based on the state trajectory in the path solving module, performs path filtering on candidate state paths. By jointly matching batch states, split states, and processing states and filtering based on path cumulative values, dual-track tracing results are output, which solves the problem of difficulty in determining the true flow path under multi-path conditions and improves the accuracy and stability of tracing results. Attached Figure Description
[0016] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings: Figure 1 This is a schematic diagram of the dual-track traceability system for non-standard parts based on digital twins, which is a dynamic batch and serial number system proposed in this invention. Figure 2 This is a schematic diagram of the improved GraphSAGE model proposed in this invention. Detailed Implementation
[0017] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.
[0018] refer to Figures 1-2 A dual-track traceability system for non-standard parts based on digital twins, consisting of dynamic batch and serial number tracking, includes: The data acquisition module is used to collect business data during the manufacturing process of non-standard parts, perform time-scale alignment and field standardization processing, and generate traceability ledgers. The batch generation module is used to extract order attributes and material attributes based on the traceability ledger, construct batch rules, and generate batch codes; The sequence generation module is used to extract size parameters, material parameters, and precision parameters based on order attributes and material attributes, construct feature codes, generate count identifiers based on the generation order under the same batch code, and combine the batch code, feature code, and count identifier to generate a serial number; The graph construction module is used to establish a mapping relationship between batch codes and serial numbers through a dual-track mapping mechanism based on the record identification relationship in the traceability ledger, and to construct a dual-track graph. The graph generation module is used to input the dual-track graph into the improved GraphSAGE model, introduce a trajectory latent domain expansion mechanism in the neighborhood aggregation layer, perform path expansion processing on the node neighborhood of the dual-track graph, and generate a tracing graph. The sub-code generation module is used to extend and associate batch codes and serial numbers based on the split records in the traceability ledger to generate a link structure; The path solving module is used to extract batch status, split status and processing status based on the link structure, construct the status trajectory, and use the Viterbi algorithm with a constraint trajectory pruning recursion mechanism to perform path filtering on the status trajectory, and output dual-track tracing results.
[0019] In this embodiment, the data acquisition module specifically comprises: Acquire business data during the manufacturing process of non-standard parts. Business data includes order data, material data, process data, breakdown data, and quality inspection data. Order data includes order number, order type, and order time. Material data includes material category, material specification, and material time. Process data includes process number, process type, and process time. Breakdown data includes breakdown number, breakdown quantity, breakdown order, and breakdown time. Quality inspection data includes quality inspection number, quality inspection item, quality inspection result, and quality inspection time. Extract the order time from the order data and write it to the corresponding record in the order data; extract the material time from the material data and write it to the corresponding record in the material data; extract the process time from the process data and write it to the corresponding record in the process data; extract the split time from the split data and write it to the corresponding record in the split data; extract the quality inspection time from the quality inspection data and write it to the corresponding record in the quality inspection data, forming a data record with a unified time field; A unified time reference is determined according to the data collection cycle at the manufacturing site. The unified time reference is divided into continuous time points. Each data record is mapped to the time point where the time field is located. If there are multiple data records of the same type at the same time point, one data record is retained according to the closeness of the time field to the unified time reference. If there are missing data records between continuous time points, the corresponding time field is filled in according to the existing data records at adjacent time points to generate data records with continuous time. Using the same time point in a unified time base as the alignment position, data records with the same time field in order data, material data, process data, split data, and quality inspection data are grouped into the same alignment unit. Data records with time field deviations that are within the range of the collection period are adjusted to the same alignment unit to generate aligned data records. The field names in order data, material data, process data, split data, and quality inspection data are standardized to correspond to a unified field format. Data items with different field names that express the same business meaning are mapped to a unified field format. The field order is standardized to record identifier field, attribute field, time field, and result field, generating aligned data records with consistent field formats. Standardize the dimensions in material specifications to the same unit of measurement, standardize the material names to the same material representation, standardize the process type, quality inspection items and quality inspection results to fixed field values, fill empty fields with empty field markers, and generate standardized data records. Order data is associated with order number, material data with material category and material specification, process data with process number, split data with split number, and quality inspection data with quality inspection number. Standardized data records with time fields in the same alignment unit and corresponding record identifiers are merged into the same business record. Order attributes and material attributes in the same business record are kept in the same record unit to generate a traceability ledger.
[0020] In this embodiment, the batch generation module specifically comprises: Extract order attributes and material attributes from the traceability ledger. Order attributes include order number and order type, while material attributes include material category and material specifications. Map the order number to the number field, the order type to the type field, the material category to the category field, and the material specification to the specification field to form the corresponding batch rule fields; Unify the character length of the order number to the same number format, unify the text content of the order type, material category and material specification to the field value format, fill empty fields with empty field markers, and form batch rule fields with consistent format; Concatenate batch rule fields with consistent formatting in the order of order number, order type, material category, and material specification to form a field combination string; By fixing the position of the delimiter in the field combination string to the same fields, a batch rule is formed. Based on batch rules, extract the number field corresponding to the order number, the type field corresponding to the order type, the category field corresponding to the material category, and the specification field corresponding to the material specification to form the batch field; The batch field is compressed, including: retaining the number character from the order number, the type character from the order type, the category character from the material category, and the specification character from the material specification, to form a batch field string; The batch field strings are concatenated in the order of number field, type field, category field, and specification field to form a batch code.
[0021] In this embodiment, size parameters, material parameters, and precision parameters are extracted based on order attributes and material attributes to construct a feature code, specifically as follows: Extract order attributes and material attributes from the traceability ledger. Order attributes include order type, and material attributes include material specifications and material category. Extract the length, width, and height values from the material specifications, and map the length, width, and height values to the length, width, and height parameters respectively to form the dimension parameters; The units of length, width, and height parameters are standardized, different units of measurement are converted into the same unit of measurement, and a string of size parameters is formed according to the order of length, width, and height parameters. Extract the material type field from the material category and map the material type field to the material parameter; The field values of material parameters are unified by merging different textual content expressing the same material type into the same field value and forming a material parameter string according to the character order in the field value; Extract the precision level field from the order type and map the precision level field to the precision parameter; To unify the field values of precision parameters, different textual content expressing the same precision level is grouped into the same field value, and a precision parameter string is formed according to the character order in the field value. Extract the numeric characters from the size parameter string one by one, pad the numeric characters to a fixed field length, and then concatenate them to form a size code; Extract the text characters from the material parameter string one by one, convert them into material field codes according to the character order, and then concatenate the material field codes to form the material code; Extract the text and numeric characters from the precision parameter string in sequence, convert them into precision field codes according to the character order, and then concatenate the precision field codes to form a precision code. The size code, material code, and precision code are connected sequentially in the order of size code first, material code in the middle, and precision code last to form a feature code.
[0022] In this embodiment, a counting identifier is generated based on the generation order under the same batch code. The batch code, feature code, and counting identifier are combined to generate a serial number, specifically as follows: Extract business records with the same batch code from the traceability ledger, and extract the time field corresponding to the business record to form a sequence generation record corresponding to the same batch code; The records generated in the sequence are arranged according to the order of the time fields to form a sequential record sequence; For each sequence in the sequential record sequence, generate a record and assign it a permutation position. The first sequence is assigned a first permutation value, the second sequence is assigned a second permutation value, and subsequent sequences are assigned permutation values according to their permutation positions to form a sequential index value. Write the sequential index value into the corresponding sequence to generate a record, and map the sequential index value to the count field to form a count identifier; The number of digits in the counting field is standardized by unifying the character length of the counting field to a fixed length. The fixed length is determined based on the number range of records generated in the same batch code sequence. When the number range is one digit, a two-digit length is used; when the number range is two digits, a three-digit length is used; and when the number range is three digits, a four-digit length is used. The numeric characters in the sequential index value are extracted one by one. When the number of numeric characters is less than the fixed length, 0s are added in front of the numeric characters. When the number of numeric characters reaches the fixed length, the original order of numeric characters is maintained to form a counting code. Arrange the characters in the batch code according to their original order, arrange the characters in the feature code according to their original order, and arrange the characters in the counting code according to their original order. Arrange the batch code first, the feature code in the middle, and the count code last. Connect the batch code, feature code, and count code in sequence to form a serial number. Then, map the serial number back into the sequence to generate a record, thus establishing the correspondence between the batch code, feature code, count identifier, and serial number.
[0023] In this embodiment, the graph construction module specifically comprises: Extract record identifiers from order data, material data, process data, split data, and quality inspection data from the traceability ledger, and extract batch codes and serial numbers. Record identifiers include order number, material category, process number, split number, and quality inspection number. Match the batch code with each business record in the traceability ledger, group business records with the same batch code into the same batch record group, and match the serial number with each business record in the traceability ledger, grouping business records with the same serial number into the same serial record group. The serial numbers in the batch record group are merged, and all serial numbers belonging to the same batch code are extracted to form the serial number record corresponding to the batch code; For each sequence number record, the order number, material category, process number, split number, and quality inspection number are matched and matched. The order number is matched with the order data, the material category with the material data, the process number with the process data, the split number with the split data, and the quality inspection number with the quality inspection data, thus forming the order data, material data, process data, split data, and quality inspection data corresponding to the sequence number. Business records with the same batch code are connected by grouping them into the same batch record group. The batch codes in the same batch record group are arranged in the order of their appearance to form a batch code arrangement chain in the batch track. All serial numbers corresponding to the same batch code are arranged in the order of their generation. The serial number that appears first is connected to the serial number that appears next to it to form a serial number arrangement chain in the sequence track. In each batch record group, the batch code is linked one by one with each serial number belonging to the batch record group to form a correspondence between the batch code and the serial number. Connect the serial number with the corresponding order number, connect the serial number with the corresponding material category, connect the serial number with the corresponding process number, connect the serial number with the corresponding split number, and connect the serial number with the corresponding quality inspection number to form a correspondence between the serial number and the order data, material data, process data, split data, and quality inspection data. The mapping relationship between batch codes and serial numbers, and the mapping relationship between serial numbers and order data, material data, process data, split data, and quality inspection data, are aggregated into the same mapping table to form a dual-track mapping relationship; Write the batch code and serial number into the graph node table, write the batch code arrangement chain in the batch track and the serial number arrangement chain in the sequence track into the graph edge table, write the batch code pointing to serial number relationship and the serial number pointing to order data, material data, process data, split data and quality inspection data relationship in the dual-track mapping relationship into the graph edge table, and form a dual-track graph according to the connection relationship between the nodes in the graph node table and the graph edge table.
[0024] In this embodiment, the improved GraphSAGE model specifically includes a dual-track coding layer, a neighborhood construction and acquisition layer, a neighborhood aggregation layer, and a graph mapping layer; Write the batch code and serial number in the dual-track diagram into the node table, write the batch track, sequence track, inter-track connection relationship and intra-track connection relationship into the edge table, and form the diagram data by matching the field values in the order data, material data, process data, split data and quality inspection data with the batch code and serial number; The dual-track coding layer maps batch codes and serial numbers in the node table to graph nodes, batch tracks, sequence tracks, inter-track connections, and intra-track connections in the edge table to graph edges, and orders number and order type in order data, material category and material specification in material data, process number and process type in process data, split number and split quantity in split data, and quality inspection number and quality inspection result in quality inspection data to graph nodes respectively. The field values corresponding to the graph nodes are organized, text fields are converted into field codes, numeric fields are converted into fixed-length numeric strings, and empty fields are filled with empty field markers. The field codes, fixed-length numeric strings and empty field markers corresponding to the same graph node are connected in the following order: batch code first, serial number in the middle, order data, material data, process data, split data and quality inspection data last, to form the initial node features. The neighborhood construction layer starts from the target node, searches for batch code nodes that are directly connected to the target node along the inter-track connection relationship, and classifies the found batch code nodes into the first-order neighborhood of the batch. Find the sequence number node that is directly connected to the target node along the connection relationship within the track, and continue to find the corresponding nodes of order data, material data, process data, split data and quality inspection data that are directly connected to the sequence number node along the sequence number node. The found nodes are assigned to the first-order neighborhood of the sequence. Continue searching outwards along the batch code node in the first-order neighborhood of the batch to find the batch code node and the sequence number node that are directly connected to the batch code node, and classify the found nodes into the second-order neighborhood of the batch. Continue searching outwards from the sequence number node in the first-order neighborhood of the sequence to find the corresponding nodes of order data, material data, process data, split data and quality inspection data that are directly connected to the sequence number node, and classify the found nodes into the second-order neighborhood of the sequence. The neighborhood aggregation layer introduces a trajectory latent domain extension mechanism during the neighborhood aggregation process. The trajectory latent domain extension mechanism is as follows: according to the connection order of the first-order neighborhood of the batch, the second-order neighborhood of the batch, the first-order neighborhood of the sequence, and the second-order neighborhood of the sequence, the target node, the batch code node, the sequence number node, the corresponding node of the order data, the corresponding node of the material data, the corresponding node of the process data, the corresponding node of the split data, and the corresponding node of the quality inspection data are arranged one by one. The nodes that are connected by graph edges between adjacent nodes are arranged into a path segment, and all the nodes formed under different connection orders are retained as multiple path segments. According to the order of nodes in each path segment, first extract the initial node features of the first node, then extract the initial node features of the nodes in subsequent positions, write the initial node features of the first node into the first segment of the path, and then append the initial node features of the nodes in subsequent positions to the first segment of the path to form the path features of the corresponding path segment. The path features are classified according to the batch track or sequence track to which the first node belongs. Path features whose first node belongs to the batch track are classified as batch track path features, and path features whose first node belongs to the sequence track are classified as sequence track path features. All path features included in the batch track path features are mapped to the same target node according to the inter-track connection relationship. All path features included in the sequence track path features are mapped to the same target node according to the intra-track connection relationship. The batch track path features that correspond to the same target node are arranged first, and the sequence track path features that correspond to the same target node are arranged last. They are connected in sequence to form the trajectory latent domain features. The trajectory latent features and the initial node features corresponding to the target node are connected sequentially in the order of initial node features first and trajectory latent features last to form a node representation; The graph mapping layer maps node representations to graph nodes in the node table, maps the connection order between node representations to graph edges in the edge table, writes the node representations corresponding to the same graph node into the graph node table, writes the node representation relationships connected to graph nodes into the graph edge table, and integrates the corresponding results in the graph node table and the graph edge table to form a traceability graph.
[0025] In this embodiment, both the improved GraphSAGE model and the standard GraphSAGE model employ a graph-based neighborhood sampling and node representation update method. Node representations are formed by aggregating neighborhood information of target nodes, maintaining consistency in the graph nodes, edges, and multi-layered neighborhood propagation structure. Building upon this, the improved GraphSAGE model adjusts the node construction, neighborhood sampling, and neighborhood aggregation methods to address the parallel existence of batch and sequence tracks in a dual-track graph. Batch codes and sequence numbers are uniformly mapped to graph nodes, and batch tracks, sequence tracks, inter-track connections, and intra-track connections are uniformly mapped to graph edges. Field values from order data, material data, process data, splitting data, and quality inspection data are embedded into node features, ensuring that node representations simultaneously include both batch and sequence dimension information. During neighborhood sampling, first-order neighborhoods for batches, first-order neighborhoods for sequences, and corresponding second-order neighborhoods are constructed according to inter-track and intra-track connections, ensuring the neighborhood structure simultaneously covers both batch flow paths and sequence processing paths, avoiding information loss caused by single-neighbor sampling. During the neighborhood aggregation process… The algorithm introduces a trajectory latent domain expansion mechanism, which expands nodes at different neighborhood levels into multiple path segments according to the connection order. The node features in the path segments are then connected sequentially to form path features. These path features are classified according to batch tracks and sequence tracks. The classified path features are then recombined according to the inter-track connection relationships to form trajectory latent domain features. This transforms node representation from traditional local neighborhood aggregation to multi-path expression that includes path sequence information. During the node representation update process, the trajectory latent domain features are connected to the initial node features, allowing the node representation to simultaneously reflect the node's own attributes, neighborhood structure information, and path evolution information, thereby enhancing the ability to express multi-level relationships in complex manufacturing processes. Through these improvements, the graph model can simultaneously capture the overall flow relationship in the batch dimension and the fine-grained processing relationship in the sequence dimension under a dual-track structure. This improves the completeness of node relationship expression and the continuity of path association in the traceability graph, reduces information breaks in cross-process and cross-splitting scenarios, improves the accuracy and consistency of dual-track traceability results, and enhances the modeling ability and path reasoning stability of multi-source data association in complex manufacturing scenarios.
[0026] In this embodiment, the subcode generation module specifically comprises: Extract the splitting records from the traceability ledger, and extract the batch code, serial number, splitting quantity and splitting order. The batch code and serial number in the splitting record correspond to the same splitting business record. The split records are merged according to the batch code and serial number. Split records with the same batch code and serial number are grouped into the same split record group. The split order is used as the sorting basis within the split record group to form a correspondence between split records and batch codes and serial numbers. Extract numeric characters from the splitting order, and map the numeric characters to the sub-code field; The number of digits in the subcode field is uniformly processed. The character length of the subcode field is uniformly fixed. The fixed length is determined based on the range of the number of records split under the same batch code. When the number range is one digit, it corresponds to a two-digit length; when the number range is two digits, it corresponds to a three-digit length; and when the number range is three digits, it corresponds to a four-digit length. When the number of digit characters in the subcode field is less than the fixed length, 0s are added in front of the digit characters. When the number of digit characters reaches the fixed length, the original order is maintained to form a fixed-length subcode field. The characters in the batch code are arranged in the original order of the batch code, and the characters in the fixed-length subcode field are arranged in the original order, with the batch code first and the fixed-length subcode field second. The batch code and the fixed-length subcode field are connected in sequence to form the split subcode. The sub-code is backfilled into each split record in the split record group. The sub-code and the sequence number correspond one by one. The split quantity is written into the corresponding record, forming a correspondence between the sub-code, the sequence number and the split quantity. The sub-codes under the same batch code are arranged according to the order of splitting, and the serial numbers are arranged according to the order of serial number generation, forming an order relationship between the sub-codes and the serial numbers; Batch code, split sub-code, and serial number are connected in the order of batch code first, split sub-code in the middle, and serial number last. The number of splits corresponds to the position between the split sub-code and the serial number, forming a split association record. All split-related records corresponding to the same batch code are arranged sequentially according to the split order. The serial number in the previous split-related record and the split sub-code in the next split-related record are connected in sequence to form a continuous association relationship and generate a link structure.
[0027] In this embodiment, the batch status, split status, and processing status are extracted based on the link structure to construct a status trajectory, specifically as follows: Extract the connection records between batch code, sub-code, and serial number from the link structure, and extract the process data and quality inspection data corresponding to the connection records. The batch code, sub-code, serial number, process data, and quality inspection data in the connection records correspond to the same link record. The link records are arranged according to the order of connections in the link structure, with the link record corresponding to the previous connection position at the front and the link record corresponding to the next connection position at the back, forming a link record sequence. Extract the character field corresponding to the batch code from the link record sequence. Link records with the same batch code are grouped into the same batch record segment. The batch code field in the batch record segment is arranged according to the order of appearance in the link record sequence to form the batch field. The batch field is written to the position of the status field, corresponding to the link record in the batch record segment, to form the batch status; Extract the character field corresponding to the split sub-code and the numeric field corresponding to the split quantity from the link record sequence. Link records with the same split sub-code and the same split quantity are grouped into the same split record segment. The split sub-code field and the split quantity field in the split record segment are arranged in the order of appearance in the link record sequence to form the split field. The split field is written to the position of the status field, corresponding to the link record in the split record segment, to form the split status; Extract the process number and process type corresponding to the process data from the link record sequence, and extract the quality inspection items and quality inspection results corresponding to the quality inspection data. Arrange the process number, process type, quality inspection items and quality inspection results according to the order of appearance in the link record sequence to form the process field and quality inspection field. The process field comes first, followed by the quality inspection field. The process field and the quality inspection field are connected sequentially to form the processing field. The processing field is written to the position of the status field, and corresponds one by one with the corresponding link record in the link record sequence to form the processing status; The batch status, split status, and processing status are extracted according to the order of arrangement in the link record sequence, with the batch status first, the split status in the middle, and the processing status last. The batch status, split status, and processing status are connected in sequence to form a status trajectory. The status trajectory corresponds to each link record in the backlink record sequence, forming a correspondence between batch status, split status, processing status and link record.
[0028] In this embodiment, the Viterbi algorithm, which incorporates a constraint trajectory pruning recursion mechanism, is used to perform path filtering on the state trajectory and outputs a dual-track tracing result, specifically as follows: Extract batch status, split status and processing status from the status trajectory, and take out the status records in the order of arrangement in the status trajectory. Connect the status records that are ranked first with the status records that are ranked next in order to form candidate status paths. According to the batch code in the backlink record corresponding to the batch status in the status trajectory, the field values in the batch status are matched with the field values in the batch code item by item. Status records with consistent field values are retained in the candidate status path, and status records with inconsistent field values are deleted from the candidate status path to form a candidate status path that satisfies the batch code correspondence. According to the split sub-code and split quantity in the backlink record corresponding to the split state in the state trajectory, the split field in the split state is matched with the field value in the split sub-code item by item, and the quantity field in the split state is matched with the numeric field in the split quantity item by item. State records with continuous split field and continuous quantity field are retained in the candidate state path, and state records with interrupted split field or interrupted quantity field are deleted from the candidate state path to form a candidate state path that satisfies the split sub-code correspondence. According to the process data and quality inspection data in the corresponding backlink record of the processing status in the status trajectory, the process fields in the processing status are matched with the process number and process type one by one, and the quality inspection fields in the processing status are matched with the quality inspection items and quality inspection results one by one. Status records in which the order of process fields is consistent with the order of process data and the order of quality inspection fields is consistent with the order of quality inspection data are retained in the candidate status path. Status records in which the order of process fields or the order of quality inspection fields is inconsistent are deleted from the candidate status path, thus forming a candidate status path that satisfies the correspondence between process data and quality inspection data. The constraint trajectory trimming recursive mechanism is as follows: At the position of the first state record in the state trajectory, the batch state, split state, and processing state corresponding to the first state record are taken as the initial state record. At the position of the second state record in the state trajectory, the second state record is sequentially connected to the initial state record to form a recursive path. In the recursive path, the recursive path in which the batch state corresponds to the batch code, the split state corresponds to the split sub-code and the split quantity in a continuous manner, and the processing state corresponds to the process data and quality inspection data in an orderly manner is retained. The recursive path in which the fields are inconsistent, the quantity is discontinuous, or the order is reversed is deleted. At the subsequent position of the state trajectory, the next state record is connected along the recursive path retained at the previous position. The retention and deletion process is repeated to form the recursive path after gradual trimming. The cumulative path value is calculated for the retained recursive path. The cumulative path value is formed by adding the batch status matching value, split status matching value and processing status matching value in sequence. Each field value in the batch status is recorded as 1 if it matches the corresponding field value in the batch code. Each field value in the split status is recorded as 1 if it matches the corresponding field value in the split sub-code and split quantity. Each field value in the processing status is recorded as 1 if it matches the corresponding field value in the process data and quality inspection data. The cumulative path value is formed by adding all unit values in the same recursive path. At each position of the state trajectory, compare the cumulative path value corresponding to the retained recursive path. The recursive path with the larger cumulative path value is retained, and the recursive path with the smaller cumulative path value is deleted, until the target state path is formed at the end of the state trajectory. Based on the batch code, sub-code, and serial number in the corresponding backlink record of the target status path, the batch code corresponding to the first status record in the target status path is taken as the traceability starting point, the sub-code correspondence in the target status path is taken as the sub-link, and the serial number correspondence in the target status path is taken as the endpoint identifier. The dual-track traceability results are output according to the order in the target status path.
[0029] Example 1: To verify the feasibility of this invention in practice, it was applied to the production management scenario of flange connectors, irregular guide blocks, and customized clamping parts for a precision non-standard parts manufacturing company. This company also undertakes orders for aerospace component accessories and automated production line fixtures, processing an average of 86 orders per month, involving 214 material specifications, with batch quantities fluctuating between 8 and 320 pieces. The production process includes multiple stages such as material cutting, machining, heat treatment, surface treatment, inspection, and warehousing. Outsourcing and sub-scrapping are frequent, and traditional management methods mainly rely on manual ledgers and single serial number tracking. In actual operation, order data, material data, process data, sub-scrapping data, and quality inspection data are scattered across ERP, MES, and quality inspection terminals, resulting in inconsistent time records. Batch flow and individual piece flow are often disconnected. When problems occur, it is often only possible to locate the order or process, making it difficult to pinpoint the specific sub-code and serial number, leading to expanded rework scope, lengthy traceability, and unclear responsibility.
[0030] After deploying this invention, the data acquisition module first collects order data, material data, process data, split data, and quality inspection data from the enterprise's existing system. It then uniformly converts time fields from different sources to a minute-level time base, completes field standardization processing, and generates a traceability ledger. The batch generation module generates batch codes based on order number, order type, material category, and material specifications. The sequence generation module extracts length, width, and height parameters based on material specifications, extracts material type fields based on material category, and extracts precision level fields based on order type, forming feature codes. These feature codes are then combined with the generation order under the same batch code to form a sequence number. The graph construction module establishes batch tracks and sequence tracks based on record identification relationships, forming a dual-track graph. The graph generation module inputs the dual-track graph into an improved GraphSAGE model to generate a traceability graph. The sub-code generation module generates split sub-codes based on split records and forms a link structure. The path solving module forms state trajectories based on the link structure, then uses the Viterbi algorithm with a constraint trajectory pruning and recursion mechanism to filter target state paths, finally outputting the dual-track traceability results.
[0031] The system ran continuously for 62 days, covering 76 orders, 189 batch codes, 4126 serial numbers, and 538 split records. To facilitate observation of the improvements this invention brings to multi-source data integration and dual-track traceability capabilities, similar orders before and after implementation were compared, resulting in Tables 1 and 2.
[0032] Table 1 Comparison of Traceability Processing Efficiency and Link Integrity
[0033] As shown in Table 1, this invention significantly improves the governance of basic traceability data. While traditional traceability methods can record business processes, the data alignment success rate is only 82.6%, and the field specification consistency rate is 84.3%, indicating significant differences in recording standards between different systems, directly impacting the quality of batch code and serial number generation. With this invention, the traceability ledger formation process is more stable, with the data alignment success rate increasing to 98.7%, the field specification consistency rate to 99.1%, and the batch code and serial number generation accuracy rates reaching 99.4% and 99.2%, respectively. More importantly, the success rate of split record association increased from 76.8% to 97.9%, and the link structure integrity rate increased from 71.4% to 96.8%, indicating a continuous and stable dual-track link between batch codes, split sub-codes, and serial numbers. The average time for a single problem traceability attempt was reduced from 43.6 minutes to 7.9 minutes, and the first-time hit rate of traceability results increased to 95.6%, demonstrating that this invention not only improves data quality but also significantly enhances on-site application efficiency.
[0034] Table 2 Comparison of Typical Abnormal Order Tracing Results
[0035] As shown in Table 2, this invention demonstrates a significant advantage in terms of anomaly location depth and responsibility determination speed. Traditional methods can mostly only locate anomalies at the order, batch, or process segment level, failing to refine the process under conditions of split processing and multi-process flow, resulting in a large number of rework operations. For example, the problem of mixed materials cannot be accurately located using traditional methods, ultimately requiring an expansion of the investigation scope; with this invention, batch codes, split sub-codes, and serial numbers can be directly locked through traceability maps and status trajectories, significantly lowering the location level. In five typical abnormal orders, the time taken by this invention was controlled within 6 to 11 minutes, approximately 80% shorter than traditional methods, and the responsibility confirmation time was reduced to 8 to 14 minutes. The number of rework operations also decreased simultaneously, indicating that the dual-track traceability results output by the path solving module accurately reflect the actual flow path, reducing unnecessary rework and improving the targeting and controllability of anomaly handling.
[0036] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A dual-track traceability system for non-standard parts based on digital twins, characterized in that: include: The data acquisition module is used to collect business data during the manufacturing process of non-standard parts, perform time-scale alignment and field standardization processing, and generate traceability ledgers. The batch generation module is used to extract order attributes and material attributes based on the traceability ledger, construct batch rules, and generate batch codes; The sequence generation module is used to extract size parameters, material parameters, and precision parameters based on order attributes and material attributes, construct feature codes, generate count identifiers based on the generation order under the same batch code, and combine the batch code, feature code, and count identifier to generate a sequence number; The graph construction module is used to establish a mapping relationship between the batch code and the serial number through a dual-track mapping mechanism based on the record identification relationship in the traceability ledger, and to construct a dual-track graph. The graph generation module is used to input the dual-track graph into the improved GraphSAGE model, introduce a trajectory latent domain expansion mechanism in the neighborhood aggregation layer, perform path expansion processing on the node neighborhood of the dual-track graph, and generate a tracing graph. The sub-code generation module is used to extend and associate the batch code and serial number based on the split records in the traceability ledger to generate a link structure; The path solving module is used to extract batch status, split status and processing status based on the link structure, construct the status trajectory, and use the Viterbi algorithm with a constraint trajectory pruning recursion mechanism to perform path filtering on the status trajectory and output dual-track tracing results.
2. The dual-track traceability system for non-standard parts based on digital twins according to claim 1, characterized in that, The data acquisition module is specifically: Acquire business data during the manufacturing process of non-standard parts, including order data, material data, process data, breakdown data, and quality inspection data; The business data is time-stamped, and resampling and time alignment are performed according to a unified time base to generate aligned data records; The aligned data records are processed to perform field standardization, mapped to a uniform field format, and the field values are standardized to generate standardized data records. The standardized data records are linked and integrated in chronological order to generate a traceability ledger containing order attributes and material attributes.
3. The dual-track traceability system for non-standard parts based on digital twins according to claim 1, characterized in that, The batch generation module specifically includes: Extract order attributes and material attributes from the traceability ledger. The order attributes include order number and order type, and the material attributes include material category and material specifications. Perform field mapping processing on order attributes and material attributes to generate batch rule fields; The batch rule fields are combined according to a preset order to generate batch rules; Extract batch fields based on batch rules, and generate batch codes according to batch fields.
4. The dual-track traceability system for non-standard parts based on digital twins according to claim 1, characterized in that, The process of extracting size parameters, material parameters, and precision parameters based on order attributes and material attributes to construct a feature code is as follows: Extract the length, width, and height parameters from the material specifications in the material properties to form the dimension parameters; Extract the material type field from the material category in the material attributes to form material parameters; Extract the precision level field from the order type in the order attributes to form precision parameters; Perform field encoding processing on the dimensional parameters, material parameters, and precision parameters respectively to generate dimensional codes, material codes, and precision codes; The feature code is generated by splicing the size code, material code, and precision code in a preset order.
5. The dual-track traceability system for non-standard parts based on digital twins according to claim 1, characterized in that, The step of generating a count identifier based on the generation order under the same batch code, and combining the batch code, feature code, and count identifier to generate a sequence number, specifically involves: Extract the sequence corresponding to the same batch code from the traceability ledger to generate records, and sort them in chronological order to form a sequence of sequential records; Extract the sequential index value from the arrangement position in the sequential record sequence to generate a counting identifier; The counting identifier is encoded with a set number of bits. The sequential index value is converted into a fixed-length number string, and zeros are padded to the beginning of any insufficient bits to generate the counting code. The batch code, feature code, and count code are concatenated in a preset coding order to generate a serial number.
6. The dual-track traceability system for non-standard parts based on digital twins according to claim 1, characterized in that, The graph construction module is specifically as follows: Extract record identifiers from order data, material data, process data, breakdown data, and quality inspection data from the traceability ledger, and extract batch codes and serial numbers; Match the record identifier, batch code, and serial number to determine the serial number record corresponding to the batch code, and determine the order data, material data, process data, split data, and quality inspection data corresponding to the serial number; Batch tracks are constructed according to the hierarchical relationship between batch codes, and sequence tracks are constructed according to the sequential relationship between serial numbers; Establish an inter-track connection between the batch code and the corresponding serial number, and establish an intra-track connection between the serial number and the corresponding order data, material data, process data, split data and quality inspection data to generate a dual-track mapping relationship; Based on the batch track, sequence track, and dual-track mapping relationship, a dual-track graph is constructed by using the batch code and sequence number as graph nodes and the inter-track connection relationship and intra-track connection relationship as graph edges.
7. The dual-track traceability system for non-standard parts based on digital twins according to claim 1, characterized in that, The improved GraphSAGE model specifically includes a dual-track coding layer, a neighborhood construction and acquisition layer, a neighborhood aggregation layer, and a graph mapping layer; The dual-track encoding layer maps batch codes and serial numbers in the dual-track graph to graph nodes, maps batch tracks, sequence tracks, inter-track connections, and intra-track connections to graph edges, and converts field values in batch codes, serial numbers, order data, material data, process data, split data, and quality inspection data into node features to generate initial node features. The neighborhood construction layer determines the batch code node directly connected to the target node from the batch track corresponding to the target node according to the inter-track connection relationship, forming a first-order batch neighborhood. Then, according to the intra-track connection relationship, it determines the sequence number node directly connected to the target node from the sequence track corresponding to the target node, as well as the corresponding nodes of order data, material data, process data, split data, and quality inspection data connected to the sequence number node, forming a first-order sequence neighborhood. The first-order batch neighborhood and the first-order sequence neighborhood continue to expand outward to form second-order batch neighborhood and second-order sequence neighborhood. The neighborhood aggregation layer introduces a trajectory latent domain extension mechanism during the neighborhood aggregation process. Specifically, it arranges the batch code nodes, sequence number nodes, and corresponding nodes of order data, material data, process data, split data, and quality inspection data connected to the target node in the order of connection of the first-order neighborhood of the batch, the second-order neighborhood of the batch, the first-order neighborhood of the sequence, and the second-order neighborhood of the sequence, forming multiple path segments corresponding to the target node. Then, according to the node arrangement order in the path segments, the node features in each path segment are sequentially concatenated to form path features. The path features are categorized according to batch tracks and sequence tracks respectively, forming batch track path features and sequence track path features. The batch track path features and sequence track path features are mapped to the same target node according to the inter-track connection relationship, forming trajectory latent domain features. Finally, the trajectory latent domain features are concatenated with the initial node features corresponding to the target node to form a node representation. The graph mapping layer integrates node representations according to the graph edge relationships between graph nodes, and maps the integrated node representations to graph nodes and graph edges in the dual-track graph to generate a traceability graph.
8. The dual-track traceability system for non-standard parts based on digital twins according to claim 1, characterized in that, The subcode generation module is specifically as follows: Extract the split records from the traceability ledger, and extract the batch code, serial number, split quantity, and split order corresponding to the split records; Match the split records, batch codes, and serial numbers to determine the batch code and serial number corresponding to the same split record; Extract the sub-code field according to the splitting order, and combine the batch code and the sub-code field according to the preset encoding order to generate the split sub-code; Establish a sub-code association relationship between the split sub-code and the corresponding sequence number, and map the split quantity to the split sub-code to generate a split association record; Based on the correspondence between batch code, sub-code, and serial number, the split associated records are sequentially connected to generate a link structure.
9. The dual-track traceability system for non-standard parts based on digital twins according to claim 1, characterized in that, The step of extracting batch status, splitting status, and processing status based on the link structure and constructing a status trajectory is as follows: Extract the connection records corresponding to the batch code, split sub-code, and sequence number from the link structure, and sort them according to the order in the connection records to form a link record sequence; Extract batch fields based on the batch code correspondence in the link record sequence to generate batch status; Extract the splitting field based on the correspondence between the splitting subcode and the splitting quantity in the link record sequence, and generate the splitting status; Based on the correspondence between process data and quality inspection data in the link record sequence, process fields and quality inspection fields are extracted to generate processing status; The state trajectory is generated by sequentially connecting the batch status, split status, and processing status in the link record sequence according to their order of appearance.
10. The dual-track traceability system for non-standard parts based on digital twins according to claim 1, characterized in that, The Viterbi algorithm, which employs a constraint trajectory pruning recursion mechanism, performs path filtering on the state trajectory and outputs a dual-track tracing result, specifically as follows: Based on the batch status, split status and processing status in the status trajectory, construct candidate status paths in the order of status appearance; Based on the correspondence between batch status and batch code, consistency matching is performed on the batch status in the candidate status path, and candidate status paths that satisfy the batch code correspondence are retained. Based on the correspondence between split states and split sub-codes, continuous matching of split states in candidate state paths is performed, and candidate state paths that satisfy the correspondence between split sub-codes are retained. Based on the correspondence between processing status and process data and quality inspection data, the processing status in the candidate status path is matched sequentially, and the candidate status path that satisfies the order of process field and quality inspection field is retained. The cumulative path value is calculated step by step for the retained candidate state paths, and the candidate state path with the largest cumulative path value is retained at each step to generate the target state path; Output the dual-track traceability result based on the batch code, sub-code, and serial number corresponding to the target status path.