CN110598470B - Block chain-based commodity information storage method, device and system and storage medium - Google Patents
Block chain-based commodity information storage method, device and system and storage medium Download PDFInfo
- Publication number
- CN110598470B CN110598470B CN201910877382.9A CN201910877382A CN110598470B CN 110598470 B CN110598470 B CN 110598470B CN 201910877382 A CN201910877382 A CN 201910877382A CN 110598470 B CN110598470 B CN 110598470B
- Authority
- CN
- China
- Prior art keywords
- commodity
- code
- self
- contained
- node
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 47
- 238000003860 storage Methods 0.000 title claims abstract description 43
- 238000004519 manufacturing process Methods 0.000 claims abstract description 194
- 238000009826 distribution Methods 0.000 claims abstract description 53
- 238000012795 verification Methods 0.000 claims abstract description 26
- 230000007246 mechanism Effects 0.000 claims description 41
- 238000004806 packaging method and process Methods 0.000 claims 1
- 230000001105 regulatory effect Effects 0.000 abstract description 4
- 238000007726 management method Methods 0.000 description 90
- 235000019504 cigarettes Nutrition 0.000 description 84
- 238000004891 communication Methods 0.000 description 11
- 230000002093 peripheral effect Effects 0.000 description 10
- 238000012545 processing Methods 0.000 description 9
- 238000010586 diagram Methods 0.000 description 8
- 230000008520 organization Effects 0.000 description 8
- 230000008569 process Effects 0.000 description 5
- 230000006870 function Effects 0.000 description 4
- 241000208125 Nicotiana Species 0.000 description 2
- 235000002637 Nicotiana tabacum Nutrition 0.000 description 2
- 238000013473 artificial intelligence Methods 0.000 description 2
- 238000004422 calculation algorithm Methods 0.000 description 2
- 239000000919 ceramic Substances 0.000 description 2
- 238000004590 computer program Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000012544 monitoring process Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000001360 synchronised effect Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000004927 fusion Effects 0.000 description 1
- 230000001788 irregular Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- 239000000463 material Substances 0.000 description 1
- 230000005055 memory storage Effects 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 238000003062 neural network model Methods 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 238000009877 rendering Methods 0.000 description 1
- 239000010409 thin film Substances 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/64—Protecting data integrity, e.g. using checksums, certificates or signatures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q30/00—Commerce
- G06Q30/018—Certifying business or products
- G06Q30/0185—Product, service or business identity fraud
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q50/00—Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
- G06Q50/04—Manufacturing
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02P—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
- Y02P90/00—Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
- Y02P90/30—Computing systems specially adapted for manufacturing
Landscapes
- Engineering & Computer Science (AREA)
- Business, Economics & Management (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Physics & Mathematics (AREA)
- General Business, Economics & Management (AREA)
- Computer Security & Cryptography (AREA)
- Health & Medical Sciences (AREA)
- Economics (AREA)
- General Health & Medical Sciences (AREA)
- Marketing (AREA)
- Strategic Management (AREA)
- Human Resources & Organizations (AREA)
- Tourism & Hospitality (AREA)
- Primary Health Care (AREA)
- Entrepreneurship & Innovation (AREA)
- Accounting & Taxation (AREA)
- Development Economics (AREA)
- Finance (AREA)
- Manufacturing & Machinery (AREA)
- Bioethics (AREA)
- Computer Hardware Design (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The application discloses a commodity information storage method, device and system based on a blockchain and a storage medium, and relates to the technical field of Internet. In the application, the management node can verify the code marked on the whole commodity according to the code generated for the whole commodity and stored in the blockchain. Because the codes stored in the blockchain and generated for the self-contained commodity cannot be tampered, the management node checks the codes marked on the self-contained commodity according to the codes stored in the blockchain and generated for the self-contained commodity, so that the production information of the self-contained commodity can be prevented from being tampered. After the code verification of the mark on the self-contained commodity passes, the management node can generate a code for each bulk commodity according to the code of the mark on the self-contained commodity and the sales node corresponding to each bulk commodity in the self-contained commodity, and upload the code generated for each bulk commodity into the blockchain. In this way, distribution information and production information of each bulk commodity can be effectively regulated.
Description
Technical Field
The application relates to the technical field of internet, in particular to a commodity information storage method, device and system based on blockchain and a storage medium.
Background
The commodity typically passes through multiple nodes from production to sale. For example, cigarettes may pass through production nodes, administration nodes, sales nodes, etc. during the process from production to sales. In order to monitor the commodity, when the commodity passes through some nodes, the commodity can be marked, and the marked information is stored in a database corresponding to the corresponding node for subsequent inquiry.
In the related art, taking the case of production and sales of cigarettes as an example, a production node may generate a code for the case of cigarettes, store the code in an industrial information database, and mark the code on the case of cigarettes. Wherein the code may contain production information for the box of cigarettes. The management node may obtain the codes on the box body of the box cigarette, generate a code for each cigarette according to the obtained codes and the information of the sales node corresponding to each cigarette in the box cigarette, mark the generated code on each cigarette, and store the code of each cigarette in the business information database. Wherein the code of each cigarette may contain production information and distribution information of the cigarette.
However, the information stored in the industrial information database and the commercial information database is easily tampered with, thereby making it impossible to effectively manage the commodity.
Disclosure of Invention
The embodiment of the application provides a commodity information storage method, device and system based on a blockchain and a storage medium, which can be used for solving the problem that commodity information is easy to tamper and effective supervision of commodities cannot be realized in the related technology. The technical scheme is as follows:
in one aspect, a method for storing commodity information based on a blockchain is provided, and the method is applied to a management node, wherein the management node is one node in a blockchain system, and the method comprises the following steps:
acquiring a code marked on a self-contained commodity, wherein the self-contained commodity comprises a plurality of bulk commodities;
verifying the code marked on the self-contained commodity according to a plurality of codes stored in a self-configured blockchain, wherein the codes comprise codes generated by production nodes for the self-contained commodity, the production nodes are nodes in the blockchain system, and the codes generated by the production nodes for the self-contained commodity comprise production information of the self-contained commodity;
if the code of the mark on the integral commodity passes the verification, generating a code for each bulk commodity in the bulk commodities according to the code of the mark on the integral commodity and the information of a sales node corresponding to each bulk commodity in the bulk commodities, wherein the code generated for each bulk commodity comprises the production information and the distribution information of the corresponding bulk commodity;
Synchronizing the code generated for each of the plurality of bulk items to other nodes in the blockchain system.
In another aspect, there is provided a blockchain-based commodity information storage method applied to a blockchain system including a production node and a management node, the method comprising:
the production node generates a code for the self-contained commodity, the code generated for the self-contained commodity is synchronized to the blockchain of other nodes in the blockchain system, the code generated by the production node for the self-contained commodity comprises production information of the self-contained commodity, and the self-contained commodity comprises a plurality of bulk commodities;
the management node acquires codes marked on the self-contained commodity and verifies the codes marked on the self-contained commodity according to a plurality of codes stored in a block chain configured by the management node;
if the verification of the code marked on the integral commodity is passed, the management node generates a code for each bulk commodity in the plurality of bulk commodities according to the code marked on the integral commodity and the information of the sales node corresponding to each bulk commodity in the plurality of bulk commodities, wherein the code generated for each bulk commodity comprises the production information and the distribution information of the corresponding bulk commodity;
The management node synchronizes the code generated for each bulk commodity into the blockchain of other nodes in the blockchain system.
In another aspect, there is provided a blockchain-based commodity information storage apparatus for use with a management node, the management node being a node in a blockchain system, the apparatus comprising:
the acquisition module is used for acquiring codes marked on the self-contained commodity, wherein the self-contained commodity comprises a plurality of bulk commodities;
the verification module is used for verifying the codes marked on the self-contained commodity according to a plurality of codes stored in the self-configured blockchain, wherein the codes comprise codes generated by production nodes for the self-contained commodity, the production nodes are nodes in the blockchain system, and the codes generated by the production nodes for the self-contained commodity comprise production information of the self-contained commodity;
the generation module is used for generating a code for each bulk commodity in the bulk commodities according to the code marked on the self-contained commodity and the information of the sales node corresponding to each bulk commodity in the bulk commodities if the code marked on the self-contained commodity passes the verification, wherein the code generated for each bulk commodity comprises the production information and the distribution information of the corresponding bulk commodity;
A synchronization module for synchronizing the code generated for each of the plurality of bulk items to other nodes in the blockchain system.
In another aspect, a blockchain system is provided that includes a production node and a management node;
the production node is used for generating a code for the self-contained commodity, synchronizing the code generated for the self-contained commodity into a blockchain of other nodes in the blockchain system, wherein the code generated by the production node for the self-contained commodity comprises production information of the self-contained commodity, and the self-contained commodity comprises a plurality of bulk commodities;
the management node is used for acquiring codes marked on the self-contained commodity and checking the codes marked on the self-contained commodity according to a plurality of codes stored in a block chain configured by the management node;
if the verification of the code marked on the self-contained commodity is passed, the management node is further used for generating a code for each bulk commodity in the plurality of bulk commodities according to the code marked on the self-contained commodity and the information of the sales node corresponding to each bulk commodity in the plurality of bulk commodities, wherein the code generated for each bulk commodity comprises the production information and the distribution information of the corresponding bulk commodity;
The management node is also configured to synchronize the code generated for each bulk commodity into the blockchain of other nodes in the blockchain system.
In another aspect, a blockchain-based commodity information storage device is provided, and is applied to a management node or a production node in the blockchain system, wherein the device comprises a processor, a communication interface, a memory and a communication bus;
the processor, the communication interface and the memory complete communication with each other through the communication bus;
the memory is used for storing a computer program;
the processor is used for executing the program stored in the memory to realize the steps of the commodity information storage method based on the blockchain.
In another aspect, a computer readable storage medium is provided, having stored therein a computer program which, when executed by a processor of a production node or a management node, implements the steps of the blockchain-based commodity information storage method provided above.
The technical scheme provided by the embodiment of the application has the beneficial effects that at least:
in the embodiment of the application, the production node can upload the codes generated for the self-contained commodity to the blockchain system, so that the management node can verify the codes marked on the self-contained commodity according to the codes stored in the blockchain and generated for the self-contained commodity. Because the codes stored in the blockchain and generated for the self-contained commodity cannot be tampered, the management node checks the codes marked on the self-contained commodity according to the codes stored in the blockchain and generated for the self-contained commodity, so that the production information of the self-contained commodity can be prevented from being tampered. After the code verification of the mark on the self-contained commodity passes, the management node can generate a code for each bulk commodity according to the code of the mark on the self-contained commodity and the sales node corresponding to each bulk commodity in the self-contained commodity, and upload the code generated for each bulk commodity into the blockchain. In this way, distribution information and production information of each bulk commodity can be effectively regulated. The commodity information of each commodity is uploaded to the blockchain, so that the conditions of loss, damage, use and the like of the commodity at certain nodes can be effectively avoided.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a block chain system architecture diagram according to an embodiment of the present application;
FIG. 2 is a schematic diagram of blocks in a blockchain provided by an embodiment of the present application;
FIG. 3 is a flowchart of a blockchain-based commodity information storage method according to an embodiment of the present application;
FIG. 4 is a flowchart of a method for querying information of a commodity based on a code marked on a target sub-commodity according to an embodiment of the present application;
FIG. 5 is a schematic diagram of a page of a commodity information query result according to an embodiment of the present application;
fig. 6 is a flowchart of a method for storing and querying information about a commodity of a cigarette according to an embodiment of the present application;
FIG. 7 is a graphical code marked on a cigarette pack, in accordance with an embodiment of the present application;
FIG. 8 is a schematic diagram of a blockchain-based merchandise information storage device according to an embodiment of the present application;
Fig. 9 is a schematic diagram of a node in a blockchain system according to an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, the embodiments of the present application will be described in further detail with reference to the accompanying drawings.
Before explaining the embodiment of the present application in detail, an application scenario related to the embodiment of the present application is described.
Goods typically pass through multiple circulation nodes from production to sale. For monitoring the commodity, at some of the circulation nodes, the commodity may be marked with a code. For example, a code corresponding to production information may be generated when the production node corresponding to the production plant is passed, and a code corresponding to distribution information may be marked on the commodity when the management node corresponding to the distribution point is passed.
For example, during a production sales process for cigarettes, a code may be generated at a production node to identify the bin of cigarettes. The resulting code is then marked on the box of cigarettes by the production line. After the cigarettes in the box reach the tobacco administration, the corresponding management node of the tobacco administration allocates a corresponding sales node for each cigarette in the box according to the order information, and generates a corresponding code for each cigarette so as to identify each cigarette, and at this time, the code of each cigarette can be marked on the cigarette through a sorting line. For another example, during the production and marketing of white spirit, a code may be generated at a production node that may be used to identify a box of white spirit, the code being used to characterize production information for the box of white spirit. The code is marked on the box of white spirit by a production line. When the box of white spirit arrives at the distribution place, the corresponding authorized retail point can be allocated to the box of white spirit according to the order information of the authorized retail point, a code is generated for each bottle of white spirit in the box of white spirit, and the corresponding code is marked for each bottle of white spirit on the sorting line. The commodity information storage method based on the blockchain provided by the embodiment of the application can be used in the commodity production and sales process such as the example, and the commodity information for monitoring commodity circulation generated in the process can be stored.
The blockchain system related to the blockchain-based commodity information storage method provided by the embodiment of the application is described next.
FIG. 1 is a schematic diagram of a blockchain system 100 in accordance with an embodiment of the present application. As shown in FIG. 1, the blockchain system 100 includes a plurality of nodes 101. The plurality of nodes 101 may include two types of nodes, one type of node refers to a production node that uploads production information, and the node may be deployed in a production mechanism of a commodity. Another type of node refers to a management node that uploads distribution information, and such nodes may be deployed in a distribution management organization for the commodity.
Each node 101 may receive input information while operating normally and maintain shared data within the blockchain system based on the received input information. In order to ensure the information intercommunication in the blockchain system, information connection can exist between every two nodes in the blockchain system, and the nodes can transmit information through the information connection. For example, when any node in the blockchain system receives input information, other nodes in the blockchain system acquire the input information according to a consensus algorithm, and store the input information as data in shared data, so that the data stored on all nodes in the blockchain system are consistent.
For each node in the blockchain system, the node identification corresponding to the node identification is provided, and each node in the blockchain system can store the node identifications of other nodes in the blockchain system so as to broadcast the generated blocks to other nodes in the blockchain system according to the node identifications of other nodes. Each node can maintain a node identification list shown in the following table, and the node names and the node identifications are correspondingly stored in the node identification list. The node identifier may be an IP (Internet Protocol, protocol of interconnection between networks) address, and any other information that can be used to identify the node, and the IP address is only illustrated in table 1.
Table 1 node identification list
Node name | Node identification |
Node 1 | 117.114.151.174 |
Node 2 | 117.116.189.145 |
… | … |
Node N | 119.123.789.258 |
Each node in the blockchain system stores one and the same blockchain. The blockchain is composed of a plurality of blocks, referring to fig. 2, the blockchain is composed of a plurality of blocks, the starting block comprises a block head and a block main body, the block head stores an input information characteristic value, a version number, a time stamp and a difficulty value, and the block main body stores input information; the next block of the starting block takes the starting block as a father block, the next block also comprises a block head and a block main body, the block head stores the input information characteristic value of the current block, the block head characteristic value of the father block, the version number, the timestamp and the difficulty value, and the like, so that the block data stored in each block in the block chain are associated with the block data stored in the father block, and the safety of the input information in the block is ensured.
The method for storing commodity information based on the blockchain is described next.
Fig. 3 is a flowchart of a method for storing article information according to an embodiment of the present application. The method can be applied to the blockchain system shown in fig. 1, wherein the production node is the production node introduced in the blockchain system, and the management node is the management node introduced in the blockchain system. Referring to fig. 3, the method includes:
step 301: the production node generates a code for the self-contained commodity and synchronizes the code generated for the self-contained commodity to the blockchain of other nodes in the blockchain system.
In an embodiment of the present application, a production node is a node deployed in a production facility, and the production node is a node in a blockchain system. The self-contained commodity may include a plurality of bulk commodities and the code generated by the production node for the self-contained commodity may include production information for the self-contained commodity. The production information may include information of a production organization, brand information, production date, type of article, production number, and the like. The production number can be an identification of random production for the self-contained commodity, and can also be used for representing the commodity number in a production cycle of the self-contained commodity. For example, the number of the self-contained items within the production day can be characterized.
It should be noted that when a production facility produces a self-contained commodity, the production node may generate a code for the self-contained commodity according to specified rules. Alternatively, other devices in the production facility may generate a code for the self-contained commodity according to specified rules and send the code to the production node. Accordingly, the production node may receive codes generated for the self-contained commodity sent by other devices. The specified rule is a rule for generating a code in a predetermined format based on production information of the packaged commodity.
The code generated for the self-contained commodity is a code containing production information of the self-contained commodity. The code may include a plurality of characters that may be divided into a plurality of character segments, each of which may be used to indicate a type of information in the production information. In addition, it should be noted that the code may be uniquely used to identify the item of merchandise included therein.
Illustratively, a box of cigarettes may be a single self-contained item, and the box of cigarettes may include a plurality of cigarettes, which may be both a plurality of bulk items included in the self-contained item, and a plurality of cigarettes in each cigarette. The multi-box cigarette may be referred to as a plurality of sub-products comprised by the bulk product. The production node may obtain an identification of a production facility that produced the box of cigarettes, a date of production, a brand identification, a type of cigarette to which the box of cigarettes corresponds, and a number of the box of cigarettes. And then, the production node can generate a corresponding first character segment according to the identification of the production mechanism, generate a corresponding second character segment according to the production date, generate a third character segment according to the brand identification, generate a fourth character segment according to the type of the cigarettes, generate a fifth character segment according to the number of the cigarettes, and combine the five character segments to obtain the code of the cigarettes.
After generating a corresponding code for the self-contained commodity, the production node can store the code generated for the self-contained commodity into a memory pool and update a hash tree used for recording input information; then, updating the update time stamp to the time of receiving the code, and trying different random numbers to calculate the characteristic value for a plurality of times, so that the calculated characteristic value can meet the following formula:
SHA256(SHA256(version+prev_hash+merkle_root+ntime+nbits+x))<TARGET
wherein SHA256 is a eigenvalue algorithm used to calculate eigenvalues; version (version number) is version information of the related block protocol in the block chain; the prev_hash is the block header characteristic value of the parent block of the current block; the merkle_root is a characteristic value of input information; ntime is the update time of the update timestamp; the nbits is the current difficulty, is a fixed value in a period of time, and is determined again after exceeding a fixed period of time; x is a random number; TARGET is a eigenvalue threshold that can be determined from nbits.
Thus, when the random number meeting the formula is calculated, the characteristic value, the version number, the time stamp and the difficulty value which are generated by the codes and the calculation and are generated for the whole commodity are correspondingly stored, and the block head and the block main body are generated, so that the current block is obtained. And then, the production node can respectively send the current block to other nodes in the block chain system where the production node is positioned according to the node identification of other nodes in the stored block chain system, the other nodes verify the current block, and the current block is added into the stored block chain after the verification is completed. To this end, the production node synchronizes the code generated for the self-contained commodity to the blockchain of other nodes in the blockchain system.
After the corresponding code is generated for the self-contained commodity, the generated code may also be transmitted to a control device of a production line in the production facility, so that the control device may control a marking device on the production line to mark the code on the self-contained commodity.
Alternatively, the control device may mark the code at a first location on the package of the self-contained item when the code is marked on the self-contained item. At the same time, the control device may acquire the first location and send the first location to the production node. Thus, the production node, upon receiving the first location, may synchronize the code generated for the self-contained commodity with the correspondence of the first location to the blockchain of other nodes in the blockchain system. The first positions of the codes of the marks on the respective self-contained articles may be the same or different. Where different, it may refer to different first locations of the code marked on each self-contained item within a production cycle, e.g., a plurality of self-contained items produced within a day, where the code marked on the self-contained item is located. And a plurality of self-contained articles produced on different production days, the positions of the codes of the marks on the self-contained articles may be the same. In addition, when the first positions of the codes marked on the individual self-contained commodities are identical, in the embodiment of the present application, after receiving the first positions, the production node may synchronize the first positions to other nodes independently, without synchronizing the correspondence between the first positions and the codes generated for the self-contained commodities.
The first position may be any position on the outer package of the self-contained product, or may be a position on the outer package of the self-contained product located on the package opening, which is not limited by the embodiment of the present application.
Alternatively, in one possible scenario, the encoded information may be transcoded after the corresponding code is generated for the self-contained item, resulting in a graphical code. The production node may then transmit the generated graphic code to a control device of a production line in the production facility so that the control device may control a marking device on the production line to mark the one code on each sub-commodity included in the self-contained commodity. Here, for each sub-commodity, a corresponding code may be marked thereon, and for a plurality of sub-commodities belonging to the same self-contained commodity, the code of the self-contained commodity is unique, and thus the codes marked on the plurality of sub-commodities may be the same. The image code may be a two-dimensional code, a bar code, or the like.
Alternatively, in another possible scenario, after generating the corresponding code for the self-contained commodity, the production node may also generate a code based on the code and the number of each sub-commodity, thereby marking the generated code on each sub-commodity. In this case, the code of the indicia on each sub-commodity will be different. The number of each sub-commodity can be the number of each sub-commodity on the production line, and the number is used for indicating the number of the sub-commodity on the production line.
It should be noted that, in the embodiment of the present application, the packaged goods may be sent out and scanned before leaving the warehouse of the production mechanism corresponding to the production node. That is, when the self-contained product is taken out of the warehouse, the code marked on the self-contained product can be identified. And matching the identified code marked on the self-contained commodity with a plurality of codes stored in the blockchain, obtaining the delivery time of the self-contained commodity after successful matching, and synchronizing the corresponding relation between the code marked on the self-contained commodity and the delivery time into the blockchain. The implementation of matching the identified code marked on the self-contained commodity with the plurality of codes stored in the blockchain may refer to the implementation of searching for a code matching the code marked on the self-contained commodity from the plurality of codes stored in the blockchain as described below.
Step 302: the management node obtains the code marked on the self-contained commodity.
In the embodiment of the application, the management node refers to a node which is deployed in a distribution management mechanism and is used for uploading distribution information of commodities.
After the code has been marked for the self-contained article, the self-contained article is transported to a distribution authority. The scanning equipment in the distribution management mechanism can scan and identify the code marked on the self-contained commodity and send the identified code marked on the self-contained commodity to the management node. Alternatively, in one possible scenario, the code marked on the self-contained item may also be scanned and identified by the management node. Alternatively, the staff may enter the code marked on the self-contained item at the management node.
Step 303: the management node checks the code marked on the self-contained commodity according to a plurality of codes stored in the self-configured blockchain.
After the code marked on the self-contained commodity is obtained, the management node can verify the code information marked on the self-contained commodity according to the codes stored in the self-configured blockchain.
Wherein the management node can search codes matched with the codes marked on the self-contained commodity from a plurality of codes stored in the blockchain; if the code matching the code marked on the self-contained commodity is found, the verification of the code marked on the self-contained commodity is passed.
It should be noted that, from the foregoing description, the production node may synchronize the code generated for the self-contained commodity to the blockchain of other nodes in the blockchain system. Since there are multiple self-contained items and there may be multiple production nodes in a blockchain system, there will be multiple codes stored in the blockchain of each node in the blockchain system. On this basis, the management node can search whether the code which is the same as the code marked on the self-contained commodity exists in the blockchain, and if the code which is the same as the code marked on the self-contained commodity is searched in the blockchain, the verification of the code marked on the self-contained commodity can be determined to pass. Alternatively, if the same code as the code marked on the self-contained item is not found in the blockchain, it is indicated that the code marked on the self-contained item is inconsistent with the code stored in the blockchain that was generated for the self-contained item, at which point it may be determined that the code marked on the self-contained item was not verified. That is, the code marked on the self-contained item has been tampered with or is problematic with the self-contained item.
Alternatively, if the production node uploads the code generated for the self-contained commodity into the blockchain at the first location on the outer package of the self-contained commodity, the management node may first take a photograph of the side of the outer package of the self-contained commodity marked with the code before acquiring the code marked on the self-contained commodity. Then, the management node can identify the position of the code marked on the whole commodity in the outer package from the shot image to obtain a second position; then, acquiring a first position from the blockchain; if the first location is the same as the second location, a code for the indicia on the self-contained item is obtained.
If the first locations corresponding to the self-contained commodities are the same in step 301, the management node may directly obtain the first locations from the blockchain. After acquiring the first location, the management node may compare the first location to the second location. If the two positions are identical, the position of the code marked on the self-contained commodity is identical to the position marked at the production node, then the management node can acquire the code marked on the self-contained commodity, and execute the operation of checking the code marked on the self-contained commodity in the step.
Alternatively, if the first positions corresponding to the self-contained articles are different, in the embodiment of the present application, the management node may further identify the code marked on the self-contained article from the captured image after identifying the second position from the captured image. The management node may then look up the blockchain for a code that matches the code marked on the self-contained item. If the code of the current mark on the self-contained commodity is found, the code generated for the self-contained commodity is consistent with the code stored in the blockchain, at the moment, the management node can acquire a first position corresponding to the found code, compare the first position with a second position, and if the two positions are identical, the position of the code marked on the self-contained commodity is consistent with the position marked at the production node. In this case, since the code and the mark position of the mark on the self-contained product are both verified, the management node can confirm that the code of the mark on the self-contained product is verified.
Step 304: if the verification of the code marked on the self-contained commodity is passed, the management node self-contained commodity marking code and the information of the sales node corresponding to each of the plurality of bulk commodities generate a code for each of the plurality of bulk commodities.
If the management node passes the verification of the code marked on the integral commodity, the management node can acquire order information sent by each sales node and allocate a corresponding sales node for each of a plurality of bulk commodities included in the integral commodity according to the currently received order information. The management node may then generate a code for each bulk commodity based on the information of the sales node corresponding to each bulk commodity and the code marked on the self-contained commodity. Wherein the code of each bulk commodity comprises production information and distribution information of the corresponding bulk commodity. Likewise, the code for each bulk commodity may contain a plurality of characters that may be divided into a plurality of character segments, wherein each character segment may be used to indicate a different message.
For example, the management node may obtain the identifier of the sales node allocated to each bulk commodity, generate a character segment according to the identifier, take the codes marked on the self-contained commodities to which the plurality of bulk commodities belong as a character segment, and combine the two character segments to generate the code on each bulk commodity.
Optionally, in some possible cases, the management node may further obtain an organization identifier of a distribution management organization to which the management node belongs and an identifier of an administrative area in which the distribution management organization is located, generate a character segment according to the identifier of the distribution management organization, generate a character segment according to the identifier of the administrative area, and use the two character segments as character segments in the encoding of each bulk commodity.
Optionally, the management node may further assign a number to each of the plurality of bulk goods, where the number of each bulk good is different, and the number of each bulk good is used to indicate a sorting position of the corresponding bulk good in the associated self-contained good. In this case, the management node may also use the number of each bulk commodity as a character segment in the code of each bulk commodity.
For example, still taking cigarettes as an example, when a box of cigarettes enters a distribution management mechanism, the distribution management mechanism may assign a corresponding sales node to each cigarette in the box of cigarettes according to order information, and then generate a code for each cigarette according to the identification of the sales node corresponding to each cigarette, the code marked on the box of cigarettes, the number of each cigarette, the mechanism identification of the distribution management mechanism, and the identification of the administrative area in which the distribution management mechanism is located.
After generating a code for each bulk commodity, the management node may send the code generated for each bulk commodity to the control device of the sorting line of the distribution management facility so that the control device controls the marking device on the sorting line to mark the code generated for the bulk commodity on the corresponding bulk commodity.
Step 305: the management node synchronizes the code generated for the bulk commodity into the blockchain of other nodes in the blockchain system.
After generating the corresponding code for each bulk commodity, the management node may refer to the foregoing method for the production node to synchronize the code generated for the self-contained commodity to other nodes in the blockchain system, and generate a corresponding block according to the code generated for each bulk commodity and synchronize the block to other nodes in the blockchain system, which is not described herein in detail.
Because each bulk commodity is marked with a code, and the management node uploads the code generated for each bulk commodity to the blockchain system, after the bulk commodity arrives at the sales node, the sales node can acquire the code marked on each bulk commodity, and check whether the bulk commodity has a problem or not by comparing the code marked on each bulk commodity with the code generated for the corresponding bulk commodity stored in the blockchain.
In the embodiment of the present application, before each bulk commodity is distributed to each sales node, that is, when each bulk commodity leaves the management node to be delivered, the management node may identify the code marked on each bulk commodity, find the code matching the identified code marked on each bulk commodity from the plurality of codes stored in the blockchain, and after the code matching the identified code marked on each bulk commodity is found, obtain the delivery time of each bulk commodity, and synchronize the correspondence between the delivery time and the identified code marked on each bulk commodity to the blockchain system. The method for searching the codes matched with the codes marked on each bulk commodity from the plurality of codes stored in the blockchain can refer to the implementation manner for searching the codes matched with the codes marked on the whole commodity from the plurality of codes stored in the blockchain, and the embodiment of the application is not repeated herein.
In the embodiment of the application, the production node can upload the codes generated for the self-contained commodity to the blockchain system, so that the management node can verify the codes marked on the self-contained commodity according to the codes stored in the blockchain and generated for the self-contained commodity. Because the codes stored in the blockchain and generated for the self-contained commodity cannot be tampered, the management node checks the codes marked on the self-contained commodity according to the codes stored in the blockchain and generated for the self-contained commodity, so that the production information of the self-contained commodity can be prevented from being tampered. After the code verification of the mark on the self-contained commodity passes, the management node can generate a code for each bulk commodity according to the code of the mark on the self-contained commodity and the sales node corresponding to each bulk commodity in the self-contained commodity, and upload the code generated for each bulk commodity into the blockchain. In this way, distribution information and production information of each bulk commodity can be effectively regulated. The commodity information of each commodity is uploaded to the blockchain, so that the conditions of loss, damage, use and the like of the commodity at certain nodes can be effectively avoided.
In addition, in the embodiment of the application, the first position of the mark code on the whole commodity can be uploaded to the blockchain, and the management node can check the position of the code mark while checking the code of the mark on the whole commodity, so that the checking accuracy is improved.
As can be seen from step 301 in the previous embodiment, each sub-item included in the self-contained item may be marked with a code. In this case, after the consumer purchases the sub-commodity from the sales node, the related information of the sub-commodity can also be queried from the blockchain through the code marked on the sub-commodity. Fig. 4 shows a method for querying information of a commodity according to a code marked on a sub-commodity according to an embodiment of the present application, as shown in fig. 4, the method includes the following steps:
step 401: and the target node receives a query request sent by the terminal, wherein the query request carries the code to be queried.
Wherein, because the same blockchain is stored on each of the plurality of nodes included in the blockchain system, the target node may be any of the plurality of nodes included in the blockchain system based on the same.
In the embodiment of the present application, the consumer terminal may scan and identify the code marked on the target sub-commodity, and as known from the foregoing embodiment, the code marked on the sub-commodity may be a graphic code. In this case, the terminal may parse and transcode the scanned code, thereby obtaining the code to be queried. And then, the terminal can carry the code to be queried in the query request and send the query request to the target node. Or if the code marked on the sub commodity is a character code, the terminal can directly identify the code, so that the code to be queried is obtained.
The terminal may scan the code of the mark on the target sub-commodity through a small program, or may scan the code of the mark on the target sub-commodity through other specific applications, which is not limited in the embodiment of the present application.
Accordingly, the target node may receive a query request carrying a code to be queried sent by the terminal.
Step 402: the target node searches for a code matching the code to be queried from a plurality of codes stored in a self-configured blockchain.
After receiving the query request, the target node can search whether the code matching the code to be queried exists in the self-configured blockchain. Since the code of the mark on the sub-commodity is determined according to the code generated for the self-contained commodity stored in the blockchain, if the target sub-commodity has no problem and the code of the mark on the target sub-commodity is not tampered, the code to be queried obtained according to the code of the mark on the target sub-commodity will be the same as the code of the self-contained commodity to which the sub-commodity stored in the blockchain belongs. Based on this, the target node may search the blockchain for the same code as the code to be queried, and if so, it indicates that the sub-commodity has no problem, at this point, the target node may perform step 403.
Alternatively, in one possible implementation manner, since the code generated by the management node for each bulk commodity includes the code of the self-contained commodity to which the corresponding bulk commodity belongs, and the management node uploads the code generated for each bulk commodity to the blockchain, in this step, the target node may also search for the code including the code to be queried from the plurality of codes stored in the blockchain. If so, the target node obtains each code found and block information of the target block where each code found is located, and performs step 403.
Optionally, if the code identical to the code to be queried is not found in the blockchain, the commodity information indicating the sub commodity is not stored in the blockchain, and at this time, the target node may return a query failure notification message to the terminal, so that the terminal displays the query failure notification message, thereby prompting the consumer that the commodity information of the sub commodity is not stored in the blockchain.
Step 403: and if the code matched with the code to be queried is found, the target node sends the block information of the target block to the terminal.
The block information of the target block may include a block number and a generation time of the target block. The target node may determine the generation time of the target block according to the timestamp stored in the block header of the target block. The block number of the target block refers to the number of the target block in the blockchain.
It should be noted that if the code identical to the code to be queried is found, the terminal may store the specified rule for generating a code for each self-assembled commodity and the information represented by different characters in each character segment described in the foregoing embodiment, and the terminal may analyze the code to be queried according to the specified rule and the information represented by different characters in each character segment, so as to obtain the production information of the target sub-commodity. And displaying the production information of the target sub-commodity and the block information of the target block.
If the code containing the code to be queried is found, the terminal can analyze the found code according to a specified rule, so that the production information and the distribution information of the target sub-commodity are obtained, and the production information and the distribution information of the target sub-commodity and the block information of a target block where the found code is located are displayed. It can be seen from the foregoing description that the production node may upload the delivery time of each individual commodity to the blockchain, and the management node may upload the delivery time of each bulk commodity to the blockchain, where in this case, the production information may further include the delivery time of the sub-commodity at the production node, and the distribution information may include the delivery time of the sub-commodity at the management node, the identifier of the distribution management mechanism corresponding to the management node, the identifier of the administrative area to which the management node belongs, and so on.
Fig. 5 is a diagram of a query result page obtained by querying a terminal according to a code marked on a target sub-commodity according to an embodiment of the present application. As shown in fig. 5, the terminal may parse the code obtained by the query to obtain the production organization, brand, date of production, type of product, block number, and block generation time of the target sub-product, and display the same.
In the embodiment of the application, each sub-commodity is marked with a code, so that after a consumer purchases one sub-commodity, the consumer can search the code matched with the code marked on the sub-commodity from the blockchain by scanning the code marked on the sub-commodity, thereby verifying the authenticity of the sub-commodity and acquiring commodity information of the sub-commodity.
The storage and querying of merchandise information during the creation and sale of cigarettes is described next in connection with fig. 6. As shown in fig. 6, for a box of cigarettes, the production node may generate a code for the box of cigarettes, which may be a code containing a plurality of numbers, for indicating the production organization, brand information, date of production, type of cigarettes, production number, etc. of the box of cigarettes. The cigarette type may refer to the shape type of the box of cigarettes, such as a special-shaped cigarette, a conventional-shaped cigarette, and the like. After generating the corresponding code for the box of cigarettes, the production node may synchronize the code to other nodes in the blockchain system. Meanwhile, the production node may generate a graphic code according to the code generated for the box of cigarettes, and send both the generated graphic code and the code generated for the box of cigarettes to the control device of the production line, where the control device controls the marking device to mark the graphic code on the box body of each box of cigarettes in the box of cigarettes, see fig. 7. The cigarettes are packed into a plurality of cigarettes and then packed into boxes, and the control device controls the marking device to mark a code on the box body of each box of cigarettes. When the cigarettes leave the production mechanism, the cigarettes are checked out of the warehouse, and the time of the cigarettes out of the warehouse and the codes on the cigarettes are uploaded to the blockchain. The cigarettes are transported to a management node, the management node can acquire the code information marked on the box body of the cigarettes, find the code matched with the code marked on the box body in a plurality of codes stored in a blockchain, and if the code matched with the code marked on the box body is found, the cigarettes are qualified. The management node may then assign a corresponding sales node to each of the cigarettes in the bin based on the currently received order information, and generate a code for each of the cigarettes based on the sales node assigned to each of the cigarettes, the code marked on the bin, and the number of each of the cigarettes. The codes generated for each cigarette are synchronized to other nodes in the blockchain system and each cigarette is marked with a code. The management node can then scan the code of the code marked on each cigarette for delivery before delivering each cigarette to the warehouse, and upload the code marked on each cigarette and delivery time to the blockchain. Thereafter, each cigarette is transported to a respective sales node.
Subsequently, for the sales node, the sales node may look up the merchandise information for each cigarette from the blockchain based on the code marked on that cigarette. For consumers purchasing individual cigarettes in each cigarette, the blockchain may be queried for production information and/or distribution information for each cigarette by scanning the graphical code on the box.
The block chain-based commodity information storage device provided by the embodiment of the application is described next.
Referring to fig. 8, an embodiment of the present application provides a blockchain-based commodity information storage apparatus 800, applied to a management node, where the management node is a node in a blockchain system, the apparatus 800 includes:
an acquisition module 801, configured to acquire a code marked on an entire package of goods, where the entire package of goods includes a plurality of bulk goods;
the verification module 802 is configured to verify the code marked on the integrated commodity according to a plurality of codes stored in the self-configured blockchain, where the plurality of codes include codes generated by production nodes for the integrated commodity, the production nodes are nodes in the blockchain system, and the codes generated by the production nodes for the integrated commodity include production information of the integrated commodity;
A generating module 803, configured to generate a code for each bulk commodity in the plurality of bulk commodities according to the code marked on the bulk commodity and the information of the sales node corresponding to each bulk commodity in the plurality of bulk commodities if the code marked on the bulk commodity passes the verification, where the code generated for each bulk commodity includes production information and distribution information of the corresponding bulk commodity;
a synchronization module 804 for synchronizing the code generated for each of the plurality of bulk items to other nodes in the blockchain system.
Optionally, the verification module 802 is specifically configured to:
searching codes matched with codes marked on the self-contained commodity from a plurality of codes stored in a blockchain;
if the code matched with the code marked on the whole commodity is found, determining that the code marked on the whole commodity passes the verification.
Optionally, the generating module is specifically configured to:
acquiring order information;
distributing corresponding sales nodes for each of the plurality of bulk commodities according to the order information;
assigning a number to each of the plurality of bulk goods, the numbers of the respective bulk goods being different, and the number of each bulk goods being used to indicate the ordering position of the respective bulk goods in the self-contained goods;
And generating a code for each bulk commodity according to the information of the corresponding sales node of each bulk commodity, the number of each bulk commodity and the code marked on the whole commodity.
Optionally, the code mark generated by the production node for the self-contained commodity is at a first position of the outer package of the self-contained commodity;
the apparatus 800 is also for:
shooting one side, marked with codes, of the outer package of the whole commodity;
identifying the position of the code marked on the whole commodity in the outer package from the shot image to obtain a second position;
acquiring a first position from a blockchain;
if the first position is the same as the second position, the code marked on the self-contained commodity is acquired through the acquisition module.
In summary, in the embodiment of the present application, the management node may verify the code marked on the integrated commodity according to the code generated for the integrated commodity stored in the blockchain. Because the codes stored in the blockchain and generated for the self-contained commodity cannot be tampered, the management node checks the codes marked on the self-contained commodity according to the codes stored in the blockchain and generated for the self-contained commodity, so that the production information of the self-contained commodity can be prevented from being tampered. After the code verification of the mark on the self-contained commodity passes, the management node can generate a code for each bulk commodity according to the code of the mark on the self-contained commodity and the sales node corresponding to each bulk commodity in the self-contained commodity, and upload the code generated for each bulk commodity into the blockchain. In this way, distribution information and production information of each bulk commodity can be effectively regulated.
It should be noted that: in the block chain-based commodity information storage apparatus provided in the above embodiment, only the division of the above functional modules is used for illustration when commodity information is stored, and in practical application, the above functional allocation may be performed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules, so as to complete all or part of the functions described above. In addition, the blockchain-based commodity information storage device and the blockchain-based commodity information storage method provided in the foregoing embodiments belong to the same concept, and detailed implementation processes of the blockchain-based commodity information storage device and the blockchain-based commodity information storage method are detailed in the method embodiments and are not described herein.
Fig. 9 illustrates a block diagram of a blockchain node 900 for commodity information storage in accordance with an exemplary embodiment of the present application. The blockchain node may be a production node or a management node in the foregoing embodiments, and the blockchain node 900 may be: tablet, notebook or desktop. The blockchain node 900 may also be referred to by other names as user devices, portable devices, laptop devices, desktop devices, and the like.
Generally, blockchain node 900 includes: a processor 901 and a memory 902.
Processor 901 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and the like. The processor 901 may be implemented in at least one hardware form of DSP (Digital Signal Processing ), FPGA (Field-Programmable Gate Array, field programmable gate array), PLA (Programmable Logic Array ). The processor 901 may also include a main processor and a coprocessor, the main processor being a processor for processing data in an awake state, also referred to as a CPU (Central Processing Unit ); a coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 901 may integrate a GPU (Graphics Processing Unit, image processor) for rendering and drawing of content required to be displayed by the display screen. In some embodiments, the processor 901 may also include an AI (Artificial Intelligence ) processor for processing computing operations related to machine learning.
The memory 902 may include one or more computer-readable storage media, which may be non-transitory. The memory 902 may also include high-speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in memory 902 is configured to store at least one instruction for execution by processor 901 to implement the blockchain-based merchandise information storage method provided by the method embodiments of the present application.
In some embodiments, blockchain node 900 may also optionally include: a peripheral interface 903, and at least one peripheral. The processor 901, memory 902, and peripheral interface 903 may be connected by a bus or signal line. The individual peripheral devices may be connected to the peripheral device interface 903 via buses, signal lines, or circuit boards. Specifically, the peripheral device includes: at least one of radio frequency circuitry 904, a touch display 905, a camera 906, audio circuitry 907, positioning components 908, and a power source 909.
The peripheral interface 903 may be used to connect at least one peripheral device associated with an I/O (Input/Output) to the processor 901 and the memory 902. In some embodiments, the processor 901, memory 902, and peripheral interface 903 are integrated on the same chip or circuit board; in some other embodiments, either or both of the processor 901, the memory 902, and the peripheral interface 903 may be implemented on separate chips or circuit boards, which is not limited in this embodiment.
The Radio Frequency circuit 904 is configured to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency circuit 904 communicates with a communication network and other communication devices via electromagnetic signals. The radio frequency circuit 904 converts an electrical signal into an electromagnetic signal for transmission, or converts a received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 904 includes: antenna systems, RF transceivers, one or more amplifiers, tuners, oscillators, digital signal processors, codec chipsets, subscriber identity module cards, and so forth. The radio frequency circuit 904 may communicate with other devices that adjust the neural network model via at least one wireless communication protocol. The wireless communication protocol includes, but is not limited to: the world wide web, metropolitan area networks, intranets, generation mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks, and/or WiFi (Wireless Fidelity ) networks. In some embodiments, the radio frequency circuit 904 may also include NFC (Near Field Communication ) related circuits, which the present application is not limited to.
The display 905 is used to display a UI (User Interface). The UI may include graphics, text, icons, video, and any combination thereof. When the display 905 is a touch display, the display 905 also has the ability to capture touch signals at or above the surface of the display 905. The touch signal may be input as a control signal to the processor 901 for processing. At this time, the display 905 may also be used to provide virtual buttons and/or a virtual keyboard, also referred to as soft buttons and/or a soft keyboard. In some embodiments, the display 905 may be one, setting the front panel of the blockchain node 900; in other embodiments, the display 905 may be at least two, respectively disposed on different surfaces of the blockchain node 900 or in a folded design; in still other embodiments, the display 905 may be a flexible display disposed on a curved surface or a folded surface of the blockchain node 900. Even more, the display 905 may be arranged in an irregular pattern other than rectangular, i.e., a shaped screen. The display 905 may be made of LCD (Liquid Crystal Display ), OLED (Organic Light-Emitting Diode) or other materials.
The camera assembly 906 is used to capture images or video. Optionally, the camera assembly 906 includes a front camera and a rear camera. Typically, the front camera is disposed on a front panel of the terminal device, and the rear camera is disposed on a rear surface of the terminal device. In some embodiments, the at least two rear cameras are any one of a main camera, a depth camera, a wide-angle camera, and a tele camera, so as to realize that the main camera and the depth camera are fused to realize a background blurring function, and the main camera and the wide-angle camera are fused to realize a panoramic shooting and VR (Virtual Reality) shooting function or other fusion shooting functions. In some embodiments, camera assembly 906 may also include a flash. The flash lamp can be a single-color temperature flash lamp or a double-color temperature flash lamp. The dual-color temperature flash lamp refers to a combination of a warm light flash lamp and a cold light flash lamp, and can be used for light compensation under different color temperatures.
The audio circuit 907 may include a microphone and a speaker. The microphone is used for collecting sound waves of users and the environment, converting the sound waves into electric signals, and inputting the electric signals to the processor 901 for processing, or inputting the electric signals to the radio frequency circuit 904 for voice communication. For purposes of stereo acquisition or noise reduction, the microphones may be multiple and disposed at different locations of the blockchain node 900. The microphone may also be an array microphone or an omni-directional pickup microphone. The speaker is used to convert electrical signals from the processor 901 or the radio frequency circuit 904 into sound waves. The speaker may be a conventional thin film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, not only the electric signal can be converted into a sound wave audible to humans, but also the electric signal can be converted into a sound wave inaudible to humans for ranging and other purposes. In some embodiments, the audio circuit 907 may also include a headphone jack.
The positioning component 908 is used to position the current geographic location of the blockchain node 900 to enable navigation or LBS (Location Based Service, location-based services).
The power supply 909 is used to power the various components in the blockchain node 900. The power supply 909 may be an alternating current, a direct current, a disposable battery, or a rechargeable battery. When the power source 909 includes a rechargeable battery, the rechargeable battery may be a wired rechargeable battery or a wireless rechargeable battery. The wired rechargeable battery is a battery charged through a wired line, and the wireless rechargeable battery is a battery charged through a wireless coil. The rechargeable battery may also be used to support fast charge technology.
Those skilled in the art will appreciate that the structure shown in fig. 9 is not limiting of blockchain node 900 and may include more or fewer components than shown, or may combine certain components, or may employ a different arrangement of components.
In an exemplary embodiment of the present application, there is also provided a computer-readable storage medium, such as a memory including instructions executable by a processor in the above-described terminal device to perform the blockchain-based commodity information storage method of the above-described embodiment. For example, the computer readable storage medium may be a ROM (Read-Only Memory), a RAM (random-access Memory), a CD-ROM (Compact Disc Read-Only Memory), a magnetic tape, a floppy disk, an optical data storage device, and the like.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program for instructing relevant hardware, where the program may be stored in a computer readable storage medium, and the storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The foregoing description of the preferred embodiments of the present application is not intended to limit the application, but rather, the application is to be construed as limited to the appended claims.
Claims (12)
1. A blockchain-based commodity information storage method, characterized by being applied to a management node, wherein the management node is one node in a blockchain system, the method comprising:
acquiring codes marked on the self-contained commodity, wherein the codes marked on the self-contained commodity are codes generated by a production node for the self-contained commodity, the production node is a node in the blockchain system, the codes generated by the production node for the self-contained commodity comprise production information of the self-contained commodity, the production information comprises a production mechanism, brand information, a production date, a commodity type and a production number, the production number is a production identifier of the self-contained commodity, the production number is used for representing the number of the self-contained commodity in a production period, the production node generates a first character segment according to the identifier of the production mechanism, generates a second character segment according to the production date, generates a third character segment according to the brand information, generates a fourth character segment according to the commodity type, generates a fifth character segment according to the production number, combines the first character segment, the second character segment, the third character segment, the fourth character segment and the fifth character segment to obtain a code, the production node is used for representing the self-contained commodity, the production node generates a plurality of codes corresponding to the self-contained commodity, and the codes are each code, and the codes are a plurality of codes corresponding to the self-contained commodity, and each code is a commodity code corresponding to a commodity, and a commodity code corresponding to a commodity code;
Verifying the code marked on the self-contained commodity according to a plurality of codes stored in a self-configured blockchain, wherein the plurality of codes comprise codes generated by the production node for the self-contained commodity;
if the code verification of the mark on the self-contained commodity passes, acquiring a character segment corresponding to information of a sales node corresponding to each bulk commodity, a character segment corresponding to a serial number of each bulk commodity, a character segment corresponding to a mechanism identifier of a distribution management mechanism to which the management node belongs and a character segment corresponding to an identifier of an administrative region to which the distribution management mechanism belongs, and combining the code marked on the self-contained commodity, the character segment corresponding to information of the sales node corresponding to each bulk commodity, the character segment corresponding to the serial number of each bulk commodity, the character segment corresponding to the mechanism identifier of the distribution management mechanism to which the management node belongs and the character segment corresponding to the identifier of the administrative region to which the distribution management mechanism belongs, so as to obtain the code of each bulk commodity in the plurality of bulk commodities, wherein the code of each bulk commodity comprises production information and distribution information of the corresponding bulk commodity, the serial number of each bulk commodity is used for indicating the ordering position of the corresponding bulk commodity in the self-contained commodity, and the serial numbers of the bulk commodities are different;
Synchronizing the code generated for each of the plurality of bulk items into a blockchain of other nodes in the blockchain system.
2. The method of claim 1, wherein verifying the code marked on the self-contained commodity from the plurality of codes stored in the self-contained blockchain comprises:
searching codes matched with codes marked on the self-contained commodity from a plurality of codes stored in the blockchain;
and if the code matched with the code marked on the self-contained commodity is found, determining that the code marked on the self-contained commodity passes the verification.
3. The method according to claim 1, wherein the method further comprises:
acquiring order information;
distributing corresponding sales nodes for each of the plurality of bulk commodities according to the order information;
each of the plurality of bulk items is assigned a number.
4. A method according to any one of claims 1-3, wherein the production node generates a coded mark for the self-contained commodity at a first location on the outer packaging of the self-contained commodity;
Before the code of the mark on the self-contained commodity is obtained, the method further comprises the following steps:
shooting one side, marked with codes, of the outer package of the self-contained commodity;
identifying the position of the code marked on the self-contained commodity in the outer package from the shot image to obtain a second position;
acquiring the first position from the blockchain;
and if the first position is the same as the second position, executing the step of acquiring the codes marked on the self-contained commodity.
5. A blockchain-based commodity information storage method, applied to a blockchain system including a production node and a management node, the method comprising:
the production node generates a first character segment according to the identification of a production mechanism of the self-contained commodity, generates a second character segment according to the production date of the self-contained commodity, generates a third character segment according to the brand information of the self-contained commodity, generates a fourth character segment according to the object type of the self-contained commodity, and combines the first character segment, the second character segment, the third character segment, the fourth character segment and the fifth character segment according to the production serial number sound field of the self-contained commodity to generate a code for the self-contained commodity, synchronizes the code generated for the self-contained commodity into a block chain of other nodes in the block chain system, wherein the self-contained commodity comprises a plurality of bulk commodities, each bulk commodity comprises a plurality of sub-commodities, any sub-commodity corresponds to one code, the production node carries out transcoding on the code generated for the self-contained commodity to obtain a graphic code, and uses the graphic code as the code of any sub-contained commodity, or uses the production node generates a code for the self-contained commodity according to the code generated for the self-contained commodity and the sub-contained commodity to generate a code on any sub-serial number of the self-contained commodity;
The management node acquires codes marked on the self-contained commodity and verifies the codes marked on the self-contained commodity according to a plurality of codes stored in a block chain configured by the management node;
if the verification of the marked codes on the self-contained commodities passes, the management node acquires a character segment corresponding to information of a sales node corresponding to each bulk commodity, a character segment corresponding to a serial number of each bulk commodity, a character segment corresponding to a mechanism identifier of a distribution management mechanism to which the management node belongs and a character segment corresponding to an identifier of an administrative region to which the distribution management mechanism belongs, and combines the marked codes on the self-contained commodity, the character segment corresponding to the information of the sales node corresponding to each bulk commodity, the character segment corresponding to the serial number of each bulk commodity, the character segment corresponding to the mechanism identifier of the distribution management mechanism to which the management node belongs and the character segment corresponding to the identifier of the administrative region to which the distribution management mechanism belongs to obtain the code of each bulk commodity in the plurality of bulk commodities, wherein the code of each bulk commodity comprises production information and distribution information of the corresponding bulk commodity, and the serial number of each bulk commodity is used for indicating the position of the corresponding bulk commodity in the self-contained ordered commodity and the serial number of each bulk commodity is different;
The management node synchronizes the code generated for each bulk commodity into the blockchain of other nodes in the blockchain system.
6. The method of claim 5, wherein the production node synchronizes the code generated for the self-contained commodity to the blockchain of other nodes in the blockchain system, further comprising:
a target node receives a query request sent by a terminal, wherein the query request carries a code to be queried, the code to be queried is obtained by identifying a code marked on a target sub commodity by the terminal, and the target node is any node in the blockchain system;
the target node searches codes matched with the codes to be queried from a plurality of codes stored in a block chain configured by the target node;
if the code matched with the code to be queried is found, the target node sends the block information of a target block to the terminal so that the terminal displays commodity information of the target sub commodity according to the code to be queried and the block information of the target block, wherein the target block is the block where the code matched with the code to be queried is located, and the block information comprises the block code and the block generation time.
7. A blockchain-based commodity information storage device for use with a management node, the management node being a node in a blockchain system, the device comprising:
the system comprises an acquisition module, a generation module and a display module, wherein the acquisition module is used for acquiring codes marked on an integral commodity, the codes marked on the integral commodity are codes generated by the integral commodity by a production node, the production node is a node in the blockchain system, the codes generated by the production node for the integral commodity comprise production information of the integral commodity, the production information comprises a production mechanism, brand information, a production date, an article type and a production number, the production number is a production identifier of the integral commodity, the production number is used for representing the number of the integral commodity in a production period, the production node generates a first character segment according to the identifier of the production mechanism, generates a second character segment according to the production date, generates a third character segment according to the brand information, generates a fifth character segment according to the production number, the first character segment, the second character segment, the third character segment, the fourth character segment and the fifth character segment are combined to obtain a code, the number of the integral commodity is a plurality of codes, the code is a number of the integral commodity, the code is generated by a plurality of the corresponding codes, the code is a commodity, the code is generated by a plurality of the integral commodity, the code is a commodity, the code is generated by a commodity, and the code is a commodity, the code is generated by a number of the integral commodity, and the code is generated by a number of the integral commodity, the code is generated by the code corresponding to the code of the integral commodity, and the code is a commodity;
The verification module is used for verifying the codes marked on the self-contained commodity according to a plurality of codes stored in the self-configured blockchain, wherein the codes comprise codes generated by the production node for the self-contained commodity;
the generation module is used for acquiring a character segment corresponding to information of a sales node corresponding to each bulk commodity, a character segment corresponding to a serial number of each bulk commodity, a character segment corresponding to a mechanism identifier of a distribution management mechanism to which the management node belongs and a character segment corresponding to an identifier of an administrative region in which the distribution management mechanism is located if the code verification of the mark on the self-contained commodity is passed, combining the code of the mark on the self-contained commodity, the character segment corresponding to the information of the sales node corresponding to each bulk commodity, the character segment corresponding to the serial number of each bulk commodity, the character segment corresponding to the mechanism identifier of the distribution management mechanism to which the management node belongs and the character segment corresponding to the identifier of the administrative region in which the distribution management mechanism is located, so as to acquire the code of each bulk commodity in the bulk commodities, wherein the code of each bulk commodity comprises production information and distribution information of the corresponding bulk commodity, and the serial number of each bulk commodity is used for indicating the ordering position of the corresponding bulk commodity in the self-contained self-service commodity, and the serial numbers of the bulk commodity are different;
A synchronization module for synchronizing the code generated for each of the plurality of bulk items into a blockchain of other nodes in the blockchain system.
8. The apparatus of claim 7, wherein the verification module is configured to find a code from a plurality of codes stored by the blockchain that matches a code marked on the self-contained commodity; and if the code matched with the code marked on the self-contained commodity is found, determining that the code marked on the self-contained commodity passes the verification.
9. The apparatus of claim 7, wherein the generation module is further configured to obtain order information; distributing corresponding sales nodes for each of the plurality of bulk commodities according to the order information; each of the plurality of bulk items is assigned a number.
10. The apparatus of any one of claims 7 to 9, wherein the production node generates a coded mark for the self-contained commodity at a first location on an overwrap of the self-contained commodity;
the acquisition module is also used for shooting one side, marked with the code, of the outer package of the self-contained commodity; identifying the position of the code marked on the self-contained commodity in the outer package from the shot image to obtain a second position; acquiring the first position from the blockchain; and if the first position is the same as the second position, executing the step of acquiring the codes marked on the self-contained commodity.
11. A blockchain system, wherein the blockchain system includes a production node and a management node;
the production node is used for generating a first character segment according to the identification of a production mechanism of the self-contained commodity, generating a second character segment according to the production date of the self-contained commodity, generating a third character segment according to the brand information of the self-contained commodity, generating a fourth character segment according to the commodity type of the self-contained commodity, and combining the first character segment, the second character segment, the third character segment, the fourth character segment and the fifth character segment according to the production serial number sound field fifth character segment of the self-contained commodity to generate a code for the self-contained commodity, synchronizing the code generated for the self-contained commodity into a block chain of other nodes in the block chain system, wherein the self-contained commodity comprises a plurality of bulk commodities, each bulk commodity comprises a plurality of sub-commodities, any sub-commodity corresponds to one code, the production node carries out transcoding on the code generated for the self-contained commodity to obtain a graphic code, and the graphic code is used as the code of the self-contained commodity, or the production node generates a code for the self-contained commodity according to the code generated for the self-contained commodity and the sub-contained commodity and the serial number of the self-contained commodity;
The management node is used for acquiring codes marked on the self-contained commodity and checking the codes marked on the self-contained commodity according to a plurality of codes stored in a block chain configured by the management node;
if the verification of the code marked on the integrated commodity is passed, the management node is further configured to obtain a character segment corresponding to information of a sales node corresponding to each bulk commodity, a character segment corresponding to a number of the bulk commodity, a character segment corresponding to a mechanism identifier of a distribution management mechanism to which the management node belongs, and a character segment corresponding to an identifier of an administrative region to which the distribution management mechanism belongs, and combine the code marked on the integrated commodity, the character segment corresponding to the information of the sales node corresponding to each bulk commodity, the character segment corresponding to the number of each bulk commodity, the character segment corresponding to the mechanism identifier of the distribution management mechanism to which the management node belongs, and the character segment corresponding to the identifier of the administrative region to which the distribution management node belongs, so as to obtain a code of each bulk commodity in the plurality of bulk commodities, where the code of each bulk commodity comprises production information and distribution information of the corresponding bulk commodity, and the number of each bulk commodity is used for indicating a position of the corresponding bulk commodity in the integrated commodity, and the serial numbers of the respective bulk commodity are different;
The management node is also configured to synchronize the code generated for each bulk commodity into the blockchain of other nodes in the blockchain system.
12. A computer storage medium having stored therein at least one instruction, at least one program, code set, or instruction set, the at least one instruction, the at least one program, the code set, or the instruction set being loaded and executed by a processor to implement the blockchain-based commodity information storage method according to any of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910877382.9A CN110598470B (en) | 2019-09-17 | 2019-09-17 | Block chain-based commodity information storage method, device and system and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910877382.9A CN110598470B (en) | 2019-09-17 | 2019-09-17 | Block chain-based commodity information storage method, device and system and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110598470A CN110598470A (en) | 2019-12-20 |
CN110598470B true CN110598470B (en) | 2023-12-15 |
Family
ID=68860236
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910877382.9A Active CN110598470B (en) | 2019-09-17 | 2019-09-17 | Block chain-based commodity information storage method, device and system and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110598470B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112149584A (en) * | 2020-09-27 | 2020-12-29 | 上海依图网络科技有限公司 | Coding system, method, device, equipment and medium |
CN112330336A (en) * | 2020-10-26 | 2021-02-05 | 成都商通时代数字科技有限公司 | White spirit management system and method based on block chain and GPS |
CN113327119B (en) * | 2021-06-25 | 2023-04-18 | 青岛森麒麟轮胎股份有限公司 | Virtual material coding method and system, electronic equipment and storage medium |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2013165028A2 (en) * | 2012-05-04 | 2013-11-07 | Atambo Patrick Nyachio | Systems and methods for tracking and authenticating serialized items |
CN107657460A (en) * | 2017-09-08 | 2018-02-02 | 众安信息技术服务有限公司 | A kind of tobacco based on block chain is false proof and source tracing method and system |
CN109461006A (en) * | 2018-09-13 | 2019-03-12 | 广东蓝蜜蜂信息技术有限公司 | A kind of trace to the source two-dimensional code generation method and the system of food in bulk and agricultural product |
CN109949047A (en) * | 2019-01-28 | 2019-06-28 | 北京科程电子商务有限责任公司 | A kind of anti-fake source tracing method of tobacco based on block chain and system |
CN110097377A (en) * | 2019-04-18 | 2019-08-06 | 深圳市科迈爱康科技有限公司 | Antifake method for products and device based on block chain |
WO2019164170A1 (en) * | 2018-02-22 | 2019-08-29 | ㈜티비스톰 | Product distribution and distribution history inquiry and management platform using blockchain |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20180130034A1 (en) * | 2016-11-07 | 2018-05-10 | LedgerDomain, LLC | Extended blockchains for event tracking and management |
-
2019
- 2019-09-17 CN CN201910877382.9A patent/CN110598470B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2013165028A2 (en) * | 2012-05-04 | 2013-11-07 | Atambo Patrick Nyachio | Systems and methods for tracking and authenticating serialized items |
CN107657460A (en) * | 2017-09-08 | 2018-02-02 | 众安信息技术服务有限公司 | A kind of tobacco based on block chain is false proof and source tracing method and system |
WO2019164170A1 (en) * | 2018-02-22 | 2019-08-29 | ㈜티비스톰 | Product distribution and distribution history inquiry and management platform using blockchain |
CN109461006A (en) * | 2018-09-13 | 2019-03-12 | 广东蓝蜜蜂信息技术有限公司 | A kind of trace to the source two-dimensional code generation method and the system of food in bulk and agricultural product |
CN109949047A (en) * | 2019-01-28 | 2019-06-28 | 北京科程电子商务有限责任公司 | A kind of anti-fake source tracing method of tobacco based on block chain and system |
CN110097377A (en) * | 2019-04-18 | 2019-08-06 | 深圳市科迈爱康科技有限公司 | Antifake method for products and device based on block chain |
Also Published As
Publication number | Publication date |
---|---|
CN110598470A (en) | 2019-12-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108764797B (en) | Circulation information inquiry method, device, equipment, system and storage medium | |
CN110598470B (en) | Block chain-based commodity information storage method, device and system and storage medium | |
JP6914333B2 (en) | Blockchain-based product tracking methods and equipment | |
CN110602206B (en) | Data sharing method and device based on block chain and storage medium | |
US9451406B2 (en) | Beacon methods and arrangements | |
CN107464162A (en) | Commodity association method, apparatus and computer-readable recording medium | |
US10304011B2 (en) | Electronic shelf label system and communications method thereof | |
US10902438B2 (en) | Information processing system, information processing apparatus, and information processing method to designate incentives for content transfer | |
US20160358189A1 (en) | Data acquisition and analytics reporting | |
CN110602201A (en) | Resume management method, device and system based on block chain and storage medium | |
KR102193555B1 (en) | Resource processing method and device | |
KR101756840B1 (en) | Method and apparatus for transmitting intention using photographing image | |
CN111339086A (en) | Block processing method, and data query method and device based on block chain | |
CN110020880A (en) | Advertisement placement method, device and equipment | |
CN110599210B (en) | Information management method and device for block chain | |
CN111241115A (en) | Data synchronization method, device, equipment and storage medium | |
CN110248214A (en) | Product Usability notice | |
CN113987326B (en) | Resource recommendation method and device, computer equipment and medium | |
WO2018194252A1 (en) | Product distribution management method and system for same | |
CN111695629A (en) | User characteristic obtaining method and device, computer equipment and storage medium | |
US20220309458A1 (en) | Information processing method, information processing device, program product for processing information, and program product for referring to history information | |
CN111626802A (en) | Method and apparatus for processing information | |
CN111784376B (en) | Method and device for processing information | |
CN110119954B (en) | Method and device for generating tracking order of surgical tool | |
CN113808343A (en) | Book information warehousing method and electronic equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |