The invention discloses a supply chain
traceability anti-counterfeiting method and
system based on cooperation of internal and external codes, belongs to the technical field of supply chain management, and aims to solve the technical problem of how to improve the anti-counterfeiting
traceability safety and reduce the cost. Comprising the following steps: for each production batch, generating a unique ID through a
snowflake algorithm; generating a private key and a public key for each production batch; for each production batch, constructing an outer code
label in a two-dimensional code form based on the batch ID, the outer code ID and the generated outer code signature, and constructing an inner code
label in a two-dimensional code form based on the batch ID, the commodity ID and the generated inner code signature; scanning and analyzing the external code
label and the internal code label, comparing the regenerated abstract with the original abstract obtained by decryption for the external code, if the comparison result is consistent, returning the supply chain data and recording the scanning
record, if the comparison result is consistent for the internal code, returning the commodity information, and if the current internal code label is scanned for the first time, returning the commodity information and recording the scanning
record. And marking the associated outer code as invalid.