CN108876405A - Product traceability records processing method, device and electronic equipment - Google Patents
Product traceability records processing method, device and electronic equipment Download PDFInfo
- Publication number
- CN108876405A CN108876405A CN201810626226.0A CN201810626226A CN108876405A CN 108876405 A CN108876405 A CN 108876405A CN 201810626226 A CN201810626226 A CN 201810626226A CN 108876405 A CN108876405 A CN 108876405A
- Authority
- CN
- China
- Prior art keywords
- data
- hash
- initial
- product
- current
- 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.)
- Pending
Links
Classifications
-
- 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
Landscapes
- Business, Economics & Management (AREA)
- Entrepreneurship & Innovation (AREA)
- Accounting & Taxation (AREA)
- Development Economics (AREA)
- Economics (AREA)
- Finance (AREA)
- Marketing (AREA)
- Strategic Management (AREA)
- Physics & Mathematics (AREA)
- General Business, Economics & Management (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Storage Device Security (AREA)
Abstract
The present invention provides a kind of product traceability record processing method, device and electronic equipments, are related to product traceability technical field, this method includes:The initialization data of product is obtained, and generates the initial Hash fingerprint of product according to the initialization data;It is stored using initialization data and initial Hash fingerprint as the initial upstream source record data of product;Each flow stages when for products in circulation record data generation current process stage corresponding current Hash fingerprint according to corresponding previous trace to the source of current process data and previous flow stages when getting the current process data in current process stage;It records data in tracing to the source for current process stage using current process data and current Hash fingerprint as product and stores, to form Hash chain of tracing to the source.The data of each step are able to record in detail and generate anti-tamper guarantee with hash algorithm in this way in goods batch, improve the social public credibility of product.
Description
Technical field
The present invention relates to product traceability technical field, more particularly, to a kind of product traceability record processing method, device and
Electronic equipment.
Background technique
With the development of market economy, social productive forces are greatly improved, and product in the market shows diversification and homogeneity
Change trend.Conventional products process includes from production is designed into then by channel again to being sold to terminal user.Consumer is difficult to
From homogeneity product appearance judge the superiority and inferiority of product quality, production source and from starting point to terminal consumer in
Between process.Such as:Mineral water.
Existing tracing technology is only the entire product after the completion of the certified products certification that single third party provides or goods batch
Process is traced to the source embodiment, and structure is single, information content is few, and the relative recording of certified products certification or goods batch that third party provides holds very much
It is easily tampered, user is caused still can not to understand actual goods batch.Therefore there are public credibility by matter for existing tracing technology
Doubtful or insufficient problem.
Summary of the invention
In view of this, the purpose of the present invention is to provide a kind of product traceability record processing method, device and electronic equipment,
To improve the social public credibility of product.
In a first aspect, the embodiment of the invention provides a kind of product traceabilities to record processing method, including:
The initialization data of product is obtained, and generates the initial Hash fingerprint of the product according to the initialization data;
Wherein, the initialization data includes beginning of production data and certified products authentication data;
It is carried out using the initialization data and the initial Hash fingerprint as the initial upstream source record data of the product
Storage;
Each flow stages when for the products in circulation, when the current process data for getting the current process stage
When, the data generation current process rank is recorded according to corresponding previous trace to the source of the current process data and previous flow stages
The corresponding current Hash fingerprint of section;Wherein, when the current process stage is the first pass stage, the previous record of tracing to the source
Data are the initial upstream source record data;
Using the current process data and the current Hash fingerprint as the product in the current process stage
It traces to the source and records data and stored, to form Hash chain of tracing to the source.
With reference to first aspect, the embodiment of the invention provides the first possible embodiments of first aspect, wherein institute
The initialization data for obtaining product is stated, and generates the initial Hash fingerprint of the product according to the initialization data, including:
Obtain the beginning of production data of product;
Receive the certified products authentication data generated based on the beginning of production data that third party's right-safeguarding public affairs letter platform is sent;
Using the beginning of production data and the certified products authentication data as the initialization data of the product;
Obtain the default cryptographic Hash and initial random data of the product, wherein the initial random data are participation institute
State the random data that initial Hash fingerprint generates operation;
The initial of the product is generated according to the initialization data, the default cryptographic Hash and the initial random data
Hash fingerprint;
Hash operation is carried out to the initial Hash fingerprint using default hash algorithm, generates the initial Hash of the product
Value.
The possible embodiment of with reference to first aspect the first, the embodiment of the invention provides second of first aspect
Possible embodiment, wherein the initial random data include initial time stamp corresponding with the initialization data, random
The initial random number of generation and the initial Hash algorithm randomly selected;It is described according to the initialization data, the default Hash
Value and the initial random data generate the initial Hash fingerprint of the product, including:
Using the initialization data as initial metadata, it is transformed to the initial MD5 value of the product;
Using the initial Hash algorithm to the initial MD5 value, the initial time stamp, the initial random number and institute
It states default cryptographic Hash and carries out Hash operation, generate the initial Hash fingerprint of the product.
The possible embodiment of with reference to first aspect the first, the embodiment of the invention provides the third of first aspect
Possible embodiment, wherein described using the initialization data and the initial Hash fingerprint as the initial of the product
It traces to the source and records data and stored, including:
By the initialization data, the default cryptographic Hash, the initial random data, the initial Hash fingerprint, institute
The initial upstream source record data that initial Hash value and the default hash algorithm are stated as the product are stored.
The third possible embodiment with reference to first aspect, the embodiment of the invention provides the 4th kind of first aspect
Possible embodiment, wherein described according to the corresponding previous record of tracing to the source of the current process data and previous flow stages
Data generate the current process stage corresponding current Hash fingerprint, including:
Obtain the current process stage corresponding current random number evidence;
According to the current process data, the current random number according to and previous flow stages are corresponding previous traces to the source
Previous metadata, previous cryptographic Hash and the previous Hash fingerprint in data are recorded, generating the current process stage corresponding works as
Preceding Hash fingerprint;
Hash operation is carried out to the current Hash fingerprint using the default hash algorithm, generates the current process rank
The corresponding current cryptographic Hash of section;
Wherein, when the current process stage is the first pass stage, the previous metadata is the initialization number
According to the previous cryptographic Hash is the initial Hash value, and the previous Hash fingerprint is the initial Hash fingerprint.
The 4th kind of possible embodiment with reference to first aspect, the embodiment of the invention provides the 5th kind of first aspect
Possible embodiment, wherein the current random number according to include current time stamp corresponding with the current process stage, with
The current random number that machine generates and the current hash algorithm randomly selected;It is described according to the current process data, it is described current
Random data and the corresponding previous previous metadata recorded in data of tracing to the source of previous flow stages, previous cryptographic Hash and preceding
One Hash fingerprint generates the current process stage corresponding current Hash fingerprint, including:
Using the current process data and the previous metadata as current meta data, the product is transformed to described
The current MD5 value in current process stage;
Using the current hash algorithm to the current MD5 value, the current time stamp, the current random number, institute
It states previous cryptographic Hash and the previous Hash fingerprint carries out Hash operation, generate the current process stage corresponding current Hash
Fingerprint.
With reference to first aspect, the embodiment of the invention provides the 6th kind of possible embodiments of first aspect, wherein institute
The method of stating further includes:
When receive carry flow stages mark trace to the source verification request when, record number from all trace to the source of the product
It traces to the source according to middle crawl each target corresponding with flow stages mark and records data;
The target described in each item, which is traced to the source, records the reversed Hash finger-mark check of data progress, and traces back to the note of initially tracing to the source
Record data;
When the target that there is verification failure, which is traced to the source, records data, determine that result of tracing to the source is to trace to the source unsuccessfully.
Second aspect, the embodiment of the present invention also provide a kind of product traceability record processing unit, including:
First generation module generates the production for obtaining the initialization data of product, and according to the initialization data
The initial Hash fingerprint of product;Wherein, the initialization data includes beginning of production data and certified products authentication data;
Data memory module, for using the initialization data and the initial Hash fingerprint as the initial of the product
It traces to the source and records data and stored;
Second generation module, each flow stages when for for the products in circulation, when getting current process rank
When the current process data of section, data life is recorded according to corresponding previous trace to the source of the current process data and previous flow stages
At the current process stage corresponding current Hash fingerprint;Wherein, when the current process stage is the first pass stage,
Previous trace to the source records data as the initial upstream source record data;
The data memory module is also used to using the current process data and the current Hash fingerprint as the production
Product record data and are stored in tracing to the source for the current process stage, to form Hash chain of tracing to the source.
The third aspect, the embodiment of the present invention also provide a kind of electronic equipment, including memory, processor, the memory
In be stored with the computer program that can be run on the processor, the processor realizes the when executing the computer program
Method described in one side or its any possible embodiment.
Fourth aspect, the embodiment of the present invention also provide a kind of meter of non-volatile program code that can be performed with processor
Calculation machine readable medium, said program code execute the processor described in first aspect or its any possible embodiment
Method.
The embodiment of the present invention brings following beneficial effect:
In the embodiment of the present invention, the initialization data of product is obtained, and the initial of product is generated according to the initialization data
Hash fingerprint;Wherein, initialization data includes beginning of production data and certified products authentication data;By initialization data and initial Hash
Fingerprint is stored as the initial upstream source record data of product;Each flow stages when for products in circulation, when getting
When the current process data in current process stage, according to the corresponding previous record of tracing to the source of current process data and previous flow stages
Data generate current process stage corresponding current Hash fingerprint;Wherein, preceding when the current process stage is the first pass stage
One, which traces to the source, records data as initial upstream source record data;It is flowed using current process data and current Hash fingerprint as product currently
The tracing to the source of journey stage records data and is stored, to form Hash chain of tracing to the source.It traces back using product provided in an embodiment of the present invention
Source record processing method, device and electronic equipment, the data of each step are able to record in detail and use Hash in goods batch
Algorithm generates anti-tamper guarantee, makes the Hash of each step the Hash fingerprint generated and previous step in production sale process
Fingerprint is associated, and formation is traced to the source Hash chain, greatly improve the social public credibility of product, perfect social value system,
The credibility and national product transparency for increasing social production quality assurance system, to improve people's living standard.
Other features and advantages of the present invention will illustrate in the following description, also, partly become from specification
It obtains it is clear that understand through the implementation of the invention.The objectives and other advantages of the invention are in specification and attached drawing
Specifically noted structure is achieved and obtained.
To enable the above objects, features and advantages of the present invention to be clearer and more comprehensible, preferred embodiment is cited below particularly, and cooperate
Appended attached drawing, is described in detail below.
Detailed description of the invention
It, below will be to specific in order to illustrate more clearly of the specific embodiment of the invention or technical solution in the prior art
Embodiment or attached drawing needed to be used in the description of the prior art be briefly described, it should be apparent that, it is described below
Attached drawing is some embodiments of the present invention, for those of ordinary skill in the art, before not making the creative labor
It puts, is also possible to obtain other drawings based on these drawings.
Fig. 1 is the flow diagram that a kind of product traceability provided in an embodiment of the present invention records processing method;
Fig. 2 is that a kind of generation provided in an embodiment of the present invention traces to the source and records the flow diagram of data;
Fig. 3 is a kind of flow diagram for method of calibration of tracing to the source provided in an embodiment of the present invention;
Fig. 4 is a kind of structural schematic diagram of product traceability record processing unit provided in an embodiment of the present invention;
Fig. 5 is the structural schematic diagram of a kind of electronic equipment provided in an embodiment of the present invention.
Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with attached drawing to the present invention
Technical solution be clearly and completely described, it is clear that described embodiments are some of the embodiments of the present invention, rather than
Whole embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art are not making creative work premise
Under every other embodiment obtained, shall fall within the protection scope of the present invention.
Current existing tracing technology has that structure is single, information content is few, public credibility is queried or insufficient.It is based on
This, a kind of product traceability record processing method, device and electronic equipment provided in an embodiment of the present invention pass through hashing technique
Formation is traced to the source Hash chain, and the social public credibility of product can be improved.
For convenient for understanding the present embodiment, first to a kind of product traceability record disclosed in the embodiment of the present invention at
Reason method describes in detail.
Embodiment one:
Method provided in an embodiment of the present invention acquires data since the source of product design and production, while by connecing
Enter third-party quality authentication and certified products guarantees database (such as third party's right-safeguarding public affairs letter platform) API (Application
Programming Interface, application programming interface) objective data that certified products authenticates is obtained, each flow stages are all
The Hash fingerprint of opposite all data before is generated, and the Hash fingerprint calculation of next flow stages is by upper one
Hash fingerprint as parameter transmitting come in participate in Hash operation, thus reach monitoring goods batch in product flow direction each step and
Without the purpose distorted, a Hash chain of completely tracing to the source is ultimately formed.Then user can be obtained by two dimensional code barcode scanning
Nothing to goods batch from source to the current process stage distorts the record page.
Fig. 1 is the flow diagram that a kind of product traceability provided in an embodiment of the present invention records processing method, and this method can
To realize that the platform of tracing to the source may include one or more server by platform of tracing to the source, and it is anti-fake to access the mechanism quality that carries weight
The third parties API such as API (referred to as anti-fake API) and material flow A PI.As shown in Figure 1, this approach includes the following steps:
Step S101 obtains the initialization data of product, and is referred to according to the initial Hash that the initialization data generates product
Line.
Above-mentioned initialization data includes beginning of production data and certified products authentication data.Beginning of production data include the place of production, life
Produce time, longitude and latitude, raw material, designer, producer etc..Certified products authentication data is to carry out verification generation to beginning of production data
Whether the description data of certified products.
In some possible embodiments, platform of tracing to the source is provided with anti-fake API, accesses third party's right-safeguarding by anti-fake API
Public affairs letter platform, is based on this, and the initialization data of product can be obtained by following below scheme:It is detailed to collect product design beginning of production
Data, the beginning of production data as product;Receive generating based on beginning of production data for third party's right-safeguarding public affairs letter platform transmission
Certified products authentication data;Using the beginning of production data and certified products authentication data as the initialization data of product.
Operation is generated in order to carry out Hash fingerprint, it is also necessary to the default cryptographic Hash and initial random data of product are obtained,
In, initial random data are the random data for participating in initial Hash fingerprint and generating operation;Then according to initialization data, default Kazakhstan
Uncommon value and initial random data generate the initial Hash fingerprint of product;Finally using default hash algorithm to initial Hash fingerprint into
Row Hash operation generates the initial Hash value of product.
Specifically, initial random data may include initial time stamp corresponding with initialization data, generate at random just
Beginning random number and the initial Hash algorithm randomly selected.There are many hash algorithms for platform of tracing to the source storage, need therefrom to randomly select
One hash algorithm is generated for Hash fingerprint, it is also necessary to be chosen one in advance from a variety of hash algorithms and be calculated as default Hash
Method is fixed for the generation of cryptographic Hash, here without limitation to specific hash algorithm, such as initial Hash algorithm can with but not
It is limited to be any one of following:SHA-1, SHA-128, SHA-256 etc., default hash algorithm can be, but not limited to as SHA-
256.Based on this, the detailed process of above-mentioned generation initial Hash fingerprint can be as follows:Using initialization data as initial metadata,
It is transformed to the initial MD5 value of product, such as algorithm is converted by character string, initial metadata is transformed to initial MD5 value;Using
Initial Hash algorithm carries out Hash operation to initial MD5 value, initial time stamp, initial random number and default cryptographic Hash, generates and produces
The initial Hash fingerprint of product.
Step S102 is deposited using initialization data and initial Hash fingerprint as the initial upstream source record data of product
Storage.
Specifically, the detailed data of tracing to the source at beginning of production is stored, including:By initialization data, preset cryptographic Hash, initial
Random data (including initial time stamp, initial random number and initial Hash algorithm), initial Hash fingerprint, initial Hash value and pre-
If hash algorithm is stored as the initial upstream source record data of product.
Step S103, each flow stages when for products in circulation, when the current process for getting the current process stage
When data, the data generation current process stage pair is recorded according to corresponding previous trace to the source of current process data and previous flow stages
The current Hash fingerprint answered.
The tracking of products in circulation flow data is collected, and data movement triggering repeats the generation of Hash fingerprint, until product is
Terminal user buys until terminating products in circulation.Product passes through many process ranks from producing to being circulated to during user
Section, is related to many flow datas, such as a plurality of logistics data, and products retail end data and buyer's data, wherein and products retail
End data includes geographical location, longitude and latitude, receiving time, recipient etc., buyer's data include the time buying, gender, real name,
Age etc..In order to obtain logistics data, which has material flow A PI.It is the first pass stage when the current process stage
When, it is previous trace to the source record data be initial upstream source record data, first flow data of first pass stage corresponding product.Often
Just need to generate a corresponding Hash fingerprint and cryptographic Hash when getting a flow data.
In some possible embodiments, above-mentioned steps S103 can be realized by following process:Obtain current process rank
The corresponding current random number evidence of section;It is corresponding previous according to current process data, current random number evidence and previous flow stages
It traces to the source the previous metadata recorded in data, previous cryptographic Hash and previous Hash fingerprint, generating the current process stage corresponding works as
Preceding Hash fingerprint;Hash operation is carried out to current Hash fingerprint using default hash algorithm, it is corresponding to generate the current process stage
Current cryptographic Hash;Wherein, when the current process stage is the first pass stage, previous metadata is initialization data, previous Kazakhstan
Uncommon value is initial Hash value, and previous Hash fingerprint is initial Hash fingerprint.
Above-mentioned current random number according to include current time stamp corresponding with the current process stage, generate at random it is current random
Number and the current hash algorithm that randomly selects are based on this, and above-mentioned generation current process stage corresponding current Hash fingerprint can be with
Specially:Using current process data and previous metadata as current meta data, it is transformed to product working as in the current process stage
Preceding MD5 value;Using current hash algorithm to current MD5 value, current time stamp, current random number, previous cryptographic Hash and previous Kazakhstan
Uncommon fingerprint carries out Hash operation, generates current process stage corresponding current Hash fingerprint.
Step S104, using current process data and current Hash fingerprint as product the current process stage record of tracing to the source
Data are stored, to form Hash chain of tracing to the source.
Specifically, the detailed data of tracing to the source of each flow stages is stored, including:By current meta data, current random number evidence
(including current time stamp, current random number and current hash algorithm), previous cryptographic Hash, previous Hash fingerprint and default Hash are calculated
Method records data and is stored as product in tracing to the source for current process stage.According to product from production to consumption terminal flow direction into
Row record, each step can all generate corresponding unique Hash fingerprint, record data by tracing to the source of obtaining of above-mentioned each step
It is formed a Hash chain of tracing to the source.
Method provided in an embodiment of the present invention is connect by acquisition product feature data and design, production link data, matching
Enter the certified products authentication data that corresponding third party's right-safeguarding public affairs letter platform provides to merge to form the complete initialization data of product, then
The data that each flow stages of tracing product intermediate links generate are overlapped, and are generated using this method for data with existing
Hash fingerprint, to mark and ensure information primitiveness of tracing to the source.The hash algorithm used when generating Hash fingerprint is random, generation
The Hash fingerprint whole world is unique, collisionless.
Processing method is recorded using product traceability provided in an embodiment of the present invention, the data of each step in goods batch
It is able to record in detail and generates anti-tamper guarantee with hash algorithm, make the Hash that each step generates in production sale process
Fingerprint is associated with the Hash fingerprint of previous step, and formation is traced to the source Hash chain, greatly improve product social public credibility,
Perfect social value system, the credibility for increasing social production quality assurance system and national product transparency, to mention
High people's living standard.
Fig. 2 is that a kind of generation provided in an embodiment of the present invention traces to the source and records the flow diagram of data, as shown in Fig. 2, base
In method shown in FIG. 1, generates to trace to the source and record the processes of data and include:Number is authenticated according to production source data and certified products
According to obtaining initial Hash fingerprint;According to product stream data 1 and initial Hash fingerprint, Hash fingerprint 1 is obtained
According to product stream data n and upper Hash fingerprint n-1, Hash fingerprint n is obtained;Referred to according to and products retail end data and Hash
Line n obtains Hash fingerprint n+1;According to buyer's data and Hash fingerprint n+1, final Hash fingerprint is obtained.
Further, above-mentioned platform of tracing to the source also provides back forecasting function.Fig. 3 is that one kind provided in an embodiment of the present invention is traced back
The flow diagram of source method of calibration, as shown in figure 3, checking process of tracing to the source includes following steps:
Step S301, when receive carry flow stages mark trace to the source verification request when, all from product trace to the source
Crawl each target corresponding with flow stages mark, which is traced to the source, in record data records data.
User can be by scanning the two-dimensional code into the corresponding interface of tracing to the source of platform of tracing to the source, which contains product circulation
The function of information and verification inquiry of tracing to the source.User can check product stream transfering the letter breath in any step (flow stages)
Or reversely verified since current procedures, the starting point data of production is up traced back to always.
Specifically, user can choose any one step, and then determination is traced to the source, which can take to platform transmission of tracing to the source
Verification request of tracing to the source with corresponding flow stages mark, platform of tracing to the source then grab each entry corresponding with the verification request of tracing to the source
Mark, which is traced to the source, records data.For example, grabbing if user's selection carries out verification of tracing to the source since Article 3 logistics data from Article 3
All trace to the source that logistics data starts up to trace back to always production records data.
Step S302 traces to the source to each target and records the reversed Hash finger-mark check of data progress, and traces back to and initially trace to the source
Record data.
Step S303 determines that result of tracing to the source is to trace to the source unsuccessfully when the target that there is verification failure, which is traced to the source, records data.
Platform of tracing to the source can compare the data of each step and corresponding Hash fingerprint, comparison pass through, then trace back to previous step, then
It is compared;It compares by tracing back to previous step again, traces back to product source always.There is the Hash fingerprint ratio of any step in centre
To not passing through, it is considered as and traces to the source unsuccessfully, product will be under suspicion.Tracing to the source platform can also be with different colour code to each step (process
Stage) whether compare by being labeled.Due to the relevant operation of Hash fingerprint and previous step of each step, leads one and start
Whole body, therefore the data after solidifying can not be distorted, it otherwise can not be verified, to ensure that the social public credibility of product.
The embodiment of the present invention realizes Hash chain of tracing to the source by hashing technique, and the circulation process of tracing product is detailed
Data, and retrospect voucher, intermediate any flow stages such as provide backtracking and the product quality problem traced to the source after Hash chain
Can all it be recalled, per stage all provides verifying, comes to testify, collects evidence and provide law aid in peripheral product.
Embodiment two:
Fig. 4 is a kind of structural schematic diagram of product traceability record processing unit provided in an embodiment of the present invention, such as Fig. 4 institute
Show, which includes:
First generation module 41 generates the first of product for obtaining the initialization data of product, and according to initialization data
Beginning Hash fingerprint;Wherein, initialization data includes beginning of production data and certified products authentication data;
Data memory module 42, for using initialization data and initial Hash fingerprint as the initial upstream source record number of product
According to being stored;
Second generation module 43, each flow stages when for for products in circulation, when getting the current process stage
Current process data when, according to current process data and previous flow stages it is corresponding it is previous trace to the source record data generate it is current
The corresponding current Hash fingerprint of flow stages;Wherein, when the current process stage is the first pass stage, previous trace to the source records number
According to for initial upstream source record data;
Data memory module 42 is also used to using current process data and current Hash fingerprint as product in current process rank
Tracing to the source for section records data and is stored, to form Hash chain of tracing to the source.
Above-mentioned first generation module 41 is specifically used for:Obtain the beginning of production data of product;Receive third party's right-safeguarding public affairs letter
The certified products authentication data generated based on beginning of production data that platform is sent;Using beginning of production data and certified products authentication data as
The initialization data of product;Obtain the default cryptographic Hash and initial random data of product, wherein initial random data are to participate in just
The random data of beginning Hash fingerprint generation operation;Product is generated according to initialization data, default cryptographic Hash and initial random data
Initial Hash fingerprint;Hash operation is carried out to initial Hash fingerprint using default hash algorithm, generates the initial Hash of product
Value.
Above-mentioned data memory module 42 is specifically used for:By initialization data, default cryptographic Hash, initial random data, initial
Hash fingerprint, initial Hash value and default hash algorithm are stored as the initial upstream source record data of product.
Above-mentioned second generation module 43 is specifically used for:Obtain current process stage corresponding current random number evidence;According to working as
Preceding flow data, current random number evidence and the corresponding previous previous metadata recorded in data of tracing to the source of previous flow stages,
Previous cryptographic Hash and previous Hash fingerprint generate current process stage corresponding current Hash fingerprint;Using default hash algorithm
Hash operation is carried out to current Hash fingerprint, generates current process stage corresponding current cryptographic Hash;Wherein, when current process rank
When section is the first pass stage, previous metadata is initialization data, and previous cryptographic Hash is initial Hash value, previous Hash fingerprint
For initial Hash fingerprint.
Further, above-mentioned apparatus further includes correction verification module of tracing to the source, trace to the source correction verification module and the above-mentioned data memory module
42 connections, are used for:When receive carry flow stages mark trace to the source verification request when, record number from all trace to the source of product
It traces to the source according to middle crawl each target corresponding with flow stages mark and records data;Tracing to the source each target, it is anti-to record data progress
To Hash finger-mark check, and trace back to initial upstream source record data;When the target that there is verification failure, which is traced to the source, records data, really
Surely result of tracing to the source is to trace to the source unsuccessfully.
In the embodiment of the present invention, the initialization data of product is obtained, and the initial of product is generated according to the initialization data
Hash fingerprint;Wherein, initialization data includes beginning of production data and certified products authentication data;By initialization data and initial Hash
Fingerprint is stored as the initial upstream source record data of product;Each flow stages when for products in circulation, when getting
When the current process data in current process stage, according to the corresponding previous record of tracing to the source of current process data and previous flow stages
Data generate current process stage corresponding current Hash fingerprint;Wherein, preceding when the current process stage is the first pass stage
One, which traces to the source, records data as initial upstream source record data;It is flowed using current process data and current Hash fingerprint as product currently
The tracing to the source of journey stage records data and is stored, to form Hash chain of tracing to the source.It traces back using product provided in an embodiment of the present invention
Source record processing unit, the data of each step are able to record in detail and generate anti-tamper guarantor with hash algorithm in goods batch
Barrier keeps the Hash fingerprint that each step generates in production sale process associated with the Hash fingerprint of previous step, is formed
It traces to the source Hash chain, greatly improves the social public credibility of product, perfect social value system, increases social production matter
The credibility and national product transparency for measuring security system, to improve people's living standard.
Embodiment three:
Referring to Fig. 5, the embodiment of the present invention also provides a kind of electronic equipment 100, including:Processor 50, memory 51, bus
52 and communication interface 53, the processor 50, communication interface 53 and memory 51 are connected by bus 52;Processor 50 is for holding
The executable module stored in line storage 51, such as computer program.
Wherein, memory 51 may include high-speed random access memory (RAM, RandomAccessMemory), can also
It can further include nonvolatile memory (non-volatile memory), for example, at least a magnetic disk storage.Pass through at least one
A communication interface 53 (can be wired or wireless) realizes the communication link between the system network element and at least one other network element
It connects, internet, wide area network, local network, Metropolitan Area Network (MAN) etc. can be used.
Bus 52 can be isa bus, pci bus or eisa bus etc..The bus can be divided into address bus, data
Bus, control bus etc..Only to be indicated with a four-headed arrow convenient for indicating, in Fig. 5, it is not intended that an only bus or
A type of bus.
Wherein, memory 51 is for storing program, and the processor 50 executes the journey after receiving and executing instruction
Sequence, method performed by the device that the stream process that aforementioned any embodiment of the embodiment of the present invention discloses defines can be applied to handle
In device 50, or realized by processor 50.
Processor 50 may be a kind of IC chip, the processing capacity with signal.During realization, above-mentioned side
Each step of method can be completed by the integrated logic circuit of the hardware in processor 50 or the instruction of software form.Above-mentioned
Processor 50 can be general processor, including central processing unit (Central Processing Unit, abbreviation CPU), network
Processor (Network Processor, abbreviation NP) etc.;It can also be digital signal processor (Digital Signal
Processing, abbreviation DSP), specific integrated circuit (Application Specific Integrated Circuit, referred to as
ASIC), ready-made programmable gate array (Field-Programmable Gate Array, abbreviation FPGA) or other are programmable
Logical device, discrete gate or transistor logic, discrete hardware components.It may be implemented or execute in the embodiment of the present invention
Disclosed each method, step and logic diagram.General processor can be microprocessor or the processor is also possible to appoint
What conventional processor etc..The step of method in conjunction with disclosed in the embodiment of the present invention, can be embodied directly in hardware decoding processing
Device executes completion, or in decoding processor hardware and software module combination execute completion.Software module can be located at
Machine memory, flash memory, read-only memory, programmable read only memory or electrically erasable programmable memory, register etc. are originally
In the storage medium of field maturation.The storage medium is located at memory 51, and processor 50 reads the information in memory 51, in conjunction with
Its hardware completes the step of above method.
Product traceability record processing unit and electronic equipment provided in an embodiment of the present invention, with production provided by the above embodiment
Product, which are traced to the source, records processing method technical characteristic having the same, so also can solve identical technical problem, reaches identical skill
Art effect.
It is apparent to those skilled in the art that for convenience and simplicity of description, the device of foregoing description
And the specific work process of electronic equipment, it can refer to corresponding processes in the foregoing method embodiment, details are not described herein.
In all examples being illustrated and described herein, any occurrence should be construed as merely illustratively, without
It is as limitation, therefore, other examples of exemplary embodiment can have different values.
The flow chart and block diagram in the drawings show the device of multiple embodiments according to the present invention, method and computer journeys
The architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generation
A part of one module, section or code of table, a part of the module, section or code include one or more use
The executable instruction of the logic function as defined in realizing.It should also be noted that in some implementations as replacements, being marked in box
The function of note can also occur in a different order than that indicated in the drawings.For example, two continuous boxes can actually base
Originally it is performed in parallel, they can also be executed in the opposite order sometimes, and this depends on the function involved.It is also noted that
It is the combination of each box in block diagram and or flow chart and the box in block diagram and or flow chart, can uses and execute rule
The dedicated hardware based system of fixed function or movement is realized, or can use the group of specialized hardware and computer instruction
It closes to realize.
The computer program product of product traceability record processing method, including storage are carried out provided by the embodiment of the present invention
The computer readable storage medium of the executable non-volatile program code of processor, the instruction that said program code includes can
For executing previous methods method as described in the examples, specific implementation can be found in embodiment of the method, and details are not described herein.
In several embodiments provided herein, it should be understood that disclosed device and method can pass through it
Its mode is realized.The apparatus embodiments described above are merely exemplary, for example, the division of the unit, only
A kind of logical function partition, there may be another division manner in actual implementation, in another example, multiple units or components can combine
Or it is desirably integrated into another system, or some features can be ignored or not executed.Another point, shown or discussed phase
Coupling, direct-coupling or communication connection between mutually can be through some communication interfaces, the INDIRECT COUPLING of device or unit or
Communication connection can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit
The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple
In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme
's.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit
It is that each unit physically exists alone, can also be integrated in one unit with two or more units.
It, can be with if the function is realized in the form of SFU software functional unit and when sold or used as an independent product
It is stored in the executable non-volatile computer-readable storage medium of a processor.Based on this understanding, of the invention
Technical solution substantially the part of the part that contributes to existing technology or the technical solution can be with software in other words
The form of product embodies, which is stored in a storage medium, including some instructions use so that
One computer equipment (can be personal computer, server or the network equipment etc.) executes each embodiment institute of the present invention
State all or part of the steps of method.And storage medium above-mentioned includes:USB flash disk, mobile hard disk, read-only memory (ROM, Read-
Only Memory), random access memory (RAM, Random Access Memory), magnetic or disk etc. are various can be with
Store the medium of program code.
Finally it should be noted that:Embodiment described above, only a specific embodiment of the invention, to illustrate the present invention
Technical solution, rather than its limitations, scope of protection of the present invention is not limited thereto, although with reference to the foregoing embodiments to this hair
It is bright to be described in detail, those skilled in the art should understand that:Anyone skilled in the art
In the technical scope disclosed by the present invention, it can still modify to technical solution documented by previous embodiment or can be light
It is readily conceivable that variation or equivalent replacement of some of the technical features;And these modifications, variation or replacement, do not make
The essence of corresponding technical solution is detached from the spirit and scope of technical solution of the embodiment of the present invention, should all cover in protection of the invention
Within the scope of.Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims (10)
1. a kind of product traceability records processing method, which is characterized in that including:
The initialization data of product is obtained, and generates the initial Hash fingerprint of the product according to the initialization data;Wherein,
The initialization data includes beginning of production data and certified products authentication data;
It is stored using the initialization data and the initial Hash fingerprint as the initial upstream source record data of the product;
Each flow stages when for the products in circulation, when getting the current process data in current process stage, root
The data generation current process stage pair is recorded according to corresponding previous trace to the source of the current process data and previous flow stages
The current Hash fingerprint answered;Wherein, when the current process stage is the first pass stage, previous trace to the source records data
For the initial upstream source record data;
Using the current process data and the current Hash fingerprint as the product tracing to the source in the current process stage
Record data are stored, to form Hash chain of tracing to the source.
2. the method according to claim 1, wherein the initialization data for obtaining product, and according to described
Initialization data generates the initial Hash fingerprint of the product, including:
Obtain the beginning of production data of product;
Receive the certified products authentication data generated based on the beginning of production data that third party's right-safeguarding public affairs letter platform is sent;
Using the beginning of production data and the certified products authentication data as the initialization data of the product;
Obtain the default cryptographic Hash and initial random data of the product, wherein the initial random data are that participation is described just
The random data of beginning Hash fingerprint generation operation;
The initial Hash of the product is generated according to the initialization data, the default cryptographic Hash and the initial random data
Fingerprint;
Hash operation is carried out to the initial Hash fingerprint using default hash algorithm, generates the initial Hash value of the product.
3. according to the method described in claim 2, it is characterized in that, the initial random data include and the initialization data
Corresponding initial time stamp, the initial random number generated at random and the initial Hash algorithm randomly selected;It is described according to it is described just
Beginningization data, the default cryptographic Hash and the initial random data generate the initial Hash fingerprint of the product, including:
Using the initialization data as initial metadata, it is transformed to the initial MD5 value of the product;
Using the initial Hash algorithm to the initial MD5 value, the initial time stamp, the initial random number and described pre-
If cryptographic Hash carries out Hash operation, the initial Hash fingerprint of the product is generated.
4. according to the method described in claim 2, it is characterized in that, described refer to the initialization data and the initial Hash
Line is stored as the initial upstream source record data of the product, including:
By the initialization data, the default cryptographic Hash, the initial random data, the initial Hash fingerprint, it is described just
Beginning cryptographic Hash and the default hash algorithm are stored as the initial upstream source record data of the product.
5. according to the method described in claim 4, it is characterized in that, described according to the current process data and previous process rank
Corresponding previous trace to the source of section records the data generation current process stage corresponding current Hash fingerprint, including:
Obtain the current process stage corresponding current random number evidence;
According to the current process data, current random number evidence and the corresponding previous record of tracing to the source of previous flow stages
Previous metadata, previous cryptographic Hash and previous Hash fingerprint in data, generate the current process stage corresponding current Kazakhstan
Uncommon fingerprint;
Hash operation is carried out to the current Hash fingerprint using the default hash algorithm, generates the current process stage pair
The current cryptographic Hash answered;
Wherein, when the current process stage is the first pass stage, the previous metadata is the initialization data, institute
Stating previous cryptographic Hash is the initial Hash value, and the previous Hash fingerprint is the initial Hash fingerprint.
6. according to the method described in claim 5, it is characterized in that, current random number evidence includes and the current process rank
The corresponding current time stamp of section, the current random number generated at random and the current hash algorithm randomly selected;It is described according to
Current process data, the current random number according to and previous flow stages it is corresponding it is previous trace to the source record it is previous in data
Metadata, previous cryptographic Hash and previous Hash fingerprint generate the current process stage corresponding current Hash fingerprint, including:
Using the current process data and the previous metadata as current meta data, the product is transformed to described current
The current MD5 value of flow stages;
Using the current hash algorithm to the current MD5 value, the current time stamp, the current random number, it is described before
One cryptographic Hash and the previous Hash fingerprint carry out Hash operation, generate the current process stage corresponding current Hash and refer to
Line.
7. the method according to claim 1, wherein the method also includes:
When receive carry flow stages mark trace to the source verification request when, recorded in data from all trace to the source of the product
Crawl each target corresponding with flow stages mark, which is traced to the source, records data;
The target described in each item, which is traced to the source, records the reversed Hash finger-mark check of data progress, and traces back to the initial upstream source record number
According to;
When the target that there is verification failure, which is traced to the source, records data, determine that result of tracing to the source is to trace to the source unsuccessfully.
8. a kind of product traceability record processing unit, which is characterized in that including:
First generation module generates the product for obtaining the initialization data of product, and according to the initialization data
Initial Hash fingerprint;Wherein, the initialization data includes beginning of production data and certified products authentication data;
Data memory module, for initially the tracing to the source as the product using the initialization data and the initial Hash fingerprint
Record data are stored;
Second generation module, each flow stages when for for the products in circulation, when getting the current process stage
When current process data, data generation institute is recorded according to corresponding previous trace to the source of the current process data and previous flow stages
State current process stage corresponding current Hash fingerprint;Wherein, described when the current process stage is the first pass stage
Previous trace to the source records data as the initial upstream source record data;
The data memory module is also used to exist using the current process data and the current Hash fingerprint as the product
The tracing to the source of the current process stage records data and is stored, to form Hash chain of tracing to the source.
9. a kind of electronic equipment, including memory, processor, be stored in the memory to run on the processor
Computer program, which is characterized in that the processor realizes any one of claim 1-7 institute when executing the computer program
The method stated.
10. a kind of computer-readable medium for the non-volatile program code that can be performed with processor, which is characterized in that described
Program code makes the processor perform claim require any the method in 1-7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810626226.0A CN108876405A (en) | 2018-06-14 | 2018-06-14 | Product traceability records processing method, device and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810626226.0A CN108876405A (en) | 2018-06-14 | 2018-06-14 | Product traceability records processing method, device and electronic equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108876405A true CN108876405A (en) | 2018-11-23 |
Family
ID=64339469
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810626226.0A Pending CN108876405A (en) | 2018-06-14 | 2018-06-14 | Product traceability records processing method, device and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108876405A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109741078A (en) * | 2018-12-28 | 2019-05-10 | 广东长盈科技股份有限公司 | One kind is towards retrospective Internet of Things storage system and method |
CN110020824A (en) * | 2019-04-09 | 2019-07-16 | 张�浩 | Product stream information management system and method |
CN111046085A (en) * | 2019-12-19 | 2020-04-21 | 南京医睿科技有限公司 | Data source tracing processing method and device, medium and equipment |
CN115034347A (en) * | 2022-06-21 | 2022-09-09 | 成都秦川物联网科技股份有限公司 | Industrial Internet of things for tracing two-dimensional code data and control method thereof |
CN116128390A (en) * | 2023-04-17 | 2023-05-16 | 长沙智医云科技有限公司 | Medical consumable cold chain transportation monitoring method based on Internet of things |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8359480B2 (en) * | 2008-12-19 | 2013-01-22 | University Of Washington | Scalable RFID systems: a privacy preserving protocol with constant-time identification |
CN106779736A (en) * | 2016-11-30 | 2017-05-31 | 电子科技大学 | Block chain technical certification method based on biological characteristic |
CN107704493A (en) * | 2017-08-23 | 2018-02-16 | 中链科技有限公司 | It is a kind of to be used to provide the method and system that product is traced to the source |
CN107846282A (en) * | 2017-11-03 | 2018-03-27 | 法信公证云(厦门)科技有限公司 | A kind of electronic data distribution keeping method and system based on block chain technology |
-
2018
- 2018-06-14 CN CN201810626226.0A patent/CN108876405A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8359480B2 (en) * | 2008-12-19 | 2013-01-22 | University Of Washington | Scalable RFID systems: a privacy preserving protocol with constant-time identification |
CN106779736A (en) * | 2016-11-30 | 2017-05-31 | 电子科技大学 | Block chain technical certification method based on biological characteristic |
CN107704493A (en) * | 2017-08-23 | 2018-02-16 | 中链科技有限公司 | It is a kind of to be used to provide the method and system that product is traced to the source |
CN107846282A (en) * | 2017-11-03 | 2018-03-27 | 法信公证云(厦门)科技有限公司 | A kind of electronic data distribution keeping method and system based on block chain technology |
Non-Patent Citations (1)
Title |
---|
沣述: "比特币与密码学之哈希函数", 《巴比特HTTPS://WWW.8BTC.COM/ARTICLE/15419》 * |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109741078A (en) * | 2018-12-28 | 2019-05-10 | 广东长盈科技股份有限公司 | One kind is towards retrospective Internet of Things storage system and method |
CN110020824A (en) * | 2019-04-09 | 2019-07-16 | 张�浩 | Product stream information management system and method |
CN111046085A (en) * | 2019-12-19 | 2020-04-21 | 南京医睿科技有限公司 | Data source tracing processing method and device, medium and equipment |
CN111046085B (en) * | 2019-12-19 | 2023-04-28 | 医渡云(北京)技术有限公司 | Data tracing processing method and device, medium and equipment |
CN115034347A (en) * | 2022-06-21 | 2022-09-09 | 成都秦川物联网科技股份有限公司 | Industrial Internet of things for tracing two-dimensional code data and control method thereof |
CN115034347B (en) * | 2022-06-21 | 2024-05-28 | 成都秦川物联网科技股份有限公司 | Industrial Internet of things for tracing two-dimensional code data and control method thereof |
CN116128390A (en) * | 2023-04-17 | 2023-05-16 | 长沙智医云科技有限公司 | Medical consumable cold chain transportation monitoring method based on Internet of things |
CN116128390B (en) * | 2023-04-17 | 2023-06-30 | 长沙智医云科技有限公司 | Medical consumable cold chain transportation monitoring method based on Internet of things |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108876405A (en) | Product traceability records processing method, device and electronic equipment | |
CN109067541B (en) | Data verification method and device based on block chain and electronic equipment | |
CN110084070B (en) | Block chain-based identity construction and source tracing method for manufacturing cross-domain heterogeneous data | |
CN108874890B (en) | Block chain system with public bibliographic mechanism | |
US20190188732A1 (en) | System and method for ensuring credibility of items in a supply chain management | |
CN107657463A (en) | Article is traced to the source platform and method and device | |
US20210049715A1 (en) | Blockchain-based data procesing method, apparatus, and electronic device | |
CN109639410A (en) | Data based on block chain deposit card method and device, electronic equipment | |
CN108197891A (en) | A kind of electronic signature device and method based on block chain | |
CN109033772A (en) | A kind of input method and device of verification information | |
CN109948320A (en) | Identity identification managing method, device, medium and electronic equipment based on block chain | |
CN109034842B (en) | Agricultural product supply chain tracing system and method based on block chain | |
CN110598433A (en) | Anti-counterfeiting information processing method and device based on block chain | |
CN110443077A (en) | Processing method, device and the electronic equipment of digital asset | |
US20220337435A1 (en) | Secure identity card using unclonable functions | |
CN110489574A (en) | A kind of multimedia messages recommended method, device and relevant device | |
CN115099911A (en) | Bidding method and system suitable for bulk commodities | |
CN112949868A (en) | Asynchronous federal learning method and device based on block chain and electronic equipment | |
CN113610550B (en) | Product tracing method and system based on block chain | |
CN108537065A (en) | Reference information processing method | |
CN109949050A (en) | Qualified products analysis method, terminal device and storage medium based on block chain | |
CN110069937A (en) | Data source tracing method, system and device based on block chain | |
CN110321734A (en) | A kind of file verification method and device | |
CN110472143A (en) | A kind of information-pushing method, device, readable storage medium storing program for executing and terminal device | |
CN112667753A (en) | Method for excavating entity node path and computer 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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20181123 |