Method and system for associating e-commerce commodity with commodity quality certificate
Patent Information
- Application Number
- CN202411386149.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-30
- Publication Date
- 2025-01-24
AI Technical Summary
In the existing product quality and safety traceability system, the data structure of the hash value calculated using the entire process flow information including product quality certificate content is too simple, making it difficult to discover through hash value comparison when the data is tampered with. Increased difficulty in tamper detection.
By constructing e -commerce product information database and blockchain, the corresponding relationship between the goods code and the quality certificate of e -product, combined with hash processing technology, calculate the hash value of the e -commerce product quality certificate content, and this hash will The value of the value of the goods code and the quality certificate of the e -product is combined into the JSON string, and then the JSON string is handled for hash to get the final hash value and store it in the blockchain to complete the relationship between e -commerce products and its quality certificate.
This method increases the level of data structure and complexity, so that any modification of the quality certificate of the product can be detected through the change of the hash value, which is easy to detect tampering and improve the reliability of product quality and safety traceability.
Smart Images

Figure CN119357993A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of logistics technology, and in particular to a method and system for associating e-commerce products with product quality certificates. Background Art
[0002] As blockchain technology matures, its decentralized, tamper-proof, transparent and traceable features provide a new solution for product quality and safety traceability. An existing patent cleverly uses blockchain technology to build a product quality and safety traceability system. The system assigns a unique identification code to each product, which enables accurate recording and tracing of information from production to consumption. When synthesizing the information chain, the system uses a hash algorithm to encrypt the information circulated throughout the entire process, generates a unique hash value, and writes the hash value into the blockchain. However, in the prior art, the data structure of the hash value calculated using the entire process flow information including the content of the product quality certificate is too simple. Even if the data is tampered with, it may be difficult to detect by comparing the hash values because the tampering method is clever, thereby increasing the difficulty of tampering detection. Summary of the invention
[0003] In view of the above-mentioned defects, the present invention proposes a method and system for associating e-commerce goods with product quality certificates, aiming to solve the problem that in the existing product quality and safety traceability system, the data structure of the hash value calculated by using the whole process flow information including the content of the product quality certificate is too simple. Even if the data is tampered with, it may be difficult to detect by comparing the hash values because the tampering method is clever, thereby increasing the difficulty of tampering detection.
[0004] To achieve this object, the present invention adopts the following technical solutions:
[0005] A method for associating an e-commerce product with a product quality certificate comprises the following steps:
[0006] Step S1: constructing an e-commerce product information database and a blockchain, wherein the e-commerce product information database includes product codes and electronic product quality certificates of a number of e-commerce products, and each e-commerce product code corresponds to an electronic product quality certificate;
[0007] Step S2: Obtain the product code of the e-commerce product to be associated;
[0008] Step S3: According to the product code of the e-commerce product to be associated, obtain the corresponding electronic product quality certificate from the e-commerce product information database;
[0009] Step S4: Calculate the hash value of the content of the electronic product quality certificate of the e-commerce product to be associated to obtain a first hash value;
[0010] Step S5: Combining the product code of the e-commerce product to be associated, the content of the electronic product quality certificate of the e-commerce product to be associated, and the first hash value into a json string;
[0011] Step S6: Perform hash processing on the json string to obtain a second hash value;
[0012] Step S7: Store the second hash value in the blockchain to complete the association between the e-commerce product to be associated and its corresponding electronic product quality certificate.
[0013] Preferably, in step S7, after completing the association between the e-commerce product to be associated and its corresponding electronic product quality certificate, the following steps are also included: by identifying the product code of the associated e-commerce product, obtaining its corresponding electronic product quality certificate and visually displaying it.
[0014] Preferably, the method further includes the following steps: regularly updating the product codes and electronic product quality certificates of the e-commerce products in the e-commerce product information database.
[0015] Another aspect of the present application provides a system for associating e-commerce products with product quality certificates, the system comprising:
[0016] A construction module is used to construct an e-commerce commodity information database and a blockchain, wherein the e-commerce commodity information database includes commodity codes and electronic commodity quality certificates of a number of e-commerce commodities, and each e-commerce commodity code corresponds to an electronic commodity quality certificate;
[0017] A first acquisition module is used to acquire the product code of the e-commerce product to be associated;
[0018] The second acquisition module is used to obtain the corresponding electronic product quality certificate from the e-commerce product information database according to the product code of the e-commerce product to be associated;
[0019] A first calculation module, used to calculate a hash value of the content of the electronic product quality certificate of the e-commerce product to be associated, to obtain a first hash value;
[0020] A combination module, used to combine the product code of the e-commerce product to be associated, the content of the electronic product quality certificate of the e-commerce product to be associated, and the first hash value into a json string;
[0021] The second calculation module is used to perform hash processing on the JSON string to obtain a second hash value;
[0022] The storage module is used to store the second hash value in the blockchain to complete the association between the e-commerce product to be associated and its corresponding electronic product quality certificate.
[0023] Preferably, it also includes: an identification module for identifying the product code of the associated e-commerce product; a third acquisition module for acquiring the electronic product quality certificate corresponding to the associated e-commerce product by executing the identification module; and a visualization module for visually displaying the electronic product quality certificate corresponding to the associated e-commerce product.
[0024] Preferably, it also includes: an updating module, which is used to regularly update the product codes and electronic product quality certificates of the e-commerce products in the e-commerce product information database.
[0025] The technical solution provided by the embodiments of the present application may have the following beneficial effects:
[0026] In this solution, an e-commerce product information database and blockchain are constructed, and the corresponding relationship between the product code and the electronic quality certificate is used, combined with hash processing technology, to achieve an effective association between e-commerce products and their quality certificates. In this solution, when calculating the hash value, the hash value of the content of the electronic product quality certificate of the e-commerce product is first calculated, and then this hash value is combined with the product code of the e-commerce product and the content of the electronic product quality certificate of the e-commerce product to form a json string, and the json string is hashed to obtain the final hash value. This method of calculating hash values increases the level and complexity of the data structure, so that any modification to the product quality certificate can be detected through changes in the hash value, making it easy to detect tampering. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 It is a flowchart of the method steps for associating e-commerce products with product quality certificates. DETAILED DESCRIPTION
[0028] The embodiments of the present invention are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals represent the same or similar elements or elements having the same or similar functions from beginning to end. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.
[0029] A method for associating an e-commerce product with a product quality certificate comprises the following steps:
[0030] Step S1: constructing an e-commerce product information database and a blockchain, wherein the e-commerce product information database includes product codes and electronic product quality certificates of a number of e-commerce products, and each e-commerce product code corresponds to an electronic product quality certificate;
[0031] Step S2: Obtain the product code of the e-commerce product to be associated;
[0032] Step S3: According to the product code of the e-commerce product to be associated, obtain the corresponding electronic product quality certificate from the e-commerce product information database;
[0033] Step S4: Calculate the hash value of the content of the electronic product quality certificate of the e-commerce product to be associated to obtain a first hash value;
[0034] Step S5: Combining the product code of the e-commerce product to be associated, the content of the electronic product quality certificate of the e-commerce product to be associated, and the first hash value into a json string;
[0035] Step S6: Perform hash processing on the json string to obtain a second hash value;
[0036] Step S7: Store the second hash value in the blockchain to complete the association between the e-commerce product to be associated and its corresponding electronic product quality certificate.
[0037] A method of associating e-commerce products with product quality certificates in this solution, such as Figure 1As shown, the first step is to construct an e-commerce commodity information database and a blockchain, wherein the e-commerce commodity information database includes the product codes and electronic commodity quality certificates of several e-commerce commodities, and each e-commerce commodity product code corresponds to an electronic commodity quality certificate. In this embodiment, by constructing an e-commerce commodity information database, it is beneficial to better store and manage the information data of e-commerce commodities. Each e-commerce commodity has a unique product code and an electronic commodity quality certificate. By constructing a blockchain, the information on the blockchain cannot be tampered with at will. The second step is to obtain the product code of the e-commerce commodity to be associated. In this embodiment, by obtaining the product code of the e-commerce commodity to be associated, it is beneficial to the subsequent association of the e-commerce commodity with the electronic commodity quality certificate. The third step is to obtain the corresponding electronic commodity quality certificate from the e-commerce commodity information database according to the product code of the e-commerce commodity to be associated. In this embodiment, since each e-commerce commodity product code corresponds to an electronic commodity quality certificate, the corresponding electronic commodity quality certificate to be associated can be retrieved from the e-commerce commodity information database according to the product code of the e-commerce commodity to be associated. The fourth step is to calculate the hash value of the content of the electronic product quality certificate of the e-commerce product to be associated, and obtain the first hash value. In this embodiment, by calculating the hash value of the content of the electronic product quality certificate of the e-commerce product, it is helpful to verify the integrity and authenticity of the electronic product quality certificate of the e-commerce product. Further explanation, the SHA-256 hash algorithm is used when calculating the hash value to ensure the security and uniqueness of the first hash value. The fifth step is to combine the product code of the e-commerce product to be associated, the content of the electronic product quality certificate of the e-commerce product to be associated, and the first hash value into a json string. In this embodiment, since the json format has good readability and easy parsing characteristics, the product code of the e-commerce product to be associated, the content of the electronic product quality certificate of the e-commerce product to be associated, and the first hash value are combined into a json string, which is conducive to subsequent processing. The sixth step is to hash the json string to obtain a second hash value. In this embodiment, by hashing the json string containing key information, a unique identifier, namely the second hash value, can be generated, which is conducive to the subsequent storage of this unique identifier in the blockchain. The seventh step is to store the second hash value in the blockchain to complete the association between the e-commerce product to be associated and its corresponding electronic product quality certificate. In this embodiment, by storing the second hash value in the blockchain, the data on the blockchain can be ensured to be tamper-proof and traceable. After completing the association between the e-commerce product to be associated and its corresponding electronic product quality certificate, the supplier will print the associated product code on the packaging of each e-commerce product after completing the production of a batch of e-commerce products. The product code is a barcode or WeChat applet code. When the e-commerce product is shipped out, the corresponding electronic product quality certificate can be viewed by scanning the product code on the e-commerce product packaging.
[0038] In this solution, an e-commerce product information database and blockchain are constructed, and the corresponding relationship between the product code and the electronic quality certificate is used, combined with hash processing technology, to achieve an effective association between e-commerce products and their quality certificates. In this solution, when calculating the hash value, the hash value of the content of the electronic product quality certificate of the e-commerce product is first calculated, and then this hash value is combined with the product code of the e-commerce product and the content of the electronic product quality certificate of the e-commerce product to form a json string, and the json string is hashed to obtain the final hash value. This method of calculating hash values increases the level and complexity of the data structure, so that any modification to the product quality certificate can be detected through changes in the hash value, making it easy to detect tampering.
[0039] Preferably, in step S7, after the association between the e-commerce product to be associated and its corresponding electronic product quality certificate is completed, the following steps are also included: by identifying the product code of the associated e-commerce product, the corresponding electronic product quality certificate is obtained and displayed visually. In this embodiment, after the association between the e-commerce product to be associated and its corresponding electronic product quality certificate is completed, the supplier can view the electronic product quality certificate of the e-commerce product on the mobile phone or computer by identifying the associated product code on the e-commerce product packaging, so that the supplier can intuitively understand the quality of the e-commerce product.
[0040] Preferably, the following steps are further included: regularly updating the product codes and electronic product quality certificates of the e-commerce products in the e-commerce product information database. In this embodiment, regularly updating the product codes and electronic product quality certificates of the e-commerce products in the e-commerce product information database is conducive to ensuring the accuracy and timeliness of the information in the e-commerce product information database.
[0041] Another aspect of the present application provides a system for associating e-commerce products with product quality certificates, the system comprising:
[0042] A construction module is used to construct an e-commerce commodity information database and a blockchain, wherein the e-commerce commodity information database includes commodity codes and electronic commodity quality certificates of a number of e-commerce commodities, and each e-commerce commodity code corresponds to an electronic commodity quality certificate;
[0043] A first acquisition module is used to acquire the product code of the e-commerce product to be associated;
[0044] The second acquisition module is used to obtain the corresponding electronic product quality certificate from the e-commerce product information database according to the product code of the e-commerce product to be associated;
[0045] A first calculation module, used to calculate a hash value of the content of the electronic product quality certificate of the e-commerce product to be associated, to obtain a first hash value;
[0046] A combination module, used to combine the product code of the e-commerce product to be associated, the content of the electronic product quality certificate of the e-commerce product to be associated, and the first hash value into a json string;
[0047] The second calculation module is used to perform hash processing on the JSON string to obtain a second hash value;
[0048] The storage module is used to store the second hash value in the blockchain to complete the association between the e-commerce product to be associated and its corresponding electronic product quality certificate.
[0049] The system of the present solution for associating e-commerce goods with product quality certificates realizes the effective association of e-commerce goods with their quality certificates through the cooperation of a construction module, a first acquisition module, a second acquisition module, a first calculation module, a combination module, a second calculation module and a storage module. In the present solution, when calculating the hash value, the hash value of the content of the electronic product quality certificate of the e-commerce product is first calculated, and then the hash value is combined with the product code of the e-commerce product and the content of the electronic product quality certificate of the e-commerce product to form a json string, and the json string is hashed to obtain the final hash value. This method of calculating hash values increases the level and complexity of the data structure, so that any modification to the product quality certificate can be detected by the change of the hash value, thereby facilitating the detection of tampering.
[0050] Preferably, it also includes: an identification module, used to identify the product code of the e-commerce product after association; a third acquisition module, used to obtain the electronic product quality certificate corresponding to the e-commerce product after association by executing the identification module; and a visualization module, used to visualize the electronic product quality certificate corresponding to the e-commerce product after association.
[0051] In this embodiment, through the cooperation of the identification module, the third acquisition module and the visual display module, the supplier can view the electronic product quality certificate of the e-commerce product on the mobile phone or computer by identifying the associated product code on the e-commerce product packaging, which makes it convenient for the supplier to intuitively understand the quality of the e-commerce product.
[0052] Preferably, it also includes: an update module for regularly updating the product code and electronic product quality certificate of the e-commerce product in the e-commerce product information database. In this embodiment, executing the update module is conducive to ensuring the accuracy and timeliness of the information in the e-commerce product information database.
[0053] In addition, each functional unit in each embodiment of the present invention may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.
[0054] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.
Claims
1. A method for associating an e-commerce product with a product quality certificate, characterized by: The following steps are involved: Step S1: constructing an e-commerce product information database and a blockchain, wherein the e-commerce product information database includes product codes and electronic product quality certificates of a number of e-commerce products, and each e-commerce product code corresponds to an electronic product quality certificate; Step S2: Obtain the product code of the e-commerce product to be associated; Step S3: According to the product code of the e-commerce product to be associated, obtain the corresponding electronic product quality certificate from the e-commerce product information database; Step S4: Calculate the hash value of the content of the electronic product quality certificate of the e-commerce product to be associated to obtain a first hash value; Step S5: Combining the product code of the e-commerce product to be associated, the content of the electronic product quality certificate of the e-commerce product to be associated, and the first hash value into a json string; Step S6: Perform hash processing on the json string to obtain a second hash value; Step S7: Store the second hash value in the blockchain to complete the association between the e-commerce product to be associated and its corresponding electronic product quality certificate.
2. A method for associating an e-commerce product with a product quality certificate according to claim 1, characterized in that: In step S7, after the association between the e-commerce product to be associated and its corresponding electronic product quality certificate is completed, the following steps are also included: By identifying the product code of the associated e-commerce product, the corresponding electronic product quality certificate is obtained and displayed visually.
3. A method for associating e-commerce products with product quality certificates according to claim 1, characterized in that: The following steps are also included: Regularly update the product codes and electronic product quality certificates of e-commerce products in the e-commerce product information database.
4. A system for associating e-commerce products with product quality certificates, using the method for associating e-commerce products with product quality certificates as claimed in any one of claims 1 to 3, characterized in that: The system comprises: A construction module is used to construct an e-commerce commodity information database and a blockchain, wherein the e-commerce commodity information database includes commodity codes and electronic commodity quality certificates of a number of e-commerce commodities, and each e-commerce commodity code corresponds to an electronic commodity quality certificate; A first acquisition module is used to acquire the product code of the e-commerce product to be associated; The second acquisition module is used to obtain the corresponding electronic product quality certificate from the e-commerce product information database according to the product code of the e-commerce product to be associated; A first calculation module, used to calculate a hash value of the content of the electronic product quality certificate of the e-commerce product to be associated, to obtain a first hash value; A combination module, used to combine the product code of the e-commerce product to be associated, the content of the electronic product quality certificate of the e-commerce product to be associated, and the first hash value into a json string; The second calculation module is used to perform hash processing on the JSON string to obtain a second hash value; The storage module is used to store the second hash value in the blockchain to complete the association between the e-commerce product to be associated and its corresponding electronic product quality certificate.
5. A system for associating e-commerce products with product quality certificates according to claim 4, characterized in that: Also includes: An identification module is used to identify the product code of the associated e-commerce product; A third acquisition module is used to acquire the electronic product quality certificate corresponding to the associated e-commerce product by executing the identification module; The visual display module is used to visually display the electronic product quality certificates corresponding to the associated e-commerce products.
6. A system for associating e-commerce products with product quality certificates according to claim 4, characterized in that: Also includes: The update module is used to regularly update the product codes and electronic product quality certificates of the e-commerce products in the e-commerce product information database.
Citation Information
Patent Citations
Commodity anti-counterfeiting method and system based on block chain
CN109146528A
A traceability anti-counterfeiting data storage system
CN109255622A
Certificate revocation method and device of blockchain network and electronic equipment
CN111030826A
Trusted application network data tracing method and auditing method for software complex network
CN111355570A
Block chain cross-chain method and device
CN113408003A