A Blockchain-Based End-to-End Traceability Method and System for Capacitors

By establishing digital threads and challenge indexes for capacitors using blockchain technology, the problem of unique identification during capacitor sample return was solved, enabling accurate after-sales responsibility attribution even under conditions of missing packaging.

CN122199008BActive Publication Date: 2026-07-17GUANGDONG SHUNRONG ELECTRIC

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
GUANGDONG SHUNRONG ELECTRIC
Filing Date
2026-05-15
Publication Date
2026-07-17

AI Technical Summary

Technical Problem

When capacitor samples are returned and the original packaging is missing, the circulation process is complex, and the samples may have undergone disassembly and relabeling, existing technologies make it difficult to verify whether the returned samples belong to the original delivered items, leading to difficulties in after-sales responsibility attribution.

Method used

By establishing a digital thread for the target capacitor and generating an on-chain challenge index based on the blockchain, the consistency of bit value, position, and source is verified by using the multi-source fields of the returned sample and the check string corresponding to the challenge index. This achieves the unique and continuous correspondence between the returned sample and the original delivery object.

Benefits of technology

In scenarios where the original packaging is missing, it can relatively improve the uniqueness of sample identification, reduce the risk of mistakenly connecting to the original object's link, and ensure the accuracy and verifiability of after-sales responsibility attribution.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122199008B_ABST
    Figure CN122199008B_ABST
Patent Text Reader

Abstract

This invention discloses a blockchain-based method and system for full-process traceability of capacitors, specifically relating to the fields of product traceability and blockchain traceability technology. The method includes acquiring historical records of the target capacitor during production, inspection, packaging, and delivery; concatenating the work order number, workstation number, inspection sequence number, packaging sequence number, and delivery sequence number corresponding to the same target capacitor in chronological order to generate a digital thread corresponding to the target capacitor and outputting the historical chain; establishing a digital thread for the target capacitor spanning production, inspection, packaging, and delivery; generating an on-chain challenge index based on the historical chain; and then using the multi-source fields of the returned sample and the verification string corresponding to the challenge index to perform position value, position, and source consistency verification to achieve a unique and continuous correspondence between the returned sample and the original delivered object.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of product traceability and blockchain traceability technology, and more specifically, to a blockchain-based method and system for full-process traceability of capacitors. Background Technology

[0002] In the traceability and after-sales accountability of capacitor products, existing technologies mainly focus on matching returned samples with existing delivery records after the product leaves the factory, based on batch identification, component inkjet printing, packaging labels, order information, testing records, and circulation ledgers. In engineering, relevant records are usually kept separately by each link of production, inspection, warehousing, and after-sales. After a failure complaint occurs, the source of the sample is determined by system retrieval, label verification, appearance inspection, and parameter retesting. Taking the after-sales return of capacitors in industrial control power boards, vehicle electronic units, or communication power components as an example, faulty samples are often handed over by customers, repair stations, or third-party laboratories after the whole machine is disassembled. The original packaging is usually missing, and the external labels may have been re-pasted. The samples may also be temporarily stored or returned together with other devices of the same model. At the same time, the company must give a clear conclusion on whether the sample can be matched with the historical delivery object without relying on the customer to completely retain the original packaging and original shipping form. In this situation, the existing identification methods repeatedly exhibit the following phenomenon: although returned samples can correspond to historical records in terms of batch number, label, specification information, or test results, once the process of compensation negotiation, liability division, third-party identification, or supply chain accountability is initiated, it is still difficult for enterprises to prove that the sample is the original device delivered, rather than a similar sample that was replaced, mixed in, or re-merged during subsequent circulation. The reason for this is that most of the existing evidence can only support the judgment that the current sample matches the historical delivery record, but cannot support the determination that the current sample has a unique and continuous correspondence with the historical delivery object. The technical problem this application aims to solve is: how to make a verifiable and unique determination as to whether a returned capacitor sample belongs to the original delivery object under the conditions that the original packaging is missing, the circulation process is complex, and the sample may have undergone disassembly and relabeling. Summary of the Invention

[0003] To overcome the aforementioned deficiencies of the prior art, embodiments of the present invention provide a blockchain-based method and system for full-process traceability of capacitors. By establishing a digital thread for the target capacitor that runs through the production, inspection, packaging, and delivery stages, and generating an on-chain challenge index based on the historical chain, the system then uses the multi-source fields of the returned sample and the verification string corresponding to the challenge index to perform bit value, position, and source consistency verification, thereby achieving a unique and continuous correspondence between the returned sample and the original delivered object, thus solving the problems mentioned in the background art.

[0004] To achieve the above objectives, the present invention provides the following technical solution: a blockchain-based method for end-to-end traceability of capacitors, comprising: S1. Obtain the historical records of the target capacitor during the production, inspection, packaging and delivery stages. Serialize the work order number, work station number, inspection sequence number, packaging sequence number and delivery sequence number corresponding to the same target capacitor in chronological order to generate the digital thread corresponding to the target capacitor and output the historical chain. S2. For the historical chain, extract the reserved field groups from the production record, inspection record and packaging record respectively, perform cross-biting and sequential concatenation in a fixed order of production first, inspection in the middle and packaging last to generate a verification string, write the summary value, field order and on-chain number of the verification string into the blockchain, and output the challenge index. S3. Obtain the return record corresponding to the return sample, retrieve the corresponding challenge index from the blockchain based on the delivery number, packaging number and model identifier in the return record, retrieve the corresponding field position and verification string, and output the verification string; S4. For the returned sample, read the sample field values ​​corresponding to the field position in the sample body, returned packaging and returned record respectively, perform same-position value taking and sequential splicing according to the field position to generate a response string, and perform position-by-position comparison, position comparison and source comparison between the response string and the string to be verified, and output the verification result. S5. Perform identity claiming on the verification results. When the response string and the string to be verified are consistent in every bit, in the same position, and in the same source, connect the return sample to the target capacitor corresponding to the digital thread and output the claiming result. If there is any inconsistency, transfer the return sample to the verification chain and output the unclaimed result.

[0005] In a preferred embodiment, S1 includes: S11. Obtain the historical records of the target capacitor during the production, inspection, packaging and delivery stages, extract the corresponding record items according to the work order number, work station number, inspection sequence number, packaging sequence number and delivery sequence number, and output the thread candidate group. S12. For the thread candidate group, perform reverse tracing based on the packaging sequence number corresponding to the delivery sequence number, the detection sequence number corresponding to the packaging sequence number, the workstation number corresponding to the detection sequence number, and the work order number corresponding to the workstation number to generate a unique thread sequence corresponding to the target capacitor and output the digital thread. S13. For digital threads, perform sequential writing in the order of production first, inspection in the middle, packaging last, and delivery last to generate the historical chain corresponding to the target capacitor.

[0006] In a preferred embodiment, S2 includes: S21. Extract the field position values, field source values, and field inheritance values ​​corresponding to the production records, inspection records, and packaging records in the historical chain. Construct a field position matrix, a field inheritance matrix, and a field differentiation matrix. Perform singular value decomposition on the field position matrix and delete column vectors with singular values ​​of zero. Perform matrix multiplication on the field inheritance matrix and the field differentiation matrix to generate a field cost matrix. Then perform bipartite matching and regularized linear solution on the field cost matrix and output the retained field group and the initial field position order.

[0007] In a preferred embodiment, S2 further includes: S22. Read the reserved field group and the initial field position, perform segmented position extraction according to the fixed order of production record, inspection record and packaging record, generate the initial segment string, perform cross-transposition, circular shift and interleaved insertion on the initial segment string in sequence to form a candidate check string group, delete each field position in each candidate check string and calculate the edit distance sequence, same source concatenation sequence and source switching sequence after deletion, retain the first candidate check string number after the edit distance sequence is sorted in descending order, and the candidate check string with the same first candidate check string number after the source switching sequence is sorted in descending order and the same first candidate check string number after the same source concatenation sequence is sorted in ascending order, output the target check string and the target field position. S23. Based on the target verification string and the target field position, perform grouped polynomial coding and cyclic redundancy check according to the target field position to generate a coding string. Perform hash mapping on the coding string to obtain a digest value. Write the challenge index, composed of the digest value, the target field position, and the on-chain number, into the blockchain and output the challenge index.

