Commodity information tracing method and device based on block chain, and electronic equipment
By obtaining and verifying the identifier and signature shard of goods in the blockchain system, the problem of opaque commodity information in complex commodity trading scenarios is solved, the transparency and traceability of commodity information is achieved, and the security and efficiency of the supply chain are improved.
Patent Information
- Application Number
- CN202411685271.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-22
- Publication Date
- 2025-02-28
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In complex commodity trading scenarios, the prior art is difficult to ensure the transparency and traceability of commodity information, and there are problems such as private key security management, cross-chain interoperability, unique identifier generation, data entry and verification, and query and traceability capabilities.
By determining the sales, transportation and supply ends of the target products in the blockchain system, obtaining corresponding identifiers and signature shards, generating threshold signatures, and verifying their authenticity, so as to obtain product orders, logistics and production information, thereby achieving transparency and traceability of product information.
It improves the transparency and security of product information in the entire transaction process, builds a highly secure, transparent and efficient supply chain ecosystem, and realizes transparent management and efficient data traceability of the entire process of commodity from production to consumption.
Smart Images

Figure CN119539834A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of blockchain or other related technical fields, and in particular to a commodity information tracing method based on blockchain, a device thereof, and an electronic device. Background Art
[0002] With the development of global trade and consumers' increasing demands for transparency in product quality and sources, supply chain management faces unprecedented challenges. Traditional supply chain systems often lack sufficient transparency and are difficult to ensure the authenticity and integrity of goods. In addition, in a complex cross-border trading environment, the proliferation of counterfeit and shoddy goods and lack of trust have become major factors restricting the development of the industry.
[0003] In order to meet these challenges, the application of blockchain technology in the field of supply chain management has attracted widespread attention in recent years. As a decentralized, distributed ledger technology, blockchain has become an ideal choice for improving supply chain transparency, ensuring the authenticity of product information, and improving transaction efficiency due to its characteristics of data immutability, transaction transparency, and no need to trust a third party. Existing blockchain technology has solved the problems of data immutability and transparency to a certain extent, but it still has the following shortcomings:
[0004] First, private key security management. In traditional blockchain systems, private keys are usually held by a single entity. Once a private key is lost or stolen, it will lead to serious security risks. In addition, a single control point is easy to become an attack target, increasing the vulnerability of the system.
[0005] Second, cross-chain interoperability. Different blockchain networks are usually unable to communicate directly, which limits the flow of information and the exchange of value. The lack of effective cross-chain protocols makes it difficult to integrate data on different blockchains, affecting the efficiency of the overall supply chain.
[0006] Third, unique identifier generation: Although some systems have adopted unique identifiers to track goods, these identifiers may not be secure enough and can be easily copied or forged. At the same time, how to efficiently and securely generate and manage these identifiers is also a challenge.
[0007] Fourth, data entry and verification. In different links of the supply chain, the data entry and verification process often relies on manual operations, which is prone to errors and fraud. The lack of automated and standardized data processing mechanisms leads to inconsistent information and delays.
[0008] Fifth, query and traceability: Even on a single blockchain, querying the history and current status of a specific product can be very complicated. In a multi-chain environment, such query becomes even more difficult, affecting consumers’ query experience.
[0009] In short, among the relevant technologies, commodity transactions based on blockchain technology still have the problem of opaque commodity information in complex commodity trading scenarios, and cannot ensure the authenticity and traceability of commodity information throughout the entire transaction process.
[0010] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0011] The embodiments of the present invention provide a commodity information tracing method and device based on blockchain, and an electronic device thereof, so as to at least solve the technical problem of opaque commodity information in complex commodity trading scenarios in related technologies.
[0012] According to one aspect of an embodiment of the present invention, a commodity information tracing method based on blockchain is provided, comprising: determining a target commodity to be traced, and obtaining a commodity order number of the target commodity; obtaining a third identifier based on the commodity order number, and determining a sales end of the target commodity based on the third identifier, wherein the third identifier is determined based on the commodity order number; obtaining a second identifier and a first identifier from a blockchain network of the sales end, determining a transportation end of the target commodity based on the second identifier, and determining a supply end of the target commodity based on the first identifier, wherein the second identifier is determined based on the transportation order number of the target commodity, and the first identifier is determined based on the production batch number of the target commodity; obtaining signature fragments associated with the target commodity from the sales end, the transportation end, and the supply end respectively to obtain a signature fragment set, and generating a threshold signature based on the signature fragments in the signature fragment set; verifying the threshold signature, and if the threshold signature passes the verification, obtaining the order information, logistics information, and production information of the target commodity, and generating a commodity information tracing result of the target commodity based on the order information, the logistics information, and the production information.
[0013] Optionally, the step of obtaining the order information, logistics information and production of the target commodity includes: obtaining the order information of the target commodity from the blockchain network of the sales end of the target commodity based on the third identifier; obtaining the logistics information of the target commodity from the blockchain network of the transportation end of the target commodity based on the second identifier; obtaining the production information of the target commodity from the blockchain network of the supply end of the target commodity based on the first identifier.
[0014] Optionally, before determining the target commodity to be traced, the method further includes: determining a transaction chain formed by each commodity during the transaction process, wherein the transaction chain records the transaction parties involved in the commodity transaction, and the transaction parties include: the supply end, the transportation end, and the sales end; for each commodity, constructing a key for each transaction party on the transaction chain, and sharding the key to obtain key shards; and distributing the key shards to the supply end, the transportation end, and the sales end on the transaction chain.
[0015] Optionally, after distributing the key shard to the supply end, the transport end and the sales end on the transaction chain, it also includes: after receiving the key shard, the supply end generates the signature shard of the product based on the key shard and the production information of the product; the supply end encrypts the production batch number of the product to obtain the first identifier, and uploads the first identifier to the relay blockchain network, and stores the production information of the product to the blockchain network of the supply end.
[0016] Optionally, after distributing the key shard to the supply end, the transport end and the sales end on the transaction chain, it also includes: after receiving the key shard, the transport end generates the signature shard of the product based on the key shard and the logistics information of the product; the supply end encrypts the transport order number of the product to obtain the second identifier, and uploads the second identifier to the relay blockchain network; obtains the first identifier of the product from the relay blockchain network, and stores the logistics information of the product and the first identifier to the blockchain network of the transport end.
[0017] Optionally, after distributing the key shard to the supply end, the transportation end and the sales end on the transaction chain, it also includes: after receiving the key shard, the sales end generates a signature shard of the product based on the key shard and the order information of the product; the sales end encrypts the product order number to obtain the third identifier, and uploads the third identifier to the relay blockchain network; obtains the first identifier and the second identifier of the product from the relay blockchain network, and stores the order information, the first identifier and the second identifier of the product to the blockchain network of the sales end.
[0018] Optionally, the blockchain-based commodity information tracing method uses a SHA-256 encryption algorithm for encryption.
[0019] According to another aspect of an embodiment of the present invention, a commodity information tracing device based on blockchain is also provided, including: a first acquisition unit, used to determine the target commodity to be traced, and obtain the commodity order number of the target commodity; a first determination unit, used to obtain a third identifier based on the commodity order number, and determine the sales end of the target commodity based on the third identifier, wherein the third identifier is determined based on the commodity order number; a second determination unit, used to obtain a second identifier and a first identifier from the blockchain network of the sales end, determine the transportation end of the target commodity based on the second identifier, and determine the supply end of the target commodity based on the first identifier, wherein , the second identifier is determined based on the transport order number of the target commodity, and the first identifier is determined based on the production batch number of the target commodity; a generating unit is used to obtain signature fragments associated with the target commodity from the sales end, the transport end and the supply end respectively, obtain a signature fragment set, and generate a threshold signature based on the signature fragments in the signature fragment set; a second obtaining unit is used to verify the threshold signature, and if the threshold signature passes the verification, obtain the order information, logistics information and production information of the target commodity, and generate a commodity information tracing result of the target commodity based on the order information, the logistics information and the production information.
[0020] Optionally, the second acquisition unit includes: a first acquisition module, used to acquire the order information of the target commodity from the blockchain network of the sales end of the target commodity based on the third identifier; a second acquisition module, used to acquire the logistics information of the target commodity from the blockchain network of the transportation end of the target commodity based on the second identifier; and a third acquisition module, used to acquire the production information of the target commodity from the blockchain network of the supply end of the target commodity based on the first identifier.
[0021] Optionally, the blockchain-based commodity information tracing device also includes: a first determination module, used to determine the transaction chain formed by each commodity during the transaction process, wherein the transaction chain records the transaction parties involved in the commodity transaction, and the transaction parties include: the supply end, the transportation end, and the sales end; a first sharding module, used to construct a key for each transaction party on the transaction chain for each commodity, and shard the key to obtain key shards; a first distribution module, used to distribute the key shards to the supply end, the transportation end, and the sales end on the transaction chain.
[0022] Optionally, the blockchain-based commodity information tracing device also includes: a first generation module, which is used for the supply end to generate the signature fragment of the commodity based on the key fragment and the production information of the commodity after receiving the key fragment; a first encryption module, which is used for the supply end to encrypt the production batch number of the commodity to obtain the first identifier, and upload the first identifier to the relay blockchain network, and store the production information of the commodity to the blockchain network of the supply end.
[0023] Optionally, the blockchain-based commodity information tracing device also includes: a second generation module, which is used for the transportation end to generate the signature fragment of the commodity based on the key fragment and the logistics information of the commodity after receiving the key fragment; a second encryption module, which is used for the supply end to encrypt the transportation order number of the commodity to obtain the second identifier, and upload the second identifier to the relay blockchain network; a first storage module, which is used to obtain the first identifier of the commodity from the relay blockchain network, and store the logistics information of the commodity and the first identifier to the blockchain network of the transportation end.
[0024] Optionally, the blockchain-based product information tracing device also includes: a third generation module, which is used for the sales end to generate a signature fragment of the product based on the key fragment and the order information of the product after receiving the key fragment; a third encryption module, which is used for the sales end to encrypt the product order number to obtain the third identifier, and upload the third identifier to the relay blockchain network; a second storage module, which is used to obtain the first identifier and the second identifier of the product from the relay blockchain network, and store the order information, the first identifier and the second identifier of the product to the blockchain network of the sales end.
[0025] Optionally, the blockchain-based commodity information tracing device uses a SHA-256 encryption algorithm for encryption.
[0026] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is also provided, wherein the computer-readable storage medium includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute any one of the above-mentioned blockchain-based commodity information tracing methods.
[0027] According to another aspect of an embodiment of the present invention, there is also provided an electronic device, comprising one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement any one of the above-mentioned blockchain-based commodity information tracing methods.
[0028] In the present application, the following steps are performed: first determine the target product to be traced, and obtain the product order number of the target product, and obtain a third identifier based on the product order number, and determine the sales end of the target product based on the third identifier, wherein the third identifier is determined based on the product order number, and then obtain the second identifier and the first identifier from the blockchain network of the sales end, determine the transportation end of the target product based on the second identifier, and determine the supply end of the target product based on the first identifier, wherein the second identifier is determined based on the transportation order number of the target product, and the first identifier is determined based on the production batch number of the target product, and then obtain the signature fragments associated with the target product from the sales end, the transportation end and the supply end respectively to obtain a signature fragment set, and generate a threshold signature based on the signature fragments in the signature fragment set, and finally verify the threshold signature. When the threshold signature passes the verification, obtain the order information, logistics information and production information of the target product, and generate the product information tracing result of the target product based on the order information, logistics information and production information.
[0029] In this application, when querying information about the target product, the third identifier of the product is obtained through the order number of the product, and the corresponding sales end is determined based on the third identifier. The second identifier and the first identifier are obtained from the blockchain network of the sales end. Based on this, the transportation end and the supply end of the target product are traced, and the threshold signature verification is set. When the threshold signature verification is met, the product information of the target product in the entire transaction process is obtained from the blockchain network of the transaction parties. Different identifiers are configured for the target product in different transaction networks, which ensures the security of the product information of the target product, achieves the purpose of building a highly secure, transparent and efficient supply chain ecology, and achieves the technical effect of transparent management and efficient data traceability of the entire process of product production to consumption. This solves the technical problem of opaque product information in related technologies for complex commodity trading scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0031] Figure 1 is a flowchart of an optional blockchain-based commodity information tracing method according to an embodiment of the present invention;
[0032] Figure 2 is a schematic diagram of an optional blockchain-based commodity information tracing method according to an embodiment of the present invention;
[0033] Figure 3is a schematic diagram of an optional blockchain-based commodity information tracing device according to an embodiment of the present invention;
[0034] Figure 4 It is a hardware structure block diagram of an electronic device (or mobile device) that executes a blockchain-based commodity information tracing method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0035] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0036] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0037] To facilitate those skilled in the art to understand the present invention, some terms or nouns involved in the embodiments of the present invention are explained below:
[0038] Threshold signature is a cryptographic technique used to ensure the security and integrity of data in distributed systems or multi-signature scenarios.
[0039] SHA-256 encryption algorithm, Secure Hash Algorithm 256-bit, is used to generate a 256-bit (32-byte) fixed-length hash value based on the original information.
[0040] It should be noted that the blockchain-based commodity information tracing method and device thereof in the present application can be used in the blockchain field when information tracing of commodity transaction processes is performed based on blockchain, and can also be used in any field other than the blockchain field when information tracing of commodity transaction processes is performed based on blockchain. The present application does not limit the application field of the blockchain-based commodity information tracing method and device thereof.
[0041] It should be noted that the relevant information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data comply with the relevant laws, regulations and standards of the relevant regions, take necessary confidentiality measures, do not violate public order and good customs, and provide corresponding operation entrances for users to choose to authorize or refuse. For example, an interface is set up between this system and relevant users or organizations. Before obtaining relevant information, it is necessary to send an acquisition request to the aforementioned user or organization through the interface, and obtain relevant information after receiving the consent information fed back by the aforementioned user or organization.
[0042] It should be noted that in this application, when collecting and analyzing customer information, corresponding operation entrances are provided for users to choose to agree or reject the automated decision-making results; if the user chooses to reject, the expert decision-making process will be entered.
[0043] The following embodiments of the present invention can be applied to various systems / applications / devices for commodity information tracing based on blockchain. In the entire commodity transaction process, the present invention constructs different identifiers for commodities on different transaction networks, enhances the identifiability of commodities and the security of identifiers, and at the same time, based on distributed private key control technology, provides a highly secure, transparent and efficient supply chain ecosystem for commodity information tracing, thereby improving the transparency and security of commodity information in the entire transaction process.
[0044] The present invention is described in detail below in conjunction with various embodiments.
[0045] Embodiment 1
[0046] According to an embodiment of the present invention, an embodiment of a commodity information tracing method based on blockchain is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in an order different from that shown here.
[0047] Figure 1 is a flowchart of an optional blockchain-based commodity information tracing method according to an embodiment of the present invention, such as Figure 1 As shown, the method comprises the following steps:
[0048] Step S101, determining the target product to be traced, and obtaining the product order number of the target product.
[0049] It should be noted that with the rapid development of global trade and online shopping, the commodity trading environment is becoming more and more complex, making it increasingly challenging to trace the source of commodities. Commodity traceability can help consumers understand the true source, production process, logistics information and transaction history of commodities, so as to judge the quality, safety and legality of commodities. For example, through traceability, consumers can confirm whether food comes from reliable and safe farms, whether medicines go through formal channels, and whether luxury goods are genuine, which helps protect consumers from counterfeit and shoddy goods. In the event of food safety, drug quality and other issues or consumer product recalls, commodity traceability can also quickly locate the source and flow of problematic commodities, helping companies and regulators to take prompt measures to reduce potential health risks and economic losses, while also facilitating subsequent accountability and improvement measures.
[0050] Traditional commodity traceability usually relies on barcodes, QR codes and manual query methods, which are difficult to ensure the authenticity and safety of commodities. With the development of blockchain technology, due to the decentralization, data immutability and high security of blockchain networks, it has become one of the important technical means to achieve commodity traceability. Combining commodity transactions with blockchain technology can significantly improve the transparency, security and efficiency of transactions. In the blockchain, the parties to the transaction are in different blockchain networks. A node in the blockchain network represents a transaction entity. When a transaction occurs, such as a commodity is ordered, shipped or paid, the transaction data will be packaged into blocks and added to the blockchain through a consensus mechanism. Each block contains one or more transaction records, as well as the hash value of the previous block, forming an unchangeable chain structure. With the openness and immutability of the blockchain, all transaction records and commodity status updates are transparent and visible to authorized participants in the network. This allows information such as the source, circulation path, and transaction history of the commodity to be traced, increasing the transparency and trustworthiness of the supply chain.
[0051] After the user orders goods from the sales end, he can obtain the product order number of the target product. When the user needs to query the status information of the target product, or trace the counterfeit situation of the target product, he can trace it based on the product order number.
[0052] Optionally, before determining the target commodity to be traced, it also includes: determining the transaction chain formed by each commodity in the transaction process, wherein the transaction chain records the transaction parties involved in the commodity transaction, and the transaction parties include: the supply end, the transportation end, and the sales end; for each commodity, constructing a key for each transaction party on the transaction chain, and sharding the key to obtain key shards; distributing the key shards to the supply end, the transportation end, and the sales end on the transaction chain.
[0053] It should be noted that the entire transaction process of a commodity generally involves the supply side, transportation side and sales side. The supply side, transportation section and sales side all have independent blockchain networks and share and transmit their own data through the relay chain. Before tracing the target commodity, the process of building a commodity transaction chain and allocating key shards is a key step to ensure the security and efficiency of commodity information traceability. In the entire circulation process of commodities from production to consumers, a series of transaction chains will be formed. These transaction chains record the flow information of commodities in different links and the entities involved, including the supply side, transportation side, sales side, etc. The first step in determining the transaction chain is to identify these participants, as well as the transaction relationship and order between them. For example, for a box of imported fruits, the transaction chain may start from the supplier, go through multiple transportation links, and finally reach the retailer. Participants in each link should be clearly identified to ensure that subsequent data entry and signature verification can be accurately performed for each entity. In order to protect the data security on the transaction chain, a pair of asymmetric encryption keys, namely public key and private key, needs to be generated for each participant. The private key is used to sign the transaction data to prove the source and integrity of the data; the public key is used to verify these signatures. The embodiment of the present invention divides the private key into multiple private key shards and distributes them securely to the participants in the transaction chain. This prevents the risk of any single entity being lost or stolen. At the same time, through the threshold signature mechanism, even if some key shards are lost, as long as a certain threshold is reached, the signing and verification of the transaction data can still be completed.
[0054] Optionally, after distributing the key shards to the supply end, transportation end and sales end on the transaction chain, it also includes: after receiving the key shards, the supply end generates a signature shard of the product based on the key shards and the production information of the product; the supply end encrypts the production batch number of the product to obtain a first identifier, and uploads the first identifier to the relay blockchain network, and stores the production information of the product to the blockchain network of the supply end.
[0055] It should be noted that after the key shards are securely distributed to the transaction parties on the transaction chain, the supplier generates the signature shard of the product based on the key shards it receives and the production information of the product, and encrypts the production batch number of the product when it is produced to generate a first identifier. When generating a partial signature of the product, the supplier uses the key shard to sign the production information of the product to generate a signature shard. The production information may include information such as the production date, production batch number, source of raw materials, and description of the production process. The signing process involves encrypting the hash value of the production information using the private key shard to generate a digital signature, namely the signature shard. This signature shard will be used in subsequent transaction links and will be threshold signed together with the signature shards of other entities to confirm the integrity of the data and the reliability of the source.
[0056] The supply side also needs to encrypt the production batch number of the product to generate a first identifier, which will serve as the product's unique identification code in the blockchain network and is used to track and trace the product's full chain information. After generating the first identifier, the supply side uploads it to a relay blockchain network, which acts as a bridge between different blockchain networks for cross-chain data synchronization and transaction verification. For other production information, the supply chain can encrypt and store it on its own blockchain network to ensure that the data cannot be tampered with, providing a trusted data source for the product for subsequent product tracing and verification.
[0057] Optionally, after distributing the key shards to the supply end, transportation end and sales end on the transaction chain, it also includes: after receiving the key shards, the transportation end generates a signature shard of the product based on the key shards and the logistics information of the product; the supply end encrypts the transport order number of the product to obtain a second identifier, and uploads the second identifier to the relay blockchain network; obtains the first identifier of the product from the relay blockchain network, and stores the logistics information and the first identifier of the product to the blockchain network of the transportation end.
[0058] It should be noted that when the goods flow from the production stage to the logistics stage, the transportation end corresponding to the goods needs to generate the signature fragment of the goods based on the distributed logistics information and the logistics information of the goods. The logistics information includes but is not limited to the transportation date, transportation method, transportation route, expected arrival time, etc. The generation of the signature fragment usually involves encrypting the hash value of the logistics information using the private key fragment. This step ensures that even if the logistics information is tampered with during the transmission process, it can be detected in the subsequent verification. At the same time, the transportation end encrypts the transportation order number of the goods, generates a second identifier as the unique identifier of the goods in the transportation stage, and uploads the generated second identifier to the relay blockchain network. At the same time, the other logistics information and the first identifier of the goods are stored in the blockchain network of the transportation end, and the transportation end and the supply end are linked. The supply end of the goods can be determined through the transportation segment of the goods.
[0059] Optionally, after distributing the key shards to the supply end, transportation end and sales end on the transaction chain, it also includes: after receiving the key shards, the sales end generates a signature shard of the product based on the key shards and the order information of the product; the sales end encrypts the product order number to obtain a third identifier, and uploads the third identifier to the relay blockchain network; obtains the first identifier and the second identifier of the product from the relay blockchain network, and stores the order information, the first identifier and the second identifier of the product to the blockchain network of the sales end.
[0060] It should be noted that when the goods flow to the sales stage, the sales end, like the supply end and the transportation end, first generates the signature shard of the goods based on the received key shard and the order information generated by the goods in the sales stage. The order information may include order date, order quantity, sales price, buyer information (such as anonymized ID), etc. The signing process ensures the integrity and non-tamperability of order information, which is crucial for the authenticity and legality verification of commodity transactions. At the same time, the sales end encrypts the product order number of the product and uploads it to the relay chain as the unique identifier of the product in the sales stage, and obtains the first identifier and second identifier of the product from the relay chain, and stores it together with other order information of the product in the blockchain network of the sales end, which is convenient for subsequent traceability and query.
[0061] Optionally, the blockchain-based commodity information traceability method uses a SHA-256 encryption algorithm for encryption.
[0062] It should be noted that when the above-mentioned supply side encrypts the production batch number of the product, the transportation side encrypts the transportation order number of the product, and the sales side encrypts the product order number of the product, the SHA-256 encryption algorithm can be used for encryption, which can effectively protect the supply chain information from being illegally obtained and is suitable for all supply chain information management scenarios that require a high level of security.
[0063] Step S102, obtaining a third identifier based on the product order number, and determining a sales end of the target product based on the third identifier.
[0064] It should be noted that when tracing the source of goods, users can obtain the product order number of the target product, which is usually obtained by consumers when purchasing goods and is used to identify a specific purchase transaction. The query request is sent through the product order number, and the query request will be sent to the relay blockchain network. The relay blockchain network will use the product order number as a query condition to retrieve the third identifier related to it. The third identifier can locate the specific sales end and access the blockchain network of the sales end.
[0065] Step S103, obtain the second identifier and the first identifier from the blockchain network of the sales end, determine the transportation end of the target product based on the second identifier, and determine the supply end of the target product based on the first identifier.
[0066] It should be noted that the blockchain network of the sales chain pre-stores the first identifier and the second identifier of the product. Through the third identifier corresponding to the target product, the second identifier and the first identifier of the target product are obtained from the blockchain network of the sales end, and the corresponding second identifier and the first identifier are located on the relay chain. The transportation end corresponding to the target product can be determined through the second identifier, and the supply chain end corresponding to the target product can be determined through the first identifier.
[0067] Step S104, respectively obtain signature fragments associated with the target product from the sales end, the transportation end and the supply end to obtain a signature fragment set, and generate a threshold signature based on the signature fragments in the signature fragment set.
[0068] It should be noted that obtaining signature fragments associated with the target product based on each link of the supply chain (sales end, transportation end and supply end) and generating a threshold signature using a set of these signature fragments is an important means to verify the information integrity and source legitimacy of the entire chain of the product. After determining the sales end, transportation end and supply end corresponding to the target product, the embodiment of the present invention obtains the signature fragments associated with the target product from the sales end, transportation end and supply end respectively. When the threshold value is reached, a threshold signature is generated based on multiple signature fragments. This threshold value specifies the minimum number of signature fragments required to generate a valid signature.
[0069] Step S105, verifying the threshold signature. If the threshold signature passes the verification, the order information, logistics information and production information of the target product are obtained, and a product information tracing result of the target product is generated based on the order information, logistics information and production information.
[0070] It should be noted that the threshold signature is finally verified by the distributed private key control module. The verification process ensures the integrity and legitimacy of the signature, that is, the signature is indeed generated by the entity holding the private key fragment and has not been tampered with during transmission or storage. Once the threshold signature is verified, all information about the target product in each transaction link can be obtained, thereby obtaining the information traceability result of the target product to verify the authenticity and legitimacy of the product.
[0071] Optionally, the step of obtaining the order information, logistics information and production of the target commodity includes: obtaining the order information of the target commodity from the blockchain network of the sales end of the target commodity based on the third identifier; obtaining the logistics information of the target commodity from the blockchain network of the transportation end of the target commodity based on the second identifier; obtaining the production information of the target commodity from the blockchain network of the supply end of the target commodity based on the first identifier.
[0072] It should be noted that when obtaining relevant information of the entire transaction process of the target commodity, the order information of the target commodity is obtained from the blockchain network of the sales end of the target commodity through the third identifier, and the logistics information of the target commodity is obtained from the blockchain network of the transportation segment of the target commodity based on the second identifier, and the production information of the target commodity is obtained from the blockchain network of the supply end of the target commodity based on the first identifier, thereby obtaining all the commodity information of the target commodity in the entire transaction process.
[0073] Through the above steps, the target product to be traced is first determined, and the product order number of the target product is obtained, and the third identifier is obtained based on the product order number, and the sales end of the target product is determined based on the third identifier, wherein the third identifier is determined based on the product order number, and then the second identifier and the first identifier are obtained from the blockchain network of the sales end, and the transportation end of the target product is determined based on the second identifier, and the supply end of the target product is determined based on the first identifier, wherein the second identifier is determined based on the transportation order number of the target product, and the first identifier is determined based on the production batch number of the target product, and then the signature fragments associated with the target product are obtained from the sales end, the transportation end and the supply end respectively to obtain a signature fragment set, and a threshold signature is generated based on the signature fragments in the signature fragment set, and finally the threshold signature is verified. When the threshold signature passes the verification, the order information, logistics information and production information of the target product are obtained, and the product information tracing result of the target product is generated based on the order information, logistics information and production information.
[0074] In this embodiment, when querying the information of the target commodity, the third identifier of the commodity is obtained through the order number of the commodity, and the corresponding sales end is determined according to the third identifier, and the second identifier and the first identifier are obtained from the blockchain network of the sales end. Based on this, the transportation end and the supply end of the target commodity are traced, and the threshold signature verification is set. When the threshold signature verification is met, the commodity information of the target commodity in the entire transaction process is obtained from the blockchain network of the transaction parties, and different identifiers are configured for the target commodity in different transaction networks, which ensures the security of the commodity information of the target commodity, achieves the purpose of building a highly secure, transparent and efficient supply chain ecology, and obtains the technical effect of transparent management and efficient data traceability of the entire process of commodity production to consumption. This solves the technical problem of opaque commodity information in related technologies for complex commodity transaction scenarios.
[0075] Another optional specific implementation is described in detail below.
[0076] Figure 2 is a schematic diagram of an optional blockchain-based commodity information tracing method according to an embodiment of the present invention, such as Figure 2As shown, an embodiment of the present invention proposes a blockchain-based commodity information tracing system, including a supplier (corresponding to the above-mentioned supply end), a transporter (corresponding to the above-mentioned transport end) and a seller (corresponding to the above-mentioned sales end) and a distributed private key control module, wherein the distributed private key control module is used to construct a key, and to fragment the private key, and to distribute the private key fragments to the transaction parties. The supplier stores the production information and part of the signature of the commodity to the supplier chain (i.e., the blockchain network where the supply end is located), and uploads the first identifier of the commodity to the relay chain (corresponding to the above-mentioned relay blockchain network). The transporter uploads the transportation information and part of the signature of the commodity to the transporter chain (corresponding to the blockchain network where the supply end is located), and uploads the second identifier to the relay chain. The seller stores the order information and part of the signature of the commodity to the seller chain (corresponding to the blockchain network where the sales end is located), and uploads the third identifier to the relay chain. Consumers query and trace the target commodity through the blockchain-based commodity information tracing system, and perform signature verification through the threshold signature mechanism. If the verification passes, the data of the commodity in the entire transaction process is obtained.
[0077] The above-mentioned distributed private key control module uses threshold signature and secret sharing algorithm to distribute the private key in segments to various nodes such as suppliers, transporters and sellers on different blockchains. Using the signature aggregation algorithm, without exposing a single private key fragment, only when the partial signatures generated by the private keys of the nodes of the participating parties on different chains reach a certain number and are combined, can the signature verification be passed.
[0078] The unique identifier generation module uses product-related information and the SHA-256 encryption algorithm to generate an irreversible and unique hash value as the product's identity proof at all stages of the transaction process, ensuring that each product has a unique, tamper-proof identifier.
[0079] The supplier uses the unique identifier generation module to encrypt the generated batch number of the product as the first identifier and upload it to the relay chain, while other production information of the product is retained on its own chain.
[0080] The transporter uses the unique identifier generation module to encrypt the product transport order number as the second identifier and upload it to the relay chain. Other transport information of the product and the first identifier are uploaded to the own chain.
[0081] The seller uses the unique identifier generation module to encrypt the product order number as the third identifier and upload it to the relay chain. Other product order information is uploaded to the own chain together with the first identifier and the second identifier.
[0082] The user obtains the third identifier through the product order number, and obtains the product order information based on the third identifier. Through the first identifier and the second identifier on the seller's own chain, the corresponding first identifier and the second identifier are found on the relay chain, and the partial signatures of the supplier and the transporter are obtained. Finally, a verifiable threshold signature is generated. After the verification is passed, the product information data on the blockchain where the supplier, transporter, and seller are located is queried based on the unique identifier, thereby achieving the purpose of data traceability for the entire process of product transactions.
[0083] In the embodiments of the present invention, a highly secure, transparent and efficient supply chain ecosystem is provided through key technologies such as distributed private key control, unique identifier generation, and cross-chain protocol.
[0084] The following is a detailed description in conjunction with another embodiment.
[0085] Embodiment 2
[0086] A blockchain-based commodity information tracing device provided in this embodiment includes multiple implementation units, each of which corresponds to each implementation step in the above-mentioned embodiment 1. Its specific implementation methods and beneficial effects can refer to the above-mentioned method embodiments and will not be repeated here.
[0087] Figure 3 is a schematic diagram of an optional blockchain-based commodity information tracing device according to an embodiment of the present invention, such as Figure 3 As shown, the blockchain-based commodity information tracing device may include: a first acquisition unit 31, a first determination unit 32, a second determination unit 33, a generation unit 34, and a second acquisition unit 35, wherein:
[0088] A first acquisition unit 31 is used to determine the target commodity to be traced and obtain the commodity order number of the target commodity;
[0089] A first determining unit 32 is configured to obtain a third identifier based on the commodity order number, and determine a sales end of the target commodity based on the third identifier, wherein the third identifier is determined based on the commodity order number;
[0090] A second determining unit 33 is used to obtain a second identifier and a first identifier from the blockchain network of the sales end, determine the transportation end of the target commodity based on the second identifier, and determine the supply end of the target commodity based on the first identifier, wherein the second identifier is determined based on the transportation order number of the target commodity, and the first identifier is determined based on the production batch number of the target commodity;
[0091] A generating unit 34 is used to obtain signature fragments associated with the target product from the sales end, the transportation end and the supply end respectively, obtain a signature fragment set, and generate a threshold signature based on the signature fragments in the signature fragment set;
[0092] The second acquisition unit 35 is used to verify the threshold signature, and when the threshold signature passes the verification, obtain the order information, logistics information and production information of the target commodity, and generate a commodity information tracing result of the target commodity based on the order information, logistics information and production information.
[0093] The above-mentioned blockchain-based commodity information tracing device determines the target commodity to be traced through the first acquisition unit 31, and obtains the commodity order number of the target commodity; the first determination unit 32 is used to obtain the third identifier based on the commodity order number, and determine the sales end of the target commodity based on the third identifier, wherein the third identifier is determined based on the commodity order number; the second determination unit 33 obtains the second identifier and the first identifier from the blockchain network of the sales end, determines the transportation end of the target commodity based on the second identifier, and determines the supply end of the target commodity based on the first identifier, wherein the second identifier is determined based on the transportation order number of the target commodity, and the first identifier is determined based on the production batch number of the target commodity; the generation unit 34 obtains the signature fragments associated with the target commodity from the sales end, the transportation end and the supply end respectively, obtains the signature fragment set, and generates the threshold signature based on the signature fragments in the signature fragment set; the threshold signature is verified by the second acquisition unit 35, and when the threshold signature passes the verification, the order information, logistics information and production information of the target commodity are obtained, and the commodity information tracing result of the target commodity is generated based on the order information, logistics information and production information.
[0094] In this embodiment, when querying the information of the target commodity, the third identifier of the commodity is obtained through the order number of the commodity, and the corresponding sales end is determined according to the third identifier, and the second identifier and the first identifier are obtained from the blockchain network of the sales end. Based on this, the transportation end and the supply end of the target commodity are traced, and the threshold signature verification is set. When the threshold signature verification is met, the commodity information of the target commodity in the entire transaction process is obtained from the blockchain network of the transaction parties, and different identifiers are configured for the target commodity in different transaction networks, which ensures the security of the commodity information of the target commodity, achieves the purpose of building a highly secure, transparent and efficient supply chain ecology, and obtains the technical effect of transparent management and efficient data traceability of the entire process of commodity production to consumption. This solves the technical problem of opaque commodity information in related technologies for complex commodity transaction scenarios.
[0095] Optionally, the second acquisition unit includes: a first acquisition module, used to acquire the order information of the target commodity from the blockchain network of the sales end of the target commodity based on the third identifier; a second acquisition module, used to acquire the logistics information of the target commodity from the blockchain network of the transportation end of the target commodity based on the second identifier; a third acquisition module, used to acquire the production information of the target commodity from the blockchain network of the supply end of the target commodity based on the first identifier.
[0096] Optionally, the blockchain-based commodity information tracing device also includes: a first determination module, used to determine the transaction chain formed by each commodity during the transaction process, wherein the transaction chain records the transaction parties involved in the commodity transaction, and the transaction parties include: a supply end, a transportation end, and a sales end; a first sharding module, used to construct a key for each transaction party on the transaction chain for each commodity, and shard the key to obtain key shards; a first distribution module, used to distribute the key shards to the supply end, transportation end, and sales end on the transaction chain.
[0097] Optionally, the blockchain-based commodity information tracing device also includes: a first generation module, which is used for the supply side to generate a signature fragment of the commodity based on the key fragment and the production information of the commodity after receiving the key fragment; a first encryption module, which is used for the supply side to encrypt the production batch number of the commodity to obtain a first identifier, and upload the first identifier to the relay blockchain network, and store the production information of the commodity in the blockchain network of the supply side.
[0098] Optionally, the blockchain-based commodity information tracing device also includes: a second generation module, which is used for the transportation end to generate a signature fragment of the commodity based on the key fragment and the logistics information of the commodity after receiving the key fragment; a second encryption module, which is used for the supply end to encrypt the transportation order number of the commodity to obtain a second identifier, and upload the second identifier to the relay blockchain network; a first storage module, which is used to obtain the first identifier of the commodity from the relay blockchain network, and store the logistics information and the first identifier of the commodity to the blockchain network of the transportation end.
[0099] Optionally, the blockchain-based product information tracing device also includes: a third generation module, which is used for the sales end to generate a signature fragment of the product based on the key fragment and the order information of the product after receiving the key fragment; a third encryption module, which is used for the sales end to encrypt the product order number to obtain a third identifier, and upload the third identifier to the relay blockchain network; a second storage module, which is used to obtain the first identifier and the second identifier of the product from the relay blockchain network, and store the order information, the first identifier and the second identifier of the product to the blockchain network of the sales end.
[0100] Optionally, the blockchain-based commodity information tracing device uses the SHA-256 encryption algorithm for encryption.
[0101] The above-mentioned blockchain-based commodity information tracing device may also include a processor and a memory. The above-mentioned first acquisition unit 31, first determination unit 32, second determination unit 33, generation unit 34, second acquisition unit 35, etc. are all stored in the memory as program units, and the processor executes the above-mentioned program units stored in the memory to realize corresponding functions.
[0102] The processor includes a kernel, which retrieves the corresponding program unit from the memory. One or more kernels can be set, and the whole transaction process of the target product can be traced by adjusting the kernel parameters.
[0103] The above-mentioned memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one storage chip.
[0104] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is also provided, the computer-readable storage medium including a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute any one of the above-mentioned blockchain-based commodity information tracing methods.
[0105] According to another aspect of an embodiment of the present invention, there is also provided an electronic device, comprising one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by one or more processors, the one or more processors implement any one of the above-mentioned blockchain-based commodity information tracing methods.
[0106] According to another aspect of an embodiment of the present invention, a computer program product is also provided, the computer program product comprising a computer program, wherein when the computer program is executed by a processor, any one of the above-mentioned blockchain-based commodity information tracing methods is implemented.
[0107] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program that is initialized with the following method steps: determining a target commodity to be traced and obtaining the commodity order number of the target commodity; obtaining a third identifier based on the commodity order number, and determining the sales end of the target commodity based on the third identifier, wherein the third identifier is determined based on the commodity order number; obtaining a second identifier and a first identifier from the blockchain network of the sales end, determining the transportation end of the target commodity based on the second identifier, and determining the supply end of the target commodity based on the first identifier, wherein the second identifier is determined based on the transportation order number of the target commodity, and the first identifier is determined based on the production batch number of the target commodity; obtaining signature fragments associated with the target commodity from the sales end, the transportation end, and the supply end respectively to obtain a signature fragment set, and generating a threshold signature based on the signature fragments in the signature fragment set; verifying the threshold signature, and when the threshold signature passes the verification, obtaining the order information, logistics information, and production information of the target commodity, and generating a commodity information tracing result of the target commodity based on the order information, logistics information, and production information.
[0108] The present application also provides a computer program product, which, when executed on a data processing device, is also suitable for executing a program that initializes the following method steps: the steps of obtaining the order information, logistics information and production of the target commodity include: obtaining the order information of the target commodity from the blockchain network of the sales end of the target commodity based on the third identifier; obtaining the logistics information of the target commodity from the blockchain network of the transportation end of the target commodity based on the second identifier; obtaining the production information of the target commodity from the blockchain network of the supply end of the target commodity based on the first identifier.
[0109] The present application also provides a computer program product, which, when executed on a data processing device, is also suitable for executing a program that initializes the following method steps: before determining the target commodity to be traced, it also includes: determining the transaction chain formed by each commodity in the transaction process, wherein the transaction chain records the transaction parties involved in the commodity transaction, and the transaction parties include: a supply end, a transportation end, and a sales end; for each commodity, constructing a key for each transaction party on the transaction chain, and sharding the key to obtain key shards; distributing the key shards to the supply end, the transportation end, and the sales end on the transaction chain.
[0110] The present application also provides a computer program product, which, when executed on a data processing device, is also suitable for executing a program that initializes the following method steps: after distributing the key shards to the supply end, transportation end and sales end on the transaction chain, it also includes: after receiving the key shards, the supply end generates a signature shard of the product based on the key shards and the production information of the product; the supply end encrypts the production batch number of the product to obtain a first identifier, and uploads the first identifier to the relay blockchain network, and stores the production information of the product to the blockchain network of the supply end.
[0111] The present application also provides a computer program product, which, when executed on a data processing device, is also suitable for executing a program that initializes the following method steps: after distributing the key shards to the supply end, transportation end and sales end on the transaction chain, it also includes: after receiving the key shards, the transportation end generates a signature shard of the product based on the key shards and the logistics information of the product; the supply end encrypts the transportation order number of the product to obtain a second identifier, and uploads the second identifier to the relay blockchain network; obtains the first identifier of the product from the relay blockchain network, and stores the logistics information and the first identifier of the product to the blockchain network of the transportation end.
[0112] The present application also provides a computer program product, which, when executed on a data processing device, is also suitable for executing a program that initializes the following method steps: after distributing the key shards to the supply end, transportation end and sales end on the transaction chain, it also includes: after receiving the key shards, the sales end generates a signature shard of the product based on the key shards and the order information of the product; the sales end encrypts the product order number to obtain a third identifier, and uploads the third identifier to the relay blockchain network; obtains the first identifier and the second identifier of the product from the relay blockchain network, and stores the order information, the first identifier and the second identifier of the product to the blockchain network of the sales end.
[0113] The present application also provides a computer program product, which, when executed on a data processing device, is also suitable for executing a program that initializes the following method steps: a blockchain-based commodity information traceability method is encrypted using the SHA-256 encryption algorithm.
[0114] Figure 4 1 is a hardware structure block diagram of an electronic device (or mobile device) for executing a commodity information tracing method based on blockchain according to an embodiment of the present invention. Figure 4 As shown, the electronic device may include one or more processors ( Figure 4 402a, 402b, ..., 402n are used to illustrate), a memory 404 for storing data. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the I / O interface), a network interface, a keyboard, a power supply and / or a camera. It can be understood by those skilled in the art that Figure 4 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 4 More or fewer components as shown, or with Figure 4 Different configurations shown.
[0115] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0116] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0117] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0118] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0119] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0120] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.
[0121] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A commodity information tracing method based on blockchain, characterized in that: include: Determine the target product to be traced and obtain the product order number of the target product; Acquire a third identifier based on the commodity order number, and determine a sales end of the target commodity based on the third identifier, wherein the third identifier is determined based on the commodity order number; Acquire a second identifier and a first identifier from the blockchain network of the sales end, determine the transportation end of the target commodity based on the second identifier, and determine the supply end of the target commodity based on the first identifier, wherein the second identifier is determined based on the transportation order number of the target commodity, and the first identifier is determined based on the production batch number of the target commodity; Acquire signature fragments associated with the target product from the sales end, the transportation end, and the supply end respectively to obtain a signature fragment set, and generate a threshold signature based on the signature fragments in the signature fragment set; Verify the threshold signature, and if the threshold signature passes the verification, obtain the order information, logistics information and production information of the target commodity, and generate a commodity information tracing result of the target commodity based on the order information, the logistics information and the production information.
2. The tracing method according to claim 1, characterized in that: The steps of obtaining the order information, logistics information and production of the target product include: Acquire order information of the target product from a blockchain network of a sales end of the target product based on the third identifier; Obtaining logistics information of the target commodity from the blockchain network of the transportation end of the target commodity based on the second identifier; Based on the first identifier, the production information of the target commodity is obtained from the blockchain network of the supplier of the target commodity.
3. The tracing method according to claim 1, characterized in that: Before determining the target product to be traced, it also includes: Determine the transaction chain formed during the transaction of each commodity, wherein the transaction chain records the transaction parties involved in the commodity transaction, including: the supply end, the transport end, and the sales end; For each commodity, a key is constructed for each party in the transaction chain, and the key is sharded to obtain key shards; The key shards are distributed to the supply end, the transportation end and the sales end on the transaction chain.
4. The tracing method according to claim 3, characterized in that: After distributing the key shards to the supply end, the transport end, and the sales end on the transaction chain, the method further includes: After receiving the key fragment, the supply end generates the signature fragment of the commodity based on the key fragment and the production information of the commodity; The supplier encrypts the production batch number of the product to obtain the first identifier, uploads the first identifier to the relay blockchain network, and stores the production information of the product to the blockchain network of the supplier.
5. The tracing method according to claim 3, characterized in that: After distributing the key shards to the supply end, the transport end, and the sales end on the transaction chain, the method further includes: After receiving the key fragment, the transport end generates the signature fragment of the commodity based on the key fragment and the logistics information of the commodity; The supplier encrypts the shipping number of the commodity to obtain the second identifier, and uploads the second identifier to the relay blockchain network; The first identifier of the commodity is obtained from the relay blockchain network, and the logistics information of the commodity and the first identifier are stored in the blockchain network of the transportation end.
6. The tracing method according to claim 3, characterized in that: After distributing the key shards to the supply end, the transport end, and the sales end on the transaction chain, the method further includes: After receiving the key fragment, the sales end generates a signature fragment of the product based on the key fragment and the order information of the product; The sales end encrypts the product order number to obtain the third identifier, and uploads the third identifier to the relay blockchain network; The first identifier and the second identifier of the commodity are obtained from the relay blockchain network, and the order information, the first identifier and the second identifier of the commodity are stored in the blockchain network of the sales end.
7. The tracing method according to any one of claims 4 to 6, characterized in that: The SHA-256 encryption algorithm is used for encryption.
8. A commodity information tracing device based on blockchain, characterized in that: include: A first acquisition unit is used to determine a target commodity to be traced and acquire a commodity order number of the target commodity; A first determining unit, configured to obtain a third identifier based on the commodity order number, and determine a sales end of the target commodity based on the third identifier, wherein the third identifier is determined based on the commodity order number; A second determining unit is used to obtain a second identifier and a first identifier from the blockchain network of the sales end, determine the transportation end of the target commodity based on the second identifier, and determine the supply end of the target commodity based on the first identifier, wherein the second identifier is determined based on the transportation order number of the target commodity, and the first identifier is determined based on the production batch number of the target commodity; A generating unit, configured to respectively obtain signature fragments associated with the target commodity from the sales end, the transportation end, and the supply end to obtain a signature fragment set, and generate a threshold signature based on the signature fragments in the signature fragment set; The second acquisition unit is used to verify the threshold signature, and when the threshold signature passes the verification, obtain the order information, logistics information and production information of the target commodity, and generate a commodity information tracing result of the target commodity based on the order information, the logistics information and the production information.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the blockchain-based commodity information tracing method described in any one of claims 1 to 7.
10. An electronic device, characterized in that: It includes one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the blockchain-based commodity information tracing method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Commodity anti-counterfeiting method and terminal
CN114092111A
Cold chain tracing method and system based on block chain and verifiable database
CN117194486A
Cited By
Logistics information tracking system and method based on block chain
CN120258672A