A blockchain and PDA-based metal material whole-process tracing method
Patent Information
- Application Number
- CN202611429460.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-15
- Publication Date
- 2026-10-27
AI Technical Summary
1、本发明通过建立唯一追溯主标识,并在原料批次、在制品批次和成品批次之间建立继承映射,能够形成贯穿金属材料全流程的统一追溯主线,避免了不同阶段数据分散导致的链路断裂问题。
Smart Images

Figure CN122988633A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of metal material traceability technology, specifically to a method for full-process traceability of metal materials based on blockchain and PDA. Background Technology
[0002] Metal materials typically undergo multiple production stages, involving multiple responsible parties and multiple material carriers during the processes of raw material procurement, incoming inspection, material processing, workflow, quality inspection, packaging and warehousing, and logistics delivery. This is especially true in the production and processing of steel plates, coils, bars, wires, aluminum, copper, stainless steel components, and other metal materials, where batch splitting, batch merging, rework, repackaging, container changes, and multiple transfers frequently occur. This results in complex relationships between materials throughout the production process, making it difficult for traditional traceability methods to accurately and continuously describe the material evolution chain.
[0003] In existing technologies, traceability of metal materials typically relies on paper transfer slips, barcode labels, centralized databases, or internal enterprise information systems for recording. However, these solutions have the following shortcomings in practical applications.
[0004] First, the traceability system is not consistent. Raw material batches, work-in-process batches, and finished product batches are usually recorded separately in different business modules, lacking a unified traceability identifier that runs through the entire process. This often leads to problems such as interrupted traces or unclear correspondences when tracing back from finished products to the source of raw materials, or when searching for the destination of raw materials.
[0005] Secondly, complex batch evolution relationships are difficult to express accurately. For business scenarios such as batch splitting, one-to-many splitting, many-to-one merging, rework, and packaging conversion, traditional solutions often use flat ledger records, which can only save partial process information and cannot accurately describe the lineage relationship between different batches, thus affecting the accuracy of source analysis, destination analysis, and recall scope determination.
[0006] In addition, in the existing scheme, some work records rely on post-event recording or unilateral confirmation, failing to synchronously bind information such as material containers, handover parties, operators, workstation equipment, and time and location. Therefore, it is difficult to clearly define the responsible points when quality disputes occur.
[0007] Therefore, there is an urgent need for a full-process traceability method applicable to complex metal material circulation scenarios, in order to solve the problems of inconsistent traceability main lines, difficulty in accurately expressing complex batch evolution relationships, and unclear handover responsibility boundaries in existing technologies. Summary of the Invention
[0008] To address the aforementioned issues, this invention aims to propose a full-process traceability method for metal materials based on blockchain and PDA. By organically combining PDA on-site data collection, batch lineage mapping, process task release control, on-chain trusted evidence storage, and bidirectional anomaly traversal analysis, continuous and reliable traceability from raw materials to finished products and logistics delivery can be achieved. Furthermore, it can quickly and accurately determine the responsible node and the scope of affected batches when quality anomalies occur.
[0009] To achieve the above-mentioned technical objectives, the technical solution adopted by this invention is as follows: This invention proposes a method for end-to-end traceability of metallic materials based on blockchain and PDA, comprising the following steps: Establish a unique traceability master identifier for batches of raw materials, work-in-process, and finished products of metal materials, and generate process task tokens for the corresponding batches according to the preset process route; At the stages of raw material entry, material processing, batch splitting, batch merging, process transfer, quality inspection, packaging and warehousing, and logistics delivery, the PDA terminal reads the unique traceability master identifier and collects the source batch identifier, target batch identifier, process task token, material container identifier, operator identifier, time information, location information, and on-site business data to generate a batch status snapshot. Establish a lineage mapping edge between the source batch and the target batch based on the batch status snapshot, and perform summary calculation on the key fields, attachment summary, previous status commitment value and current process task token in the batch status snapshot to generate the current batch status commitment value; Submit the current batch status commitment value, the previous status commitment value, the bloodline mapping edge summary, the process task token status, and the handover and signing results to the blockchain network for evidence storage; The smart contract verifies the preconditions for completion of the process task token, batch conversion permissions, quantity conservation relationship and handover consistency. After the verification is passed, the lineage mapping edge status and the process task token status are updated, and the next process task token is released. During the handover of processes, the handover party and the receiving party shall respectively use PDA terminals to perform two-way signature on the same batch and the same material container, forming a handover confirmation record and binding it with a unique traceability master identifier; Upon receiving a traceability request or a quality anomaly request, the system retrieves the corresponding process task token execution trajectory, lineage mapping edge set, batch status commitment value index, and handover confirmation record based on the unique traceability master identifier. It then performs reverse source traversal and forward destination traversal, outputting the traceability results as well as the responsible nodes and affected batch ranges involved in the anomaly.
[0010] In some embodiments, the unique traceability master identifier is generated by encoding in the order of enterprise code, order number, material category code, furnace batch number, production batch number and serial number, and an inheritance mapping is established between raw material batches, work-in-process batches and finished product batches through parent-child association relationship; When batch splitting, batch merging, rework conversion, or packaging conversion occurs, the inheritance mapping relationship is updated through lineage mapping edges to ensure the continuous traceability of the same material chain at each stage of circulation.
[0011] In some embodiments, the process task token includes at least a token number, a batch identifier, a process number, a target workstation identifier, a target equipment identifier, a preceding token reference value, an allowed execution window, a responsible role identifier, and a token status. The token status includes at least the following states: pending execution, in execution, pending inspection, pending handover, released, completed, and locked. The smart contract releases the current process task token only when the preceding token is in the completed state and the corresponding handover confirmation record is valid.
[0012] In some embodiments, the batch status snapshot includes at least a unique traceability master identifier, source batch identifier, target batch identifier, process task token number, material container identifier, workstation identifier, equipment identifier, operator identifier, team identifier, start time, end time, work location, quantity information, key process parameters, quality inspection data, anomaly markers, and attachment index. The original attachment file corresponding to the attachment index is stored in the off-chain storage node and has a unique correspondence with the batch status snapshot.
[0013] In some embodiments, the lineage mapping edge is used to represent the material evolution relationship from the source batch to the target batch, including at least one-to-one sequence mapping edge, one-to-many splitting mapping edge, many-to-one merging mapping edge, one-to-one rework mapping edge, and one-to-one packaging mapping edge. The bloodline mapping edge records at least the source batch identifier, target batch identifier, conversion type, quantity information, loss value, timestamp, workstation identifier, equipment identifier, and witness signature information, wherein the witness signature information includes at least the operator's signature and the reviewer's signature.
[0014] In some embodiments, the current batch status commitment value is obtained by combining the unique traceability master identifier, process task token number, key field set, attachment summary, previous status commitment value and current effective lineage mapping edge summary in the batch status snapshot; The blockchain network should store at least the current batch state commitment value, the previous state commitment value, the process task token state, the lineage mapping edge summary, the handover confirmation record summary, and the storage time for subsequent consistency verification.
[0015] In some embodiments, the quantity conservation relationship verification performed by the smart contract includes: when the conversion type is a one-to-many split mapping edge, verifying whether the sum of the quantity value of each target batch and the loss value is consistent with the quantity value of the source batch; When the conversion type is a many-to-one merged mapping edge, check whether the sum of the quantity values of each source batch after deducting the loss value is consistent with the quantity value of the target batch. When the quantity conservation relationship verification fails, the corresponding lineage mapping edge and the corresponding process task token are locked, and subsequent process task tokens are prohibited from being released.
[0016] In some embodiments, the handover consistency verification includes: the handover party confirming the handover batch, handover container, handover quantity and handover time through a PDA terminal, and the receiving party confirming the receiving batch, receiving container and receiving quantity and receiving time through a PDA terminal; A valid handover confirmation record is generated when the information handed over matches the information received. A handover exception record is generated when the information handed over does not match the information received, and the current process task token of the corresponding batch is locked until the review is passed.
[0017] In some embodiments, the traceability results include at least the raw material source path, process execution path, batch splitting and merging path, quality inspection results, packaging and warehousing records, logistics delivery records, handover confirmation records, and on-chain status commitment value verification results. The reverse source traversal starts from the target finished product batch and recursively searches upstream along the lineage mapping edge to the raw material batch set, while the forward destination traversal starts from the specified raw material batch and recursively searches downstream along the lineage mapping edge to the finished product batch set and the logistics delivery node set.
[0018] In some embodiments, the determination of the responsible nodes and affected batches involved in the anomaly is as follows: taking the current process task token and the currently effective lineage mapping edge corresponding to the abnormal batch as the starting point of analysis, and combining the corresponding equipment identifier, workstation identifier, team identifier, operation window, handover confirmation record, quality inspection result and status commitment value continuity, a bidirectional traversal is performed on all upstream source batches and downstream destination batches to determine the set of affected batches, and the operator node, reviewer node, workstation node, equipment node and container node directly associated with the abnormal batch are determined as the set of responsible nodes.
[0019] By adopting the above technical solution, the present invention has the following beneficial effects compared with the prior art: 1. By establishing a unique traceability master identifier and establishing an inheritance mapping between raw material batches, work-in-process batches and finished product batches, this invention can form a unified traceability master line that runs through the entire process of metal materials, avoiding the problem of broken links caused by data dispersion at different stages.
[0020] 2. This invention combines batch state snapshots with lineage mapping edges to provide a structured description of complex batch evolution relationships such as one-to-one sequence conversion, one-to-many splitting, many-to-one merging, one-to-one rework, and one-to-one packaging conversion. This not only accurately expresses the source and destination relationships of metal materials in complex circulation processes, but also provides a clear data foundation for subsequent reverse source traversal and forward destination traversal, thereby significantly improving the traceability integrity and accuracy in complex metal material circulation scenarios.
[0021] 3. This invention uses process task tokens and smart contracts to jointly verify the completion conditions of the preceding process, batch conversion permissions, quantity conservation relationships, and handover consistency. This ensures that a batch can only enter the next process if the preceding process is completed, the handover is valid, the quantity matches, and the permissions are legal. This upgrades the traceability mechanism from a simple post-event recording to a process-controlled mechanism. It can promptly lock the corresponding batch and process when abnormal data occurs, preventing the abnormality from being passed on to the next process, thus improving the reliability of the traceability chain and the controllability of the production process.
[0022] 4. This invention uses a PDA terminal to collect batch identification, material containers, workstation equipment, operators, operation time, operation location and business data in real time on site. Combined with a two-way signature mechanism between the sender and receiver, a handover confirmation record is formed, which binds the traceability data with the actual operation behavior, the actual container flow and the actual personnel responsibility, thereby improving the authenticity, completeness and responsibility determination ability of the data collected on site.
[0023] 5. This invention generates the current batch status commitment value by performing combined digest calculation on key fields, attachment summaries, previous status commitment values, and lineage mapping edge summaries in the batch status snapshot. The current batch status commitment value, lineage mapping edge summaries, and handover confirmation record summaries are then submitted to the blockchain network for evidence storage. This achieves reliable preservation and continuous verification of key traceability data without increasing the on-chain storage burden, thereby improving the tamper-proof capability of traceability data and the credibility of evidence in subsequent dispute resolution.
[0024] 6. This invention constructs a directed graph composed of batch nodes and lineage mapping edges. When a quality anomaly occurs, it can perform reverse source traversal and forward destination traversal based on a unique traceability master identifier. Combined with equipment identifier, workstation identifier, team identifier, operation time window, handover confirmation record, quality inspection results, and the continuity of status commitment value, it can quickly determine the anomaly source path, anomaly propagation path, set of responsible nodes, and range of affected batches. This improves the efficiency of quality anomaly analysis, narrows the scope of investigation and recall, and reduces the cost of handling quality accidents. Attached Figure Description
[0025] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the accompanying drawings used in the description of the embodiments will be briefly introduced below.
[0026] Figure 1 This is a simplified flowchart of the end-to-end traceability method for metal materials based on blockchain and PDA according to the present invention. Figure 2 This is a schematic diagram illustrating the relationship between batch splitting, batch merging, rework conversion, and packaging conversion described by the bloodline mapping edge in this invention. Detailed Implementation
[0027] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be particularly noted that the following embodiments are for illustrative purposes only and do not limit the scope of the invention. Similarly, the following embodiments are only some, not all, embodiments of the present invention, and all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0028] This invention provides a blockchain and PDA-based end-to-end traceability method for metal materials, applicable to traceability management of steel plates, coils, bars, wires, aluminum, copper, stainless steel components, and other metal materials during raw material entry, material input and processing, process flow, quality inspection, packaging and warehousing, and logistics delivery. The method operates within a collaborative system comprised of PDA terminals, a business processing server, off-chain storage nodes, and blockchain nodes. Specifically, the PDA terminals are used for on-site identity authentication, batch identifier reading, material container reading, process data collection, and handover verification; the business processing server generates process task tokens, organizes batch status snapshots, establishes lineage mapping edges, and invokes smart contracts for verification; the off-chain storage nodes store original documents such as quality inspection reports, process records, on-site images, packaging lists, logistics vouchers, and handover attachments; and the blockchain nodes reliably store the current batch status commitment value, lineage mapping edge summary, process task token status, and handover confirmation record summary. Through the collaboration of these systems, a full-process traceability mechanism is achieved, storing business plaintext off-chain and key commitment information and summary information on-chain.
[0029] See attached document Figure 1 As shown, this embodiment provides a method for end-to-end traceability of metal materials based on blockchain and PDA, including the following steps: In this embodiment, a unified and unique traceability master identifier is first established for the metal materials entering the system. This unique traceability master identifier is generated by encoding the enterprise code, order number, material category code, furnace batch number, production batch number, and serial number in that order, and can be represented as follows: ; In this coding system, E represents the enterprise code, O represents the order number, C represents the material category code, F represents the furnace batch number, B represents the production batch number, and S represents the serial number. This coding method ensures that each raw material batch, work-in-process batch, and finished product batch has a unique and traceable identifier within the enterprise and during cross-process flow, guaranteeing their uniqueness and traceability.
[0030] For raw material batches generated upon arrival at the factory, a corresponding unique traceability master identifier is directly generated. For work-in-process and finished product batches, new batch identifiers are derived from the preceding batches, and their parent-child inheritance relationships are recorded in the business processing server. The parent-child inheritance relationship describes the inheritance mapping between preceding and subsequent batches. For example, suppose the source batch set is: The target batch set is The inheritance relationship between the two can be represented as follows: in, Used to describe the inheritance mapping relationship from previous batches to subsequent batches.
[0031] When subsequent batch splitting, batch merging, rework conversion, or packaging conversion occurs, the existing main identification system will not be changed. Instead, the inheritance mapping relationship will be updated through the subsequently established lineage mapping edge, thereby ensuring that the same material chain remains continuously traceable at different stages of circulation.
[0032] After establishing a unique traceability master identifier, process task tokens are generated for the corresponding batches according to the preset process route. For any batch P, its process route can be represented as follows: ,in, This represents the i-th process step. For each process step, the system generates a corresponding process task token. Each process task token must include at least the token number, batch identifier, process number, target workstation identifier, target equipment identifier, preceding token reference value, allowed execution window, responsible role identifier, and token status. A process task token can be represented as:
[0033] in, This indicates the token number, and P indicates the batch identifier. Indicates the process number. Indicates the target workstation identifier. Indicates the target device identifier. Indicates the reference value of the preceding token. Indicates that the execution window is allowed. Indicates the role of responsibility. The token status is indicated, which includes pending execution, in execution, pending verification, pending handover, released, completed, and locked.
[0034] By using process task tokens, process nodes are no longer isolated records, but rather form an execution chain with sequential dependencies. For the current process task token... Only when its preceding process task token When a process is in a completed state and the handover confirmation record corresponding to the previous process is valid, the smart contract allows the release of the task token for the current process, thereby preventing batches that have not completed the previous process or have not completed a valid handover from directly entering the next process.
[0035] PDA terminals are deployed for on-site data collection at various business nodes, including raw material receiving, material processing, batch splitting, batch merging, process transfer, quality inspection, packaging and warehousing, and logistics delivery. Operators first log in using the PDA terminal, and the system records their identification. Subsequently, the PDA terminal reads the unique traceability master identifier, process task token number, and material container identifier for the current batch. Based on the specific business scenario, it further collects data such as source batch identifier, target batch identifier, workstation identifier, equipment identifier, start time, end time, work location, quantity information, key process parameters, quality inspection data, anomaly markers, and attachment indexes, forming a snapshot of the batch status corresponding to the current business node.
[0036] The batch status snapshot includes at least the unique traceability master identifier, source batch identifier, target batch identifier, process task token number, material container identifier, workstation identifier, equipment identifier, operator identifier, team identifier, start time, end time, work location, quantity information, key process parameters, quality inspection data, anomaly markers, and attachment index, which can be represented as: Where I represents the unique traceability identifier, Indicates the source batch identifier. This indicates the target batch identifier, and T represents the process task token number. The symbols represent material container identifiers, W represents workstation identifiers, D represents equipment identifiers, U represents operator identifiers, and G represents work group identifiers. Indicates the start time. Indicates the end time, L represents the job location, and Q represents the quantity information. This represents the set of key process parameters. This indicates quality inspection data. This indicates an exception marker, and A indicates the attachment index.
[0037] The quantity information Q has different meanings in different business scenarios. For raw material receiving and ordinary process transfer scenarios, quantity information Q represents the net weight, number of pieces, or length information of the current batch; for one-to-many splitting scenarios, the quantity information includes both the source batch quantity and the quantity of each target batch; for many-to-one merging scenarios, the quantity information includes both the source batch quantity and the target batch quantity; for packaging and logistics delivery scenarios, the quantity information represents the number of boxes packed, the number shipped, and the number of items received. Key process parameter set. Configurations are based on the process type. For example, in heat treatment, heating temperature, holding time, and cooling method may be included; in rolling, rolling passes, reduction amount, and linear speed may be included; and in surface treatment, treatment solution concentration, surface roughness, and treatment time may be included. The quality inspection data may include dimensional deviations, hardness values, tensile strength, surface defect levels, and pass / fail results. Appendix Index A corresponds to the storage index of the original files in the off-chain storage node. The original files include raw material vouchers, quality inspection reports, process records, on-site images, packing lists, logistics documents, and receipts, etc.
[0038] After obtaining the batch status snapshot, the system further establishes a lineage mapping edge between the source batch and the target batch to describe the material evolution relationship of the metal material during the process flow. The lineage mapping edge records at least the source batch identifier, target batch identifier, conversion type, quantity information, loss value, timestamp, workstation identifier, equipment identifier, and witness signature information. Any lineage mapping edge can be represented as:
[0039] in, Indicates the source batch identifier. Indicates the target batch identifier. Indicates the conversion type. Indicates the quantity value of the source batch. Indicates the target batch quantity value. The values represent loss values, t represents timestamps, W represents workstation identifiers, and D represents equipment identifiers. This indicates the signature information being witnessed. (Type conversion) This includes one-to-one transposition mapping edges, one-to-many splitting mapping edges, many-to-one merging mapping edges, one-to-one rework mapping edges, and one-to-one wrapping mapping edges, as shown in the appendix. Figure 2 As shown. Witness signature information. At least the operator's signature is required. Signature of the reviewer ,Right now .
[0040] For critical transformation nodes such as splitting, merging, rework, and packaging conversion, it is preferable to require both the operator and the reviewer to complete signature confirmation via PDA terminals before the lineage mapping edge enters the pending state. Through the lineage mapping edge recording mechanism, complex relationships such as batch splitting, batch merging, rework, and packaging conversion can be organized into clear upstream and downstream evolutionary relationships. This overcomes the problem that flat ledgers cannot fully reconstruct the source and destination paths, providing a foundation for subsequent source tracing, destination tracking, and anomaly analysis.
[0041] After establishing the lineage mapping edge, the system further generates the current batch state commitment value. This current batch state commitment value characterizes the overall state of the current batch at the completion time of the current process node, enabling data integrity proof without directly writing all plaintext data to the blockchain.
[0042] Specifically, the unique traceability master identifier I, the process task token number T, and preset key fields are first extracted from the batch status snapshot. Secondly, calculate the attachment digest for the original attachment files stored off-chain. Then read the preceding state commitment value. and the current effective bloodline mapping edge summary Finally, the above content is concatenated to form the data string to be committed to: The current batch status commitment value is calculated using a preset digest algorithm. ;in, Represents a summary function. This indicates a data concatenation operation.
[0043] In this embodiment, the preset key fields include a unique traceability master identifier, source batch identifier, target batch identifier, process task token number, process number, material container identifier, equipment identifier, workstation identifier, operator identifier, start time, end time, quantity information, key process parameters corresponding to the current process, quality inspection conclusion, anomaly marker, and attachment summary value corresponding to the attachment index.
[0044] Since the generation of the current batch state commitment value introduces the previous state commitment value, a chain connection is formed between the current process state and the previous process state. This means that if the data of any previous node is tampered with, the state commitment value verification of all subsequent nodes will fail, thereby improving the state continuity and data integrity verification capabilities.
[0045] Subsequently, the system submits the current batch status commitment value, the previous status commitment value, the lineage mapping edge summary, the process task token status, and the handover confirmation record summary to the blockchain network for notarization, while the batch status flash message and its original attachment files continue to be stored in the off-chain storage node.
[0046] Data items stored in a blockchain network can be represented as: ;in, This indicates the committed value for the current batch status. This represents the commitment value of the preceding state. This represents a summary of the bloodline mapping edges. Indicates the current process task token status. This indicates a summary of the handover confirmation record. Indicates the blockchain storage time. The preferred method for generating the bloodline mapping edge digest is as follows:
[0047] The handover confirmation record summary is preferably generated in the following manner:
[0048] Where P represents the handover batch identifier. Indicates the identification of the handover container. Indicates the quantity handed over. Indicates the number of items received. Indicates the time to hand over. Indicates the receiving time. Indicates the identification of the personnel handing over the goods. This indicates the recipient's identification.
[0049] Subsequently, when consistency verification is required, the system rereads the off-chain snapshot data and original attachment files, recalculates the corresponding commitment value and summary information, and compares it with the on-chain evidence storage results to complete the consistency verification. In this way, while controlling the on-chain storage burden, it achieves reliable storage and tamper-proof verification of key traceability data.
[0050] To ensure that the workflow is controlled, the system calls the smart contract to perform pre-completion condition verification, batch conversion permission verification, quantity conservation relationship verification, and handover consistency verification on the current workflow task token.
[0051] The preceding completion condition verification is used to determine whether the task token of the preceding process is in a completed state, and whether the corresponding handover confirmation record of the preceding process is valid.
[0052] Batch conversion permission verification is used to determine whether the currently logged-in user has the permission to perform the current conversion type.
[0053] The quantity conservation check is used to ensure quantity consistency during splitting and merging processes. For one-to-many splitting scenarios, the system checks whether the sum of the quantity value of each target batch and the loss value is consistent with the quantity value of the source batch; for many-to-one merging scenarios, the system checks whether the sum of the quantity values of each source batch after deducting the loss value is consistent with the quantity value of the target batch.
[0054] Specifically, for a one-to-many splitting scenario, if the source batch quantity is... The quantity of each target batch is... The loss value is Then it should satisfy: , where n represents the total number of target batches; And define the splitting error as: ;when At that time, the split verification is considered to have passed, where, This indicates the allowable error threshold.
[0055] For many-to-one merging scenarios, if the quantity of each source batch is... The target batch quantity is The loss value is Then it should satisfy: , where m represents the total number of source batches; The merging error is defined as: ;when At that time, the merge verification is considered successful.
[0056] If the quantity conservation relationship verification fails, the corresponding bloodline mapping edge and the current process task token will be directly locked, and subsequent process task tokens will be prohibited from being released.
[0057] The handover consistency verification relies on comparing the handover information entered by both parties through their PDA terminals. When all the above verifications pass, the system updates the status of the current process task token to "completed" and releases the task token for the next process. If any verification fails, the current process task token is locked until it is manually reviewed and approved.
[0058] During the process handover, the party handing over the work confirms the handover batch, the handedover container, the handover quantity, and the handover time through its PDA terminal, thus creating a handover record. The recipient confirms the batch, container, quantity, and time of receipt via another PDA terminal, thus creating a receipt record. Where P represents the handover batch identifier. Indicates the identification of the handover container. Indicates the quantity handed over. Indicates the number of items received. Indicates the time to hand over. Indicates the receiving time. Indicates the identification of the personnel handing over the goods. This indicates the recipient's identification.
[0059] The system performs consistency checks on handover and receipt records, prioritizing consistency in the handover batches, containers, quantities handed over and received, and handover and receipt times within the allowable time difference. When all of these criteria are met, a valid handover confirmation record is generated and bound to a unique traceability identifier. A summary of the handover confirmation record is also generated and written to the blockchain. Conversely, if inconsistencies exist, a handover anomaly record is generated, and the current process task token is locked until verification is successful.
[0060] Specifically, the system performs a consistency check on the handed-out and received records, and preferably defines the handover consistency function as follows:
[0061] in, This indicates the allowed handover time difference threshold. When When a valid handover confirmation record is generated, it is bound to a unique traceability identifier, and a summary of the handover confirmation record is generated and written to the blockchain; when If an error occurs, a handover exception record is generated, and the current process task token is locked until it passes review. Through a two-way signature mechanism, the four key dimensions of batch, container, quantity, and time are bound to the same handover action, thereby improving the authenticity of handover data and the ability to define responsibilities.
[0062] When the system receives a traceability request or a quality anomaly request, it uses the corresponding unique traceability master identifier as the entry point to retrieve the set of process task token execution trajectories corresponding to that batch. Bloodline mapping edge set Batch Status Commitment Value Index and handover confirmation record And construct a directed relational structure graph of all batch nodes and lineage mapping edges. , where V represents the set of batch nodes and E represents the set of bloodline mapping edges.
[0063] For a target finished product batch node, the system searches all its source nodes level by level along the upstream associated path until it reaches the raw material batch node set, forming a reverse source path. For a specified raw material batch node, the system searches all its destination nodes level by level along the downstream associated path until it reaches the finished product batch node and the logistics delivery node, forming a forward destination path.
[0064] Specifically, for the target finished product batch node The system recursively searches all upstream nodes along the incoming edges of the directed relational graph until it reaches the raw material batch node set, thus forming a reverse source path: ;in, This refers to the raw material batch node. For a specified raw material batch node... The system recursively searches all downstream nodes along the outgoing edges of the directed relational graph until it reaches the finished product batch node and the logistics delivery node, thus forming a forward path: .
[0065] By traversing the source in reverse order, we can determine all the sources of raw materials for the target finished product and their intermediate evolution paths; by traversing the destination in forward order, we can determine the final set of finished product batches, packaging nodes, and logistics delivery nodes formed by a certain batch of raw materials.
[0066] During the traceability process, the system further rereads the off-chain batch status snapshots and original attachment files of key batch nodes, recalculates the current batch status commitment value, and compares it with the on-chain stored value to complete consistency verification. When the comparison results are consistent, it indicates that the business data of the corresponding batch node has not been tampered with since being uploaded to the chain; when the comparison results are inconsistent, it indicates that there is a data anomaly in the corresponding node. Based on the above traversal and verification, the traceability results output by the system include at least the raw material source path, process execution path, batch splitting and merging path, quality inspection results, packaging and warehousing records, logistics delivery records, handover confirmation records, and on-chain status commitment value verification results.
[0067] When an abnormal batch is detected, the analysis starts from its current process task token and currently active lineage mapping edge. It then performs a bidirectional traversal of all upstream source batches and downstream destination batches, combining equipment identifiers, workstation identifiers, team identifiers, operation time windows, handover confirmation records, quality inspection results, and the continuity of status commitment values. To improve the accuracy of determining the scope of the abnormality's impact, a comprehensive risk assessment is conducted on related batches based on equipment homogeneity, workstation homogeneity, team homogeneity, overlap of operation time windows, correlation of handover containers, and similarity of quality inspection anomalies. When the comprehensive risk of a certain related batch reaches a preset threshold, it is included in the set of affected batches. Simultaneously, the operator nodes, reviewer nodes, workstation nodes, equipment nodes, and container nodes directly associated with the abnormal batch constitute a set of responsible nodes.
[0068] Specifically, in this embodiment, a risk scoring function is further defined: ; in, This indicates the equipment's originability index; if related batches... If the batch was processed by the same equipment as the abnormal batch, take 1; otherwise, take 0. This indicates the workstation homogeneity index; if related batches... If the batch is processed at the same workstation as the abnormal batch, take 1; otherwise, take 0. This indicates the commonality index of work groups, if related batches. If the batch is processed by the same work group as the abnormal batch, take 1; otherwise, take 0. The index representing the degree of overlap in operation time windows is determined based on the proportion of the overlapping start and end times of the corresponding processes in the associated batch to the total operation time. This indicates the associated metrics for the handover containers, if associated with a batch. If the same material container was used with the abnormal batch, return 1; otherwise, return 0. The quality inspection anomaly similarity index is determined based on the degree of consistency between the associated batch and the abnormal batch in terms of abnormal test items, anomaly levels, and the direction of deviation of test results. For example, if an abnormal batch shows a low hardness value and an anomaly level of 2 in the hardness test, and an associated batch also shows a low hardness value and the same or similar anomaly level in the hardness test, then the quality inspection anomaly similarity index between the associated batch and the abnormal batch is determined to be high. If the anomalies in the associated batches occur in different test items, or although they are in the same test item but the direction of deviation of the test results is opposite, then the quality inspection anomaly similarity index is determined to be low. to Assign weights to each indicator, satisfying:
[0069] when At that time, batch nodes Included in the affected batch set: ;in, This indicates the risk threshold. Simultaneously, the operator node, reviewer node, workstation node, equipment node, and container node directly associated with the abnormal batch constitute a set of responsibility nodes: .
[0070] Accordingly, the system can simultaneously output the source path of the anomaly, the propagation path of the anomaly, the set of affected batches, and the set of responsible nodes in the case of quality anomalies, thereby supporting enterprises to perform subsequent re-inspection, isolation, recall, and responsibility tracing.
[0071] The following uses a steel plate processing scenario as an example to illustrate the implementation process of this invention. A steel plate company receives a batch of raw steel coils. The system first generates a unique traceability master identifier for the raw steel coils. And generate unwinding process task tokens sequentially according to the process route. Cutting process task token Heat treatment process task token Quality inspection process task token Packaging process task token and shipping process task token During the unwinding process, operators scan using a PDA terminal. The corresponding process task tokens and material container identifiers are used to enter data such as equipment number, workstation number, operation time, and net weight, forming a batch status snapshot. And generate the current batch status commitment value. In the slitting process, the raw steel coils are slit into three intermediate batches. and The system establishes a one-to-many splitting mapping edge based on the data collected on site, and verifies it. If the quantity conservation relationship holds, then the task token for subsequent processes is released. In the heat treatment process, batches... and The target batch is formed by merging products processed in the same heat treatment equipment. The system establishes a many-to-one merged mapping edge based on this and verifies it. .
[0072] During the quality inspection process, quality inspectors use PDA terminals to input quality inspection data such as hardness values, dimensional deviations, and surface quality conclusions, and upload the corresponding quality inspection report attachment index. The system generates a new status commitment value and completes on-chain notarization. In the packaging and shipping processes, the sender and receiver each use PDA terminals to perform two-way signatures, confirming the handover batch, handover container, handover quantity, and handover time. If the comparison matches, a valid handover confirmation record is generated and submitted to the blockchain. If the customer subsequently requests confirmation of the finished product batch... If an objection to abnormal hardness is raised, the system can immediately respond. Perform a reverse source traversal for the target node to determine its origin from the raw material batch. The specific evolutionary path after slitting and heat treatment; simultaneously, based on raw material batches. Starting from the raw material batch, a forward traversal is performed to identify all downstream finished product batches related to that batch. Then, a risk score is calculated by combining factors such as equipment homogeneity, workstation homogeneity, shift homogeneity, overlap of operation windows, correlation of handover containers, and similarity of detection anomalies. Batches exceeding the threshold are included in the affected batch set, and the corresponding heat treatment equipment node, workstation node, operator node, and reviewer node are included in the responsibility node set.
[0073] In summary, this invention constructs a full-process traceability technology system suitable for complex metal material circulation scenarios through the coordinated use of a unique traceability master identifier, process task token, batch status snapshot, lineage mapping edge, current batch status commitment value, bidirectional handover signature, and reverse source traversal and forward destination traversal. This technology system not only ensures the authenticity of on-site data collection, the controllability of process flow, and the tamper-proof nature of key records, but also can quickly and accurately output the source path, destination path, responsible node, and affected batch range in the event of quality anomalies, demonstrating significant engineering implementation value and promising prospects for widespread application.
[0074] Furthermore, the functional units in the embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods of the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0075] The above description is only a part of the embodiments of the present invention and does not limit the scope of protection of the present invention. Any equivalent device or equivalent process transformation made based on the content of the present invention specification and drawings, or direct or indirect application in other related technical fields, are similarly included within the patent protection scope of the present invention.
Claims
1. A method for end-to-end traceability of metallic materials based on blockchain and PDA, characterized in that, Includes the following steps: Establish a unique traceability master identifier for batches of raw materials, work-in-process, and finished products of metal materials, and generate process task tokens for the corresponding batches according to the preset process route; At the stages of raw material entry, material processing, batch splitting, batch merging, process transfer, quality inspection, packaging and warehousing, and logistics delivery, the PDA terminal reads the unique traceability master identifier and collects the source batch identifier, target batch identifier, process task token, material container identifier, operator identifier, time information, location information, and on-site business data to generate a batch status snapshot. Establish a lineage mapping edge between the source batch and the target batch based on the batch status snapshot, and perform summary calculation on the key fields, attachment summary, previous status commitment value and current process task token in the batch status snapshot to generate the current batch status commitment value; Submit the current batch status commitment value, the previous status commitment value, the bloodline mapping edge summary, the process task token status, and the handover and signing results to the blockchain network for evidence storage; The smart contract verifies the preconditions for completion of the process task token, batch conversion permissions, quantity conservation relationship and handover consistency. After the verification is passed, the lineage mapping edge status and the process task token status are updated, and the next process task token is released. During the handover of processes, the handover party and the receiving party shall respectively use PDA terminals to perform two-way signature on the same batch and the same material container, forming a handover confirmation record and binding it with a unique traceability master identifier; Upon receiving a traceability request or a quality anomaly request, the system retrieves the corresponding process task token execution trajectory, lineage mapping edge set, batch status commitment value index, and handover confirmation record based on the unique traceability master identifier. It then performs reverse source traversal and forward destination traversal, outputting the traceability results as well as the responsible nodes and affected batch ranges involved in the anomaly.
2. The method for full-process traceability of metal materials based on blockchain and PDA according to claim 1, characterized in that, The unique traceability master identifier is generated in the order of enterprise code, order number, material category code, furnace batch number, production batch number and serial number, and an inheritance mapping is established between raw material batches, work-in-process batches and finished product batches through parent-child association relationship; When batch splitting, batch merging, rework conversion, or packaging conversion occurs, the inheritance mapping relationship is updated through lineage mapping edges to ensure the continuous traceability of the same material chain at each stage of circulation.
3. The method for full-process traceability of metal materials based on blockchain and PDA according to claim 1, characterized in that, The process task token includes at least the token number, batch identifier, process number, target workstation identifier, target equipment identifier, preceding token reference value, allowed execution window, responsible role identifier, and token status; The token status includes at least the following states: pending execution, in execution, pending inspection, pending handover, released, completed, and locked. The smart contract releases the current process task token only when the preceding token is in the completed state and the corresponding handover confirmation record is valid.
4. The method for full-process traceability of metal materials based on blockchain and PDA according to claim 1, characterized in that, The batch status snapshot includes at least the unique traceability master identifier, source batch identifier, target batch identifier, process task token number, material container identifier, workstation identifier, equipment identifier, operator identifier, team identifier, start time, end time, work location, quantity information, key process parameters, quality inspection data, anomaly markers, and attachment index. The original attachment file corresponding to the attachment index is stored in the off-chain storage node and has a unique correspondence with the batch status snapshot.
5. The method for full-process traceability of metal materials based on blockchain and PDA according to claim 1, characterized in that, The lineage mapping edge is used to represent the material evolution relationship from the source batch to the target batch, and includes at least one-to-one sequence mapping edge, one-to-many splitting mapping edge, many-to-one merging mapping edge, one-to-one rework mapping edge, and one-to-one packaging mapping edge. The bloodline mapping edge records at least the source batch identifier, target batch identifier, conversion type, quantity information, loss value, timestamp, workstation identifier, equipment identifier, and witness signature information, wherein the witness signature information includes at least the operator's signature and the reviewer's signature.
6. The method for full-process traceability of metal materials based on blockchain and PDA according to claim 1, characterized in that, The current batch status commitment value is calculated by combining the unique traceability master identifier, process task token number, key field set, attachment summary, previous status commitment value and current effective lineage mapping edge summary in the batch status snapshot; The blockchain network should store at least the current batch state commitment value, the previous state commitment value, the process task token state, the lineage mapping edge summary, the handover confirmation record summary, and the storage time for subsequent consistency verification.
7. The method for full-process traceability of metal materials based on blockchain and PDA according to claim 1, characterized in that, The quantity conservation relationship verification of the smart contract execution includes: when the conversion type is a one-to-many split mapping edge, verifying whether the sum of the quantity value of each target batch and the loss value is consistent with the quantity value of the source batch; When the conversion type is a many-to-one merged mapping edge, check whether the sum of the quantity values of each source batch after deducting the loss value is consistent with the quantity value of the target batch. When the quantity conservation relationship verification fails, the corresponding lineage mapping edge and the corresponding process task token are locked, and subsequent process task tokens are prohibited from being released.
8. The method for full-process traceability of metal materials based on blockchain and PDA according to claim 1, characterized in that, The handover consistency verification includes: the handover party confirming the handover batch, handover container, handover quantity and handover time through a PDA terminal, and the receiving party confirming the receiving batch, receiving container and receiving quantity and receiving time through a PDA terminal; A valid handover confirmation record is generated when the information handed over matches the information received. A handover exception record is generated when the information handed over does not match the information received, and the current process task token of the corresponding batch is locked until the review is passed.
9. The method for full-process traceability of metal materials based on blockchain and PDA according to claim 1, characterized in that, The traceability results include at least the raw material source path, process execution path, batch splitting and merging path, quality inspection results, packaging and warehousing records, logistics delivery records, handover confirmation records, and on-chain status commitment value verification results. The reverse source traversal starts from the target finished product batch and recursively searches upstream along the lineage mapping edge to the raw material batch set, while the forward destination traversal starts from the specified raw material batch and recursively searches downstream along the lineage mapping edge to the finished product batch set and the logistics delivery node set.
10. The method for full-process traceability of metal materials based on blockchain and PDA according to claim 1, characterized in that, The method for determining the responsible nodes and affected batches involved in the anomaly is as follows: taking the current process task token and the currently effective lineage mapping edge corresponding to the abnormal batch as the starting point of analysis, and combining the corresponding equipment identifier, workstation identifier, team identifier, operation window, handover confirmation record, quality inspection results and status commitment value continuity, a bidirectional traversal is performed on all upstream source batches and downstream destination batches to determine the set of affected batches, and the operator node, reviewer node, workstation node, equipment node and container node directly associated with the abnormal batch are determined as the set of responsible nodes.