[0008] In a preferred embodiment, S3 includes: S31. Extract the delivery sequence number, packaging sequence number, and model identifier from the return record, construct delivery search terms, packaging search terms, and model search terms, perform on-chain traversal and join verification in the order of delivery sequence number corresponding to packaging sequence number and packaging sequence number corresponding to model identifier, and output candidate index groups; S32. Retrieve the field position order, check string, and chain number corresponding to each candidate index in the candidate index group, construct the position order correspondence table and the string-position mapping table, perform bit-by-bit alignment on the position order correspondence table, perform bit-to-bit association expansion on the string-position mapping table, delete candidate indexes with non-contiguous field position order, non-corresponding check string bit length, and broken chain number, and output the target index. S33. Obtain the field position order and verification string corresponding to the target index, perform string rearrangement and order restoration according to the field position order, and generate the verification string.

[0009] In a preferred embodiment, S4 includes: S41. For the sample body field, reflow packaging field and reflow record field in the reflow sample, construct the sample value matrix, source label matrix and position constraint matrix according to the field position order. Perform missing mark on the sample value matrix, perform column vector labeling processing on the source category in the source label matrix according to the number of source categories, and then perform integer constraint solution with the position constraint matrix as the equality constraint term and the number of missing and cross-source jumps as the joint cost term, and output the same position field group and candidate response segment group.

[0010] In a preferred embodiment, S4 further includes: S42. Based on the candidate response segment group and the string to be checked, the candidate response segment group is sequentially concatenated according to the field position order to generate a candidate response string group. For each candidate response string, a positional difference matrix, a position offset matrix and a source correspondence matrix are constructed respectively. Hamming distance is calculated according to the positional difference matrix. Edit distance is recursively calculated according to the position offset matrix. Conditional independent decomposition and posterior consistency update are performed according to the source correspondence matrix. Then, conflict resolution is performed according to the retention rules that Hamming distance is zero, edit distance is zero and each row and column of the source correspondence matrix contains only one source tag. The target response string and intermediate check table are output. S43. Read the target response string, intermediate verification table, and string to be verified. Construct a joint verification vector based on the target response string and the string to be verified. Perform convolution verification and cyclic redundancy verification on the joint verification vector to generate position value verification result, position order verification result, and source verification result. Then write the position value verification result, position order verification result, and source verification result into the verification result table according to the field position order, and output the verification result.

[0011] In a preferred embodiment, S5 includes: S51. Based on the position value verification item, position verification item and source verification item in the verification results, construct a sample claim table, and write the position value verification item, position verification item and source verification item into the corresponding field row according to the field position order, and output the claim judgment table. S52. Based on the claim determination table, check the position value verification item, position verification item and source verification item in each field row according to the field position order. When all field rows are consistent at the same time, generate a claim establishment flag. When there is an inconsistency in any field row, generate a claim blocking flag and output the determination flag.

[0012] In a preferred embodiment, S5 further includes: S53. Retrieve the judgment mark, return sample identifier and digital thread identifier. When the judgment mark is the claim establishment mark, write the return sample identifier into the last bit of the target capacitor node corresponding to the digital thread and establish a return access edge, generate the claim link, and output the claim result. S54. Based on the judgment mark, the return sample identifier, and the target chain identifier, when the judgment mark is the claim blocking mark, write the return sample identifier into the target chain and cut off its access relationship with the target capacitor node corresponding to the digital thread, generate the target chain, and output the unclaimed result.

[0013] A blockchain-based end-to-end traceability system for capacitors, comprising a chain-building module, an indexing module, a retrieval module, a verification module, and a claiming module: The chain building module is used to obtain the historical records of the target capacitor in the production, inspection, packaging and delivery stages. It concatenates the work order number, work station number, inspection sequence number, packaging sequence number and delivery sequence number corresponding to the same target capacitor in chronological order to generate the digital thread corresponding to the target capacitor and output the historical chain. The index module is used to extract the reserved field groups from the production record, inspection record and packaging record respectively for the historical chain, perform cross-biting and sequential concatenation in a fixed order of production first, inspection in the middle and packaging last to generate a check string, write the summary value, field order and on-chain number of the check string into the blockchain, and output the challenge index. The retrieval module is used to obtain the reflux record corresponding to the reflux sample, retrieve the corresponding challenge index from the blockchain based on the delivery serial number, packaging serial number and model identifier in the reflux record, retrieve the corresponding field position and verification string, and output the string to be verified. The verification module is used to read the sample field values ​​corresponding to the field position in the sample body, reflow packaging and reflow record for the reflowed sample, perform same-position value taking and sequential concatenation according to the field position, generate a response string, and perform position-by-position comparison, position comparison and source comparison between the response string and the string to be verified, and output the verification result. The claim module is used to claim the identity of the verification results. When the response string and the string to be verified are consistent in every position, order, and source, the return sample is connected to the target capacitor corresponding to the digital thread and the claim result is output. If any inconsistency exists, the return sample is transferred to the verification chain and the unclaimed result is output.

[0014] The technical effects and advantages of this invention are as follows: 1. This solution establishes a digital thread for the target capacitor and performs bit-by-bit, position-by-position, and source verification on the response string of the returned sample and the string to be verified on the chain. This can advance the record matching into continuous correspondence identification, thereby improving the unique identification capability of the sample in the scenario of missing original packaging. 2. By filtering and retaining field groups from production records, inspection records, and packaging records and generating challenge indexes, key acceptance information can be retained without directly disclosing the complete historical history, thus balancing the verification basis required for subsequent claims with the usage boundaries of the historical chain; 3. Perform on-chain traversal and join verification according to delivery serial number, packaging serial number and model identifier, and filter out invalid indexes by combining field positional continuity and on-chain number continuity, which can relatively reduce the probability of returning samples finding non-corresponding challenge indexes; 4. A unified positional constraint is constructed for the sample body field, the reflux packaging field, and the reflux record field, and conflict resolution is performed between fields from multiple sources, which can relatively suppress the direct interference of a single label, a single record, or a local field anomaly on the claiming results; 5. Write the position value verification result, position verification result, and source verification result into the claim judgment table, and use this to distinguish between digital thread access and the chain to be verified. This enables the after-sales responsibility attribution, review processing and formal claim to be executed separately, reducing the risk of mistakenly accessing the original object's chain. Attached Figure Description

[0015] Figure 1 This is a flowchart outlining the method steps of the present invention; Figure 2 This is a schematic diagram of the system module structure of the present invention. Detailed Implementation

[0016] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0017] Refer to the instruction manual appendix Figure 1-2 The present invention provides a blockchain-based method for end-to-end traceability of capacitors, comprising: S1. Obtain the historical records of the target capacitor during the production, inspection, packaging and delivery stages. Serialize the work order number, work station number, inspection sequence number, packaging sequence number and delivery sequence number corresponding to the same target capacitor in chronological order to generate the digital thread corresponding to the target capacitor and output the historical chain. In this embodiment, S1 is used to gather the record items scattered in the production, inspection, packaging, and delivery stages into a continuous object chain corresponding to the same target capacitor, and write this continuous object chain into the traceability structure in a fixed order to avoid object mixing, stage disconnection, and order reversal when the challenge index is subsequently established. Specifically, firstly, the record items corresponding to the target capacitor are extracted from the records of each stage; then, a unique thread sequence is determined in reverse based on the continuity relationship between delivery sequence number, packaging sequence number, inspection sequence number, workstation number, and work order number; finally, this unique thread sequence is written into the historical chain in a unified order, providing a unique source basis for subsequent extraction of reserved field groups and generation of verification strings. This implementation process includes the following steps: The purpose of S11 is to extract the minimum record unit required for subsequent follow-up from the history of multiple stages and to establish a thread candidate basis for the same target capacitor; the input quantities are production record, inspection record, packaging record and delivery record, wherein the production record includes at least the work order number, work station number, production time and work-in-process object identifier, the inspection record includes at least the inspection sequence number, source work station number, inspection time and inspected object identifier, the packaging record includes at least the packaging sequence number, source inspection sequence number, packaging time and packaging object identifier, and the delivery record includes at least the delivery sequence number, source packaging sequence number, delivery time and delivery object identifier; Starting with the target capacitor's delivery object identifier, extract the corresponding delivery serial number and its source packaging serial number from the delivery record. Then, based on the source packaging serial number, extract the corresponding packaging serial number and its source inspection serial number from the packaging record. Next, based on the source inspection serial number, extract the corresponding inspection serial number and its source workstation number from the inspection record. Finally, based on the source workstation number, extract the corresponding workstation number and its associated work order number from the production record. Write the work order number record, workstation number record, inspection serial number record, packaging serial number record, and delivery serial number record into the thread candidate list according to field category, output the thread candidate list, and make it available for S12 to read. If no corresponding record is found in any step, write a missing record flag and stop the current target capacitor's follow-up processing. If multiple record items correspond to the same source value, retain the first record item in ascending order of recording time and write the remaining record items into the conflict record table. The purpose of S12 is to use the connection relationship of each record item in the thread candidate group to solve the unique thread sequence of the same target capacitor, so as to avoid mistakenly connecting the link records of different objects to the same digital thread in the future; the input is the thread candidate group; first, read the source packaging number in the delivery sequence number record item and check whether the source packaging number is consistent with the packaging number in the packaging sequence number record item, then read the source detection number in the packaging sequence number record item and check whether the source detection number is consistent with the detection number in the detection sequence number record item, then read the source workstation number in the detection sequence number record item and check whether the source workstation number is consistent with the workstation number in the workstation number record item, and finally read the work order number in the workstation number record item and check whether the work order number is consistent with the work order number in the work order number record item. When all checks are successful, a unique thread sequence is generated by concatenating the work order number, workstation number, inspection sequence number, packaging sequence number, and delivery sequence number. The unique thread sequence is written into the digital thread, and the digital thread is output for S13 to read. If any acceptance check is unsuccessful, a disconnection flag is written and the current thread candidate group is transferred to the abnormal thread table. If two or more acceptance results are successful at a certain level, candidate numbers are generated in the order of the fields, and the first item in ascending order is retained as the input of the unique thread sequence. The remaining candidates are written into the parallel candidate table. The purpose of S13 is to convert the digital thread into a historical chain that can be directly called by subsequent steps, and to fix the order of the steps to ensure that the extraction of retained fields and the creation of challenge indexes are based on the same writing order. The input is the digital thread. First, the work order number, workstation number, inspection sequence number, packaging sequence number and delivery sequence number are read from the digital thread in sequence. Then, the sequential writing is performed in a fixed order of production first, inspection in the middle, packaging last and delivery last. The work order number and workstation number are written to the production chain segment, the inspection sequence number is written to the inspection chain segment, the packaging sequence number is written to the packaging chain segment, and the delivery sequence number is written to the delivery chain segment. The preceding node number and the following node number are written between adjacent chain segments to form a chain segment inheritance relationship. Finally, the historical chain corresponding to the target capacitor is generated and written to the historical chain list for S2 to read. If there are missing fields in the digital thread, the generation of the historical chain is stopped and the digital thread is written to the thread to be supplemented table. If the order of each field in the digital thread is inconsistent with the fixed order, it is rearranged according to the fixed order and then written to the historical chain. The order before rearrangement is written to the order correction table. Through the above processing, we can first stably extract thread candidates for the same target capacitor from four types of historical records, then reverse the unique thread sequence based on the delivery to production relationship, and finally form a historical chain with fixed order, clear nodes and clear relationship, thus providing a unique and continuous source of objects for subsequent retention field group screening, verification string generation and challenge index writing. In practical applications: For example, when a batch of aluminum electrolytic capacitors is delivered and samples are returned, the system first locates the delivery serial number A17 and the source packaging serial number B09 in the delivery record based on the delivery object identifier. Then, it locates the packaging serial number B09 and the source inspection serial number C23 in the packaging record. Next, it locates the inspection serial number C23 and the source workstation number D05 in the inspection record. Finally, it locates the work order number E12 to which workstation number D05 belongs in the production record. E12, D05, C23, B09, and A17 are then linked in reverse to generate a digital thread. The thread is then written into the historical chain according to the production chain, inspection chain, packaging chain, and delivery chain. Subsequently, S2 directly uses this historical chain as input to extract the reserved field group, thereby avoiding the mistaken merging of records of the same model but different objects into the same target capacitor.

[0018] S2. For the historical chain, extract the reserved field groups from the production record, inspection record and packaging record respectively, perform cross-biting and sequential concatenation in a fixed order of production first, inspection in the middle and packaging last to generate a verification string, write the summary value, field order and on-chain number of the verification string into the blockchain, and output the challenge index. In this embodiment, S2 is used to screen out the reserved field groups from the historical chain that can be continuously inherited across production records, inspection records, and packaging records and can be used for subsequent sample claiming. A verification string and challenge index are generated based on these reserved field groups to avoid field redundancy, mixed sources, and unstable correspondence with subsequent returned samples caused by directly using the complete historical record. Specifically, the position, source, and inheritance information of fields at each stage are first extracted from the historical chain to determine the retrievable field groups and their initial field order. Then, the reserved field groups are reordered and rearranged according to a fixed stage order to generate the target verification string and target field order. Finally, the target verification string is encoded, verified, and mapped using a digest, and written to the blockchain along with the target field order and on-chain number to form the challenge index retrieved in S3. This implementation process includes the following steps: The purpose of S21 is to filter out the reserved field group from the historical chain that can distinguish the target capacitor and maintain the cross-stage connection relationship, and form the initial field position order required for the subsequent verification string generation; the input is the production record, inspection record, and packaging record in the historical chain, where the production record includes at least the production equipment number, workstation number, batch location number, and production time position; the inspection record includes at least the inspection sequence number, inspection channel number, inspection result position, and inspection time position; and the packaging record includes at least the packaging sequence number, packaging workstation number, packing location number, and packaging time position; first, the fields are sorted according to the order of the production record fields, then the inspection record fields, and finally the packaging record fields. Record the field order, write the field position value for each field, which is the position of the field in the fixed field order of the record. Then write the field source value according to the link category of production record, inspection record and packaging record respectively. The production record field writes the first source value, the inspection record field writes the second source value, and the packaging record field writes the third source value. Then write the field connection value according to whether the previous link field and the next link field in the historical chain belong to the same target capacitor. When the next link field can be traced by the previous link field, write the connection establishment value; otherwise, write the connection break value. Based on this, a field position matrix is ​​constructed with candidate fields as rows and field positions as columns. A field continuation matrix is ​​constructed with candidate fields from the previous stage as rows and candidate fields from the next stage as columns. A field differentiation matrix is ​​constructed with candidate field pairs as rows and columns. The elements of the field differentiation matrix are determined by whether the source values ​​of the corresponding field pairs are the same and whether the position values ​​are repeated. Then, singular value decomposition is performed on the field position matrix, deleting the column vectors corresponding to singular values ​​of zero and retaining the candidate field sets corresponding to the remaining column vectors. Then, matrix multiplication is performed on the field continuation matrix and the field differentiation matrix to obtain the field cost matrix. Each element in the field cost matrix represents the connection cost when the corresponding field pairs are retained simultaneously. Then, two-part matching is performed based on the field cost matrix to generate a one-to-one correspondence table between production record fields, inspection record fields, and packaging record fields. Regularized linear solution is performed within this one-to-one correspondence table to delete duplicate field pairs and non-continuous field pairs, and the retained field group is output. Finally, following the order of production record fields first, inspection record fields second, and packaging record fields last, the position values ​​of each field in the retained field group are concatenated to form the initial field order. The retained field group and the initial field order are output for S22 to read. If a field is missing in a certain step, a missing value is written in the corresponding matrix position and the matrix solution continues. If two-part matching yields multiple parallel results, the first item is retained in ascending order of field position value. If no field group can be inherited after regularization linear solution, a field screening failure flag is written and the generation of subsequent verification strings for the current historical chain is stopped. The purpose of S22 is to construct a target verification string with cross-source distinguishability and deletion stability based on the reserved field group and the initial field position order, and to simultaneously determine the target field position order. The input is the reserved field group and the initial field position order. First, according to the fixed order of production record, inspection record and packaging record, the reserved field group is segmented and the position is extracted from the historical chain to obtain the production field segment, inspection field segment and packaging field segment. Then, the initial segment string is generated by concatenating the production field segment first, the inspection field segment in the middle and the packaging field segment last. Then, the initial segment string is sequentially subjected to cross-transposition, circular shift and interleaved insertion. Cross-transposition is to swap the positions of two adjacent source fields according to their front and back positions. Circular shift is to move the first field of the current segment string to the end and move the rest of the fields forward by one position. Interleaved insertion is to insert the next source field into the new empty position formed by the previous source field at one position interval. This generates a candidate verification string group. Next, each field in each candidate check string is deleted sequentially, and the deleted candidate check strings are compared one by one with the original candidate check strings to obtain the edit distance after deletion. An edit distance sequence is then formed according to the field position order. The lengths of consecutive segments with the same source value in adjacent fields within each candidate check string are then counted, and a sequence of homologous linked bits is formed according to their order of appearance. Simultaneously, the position numbers where the field source value changes are counted, and a source switching sequence is formed according to the field position order. Subsequently, the edit distance sequence, the homologous linked bit sequence, and the source switching sequence are sorted in descending order, respectively, and the first result of each of the three sorting methods is read. The candidate verification string number is used only if the first candidate verification string number of the edit distance sequence is the same as the first candidate verification string number of the source switching sequence and the first candidate verification string number of the same source concatenation sequence. The corresponding candidate verification string is retained as the target verification string, and the field order of the candidate verification string is written as the target field position order. The target verification string and the target field position order are output and read by S23. If there is more than one candidate verification string that meets the retention conditions, the first candidate verification string is retained according to the generation order of the candidate verification strings. If the candidate verification string group is empty, a verification string generation failure flag is written and the challenge index generation is stopped. The purpose of S23 is to convert the target verification string and the target field position sequence into a challenge index that can be stored on the blockchain and stably retrieved by subsequent backflow claiming steps. The input is the target verification string and the target field position sequence. First, the target verification string is grouped according to the target field position sequence, and fields with consecutive sources are grouped into the same coding group. Group polynomial coding is performed on each coding group in sequence to obtain the group coding segment corresponding to each coding group. Then, the group coding segments are concatenated into a coding string according to the target field position sequence. Subsequently, cyclic redundancy check is performed on the coding string to obtain the check value corresponding to the coding string. The check value is appended to the end of the coding string to form the coding string to be mapped. Finally, hash mapping is performed on the coding string to be mapped to obtain the digest value. The on-chain number is composed of the historical chain number and the target field position number concatenated together. The historical chain number is taken from the unique historical chain number of the current target capacitor in the historical chain list, and the target field position number is taken from the sequential number of the target field position in the generation of this verification string. Finally, the digest value, the target field position, and the on-chain number are written into the same challenge index structure, and the challenge index is written into the blockchain. The challenge index is output and used for S3 retrieval. If the cyclic redundancy check result does not correspond to the encoded string, the grouped polynomial encoding is re-executed once and checked again. If the two check results still do not correspond, an encoding error record is written and the chain writing is stopped. If the blockchain writing fails, the challenge index is written into the pending chain list and the writing time is recorded for subsequent retry of chain writing. Through the above processing, we can first screen out the reserved field group with continuous inheritance relationship and source differentiation ability from the historical chain, then generate the target verification string according to the fixed link order and string position rearrangement rules, and finally convert the target verification string into a challenge index composed of summary value, target field position and on-chain number and write it into the blockchain, so as to provide a stable, traceable verification basis for subsequent return sample claiming that does not rely on the public exposure of complete original historical records. In practical applications: For example, in the historical chain of a target capacitor, the production record provides the production equipment number P03, workstation number D05, and batch location number 07; the inspection record provides the inspection sequence number C23, inspection channel number 02, and inspection result bit 1; and the packaging record provides the packaging sequence number B09, packaging workstation number 04, and packing location number 06. The system first writes the field position values ​​according to the fixed order of each field in its respective record, and then writes the first source value, second source value, and third source value according to the production record, inspection record, and packaging record, respectively. Then, it writes the field succession value according to the sequential relationship in the historical chain; invalid column vectors are deleted through singular value decomposition, and... After solving the field cost matrix, the production equipment number, inspection channel number, and packing location number are retained as the reserved field group, and the corresponding initial field position sequence is generated. Then, the field values ​​are extracted in a fixed order to form an initial segment string. The initial segment string is subjected to cross-transposition, cyclic shift, and spaced insertion to screen out the unique target verification string. Then, grouped polynomial encoding and cyclic redundancy check are performed according to the target field position sequence to obtain the digest value. The digest value, target field position sequence, and on-chain number are written together into the blockchain to form a challenge index. Subsequently, S3 directly retrieves the challenge index based on the delivery sequence number, packaging sequence number, and model identifier in the return record, thereby avoiding the direct exposure of the complete historical fields.

[0019] S3. Obtain the return record corresponding to the return sample, retrieve the corresponding challenge index from the blockchain based on the delivery number, packaging number and model identifier in the return record, retrieve the corresponding field position and verification string, and output the verification string; In this implementation, step S3 is used to accurately retrieve the challenge index corresponding to the returned sample from the blockchain, and restore the field position sequence and verification string in the challenge index to the verification string that can be directly called in subsequent step S4. This avoids index misretrievability, string misalignment, and link disconnection when the returned record directly retrieves the index based on a single delivery information. Specifically, the delivery sequence number, packaging sequence number, and model identifier are first extracted from the returned record to form three types of search terms for on-chain retrieval. Then, the search scope is narrowed according to the order of delivery sequence number corresponding to packaging sequence number and packaging sequence number corresponding to model identifier to generate candidate index groups. Subsequently, the position sequence, verification string, and on-chain number in the candidate index group are checked for position consistency, string mapping, and link continuity to screen out the unique target index. Finally, the string position is rearranged and the order is restored according to the field position sequence and verification string in the target index to generate the verification string, which provides a unified reference for the subsequent positional comparison, positional comparison, and source comparison of the returned sample response string. This implementation process includes the following steps: The purpose of S31 is to form a retrieval input with hierarchical constraints from the return records, and to screen out candidate index groups related to the return samples in the blockchain accordingly. The input is the return records, which include at least the delivery serial number, packaging serial number, model identifier, return registration number, and return time. The delivery serial number is taken from the original shipment number corresponding to the delivered object at the time of return registration. The packaging serial number is taken from the packaging identifier on the return packaging or the packaging registration value in the return registration. The model identifier is taken from the return sample body identifier or the model registration value in the return record. First, the delivery serial number is extracted from the return records and written into the delivery retrieval item. Then, the packaging serial number is extracted and written into the packaging retrieval item. Finally, the model identifier is extracted and written into the model retrieval item. The delivery retrieval item, packaging retrieval item, and model retrieval item are all bound to the same return registration number. Then, starting with the delivery retrieval item, the system traverses the on-chain challenge index table within the blockchain, selecting index records with the same delivery sequence number to form the first candidate set. Next, within the first candidate set, the packaging sequence number is compared, and index records with the same packaging sequence number are retained to form the second candidate set. Finally, within the second candidate set, the model identifier is compared, and index records with the same model identifier are retained to form the candidate index group. The candidate index group is then written into the candidate index table for S32 to read. If the return record lacks a packaging sequence number, it is supplemented with the packaging identifier on the return packaging before the retrieval is performed. If the return record lacks a model identifier, it is supplemented with the model identifier of the return sample before the retrieval is performed. If the delivery retrieval item has no corresponding index record on the chain, a "no index" flag is written, and the current return sample retrieval process is stopped. If the candidate index group contains multiple index records, all are retained and handed over to S32 for further verification. The purpose of S32 is to perform positional continuity, string-to-position correspondence, and link continuity checks on the candidate index group, and to filter out a unique target index from multiple candidate indexes to avoid referencing the wrong index when restoring the string to be checked later. The input is the candidate index group. First, the field positional order, check string, and link number are retrieved from each candidate index in the candidate index group. Then, a positional order correspondence table is constructed with the positional value in the field positional order as one column and the corresponding field number as another column. Then, a string-to-position mapping table is constructed with the string position in the check string as one column and the positional value in the field positional order as another column. The positional order correspondence table is used to represent the correspondence between the previous and next positions in the field positional order, and the string-to-position mapping table is used to represent the correspondence between each position in the check string and each position in the field positional order. Then, the positional order correspondence table is aligned bit by bit. The processing rule for bit by bit alignment is: arrange the positional values ​​of each position in the field positional order from smallest to largest, calculate the difference between adjacent positional values. If the difference between adjacent positional values ​​is equal to one, the field positional order is determined to be continuous. If there is any difference between adjacent positional values ​​that is not equal to one, the field positional order is determined to be discontinuous. Next, perform inter-bit association expansion on the string mapping table. The processing rules for inter-bit association expansion are as follows: read the bit order value corresponding to each string bit in the check string according to the string bit order, and check whether the number of bits in the check string is equal to the number of bits in the field. If the number of bits in the check string is consistent with the number of bits in the field, the current candidate index is retained to participate in the next step of check. If the number of bits in the check string is inconsistent with the number of bits in the field, the current candidate index is deleted. Next, a link continuity check is performed on the on-chain number. The processing rules for the link continuity check are as follows: the historical chain number and the position number are separated from the on-chain number of the current candidate index. Then, the challenge index write record is traced back using the historical chain number. If a challenge index write record corresponding to the current field position can be found under the same historical chain number, the on-chain number is determined to be continuous. If a corresponding challenge index write record cannot be found, the on-chain number is determined to be broken. Based on this, candidate indexes with non-continuous field position, non-corresponding check string length, and broken on-chain number are deleted. The remaining candidate indexes are retained as target indexes and written to the target index table for S33 to read. If there is more than one remaining candidate index, the first candidate index is retained as the target index in ascending order of the byte order of the on-chain number, and the remaining candidate indexes are written to the parallel index table. If the remaining candidate indexes are empty, an index check failure flag is written and the generation of the check string is stopped. The purpose of S33 is to restore the field position sequence and verification string in the target index to the verification string to be directly called in S4, so that the return sample response string and the on-chain verification basis are in the same position structure; the input is the field position sequence and verification string corresponding to the target index; firstly, the field position sequence and verification string are extracted from the target index, and the target position sequence is generated according to the order of each position value in the field position sequence from smallest to largest. Then, the verification string is rearranged according to the target position sequence. The processing rule of the rearrangement is: each position in the verification string is moved to the corresponding position in the target position sequence according to its corresponding position value in the position mapping table, and the rearranged string is generated. Then, the rearranged string is restored in sequence. The processing rules for the restoration are as follows: read the corresponding string positions in the rearranged string from the first to the last position according to the target position sequence, and reassemble each string position into the string to be checked in the reading order. At the same time, write the target position sequence into the field position column of the string to be checked table, write the string to be checked into the string value column of the string to be checked table, output the string to be checked and let S4 read it. If there are duplicate position values ​​in the field position sequence, retain the corresponding string position at the first occurrence of the position value and delete the remaining duplicate string positions. If there are string positions in the check string that cannot be mapped to the target position sequence, write the string position into the invalid string position table and continue to perform the restoration. If the number of bits in the string to be checked after rearrangement is less than the number of field position sequences, write a missing position mark at the missing position and write it into the string to be checked table at the same time. Through the above processing, the on-chain search range can be narrowed down layer by layer according to the delivery serial number, packaging serial number and model identifier in the return record. Then, a unique target index is screened out according to the continuity of field position, the correspondence of the verification string length and the continuity of on-chain number. Finally, the verification string in the target index is restored to a verification string with unified field position and can directly participate in the subsequent verification, thereby avoiding the mistaken inclusion of challenge indexes from different historical chains, different packaging units or different models into the current return sample claiming process. In practical applications: For example, in the reflux record of a refluxed sample, the delivery serial number is A17, the packaging serial number is B09, and the model identifier is C470. The system first retrieves three index records in the blockchain using A17, then retains two index records with packaging serial number B09 from the three index records, and then retains one index record with model identifier C470 from the two index records to form a candidate index group; then, it retrieves the field position 1, 2, 3, 4, 5 and the verification string Q from the candidate index group. 7K2M, after confirming the continuity of field positions through bit-by-bit alignment, and confirming that the number of bits in the verification string matches the number of field positions through string-to-bit mapping, and confirming through on-chain number backtracking that the index comes from the challenge index write record of the current historical chain, thus determining this candidate index as the target index; finally, the verification string is rearranged and restored according to the field position order to generate the verification string Q7K2M and written to the verification string table. Subsequently, S4 directly extracts the response string of the returned sample based on this and performs bit-by-bit comparison, position comparison and source comparison.

[0020] S4. For the returned sample, read the sample field values ​​corresponding to the field position in the sample body, returned packaging and returned record respectively, perform same-position value taking and sequential splicing according to the field position to generate a response string, and perform position-by-position comparison, position comparison and source comparison between the response string and the string to be verified, and output the verification result. In this embodiment, S4 is used to uniformly map the sample body field, reflow packaging field, and reflow record field in the reflowed sample to the corresponding field position of the string to be verified, solve for the target response string that can be verified one by one with the string to be verified, and convert the verification process into a verification result table that can be written into the subsequent claiming step, so as to avoid the claiming distortion caused by direct comparison when the reflowed sample has missing fields, mixed sources, and misaligned positions; wherein, firstly, the three types of source fields are organized into a sample value matrix, a source marker matrix, and a position constraint matrix according to the field position, and solve for the same position field group and candidate response segment group, then the candidate response segment group is compared with the string to be verified position by position, screen out the unique target response string and form an intermediate verification table, and finally perform joint verification on the target response string and the string to be verified, and output the position value verification result, position verification result, and source verification result for subsequent S5 to perform identity verification; this implementation process includes the following steps: The purpose of S41 is to unify the multiple source fields in the recirculated samples into the same field positional framework, and to solve the corresponding field groups and candidate response segment groups that can participate in subsequent verification in the case of missing fields and overlapping sources. The input quantities are the sample body field, recirculation packaging field, recirculation record field and the field positional order output by S3 in the recirculated sample. The sample body field includes at least the sample body inkjet printing position, sample body engraving position and sample body specification position. The recirculation packaging field includes at least the packaging identification position, bag position position and box label position. The recirculation record field includes at least the recirculation registration position, recirculation serial number position and recirculation model position. First, the values ​​of the three types of source fields are extracted one by one according to the field positional order. The sample value matrix is ​​constructed with the field positional order as the column and the sample body field, recirculation packaging field and recirculation record field as the row. Each element in the sample value matrix takes the field value of the corresponding source field in the corresponding field positional order. If the source has no field value in the field positional order, a missing value mark is written. Subsequently, a source marker matrix is ​​constructed with field position as columns and source category as rows. The sample body field is written with the first source marker, the reflux packaging field with the second source marker, and the reflux record field with the third source marker. Then, the source categories in the source marker matrix are expanded into one-hot column vectors according to the number of source categories, so that each field position corresponds to a single-value marker for only one source position. Next, a position constraint matrix is ​​constructed with the relationship between the order of the field positions as rows and columns. In the position constraint matrix, the continuation value is written between adjacent field positions, and the continuation value is written between non-adjacent field positions. Based on this, the number of missing positions is counted in the sample value matrix, and the number of cross-source jumps is counted in the source marker matrix. The number of missing positions is the total number of missing markers in the sample value matrix, and the number of cross-source jumps is the number of times the source marker corresponding to an adjacent field position changes and this change does not conform to the continuous relationship of the field position order. Then, the position constraint matrix is ​​used as an equality constraint term, and the sum of the number of missing positions and the number of cross-source jumps is used as a joint cost term to perform integer constraint solving. The variable in the integer constraint solving is whether each field position order retains a certain source field. The solution result satisfies that all adjacent field positions have valid occurrences. During the acceptance process, the source fields at the corresponding field positions are retained to form a corresponding field group, and each corresponding field group is combined according to the source to generate a candidate response segment group. The corresponding field group and the candidate response segment group are output and read by S42. If a certain field position has no field value in any of the three types of sources, a full missing mark is written to the field position and the subsequent solution of the field position is stopped. If there are multiple parallel results in the integer constraint solution, the first valid result in the sample body field, reflux packaging field, and reflux record field is retained in a fixed order of source. If there is still no valid result, the current reflux sample is written to the field table to be reviewed. The purpose of S42 is to solve for a unique target response string based on the candidate response segment group and the string to be checked, and to write the bit-by-bit, sequential, and source-by-source checking process into an intermediate checking table. The input is the candidate response segment group and the string to be checked. First, the response segments in the candidate response segment group are sequentially concatenated according to the field position order to generate a candidate response string group. Each candidate response string is formed by concatenating the candidate response segment group segments sequentially according to the field position order from smallest to largest. Then, for each candidate response string, a bit-by-bit difference matrix, a position offset matrix, and a source correspondence matrix are constructed. The rows and columns of the bit-by-bit difference matrix correspond to the positions of the candidate response string and the string to be checked, respectively. The matrix elements take the difference result of whether the corresponding two characters are the same. The rows and columns of the position offset matrix correspond to the positions of the candidate response string and the string to be checked, respectively. The matrix elements take the difference between the two positions. The rows of the source correspondence matrix correspond to the sources of each position in the candidate response string, and the columns correspond to the target sources of each position in the string to be checked. The matrix elements take the mark value of whether the sources correspond. Based on this, Hamming distance is calculated using the positional difference matrix, where the Hamming distance is the sum of the inconsistent bits on the main diagonal of the positional difference matrix. Edit distance is then recursively calculated using the positional offset matrix, accumulating bit-by-bit for insertion, deletion, and replacement operations to obtain the edit distance between the candidate response string and the string to be verified. Finally, conditional independence decomposition and posterior consistency update are performed using the source correspondence matrix. Conditional independence decomposition involves splitting the source correspondence matrix into three source submatrices based on three sources: sample body field, reflux packaging field, and reflux record field. Posterior consistency update involves sequentially matching the consistency result of the previous source with the consistency result of the current source, according to the field position order. Merge to form a source consistency sequence; then perform conflict resolution according to the retention rules of zero Hamming distance, zero edit distance, and each row and column of the source corresponding matrix containing only one source marker. Retain candidate response strings that simultaneously satisfy all three rules as target response strings, and write the positional difference result, positional difference result, and source consistency result corresponding to the target response string into the intermediate verification table according to the field positional order. Output the target response string and the intermediate verification table for S43 to read; if there is more than one candidate response string that satisfies the retention rules, retain the first candidate response string according to the generation order of the candidate response strings; if there is no candidate response string that satisfies the retention rules, write a response string invalid flag and stop the generation of verification results; The purpose of S43 is to transform the verification process between the target response string and the string to be verified into a direct readable result for subsequent identity verification, including bit value verification, position verification, and source verification. The inputs are the target response string, the intermediate verification table, and the string to be verified. First, the target response string and the string to be verified are read bit by bit according to the field position order. Each bit of the target response string is paired with the corresponding bit of the string to be verified according to the field position order to construct a joint verification vector. Each vector unit in the joint verification vector includes at least the current field position order, the target response bit value, the bit value to be verified, the target response position, the position to be verified, and the current source corresponding result. Then, convolution verification is performed on the joint verification vector. The processing rules for convolution verification are as follows: Using the positional order of three adjacent fields as a convolution window, perform bitwise multiplication and addition on the target response positional value and the positional value to be checked within the window to obtain the positional convolution result, and determine whether the positional convolution result is consistent with the positional difference result in the intermediate check table; then perform cyclic redundancy check on the joint check vector. The processing rule of cyclic redundancy check is as follows: form a check input string with the target response positional value, target response position, and source corresponding result in the joint check vector, perform cyclic redundancy calculation on the check input string, and compare the obtained check value with the check value corresponding to the string to be checked. If the two are consistent, retain the positional order of the current field and the source check result. If the two are inconsistent, write the positional order of the current field and the source check result. Based on the above processing, positional verification results, order verification results, and source verification results are generated. The positional verification results are taken from the comparison results of convolution verification and position-by-position difference results; the order verification results are taken from the comparison results of cyclic redundancy check and order pairing results; and the source verification results are taken from the comparison results of cyclic redundancy check and corresponding source results. The positional verification results, order verification results, and source verification results are then written into the verification result table row by row according to the field position order. The verification results are output and read by S5. If there is a missing position mark in a certain field position order in the joint verification vector, the missing verification result is written into the corresponding field row of the verification result table and the field row is retained. If the convolution verification or cyclic redundancy check fails, the verification failure mark is written into the corresponding field position order and the complete verification result table is output. Through the above processing, the sample body field, reflux packaging field, and reflux record field can be uniformly mapped to the field position order. Then, under the conditions of multiple sources coexisting, field missing, and position intersection, the unique target response string can be solved. The position value consistency, position order consistency, and source consistency between the target response string and the string to be verified are written into a verification result table that can be read field by field, thereby providing a verifiable, traceable, and item-by-item blocking judgment basis for subsequent identity recognition. In practical applications: For example, if the field positions of a reflux sample are 1, 2, 3, 4, 5, the sample body field is readable at positions 1, 2, and 5, the reflux packaging field is readable at positions 3 and 4, and the reflux record field is readable at positions 2 and 4. The system first constructs a sample value matrix and writes missing markers at the missing positions. Then, it constructs a source marker matrix and expands the sample body field, reflux packaging field, and reflux record field into one-hot column vectors. Subsequently, it performs integer constraint solving based on the position constraint matrix, retaining position 1 as the sample body field, position 2 as the sample body field, position 3 as the reflux packaging field, position 4 as the reflux packaging field, and position 5 as the reflux record field. The sample ontology fields are used to form a corresponding field group, which in turn forms a candidate response segment group. The candidate response segment groups are then concatenated sequentially to form a candidate response string. This string is compared bit by bit with the string to be checked to obtain a target response string with zero Hamming distance, zero edit distance, and each row and column of the source corresponding matrix containing only one source marker. The bit-by-bit difference results, position difference results, and source consistency results are written into an intermediate check table. Finally, a joint check vector is constructed based on the target response string and the string to be checked. Convolution check and cyclic redundancy check are performed, and the bit value check results, position check results, and source check results are output and written into a check result table. Subsequently, S5 directly performs claim establishment or claim blocking based on the check result table.

[0021] S5. Perform identity claiming on the verification results. When the response string and the string to be verified are consistent in every position, position, and source, connect the return sample to the target capacitor corresponding to the digital thread and output the claiming result. If there is any inconsistency, transfer the return sample to the verification chain and output the unclaimed result. In this implementation, S5 is used to convert the verification result output by S4 into an executable identity claim conclusion, and to determine whether the return sample is connected to the digital thread or transferred to the waiting chain based on the claim conclusion, so as to avoid remaining at the result display level after the verification is completed without forming subsequent link attribution; wherein, firstly, the position value verification result, position verification result, and source verification result are organized into a claim judgment table according to the field position order, and then the claim is judged field by field to determine whether the claim is valid. Then, when the claim is valid, the return sample is connected to the target capacitor node corresponding to the digital thread. When the claim is blocked, the return sample is transferred to the waiting chain and its access relationship with the digital thread is cut off, thereby directly converting the verification result into the link access result and the link isolation result; the implementation process includes the following steps: The purpose of S51 is to organize the three types of verification items in the verification results into a claim determination table that can be directly read for subsequent field-by-field determination. The input is the verification results, which at least include field position, position value verification results, position order verification results, and source verification results. First, a sample claim table is constructed using the field position as the primary key. The sample claim table includes at least a field position column, a position value verification item column, a position order verification item column, and a source verification item column. Then, according to the field position in ascending order, the position value verification results in the verification results are written into the position value verification item column of the corresponding field row. The ranking verification result is written to the ranking verification item column of the corresponding field row, and the source verification result is written to the source verification item column of the corresponding field row, thus forming the claim judgment table. The claim judgment table is written to the claim judgment table storage area for S52 to read. If a certain field in the verification result is missing any verification item, a missing item mark is written in the corresponding column of the field row and the field row is retained. If there are duplicate field rankings in the verification result, the field row with the first occurrence of the field ranking is retained and subsequent duplicate field rows are deleted. At the same time, the duplicate field rankings are written to the duplicate ranking record table. The purpose of S52 is to decode a unique determination mark field by field based on the claim determination table, so that subsequent link access and link isolation are based on explicit field-level consistency. The input is the claim determination table. First, the position check item, position check item, and source check item in the claim determination table are read row by row in ascending order of field position. Then, a consistency check is performed on each field row. The consistency check processing rule is: only when the position check item, position check item, and source check item in the field row are all consistent is the field row determined to be a consistent field row. If any check item in a field row is marked as inconsistent or missing, that field row is determined to be a blocking field row. Subsequently, the field row judgment results in the claim judgment table are counted. When all field rows are consistent, a claim success mark is generated. When any blocking field row exists, a claim blocking mark is generated, and the judgment mark is written to the judgment mark table for S53 and S54 to read. If the claim judgment table is empty, a claim blocking mark is generated directly. If there are unsorted field rows in the claim judgment table, they are first rearranged in ascending order according to the field position before the consistency check is performed. The purpose of S53 is to legally connect the return sample to the digital thread when the claim is established, so that the return sample obtains a claim link that is continuously corresponding to the historical chain of the target capacitor. The input quantities are a judgment flag, a return sample identifier, and a digital thread identifier, where the digital thread identifier is taken from the unique number of the digital thread in the historical chain corresponding to the target capacitor, and the return sample identifier is taken from the unique number of the return sample in the return record. First, the judgment flag corresponding to the current return sample is retrieved from the judgment flag table, and then it is determined whether the judgment flag is a claim establishment flag. If so, the target capacitor node in the digital thread is located according to the digital thread identifier, and the last bit of the target capacitor node is read, where the last bit of the target capacitor node is the return access position reserved after the delivery node in the digital thread. Subsequently, the return sample identifier is written to the end of the target capacitor node, and a return access edge is established between the target capacitor node and the return sample identifier node. The target capacitor node, the return access edge, and the return sample identifier node jointly generate the claim link. Then, the digital thread identifier, the return sample identifier, and the claim establishment flag are written to the claim result table, and the claim result is output for subsequent return sample full-process query and reading. If the end of the target capacitor node does not exist in the digital thread, a return access position is added after the delivery node and the return sample identifier is written. If the establishment of the return access edge fails, the current return sample is written to the waiting access queue and the reason for failure is recorded. The claim result is not output. The purpose of S54 is to isolate the access relationship between the return sample and the digital thread during the claim blocking, so that the return sample that fails the verification only retains the waiting state and does not occupy the target capacitor identity; the input quantities are the judgment flag, the return sample identifier, and the waiting chain identifier, where the waiting chain identifier is the unique number of the waiting chain. The waiting chain includes at least the waiting chain identifier, the return sample identifier, the blocking reason, and the subsequent verification entry; first, it is determined whether the judgment flag corresponding to the current return sample is the claim blocking flag based on the judgment flag. If so, the waiting chain is located by the waiting chain identifier, and the return sample identifier is written into the waiting sample node in the waiting chain. Then, the blocking field position and the blocking reason are written into the corresponding record item of the waiting chain. The waiting chain is generated by the waiting chain identifier and the return sample identifier. Next, check whether the current reflux sample has an access relationship with the target capacitor node corresponding to the digital thread. If it does, delete the reflux access edge corresponding to the access relationship and restore the target capacitor node to an empty access state. If it does not, keep the original state of the digital thread unchanged. Finally, write the pending chain identifier, reflux sample identifier, and claim blocking flag into the unclaimed result table, output the unclaimed result, and read it for subsequent review processing. If the same reflux sample identifier already exists in the pending chain, retain it according to the first write record and delete subsequent duplicate write records. If the pending chain write fails, write the current reflux sample into the pending write exception table and record the write time. Through the above processing, the verification results can be organized into a claim judgment table corresponding to the field position order. Then, a unique judgment mark is generated based on the consistency check results of all field rows. When the claim is successful, the return sample is connected to the digital thread to form a claim link. When the claim is blocked, the return sample is transferred to the waiting chain to form a waiting chain. This ensures that the subsequent ownership of the return sample is based only on the complete field verification and will not directly occupy the identity of the target capacitor due to local consistency or manual intervention. In practical applications: For example, the verification result table of a returned sample contains the position value verification result, position verification result, and source verification result corresponding to field positions 1 to 5. The system first writes the three types of verification results into the corresponding field rows of the claim judgment table according to field positions 1 to 5. If all field rows in field positions 1 to 5 show consistent position values, consistent position numbers, and consistent sources, a claim establishment flag is generated, and the digital thread identifier DT-023 is retrieved. The returned sample identifier RS-105 is written after the target capacitor delivery node of the digital thread, and a returned access edge is established from the target capacitor node to RS-105 to form a claim link and output the claim result. If the source verification item in field position 3 shows inconsistency, a claim blocking flag is generated, and the returned sample identifier RS-105 is written into the pending verification chain WK-018, cutting off the access relationship between RS-105 and the digital thread DT-023, forming a pending verification link and outputting the unclaimed result. Subsequent verification is only allowed within the pending verification chain, and direct reconnection to the digital thread is not allowed.

[0022] Furthermore, the present invention also includes a blockchain-based end-to-end traceability system for capacitors, the system comprising a chain-building module, an indexing module, a retrieval module, a verification module, and a claiming module: The chain building module is used to obtain the historical records of the target capacitor in the production, inspection, packaging and delivery stages. It concatenates the work order number, work station number, inspection sequence number, packaging sequence number and delivery sequence number corresponding to the same target capacitor in chronological order to generate the digital thread corresponding to the target capacitor and output the historical chain. The index module is used to extract the reserved field groups from the production record, inspection record and packaging record respectively for the historical chain, perform cross-biting and sequential concatenation in a fixed order of production first, inspection in the middle and packaging last to generate a check string, write the summary value, field order and on-chain number of the check string into the blockchain, and output the challenge index. The retrieval module is used to obtain the reflux record corresponding to the reflux sample, retrieve the corresponding challenge index from the blockchain based on the delivery serial number, packaging serial number and model identifier in the reflux record, retrieve the corresponding field position and verification string, and output the string to be verified. The verification module is used to read the sample field values ​​corresponding to the field position in the sample body, reflow packaging and reflow record for the reflowed sample, perform same-position value taking and sequential concatenation according to the field position, generate a response string, and perform position-by-position comparison, position comparison and source comparison between the response string and the string to be verified, and output the verification result. The claim module is used to claim the identity of the verification results. When the response string and the string to be verified are consistent in every position, order, and source, the return sample is connected to the target capacitor corresponding to the digital thread and the claim result is output. If any inconsistency exists, the return sample is transferred to the verification chain and the unclaimed result is output.

[0023] Working Principle: This solution first establishes a continuous digital thread for each target capacitor, from production, inspection, packaging to delivery. Then, it selects reserved fields from this digital thread that represent the target capacitor without directly exposing the complete historical record. These fields are then reassembled into a verification string in a fixed order. The summary value, field order, and on-chain number of the verification string are written into the blockchain to form a challenge index. When a returned sample enters the system, the corresponding challenge index is retrieved from the blockchain based on the delivery serial number, packaging serial number, and model identifier in the returned record. The field values ​​of the returned sample, returned packaging, and returned record are then arranged into a response string according to field order and compared with the verification string position by position and source to obtain the verification result. Finally, based on the verification result, it is determined whether the returned sample can be legally reconnected to the original digital thread. If all verification items are consistent, the returned sample is connected to the digital thread corresponding to the target capacitor. If any inconsistency exists, the returned sample is transferred to the verification chain, thus avoiding misidentifying samples of unknown origin or those replaced midway as the original delivery object. For example, in after-sales scenarios for industrial control boards or automotive electronic units, a customer returns a capacitor suspected of being faulty after disassembling the device. The original packaging may be missing, and the external labels may have been reattached by the repair station. In this case, traditional methods often only rely on the batch number, label, or appearance to roughly determine the origin, making it difficult to prove that this sample is the one originally delivered. This solution first traces the capacitor's historical chain from the company's original production, inspection, packaging, and delivery records, and saves the corresponding challenge index on the chain in advance. When the sample is returned, the delivery serial number, packaging serial number, and model identifier in the return record are used to locate the index on the chain. At the same time, the corresponding fields in the sample body, return packaging, and return record are read and reconstructed into a response string. This string is then checked against the verification string saved on the chain. If all three verification results are true, it means that this returned sample can form a unique and continuous correspondence with the original delivered object, and the system returns it to the original digital thread. If inconsistencies are found during the verification, the system isolates the sample in the verification chain for further review, without directly occupying the original object's identity.

[0024] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A blockchain-based method for end-to-end traceability of capacitors, characterized in that: include: S1. Obtain the historical records of the target capacitor during the production, inspection, packaging and delivery stages. Serialize the work order number, work station number, inspection sequence number, packaging sequence number and delivery sequence number corresponding to the same target capacitor in chronological order to generate the digital thread corresponding to the target capacitor and output the historical chain. S2. For the historical chain, extract the reserved field groups from the production record, inspection record and packaging record respectively, perform cross-biting and sequential concatenation in a fixed order of production first, inspection in the middle and packaging last to generate a verification string, write the summary value, field order and on-chain number of the verification string into the blockchain, and output the challenge index. S3. Obtain the return record corresponding to the return sample, retrieve the corresponding challenge index from the blockchain based on the delivery number, packaging number and model identifier in the return record, retrieve the corresponding field position and verification string, and output the verification string; S4. For the returned sample, read the sample field values ​​corresponding to the field position in the sample body, returned packaging and returned record respectively, perform same-position value taking and sequential splicing according to the field position to generate a response string, and perform position-by-position comparison, position comparison and source comparison between the response string and the string to be verified, and output the verification result. S5. Perform identity claiming on the verification results. When the response string and the string to be verified are consistent in every position, position, and source, connect the return sample to the target capacitor corresponding to the digital thread and output the claiming result. If there is any inconsistency, transfer the return sample to the verification chain and output the unclaimed result. S2 includes: S21. Extract the field position values, field source values, and field inheritance values ​​corresponding to the production records, inspection records, and packaging records in the historical chain. Construct a field position matrix, a field inheritance matrix, and a field differentiation matrix. Perform singular value decomposition on the field position matrix and delete column vectors with singular values ​​of zero. Perform matrix multiplication on the field inheritance matrix and the field differentiation matrix to generate a field cost matrix. Then perform bipartite matching and regularized linear solution on the field cost matrix and output the retained field group and the initial field position order. S3 includes: S31. Extract the delivery sequence number, packaging sequence number, and model identifier from the return record, construct delivery search terms, packaging search terms, and model search terms, perform on-chain traversal and join verification in the order of delivery sequence number corresponding to packaging sequence number and packaging sequence number corresponding to model identifier, and output candidate index groups; S32. Retrieve the field position order, check string, and chain number corresponding to each candidate index in the candidate index group, construct the position order correspondence table and the string-position mapping table, perform bit-by-bit alignment on the position order correspondence table, perform bit-to-bit association expansion on the string-position mapping table, delete candidate indexes with non-contiguous field position order, non-corresponding check string bit length, and broken chain number, and output the target index. S33. Obtain the field position order and verification string corresponding to the target index, perform string rearrangement and order restoration according to the field position order, and generate the verification string; S4 includes: S41, Value Constraint Module: For the sample body field, reflow packaging field, and reflow record field in the reflow sample, construct the sample value matrix, source marker matrix, and position constraint matrix according to the field position order. Perform missing mark on the sample value matrix, perform column vector marking processing on the source categories in the source marker matrix according to the number of source categories, and then perform integer constraint solution by using the position constraint matrix as an equality constraint term and the number of missing values ​​and the number of cross-source jumps as joint cost terms, and output the same position field group and candidate response segment group.

2. The blockchain-based capacitor end-to-end traceability method according to claim 1, characterized in that: S1 includes: S11. Obtain the historical records of the target capacitor during the production, inspection, packaging and delivery stages, extract the corresponding record items according to the work order number, work station number, inspection sequence number, packaging sequence number and delivery sequence number, and output the thread candidate group. S12. For the thread candidate group, perform reverse tracing based on the packaging sequence number corresponding to the delivery sequence number, the detection sequence number corresponding to the packaging sequence number, the workstation number corresponding to the detection sequence number, and the work order number corresponding to the workstation number to generate a unique thread sequence corresponding to the target capacitor and output the digital thread. S13. For digital threads, perform sequential writing in the order of production first, inspection in the middle, packaging last, and delivery last to generate the historical chain corresponding to the target capacitor.

3. The blockchain-based capacitor end-to-end traceability method according to claim 2, characterized in that: S2 also includes: S22. Read the reserved field group and the initial field position, perform segmented position extraction according to the fixed order of production record, inspection record and packaging record, generate the initial segment string, perform cross-transposition, circular shift and interleaved insertion on the initial segment string in sequence to form a candidate check string group, delete each field position in each candidate check string and calculate the edit distance sequence, same source concatenation sequence and source switching sequence after deletion, retain the first candidate check string number after the edit distance sequence is sorted in descending order, and the candidate check string with the same first candidate check string number after the source switching sequence is sorted in descending order and the same first candidate check string number after the same source concatenation sequence is sorted in ascending order, output the target check string and the target field position. S23. Based on the target verification string and the target field position, perform grouped polynomial coding and cyclic redundancy check according to the target field position to generate a coding string. Perform hash mapping on the coding string to obtain a digest value. Write the challenge index, composed of the digest value, the target field position, and the on-chain number, into the blockchain and output the challenge index.

4. The blockchain-based capacitor end-to-end traceability method according to claim 3, characterized in that: S4 also includes: S42. Based on the candidate response segment group and the string to be checked, the candidate response segment group is sequentially concatenated according to the field position order to generate a candidate response string group. For each candidate response string, a positional difference matrix, a position offset matrix and a source correspondence matrix are constructed respectively. Hamming distance is calculated according to the positional difference matrix. Edit distance is recursively calculated according to the position offset matrix. Conditional independent decomposition and posterior consistency update are performed according to the source correspondence matrix. Then, conflict resolution is performed according to the retention rules that Hamming distance is zero, edit distance is zero and each row and column of the source correspondence matrix contains only one source tag. The target response string and intermediate check table are output. S43. Read the target response string, intermediate verification table, and string to be verified. Construct a joint verification vector based on the target response string and the string to be verified. Perform convolution verification and cyclic redundancy verification on the joint verification vector to generate position value verification result, position order verification result, and source verification result. Then write the position value verification result, position order verification result, and source verification result into the verification result table according to the field position order, and output the verification result.

5. The blockchain-based capacitor end-to-end traceability method according to claim 4, characterized in that: S5 includes: S51. Based on the position value verification item, position verification item and source verification item in the verification results, construct a sample claim table, and write the position value verification item, position verification item and source verification item into the corresponding field row according to the field position order, and output the claim judgment table. S52. Based on the claim determination table, check the position value verification item, position verification item and source verification item in each field row according to the field position order. When all field rows are consistent at the same time, generate a claim establishment flag. When there is an inconsistency in any field row, generate a claim blocking flag and output the determination flag.

6. The blockchain-based capacitor end-to-end traceability method according to claim 5, characterized in that: S5 also includes: S53. Retrieve the judgment mark, return sample identifier and digital thread identifier. When the judgment mark is the claim establishment mark, write the return sample identifier into the last bit of the target capacitor node corresponding to the digital thread and establish a return access edge, generate the claim link, and output the claim result. S54. Based on the judgment mark, the return sample identifier, and the target chain identifier, when the judgment mark is the claim blocking mark, write the return sample identifier into the target chain and cut off its access relationship with the target capacitor node corresponding to the digital thread, generate the target chain, and output the unclaimed result.

7. A blockchain-based capacitor end-to-end traceability system, used to implement the blockchain-based capacitor end-to-end traceability method as described in any one of claims 1-6, the system comprising a chain-building module, an indexing module, a retrieval module, a verification module, and a claiming module, characterized in that: The chain building module is used to obtain the historical records of the target capacitor in the production, inspection, packaging and delivery stages. It concatenates the work order number, work station number, inspection sequence number, packaging sequence number and delivery sequence number corresponding to the same target capacitor in chronological order to generate the digital thread corresponding to the target capacitor and output the historical chain. The index module is used to extract the reserved field groups from the production record, inspection record and packaging record respectively for the historical chain, perform cross-biting and sequential concatenation in a fixed order of production first, inspection in the middle and packaging last to generate a check string, write the summary value, field order and on-chain number of the check string into the blockchain, and output the challenge index. The retrieval module is used to obtain the reflux record corresponding to the reflux sample, retrieve the corresponding challenge index from the blockchain based on the delivery serial number, packaging serial number and model identifier in the reflux record, retrieve the corresponding field position and verification string, and output the string to be verified. The verification module is used to read the sample field values ​​corresponding to the field position in the sample body, reflow packaging and reflow record for the reflowed sample, perform same-position value taking and sequential concatenation according to the field position, generate a response string, and perform position-by-position comparison, position comparison and source comparison between the response string and the string to be verified, and output the verification result. The claim module is used to claim the identity of the verification results. When the response string and the string to be verified are consistent in every position, order, and source, the return sample is connected to the target capacitor corresponding to the digital thread and the claim result is output. If any inconsistency exists, the return sample is transferred to the verification chain and the unclaimed result is output.