CN113222084B - Block chain-based date labeling and querying method and device - Google Patents

Block chain-based date labeling and querying method and device Download PDF

Info

Publication number
CN113222084B
CN113222084B CN202110512830.2A CN202110512830A CN113222084B CN 113222084 B CN113222084 B CN 113222084B CN 202110512830 A CN202110512830 A CN 202110512830A CN 113222084 B CN113222084 B CN 113222084B
Authority
CN
China
Prior art keywords
commodity
information
time
marked
code information
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
Application number
CN202110512830.2A
Other languages
Chinese (zh)
Other versions
CN113222084A (en
Inventor
彭玉军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alipay Hangzhou Information Technology Co Ltd
Ant Blockchain Technology Shanghai Co Ltd
Original Assignee
Alipay Hangzhou Information Technology Co Ltd
Ant Blockchain Technology Shanghai Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Alipay Hangzhou Information Technology Co Ltd, Ant Blockchain Technology Shanghai Co Ltd filed Critical Alipay Hangzhou Information Technology Co Ltd
Priority to CN202110512830.2A priority Critical patent/CN113222084B/en
Publication of CN113222084A publication Critical patent/CN113222084A/en
Application granted granted Critical
Publication of CN113222084B publication Critical patent/CN113222084B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K17/00Methods or arrangements for effecting co-operative working between equipments covered by two or more of main groups G06K1/00 - G06K15/00, e.g. automatic card files incorporating conveying and reading operations
    • G06K17/0022Methods or arrangements for effecting co-operative working between equipments covered by two or more of main groups G06K1/00 - G06K15/00, e.g. automatic card files incorporating conveying and reading operations arrangements or provisious for transferring data to distant stations, e.g. from a sensing device
    • G06K17/0025Methods or arrangements for effecting co-operative working between equipments covered by two or more of main groups G06K1/00 - G06K15/00, e.g. automatic card files incorporating conveying and reading operations arrangements or provisious for transferring data to distant stations, e.g. from a sensing device the arrangement consisting of a wireless interrogation device in combination with a device for optically marking the record carrier
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION 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/00Commerce
    • G06Q30/018Certifying business or products
    • G06Q30/0185Product, service or business identity fraud
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION 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/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/04Manufacturing
    • YGENERAL 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
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • General Business, Economics & Management (AREA)
  • Economics (AREA)
  • Strategic Management (AREA)
  • Data Mining & Analysis (AREA)
  • Marketing (AREA)
  • Human Resources & Organizations (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Primary Health Care (AREA)
  • Computational Linguistics (AREA)
  • Tourism & Hospitality (AREA)
  • Health & Medical Sciences (AREA)
  • Manufacturing & Machinery (AREA)
  • General Health & Medical Sciences (AREA)
  • Accounting & Taxation (AREA)
  • Development Economics (AREA)
  • Finance (AREA)
  • Computing Systems (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The embodiment of the specification provides a date labeling and querying method and device based on a block chain, wherein the method comprises the following steps: responding to a labeling time acquisition request of a commodity to be labeled sent by labeling equipment, and acquiring standard time information corresponding to the current moment from a time service center server side by using a first intelligent contract; generating commodity code information of the commodities to be marked through a second intelligent contract based on the acquired standard time information and the commodity attribute information of the commodities to be marked; returning the commodity code information to the labeling equipment so that the labeling equipment labels the standard time information and the commodity code information on the commodity to be labeled; the commodity code information is used for verifying the authenticity of the marking time on the commodity to be marked.

Description

Block chain-based date labeling and querying method and device
Technical Field
The present disclosure relates to the field of blockchain technologies, and in particular, to a method and an apparatus for date labeling and query based on a blockchain.
Background
Generally, when a manufacturer produces a commodity, some time information of the commodity, such as production time, needs to be marked on a package of the commodity so that a user can conveniently check the time information when purchasing or using the commodity. However, in the course of distribution of the product, some vendors or distributors may falsely tamper with the time information marked on the product and sell the product, and therefore, the user cannot confirm the authenticity of the time marked on the product.
Disclosure of Invention
The embodiment of the specification provides a block chain-based date labeling method. Wherein, the method comprises the following steps: and responding to a marking time acquisition request of the commodity to be marked sent by the marking equipment, and acquiring standard time information corresponding to the current moment from a time service center server side through a first intelligent contract. And generating commodity code information of the commodity to be marked through a second intelligent contract based on the standard time information and the commodity attribute information of the commodity to be marked. And returning the commodity code information to the labeling equipment so that the labeling equipment labels the standard time information and the commodity code information on the commodity to be labeled. And the commodity code information is used for verifying the authenticity of the marking time on the commodity to be marked.
The embodiment of the specification further provides a block chain-based date query method. Wherein, the method comprises the following steps: and receiving a marking time query request of the commodity to be queried, which is sent by the terminal equipment. And the time-marked query request carries the commodity code information of the commodity to be queried. The commodity code information is generated through the block chain system based on standard time information acquired from a time service center server and commodity attribute information of the commodity to be inquired. And analyzing the commodity code information through a fourth intelligent contract to obtain the marking time and the commodity attribute information contained in the commodity code information. And sending the analyzed marking time and the analyzed commodity attribute information to the terminal equipment so that the terminal equipment displays the analyzed marking time and the analyzed commodity attribute information.
The embodiment of the specification further provides a block chain-based date labeling device. Wherein the apparatus comprises: the first acquisition module responds to a marking time acquisition request of a commodity to be marked sent by marking equipment and acquires standard time information corresponding to the current moment from a time service center server side through a first intelligent contract. And the generation module is used for generating commodity code information of the commodity to be marked through a second intelligent contract based on the standard time information and the commodity attribute information of the commodity to be marked. And the return module returns the commodity code information to the marking equipment so that the marking equipment marks the standard time information and the commodity code information on the commodity to be marked. And the commodity code information is used for verifying the authenticity of the marking time on the commodity to be marked.
The embodiment of the specification also provides a date inquiry device based on the block chain. Wherein, the device includes: and the receiving module is used for receiving the marking time query request of the commodity to be queried, which is sent by the terminal equipment. And the time-marked query request carries the commodity code information of the commodity to be queried. The commodity code information is generated through the block chain system based on standard time information acquired from a time service center server and commodity attribute information of the commodity to be inquired. And the analysis module is used for analyzing the commodity code information through a fourth intelligent contract to obtain the marking time and the commodity attribute information contained in the commodity code information. And the sending module is used for sending the analyzed marking time and the analyzed commodity attribute information to the terminal equipment so that the terminal equipment displays the analyzed marking time and the analyzed commodity attribute information.
An embodiment of the present specification further provides a block chain-based date labeling device, including: a processor, and a memory arranged to store computer executable instructions that, when executed, cause the processor to: and responding to a marking time acquisition request of the commodity to be marked sent by the marking equipment, and acquiring standard time information corresponding to the current moment from a time service center server side through a first intelligent contract. And generating commodity code information of the commodities to be marked through a second intelligent contract based on the standard time information and the commodity attribute information of the commodities to be marked. And returning the commodity code information to the labeling equipment so that the labeling equipment labels the standard time information and the commodity code information on the commodity to be labeled. And the commodity code information is used for verifying the authenticity of the marking time on the commodity to be marked.
An embodiment of the present specification further provides a date querying device based on a block chain, including: a processor, and a memory arranged to store computer executable instructions that, when executed, cause the processor to: and receiving a marking time query request of the commodity to be queried, which is sent by the terminal equipment. And the time-marked query request carries the commodity code information of the commodity to be queried. The commodity code information is generated through the block chain system based on standard time information acquired from a time service center server and commodity attribute information of the commodity to be inquired. And analyzing the commodity code information through a fourth intelligent contract to obtain the marking time and the commodity attribute information contained in the commodity code information. And sending the analyzed marking time and the analyzed commodity attribute information to the terminal equipment so that the terminal equipment displays the analyzed marking time and the analyzed commodity attribute information.
Embodiments of the present specification also provide a storage medium for storing computer-executable instructions, which when executed implement the following flow: and responding to a marking time acquisition request of the commodity to be marked sent by the marking equipment, and acquiring standard time information corresponding to the current moment from a time service center server side through a first intelligent contract. And generating commodity code information of the commodity to be marked through the block chain system based on the standard time information and the commodity attribute information of the commodity to be marked. And returning the commodity code information to the marking equipment so that the marking equipment marks the standard time information and the commodity code information on the commodity to be marked. And the commodity code information is used for verifying the authenticity of the marking time on the commodity to be marked.
Embodiments of the present specification also provide a storage medium for storing computer-executable instructions, which when executed implement the following processes: and receiving a marking time query request of the commodity to be queried, which is sent by the terminal equipment. And the time-marked query request carries the commodity code information of the commodity to be queried. The commodity code information is generated through the block chain system based on standard time information acquired from a time service center server and commodity attribute information of the commodity to be inquired. And analyzing the commodity code information through a fourth intelligent contract to obtain the marking time and the commodity attribute information contained in the commodity code information. And sending the analyzed marking time and the analyzed commodity attribute information to the terminal equipment so that the terminal equipment displays the analyzed marking time and the analyzed commodity attribute information.
Drawings
In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the present application, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a schematic view of an application scenario of a block chain-based date labeling method according to an embodiment of the present specification;
fig. 2 is a first flowchart of a block chain-based date labeling method according to an embodiment of the present disclosure;
fig. 3 is a second flowchart of a block chain-based date labeling method according to an embodiment of the present disclosure;
fig. 4 is an interaction flowchart of a block chain-based date labeling method according to an embodiment of the present disclosure;
fig. 5 is a flowchart of a block chain-based date query method provided in an embodiment of the present specification;
FIG. 6 is a schematic interaction flow diagram of a block chain-based date query method according to an embodiment of the present disclosure;
FIG. 7 is a block chain-based date labeling apparatus according to an embodiment of the present disclosure;
Fig. 8 is a schematic diagram illustrating a module composition of a block chain-based date querying device according to an embodiment of the present disclosure;
fig. 9 is a schematic structural diagram of a block chain-based date labeling apparatus according to an embodiment of the present disclosure.
Detailed Description
In order to make those skilled in the art better understand the technical solutions in this document, the technical solutions in the embodiments of the present specification will be clearly and completely described below with reference to the drawings in the embodiments of the present specification, and it is obvious that the described embodiments are only a part of the embodiments of this document, and not all embodiments of this document. All other embodiments obtained by a person skilled in the art without making any inventive step based on the embodiments in this description shall fall within the scope of protection of this document.
Fig. 1 is a schematic view of an application scenario of a block chain-based date labeling method provided in an embodiment of the present specification, and as shown in fig. 1, the application scenario includes a labeling device, a date labeling server, a manufacturer system, a block chain system, and a time service center server; the marking equipment is equipment used for marking time information for commodities on a production line, and the marking equipment can be production date marking equipment, in particular, a production date coding machine, a production date spray gun and the like; the date marking server is accessed to the block chain system and used as a node of the block chain system, and the date marking server is used for acquiring the standard time information from the time service center server and generating commodity code information used for verifying the authenticity of the marked time on the commodity.
In a specific embodiment, the date labeling server acquires commodity attribute information of a commodity planned to be produced within a preset time length from a manufacturer system in advance, and stores the commodity attribute information to the block chain system; when the marking equipment needs to mark time for the commodity, the marking equipment sends a marking time obtaining request to a date marking server, and the date marking server obtains standard time information corresponding to the current time from a time service center server after receiving the marking time obtaining request; then, the date labeling server generates corresponding commodity code information through a block chain system based on the acquired standard time information and the acquired commodity attribute information, and returns the standard time information and the commodity code information to labeling equipment, and the labeling equipment labels the standard time information as labeling time of the commodity on the commodity and labels the received commodity code information on the commodity together; since the commodity code information carries the commodity attribute information and the standard time information of the commodity, the user can verify the commodity labeling time based on the commodity code information, so as to verify whether the labeling time labeled on the commodity is true.
Of course, fig. 1 is a schematic diagram illustrating a possible application scenario of the method provided in the embodiment of the present specification, and the method provided in the embodiment of the present specification may also correspond to other specific application scenarios, which are not described in detail in the embodiment of the present specification.
The block chain-based date labeling method provided in the embodiments of the present specification may be applied to a date labeling server, that is, an execution subject of the method is the date labeling server, and specifically, the method may be a block chain-based date labeling device installed on the date labeling server.
Specifically, the marked time marked on the commodity in the embodiment of the present specification may be a production date of the commodity, or may be other time that needs to be marked, and the embodiment of the present specification does not limit the specific time type of the marked time.
Fig. 2 is a first flowchart of a block chain based date labeling method provided in an embodiment of the present disclosure, and as shown in fig. 2, the method at least includes the following steps:
and 102, responding to a marking time obtaining request of the commodity to be marked sent by the marking equipment, and obtaining standard time information corresponding to the current time from a time service center server side through a first intelligent contract.
In the embodiment of the present specification, the annotation device may send an annotation time acquisition request to the date annotation server when performing the annotation of the annotation time, that is, each time a commodity is annotated, the annotation time acquisition request is sent to the date annotation server; in addition, when the labeling of the labeling time is carried out or before the labeling of the labeling time is carried out, the labeling equipment sends a labeling time obtaining request for obtaining the labeling time of all the commodities to be labeled to the date labeling server, namely, only one labeling time obtaining request needs to be sent, correspondingly, the date labeling server can return the labeling time and the commodity code of all the commodities to be labeled at one time, or the labeling time and the commodity code of the commodities to be labeled can be returned one by one according to a set frequency interval; in practical applications, an implementation manner suitable for the current application scenario may be selected, and here, several possible specific implementations are merely exemplified and do not constitute a limitation to the embodiments of the present specification.
In addition, an Application Programming Interface (API) is predefined on the annotation device, and the annotation device sends an annotation time acquisition request to the date annotation server by calling the API.
Specifically, after the date marking server receives a marking time obtaining request sent by the marking device, the date marking server obtains standard time information corresponding to the current time from the time service center server through a first intelligent contract.
Optionally, in a specific implementation, a first intelligent contract used for acquiring standard time information from the time service center server may be deployed in the blockchain system in advance, for example, the first intelligent contract may be a time service contract, after the date marking server receives a marking time acquisition request sent by the marking device, the time service contract deployed in the blockchain system is called, and the standard time information corresponding to the current time is automatically acquired from the time service center by executing the time service contract.
Wherein the smart contract is a digitally defined contract that is capable of automatically executing terms. In the field of blockchain technology, smart contracts refer to computer programs that are triggered based on predetermined events, are not tampered with, and are executed automatically. The intelligent contract can guarantee the reliable execution of all contracts and avoid tampering, repudiation and default. The intelligent contracts need to be instantiated and validated on the state machines in the blockchain after release. Specifically, an intelligent contract can be deployed in a block chain system in advance, the intelligent contract comprises a contract for acquiring standard time from a time service center, standard time information can be automatically acquired through execution of the contract, and the effects of no manual intervention, multi-party witness and no tampering can be realized.
And 104, generating commodity code information corresponding to the commodity to be marked through a second intelligent contract based on the standard time information and the commodity attribute information of the commodity to be marked.
Specifically, in the embodiment of the present specification, the product attribute information of all the products planned to be produced in a certain day is stored in the blockchain system for a certain period of time. Therefore, after receiving the labeling time acquisition request sent by the labeling device, the date labeling server can search the commodity attribute information of the commodity to be labeled in the block chain system, and generate the commodity code information corresponding to the commodity to be labeled through the block chain system based on the standard time information acquired from the time service center server and the commodity attribute information of the commodity to be labeled.
Certainly, in a specific implementation manner, the commodity attribute information of the commodity to be labeled may also be carried in the labeling time obtaining request sent by the labeling device, so that the commodity attribute information of the commodity to be labeled can be obtained from the labeling time obtaining request; for example, if the annotation equipment sends an annotation time acquisition request corresponding to the article a, the annotation time acquisition request may carry attribute information of the article a, so as to generate article code information of the article a.
In addition, in some other specific embodiments, after the annotation time acquisition request sent by the annotation device is acquired, the commodity attribute information corresponding to the commodity to be annotated may be acquired from the manufacturer system or the annotation device;
it should be noted that, in the embodiment of the present specification, several possible obtaining manners of the product attribute information are exemplarily listed, and do not constitute a limitation to the embodiment of the present specification, and other manners that can obtain the product attribute information of the product to be labeled can be applied to the embodiment of the present specification, and the embodiments of the present specification are not described in detail.
In the embodiment of the present specification, one specific expression form of the above-mentioned commodity code information is graphic code information; such as a two-dimensional code or bar code. Therefore, the commodity code information is displayed in the form of the graphic code, so that a user can verify whether the marking time marked on the commodity is true or not by scanning the code.
Optionally, in a specific implementation manner, a second intelligent contract, such as a release contract, for automatically generating the commodity code information corresponding to the commodity to be marked may be deployed in advance in the blockchain system, so that the automatic generation of the commodity code information may be implemented by calling the second intelligent contract. That is, in the step 104, based on the standard time information and the commodity attribute information of the commodity to be marked, the commodity code information corresponding to the commodity to be marked is generated through the second intelligent contract, which may specifically be implemented through the following processes:
And calling a second intelligent contract deployed in the block chain system, and generating commodity code information according to the standard time information and the commodity attribute information by executing the second intelligent contract.
When the step 104 is implemented specifically, the intelligent contract deployed in the blockchain system may be invoked to generate the commodity code information corresponding to the commodity to be marked, so that the execution of the contract may automatically generate the commodity code information, and no manual intervention, multi-party witness and no tampering may be realized.
And 106, returning the commodity code information to the labeling equipment so that the labeling equipment can label the standard time information and the commodity code information on the commodity to be labeled.
The standard time information is used as the marking time of the commodity to be marked; the commodity code information is used for verifying the authenticity of the marking time on the commodity to be marked.
Because the commodity code information carries the standard time information corresponding to the commodity to be marked, in a specific implementation mode, only the commodity code information can be returned to the marking equipment, and the marking equipment analyzes the commodity code information to obtain the standard time information, so that the commodity code information and the standard time information are marked on the commodity to be marked;
However, in consideration of the fact that the standard time information is obtained by the way that the labeling device analyzes the commodity code information, the workload of the labeling device may be increased, and thus the efficiency of labeling the commodity to be labeled by the labeling device is affected.
In the method for labeling dates based on the block chain provided in the embodiment of the present specification, after receiving a request for obtaining labeling time of a commodity to be labeled sent by a labeling device, a first intelligent contract is used to obtain standard time information corresponding to a current time from a time service center server, and the obtained standard time is used as the labeling time corresponding to the commodity to be labeled; the time information is obtained from the time service center server, so that the accuracy and authority of the obtained time are ensured; in addition, based on the standard time information acquired from the time service center server and the commodity attribute information of the commodity to be marked, commodity code information corresponding to the commodity to be marked is generated through a second intelligent contract, and the commodity code information is returned to the marking equipment, so that the marking equipment marks the commodity code information and the standard time information on the commodity; by means of marking the commodity code information, even if a seller or a distributor falsely tamper the marked time marked on the commodity, the user can inquire the real marked time corresponding to the corresponding commodity through the commodity code information, so that whether the marked time marked on the commodity is real can be verified; in addition, in the embodiment of the specification, the standard time information is acquired through the first intelligent contract, and the commodity code information corresponding to the commodity to be marked is generated through the second intelligent contract, so that the effects of no manual intervention, multi-party witness and incapability of tampering can be achieved, and the authenticity of the generated commodity code information is ensured.
In order to facilitate understanding of the methods provided in the embodiments of the present disclosure, the following detailed description will describe specific implementation processes of the above steps.
Optionally, in a specific embodiment, in the step 104, commodity code information of a commodity to be marked is generated through a second intelligent contract based on the standard time information and the commodity attribute information of the commodity to be marked, which may be specifically implemented through the following processes:
calling a second intelligent contract deployed in the block chain system, and performing association processing on commodity attribute information and standard time information of the commodity to be marked by executing the second intelligent contract to obtain corresponding association information; and generating commodity code information of the commodity to be marked based on the associated information.
In a specific implementation, the associating processing of the product attribute information and the standard time information may include any one of the following associating processing:
processing the commodity attribute information and the standard time information into a code value according to a set encryption algorithm or a coding rule, and generating the commodity code information based on the code value; or, storing the product attribute information and the standard time information in a block chain system, acquiring a storage hash value corresponding to the product attribute information and the standard time information, and generating the product code information based on the storage hash value.
In the embodiment of the specification, the commodity attribute information and the standard time information of the commodity to be marked are associated, so that the binding relationship exists between the commodity attribute information and the standard time information, and thus when a user verifies the authenticity of the marked time based on the commodity code information, whether the commodity code information is a commodity code corresponding to the commodity to be marked can be verified according to the binding relationship between the commodity attribute information and the standard time information, and the accuracy of a verification result is further ensured.
Of course, when the method provided in the embodiments of the present specification is specifically implemented, the product attribute information and the standard time information may not be associated, and the product code information may be directly generated according to the product attribute information and the standard time information.
The embodiments of the present disclosure are not limited to the above embodiments, and the embodiments may be implemented in various forms.
Optionally, in a specific implementation manner, when generating the product code information corresponding to the product to be labeled, at least two pieces of information, namely standard time information and product attribute information corresponding to the product to be labeled, need to be used, and in order to shorten the time consumed for generating the product code information, the product attribute information of the product planned to be produced may be obtained from a manufacturer system in advance and stored in the block chain system. Therefore, before the step 102 is executed, that is, before the standard time information corresponding to the current time is acquired from the time service center server by the first intelligent contract in response to the request for acquiring the marking time of the commodity to be marked sent by the marking device, the method provided in the embodiment of the present specification further includes the following steps:
Acquiring commodity attribute information of commodities to be produced within a preset time length from a producer system, and storing the commodity attribute information to a block chain system; the commodity attribute information at least comprises commodity identification information and/or commodity batch information.
That is, in the embodiment of the present specification, the product attribute information may include product identification information, or may also include product batch information, or the product attribute information includes both product identification information and product batch information.
Optionally, in a specific embodiment, the product batch information may include product quantity information of each type of product. For example, if the commodities planned to be produced within the preset time period include the commodity 1, the commodity 2 and the commodity 3, the commodity batch information may include the commodity number of the commodity 1 to be produced, the commodity number of the commodity 2 to be produced and the commodity number of the commodity 3 to be produced.
In one embodiment, the commodity identification information may include at least one or more of a commodity name, commodity manufacturer information, commodity place of production information, commodity production batch information, commodity barcode information, and the like.
In specific implementation, the specific value of the preset time length may be any time length such as one day, two days, 12 hours, and the like. The specific value of the preset time period may be set according to an actual application scenario, which is not limited in the embodiments of the present specification. For example, in one embodiment, commodity attribute information for a commodity to be produced the next day may be obtained from the manufacturer system at 00 minutes and 00 seconds per day at 18 hours.
In addition, it should be noted that, in the embodiment of the present specification, the manufacturer system may actively send the commodity attribute information of the commodity to be produced within the preset time length to the date marking server according to an agreement, or after receiving a commodity attribute information acquisition instruction sent by the date marking server, send the commodity attribute information of the commodity to be produced within the preset time length to the date marking server.
Optionally, in a specific implementation manner, an intelligent contract for acquiring the commodity attribute information may be deployed in the blockchain system in advance, and the operation of acquiring the commodity attribute information is realized by executing the intelligent contract, so that no manual intervention, multiple witnesses, and no tampering can be realized. Therefore, in an embodiment, the above-mentioned obtaining the commodity attribute information of the commodity needing to be produced within the preset time period from the manufacturer system, and storing the commodity attribute information in the blockchain system may be specifically implemented by the following processes:
And calling a third intelligent contract deployed in the blockchain system, acquiring the commodity attribute information from a manufacturer system by executing the third intelligent contract, and storing the commodity attribute information to the blockchain system.
Specifically, in the embodiment of the present specification, the intelligent contract used for acquiring the commodity attribute information from the manufacturer system and storing the commodity attribute information in the blockchain system is denoted as a third intelligent contract, and actually, the third intelligent contract is an entry contract deployed in the blockchain system, and is used for acquiring the commodity attribute information from the manufacturer system and storing the commodity attribute information in the blockchain system.
Generally, commodity attribute information of one or more commodities to be produced may be stored in the blockchain system, and therefore, in order to facilitate finding out the commodity attribute information corresponding to the commodity to be labeled from the commodity attribute information stored in the blockchain system, the labeling time acquisition request sent by the labeling device to the date labeling service end needs to carry identification information of the commodity to be labeled. For example, the identification information may be information such as the name of the product to be labeled.
In a specific embodiment, when the request for obtaining the labeling time is sent, in order to facilitate an operator of the labeling device to quickly input the identification information of the product to be labeled in the labeling device, the code value corresponding to the product, that is, the product number, may be configured in advance, for example, the code value corresponding to the bread is 01, the code value corresponding to the cake is 02, the code value corresponding to the biscuit is 03, and the like. Therefore, when the annotation equipment sends an annotation time acquisition request of the commodity to be annotated to the date annotation server, the annotation equipment only needs to carry the code value corresponding to the commodity to be annotated in the annotation time acquisition request.
In order to determine the article attribute information corresponding to the article to be labeled from the block chain system based on the code value, in the method provided in this specification, the code value corresponding to each article needs to be configured in advance and stored.
Therefore, in a specific implementation manner, before step 102 is executed, that is, before a request for obtaining a marking time of a to-be-marked commodity sent by a marking device is responded, and before standard time information corresponding to a current time is obtained from a time service center server by a first intelligent contract, a method provided in an embodiment of the present specification further includes the following steps:
code values corresponding to the commodities are configured, and the code values corresponding to the commodities are stored in the block chain system. The code value is used as identification information of the commodity to be identified and carried in a labeling time acquisition request of the commodity to be labeled sent by the labeling device.
Optionally, in an embodiment, the storing the code value corresponding to the commodity in the blockchain system may be storing a mapping relationship between a commodity name and the code value in the blockchain system. One possible form is shown in table 1.
TABLE 1
Name of commodity Encoding a value
Cake 02
Bread 01
Biscuit 03
The names of commodities and the corresponding code values are listed in table 1 by way of example, and the names of commodities and the code values referred to herein are all exemplified and not limited to the embodiments of the present disclosure.
Of course, in another embodiment, since the code value corresponding to each commodity is stored in the blockchain system, after the commodity attribute information of the commodity planned to be produced within the preset time period is acquired from the manufacturer, when the commodity attribute information is stored in the blockchain system, the mapping relationship between the code value corresponding to the commodity and the commodity attribute information may be stored; of course, the mapping relationship between the commodity name and the commodity attribute information may be stored; the two possible storage forms are only exemplified here and are not to be construed as limiting the embodiments of the present description.
In addition, it should be noted that, in the embodiment of the present specification, after the code value corresponding to each commodity is configured, the date labeling server also needs to send the commodity code information corresponding to each commodity to the manufacturer system, so that an operator corresponding to the labeling device can query the code value corresponding to the commodity to be labeled; therefore, when the operator corresponding to the labeling device labels the labeling time of the commodity to be labeled, the operator can carry the code value corresponding to the commodity to be labeled in the labeling time acquisition request and send the labeling time acquisition request to the date labeling server.
Therefore, in a specific implementation manner, the annotation time acquisition request sent by the annotation device to the date annotation service end carries the code value corresponding to the commodity to be annotated;
correspondingly, before the step 104 is executed, that is, before the commodity code information corresponding to the commodity to be expressed is generated through the second intelligent contract based on the standard time information and the commodity attribute information of the commodity to be labeled, the method provided by the embodiment of the present specification further includes the following steps:
based on the code value, commodity attribute information corresponding to the commodity to be marked is searched in the commodity attribute information of each commodity stored in the block chain system; the block chain system stores the mapping relation between each code value and the corresponding commodity attribute information;
or,
determining the commodity name corresponding to the code value, and searching the commodity attribute information corresponding to the commodity name in the commodity attribute information of each commodity stored in the block chain system; the block chain system stores the mapping relation between each commodity name and the corresponding commodity attribute information.
Alternatively, in a specific embodiment, one possible storage form of the article attribute information is shown in table 2.
TABLE 2
Encoding a value Attribute information
01 Product attribute information 1
02 Product attribute information 2
03 Commodity genusSexual information 3
Of course, the above table 2 is only an exemplary storage form of the product attribute information, and does not limit the embodiments of the present specification.
For the above situation, in specific implementation, after the date labeling server receives a labeling time acquisition request of a to-be-labeled commodity sent by the labeling device, the code value of the to-be-labeled commodity carried in the labeling time acquisition request is matched with the table 2 to determine the commodity attribute information corresponding to the code value of the to-be-identified commodity, and the commodity attribute information is determined as the commodity attribute information of the to-be-identified commodity.
Of course, in another embodiment, the mapping relationship between the product name and the product attribute information of each product is stored in the blockchain system. After the date labeling server receives a labeling time acquisition request of the to-be-labeled commodity sent by the labeling device, matching the code value of the to-be-labeled commodity carried by the labeling time acquisition request with the table 1 to determine a commodity name corresponding to the code value, and searching corresponding commodity attribute information in a block chain system based on the commodity name.
Here, two possible specific implementation manners for searching for the article attribute information corresponding to the article to be labeled are listed as examples, and certainly, the specific implementation manner for searching for the article attribute information of the article to be labeled is not limited thereto, and the embodiments of this specification are not described in detail any more.
For example, in one embodiment, the time is a production date, i.e. a production date of the product needs to be marked. Correspondingly, in the production process of the commodity, after the commodity flow is switched to the link of marking the production date, each time a commodity is marked, the marking device sends a production date acquisition request to the date marking server, namely, how many commodities need to be marked, and how many times the production date acquisition requests are sent to the date marking server by the marking device.
For the above situation, in order to reduce the number of times of the production date acquisition request sent by the annotation device to the date annotation server, before a certain batch of commodities are produced, an acquisition request for acquiring the production date corresponding to each commodity in the batch of commodities can be sent to the date annotation server in advance; that is, the production date and the commodity code information of a plurality of commodities are acquired at one time and stored in the labeling device in advance, so that after the commodities are produced, the acquired production date and commodity code information are directly labeled on the commodities. Therefore, the network resource consumption caused by communication between the labeling equipment and the date labeling server side is reduced, and the production date labeling efficiency can be improved.
Certainly, in specific implementation, after the commodity flow goes to the link of labeling the production date, when the production date needs to be labeled, the labeling device sends a production date acquisition request for acquiring the production dates of multiple commodities to the date labeling server, and then the date labeling server returns the production date and the commodity code corresponding to each commodity to the labeling device in sequence, that is, only one production date acquisition request needs to be sent.
Therefore, in a specific embodiment, the request for obtaining the labeling time needs to carry the number of the commodities to be labeled in addition to the code value of the commodity to be labeled;
specifically, the obtaining, in the step 102, standard time information corresponding to the current time from the service end of the time service center through the first intelligent contract specifically includes:
calling a first intelligent contract deployed in a block chain system, and sequentially acquiring a plurality of standard time information from a time service center server side according to a set frequency by executing the first intelligent contract; the quantity of the acquired standard time information is consistent with that of the commodities to be marked;
in the step 104, based on the standard time information and the commodity attribute information of the commodity to be labeled, the method for generating commodity code information of the commodity to be labeled through the second intelligent contract specifically includes:
Generating commodity code information corresponding to the commodity to be marked through a second intelligent contract according to the acquired standard time information and the commodity attribute information of the commodity to be marked;
in the step 106, the step of returning the commodity code information to the labeling device specifically includes:
and according to the time sequence of the standard time information, sequentially returning the standard time information and the commodity code information corresponding to the standard time information to the labeling equipment according to the set frequency.
Generally, in the process of producing commodities, each commodity is sequentially transmitted to a labeling node for performing time labeling according to a set frequency, so in the embodiment of the description, in order to reduce the number of times of communication between labeling equipment and a date labeling server and the time labeling delay caused by the communication between the labeling equipment and the date labeling server, the labeling equipment only needs to send a time labeling acquisition request to the date labeling server once when labeling the time of a first commodity, and the time labeling acquisition request carries the code value and the number of the commodities to be labeled; therefore, after receiving a labeling time acquisition request sent by labeling equipment, the date labeling server side directly acquires standard time information from the time service center server side in sequence according to the frequency of commodity flow to a labeling time labeling link, and generates commodity code information in corresponding quantity.
For example, in one embodiment, it is assumed that the commodities produced on the production line sequentially flow to the labeling link of the labeling time at time intervals of 0.1 second, and the quantity of the commodities to be labeled is planned to be 1000. Therefore, after the date marking service end receives a marking time obtaining request of a commodity to be marked sent by the marking equipment, standard time information corresponding to the current moment is obtained from the time service center service end through a first intelligent contract, then commodity code information corresponding to the commodity to be marked is generated through a second intelligent contract based on the standard time information and commodity attribute information of the commodity to be marked, and the marking time information and the commodity code information are returned to the marking equipment; meanwhile, after the date labeling server acquires the standard time information, the standard time information corresponding to the current time is acquired from the time service center server after the interval of 0.1 second, commodity code information is generated through a block chain system, and the standard time information and the commodity code information are returned to the standard equipment, however, the date labeling server can also return all generated code values and the standard time information to the labeling equipment in sequence according to the time interval of 0.1 second. Therefore, the analogy is ended until the commodity code information corresponding to 1000 commodities is generated.
In addition, in the embodiment of the present specification, the operations of acquiring the standard time information according to the set frequency, generating the product code information, and returning the standard time information and the product code information according to the set frequency may be performed in parallel, and each of the operations may operate according to its own frequency without mutual influence.
Based on the above description, in a specific embodiment, when the method provided in the embodiment of the present specification is executed, standard time information is obtained from a time service center server by calling and executing a time service contract deployed in a block chain system, commodity attribute information of a commodity to be produced within a preset time length is obtained from a manufacturer system by calling and executing an entry contract deployed in the block chain system, and commodity code information of the commodity to be labeled is generated by calling and executing an issue contract deployed in the block chain system; by the mutual cooperation and cooperation of the three intelligent contracts, the automatic generation of the marking time and the commodity code information is realized, and the effects of no manual intervention, multi-party witnesses and incapability of tampering in the generation process of the marking time and the commodity code information are achieved.
In the method provided in the embodiment of the present specification, the commodity code information is marked on the commodity, so that the user can check whether the standard marking time on the commodity is true or not based on the commodity code information. During specific implementation, a user can use terminal equipment with a code scanning function to scan commodity code information marked on a commodity, the commodity code information is carried in a marked time query request and is sent to a date marking server, and after the date marking server receives the marked time query request sent by the terminal equipment, the commodity code information carried in the marked time query request is analyzed through a block chain system to obtain commodity attribute information and marked time information contained in the commodity code information; after the analysis is finished, the date labeling server returns the analyzed commodity attribute information and the analyzed labeled time information to the terminal equipment, and when the terminal equipment receives the information returned by the date labeling server, the commodity attribute information and the labeled time information returned by the date labeling server are displayed on a display screen of the terminal equipment; therefore, the user can compare the commodity attribute information and the labeling time information obtained based on the query with the information labeled on the commodity to check whether the labeling time labeled on the commodity is true or not.
It should be noted that, in this specification, a user may scan commodity code information using a rights management service client installed on a terminal device, or may also scan commodity code information using another client installed on a terminal device, and this specification does not limit a specific application program for scanning commodity code information, as long as it is possible to send a query request for tagged time carrying commodity code information to a date tagging service end.
Optionally, in a specific implementation manner, the commodity code information is analyzed by the block chain system to obtain the labeling time and the commodity attribute information of the commodity to be queried, which are included in the commodity code information, and the method specifically includes the following steps: calling a fourth intelligent contract deployed in the blockchain system; and analyzing the commodity code information by executing a fourth intelligent contract to obtain the marking time and the commodity attribute information contained in the commodity code information.
In this embodiment of the present specification, the fourth intelligent contract may be a verification contract, and the analysis of the commodity code information based on the verification contract may be performed to realize automatic analysis of the commodity code information, and ensure authenticity of the analyzed commodity attribute information and the marking time.
In order to facilitate an understanding of the methods provided by the embodiments of the present disclosure, the methods provided by the embodiments of the present disclosure will be described in conjunction with specific embodiments. Fig. 3 is a second flowchart of a block chain-based date labeling method according to an embodiment of the present disclosure, and as shown in fig. 3, the method at least includes the following steps:
step 202, receiving a labeling time obtaining request of a to-be-labeled commodity sent by a labeling device.
The marking time obtaining request carries a code value corresponding to the commodity to be marked.
And 204, calling a time service contract deployed in the block chain system, and acquiring standard time information corresponding to the current time from a time service center server side by executing the time service contract.
And step 206, invoking an issuing contract deployed in the block chain system, determining commodity attribute information corresponding to the commodity to be marked according to the code value by executing the issuing contract, and generating commodity code information corresponding to the commodity to be marked according to the standard time information and the commodity attribute information.
And step 208, returning the generated commodity code information and the standard time information to the labeling equipment, so that the labeling equipment labels the labeling time information and the commodity code information on the commodity to be labeled.
The standard time information is used as the marking time corresponding to the commodity to be marked, and the commodity code is marked on the commodity to be marked and used for verifying whether the marking time marked on the commodity to be marked is true or not.
In addition, when the method provided by the embodiment of the present specification is implemented, a related system architecture includes a labeling device, a date labeling server, a blockchain system, a manufacturer system, and a time service center; the following describes an implementation process of the method provided by the embodiment of the present specification with reference to the above system architecture, taking the above labeled time as a production date as an example. Fig. 4 is a schematic interaction flow diagram of a block chain-based date labeling method provided in an embodiment of the present specification, where as shown in fig. 4, the method at least includes the following steps:
step 302, the date labeling server configures code values corresponding to the commodities.
Step 304, the date labeling server stores the code values corresponding to the allocated commodities to the block chain system.
Step 306, the date labeling server obtains the commodity attribute information of the commodity to be produced in the preset time from the manufacturer system by calling the participation contract in the block chain system.
And 308, the date labeling server stores the acquired commodity attribute information to the block chain system.
And 310, the annotation equipment sends a production date acquisition request of the commodity to be annotated to the date annotation server.
The production date acquisition request carries a code value corresponding to the commodity to be marked.
And step 312, the date marking server side responds to the production date obtaining request, and obtains standard time information corresponding to the current time from the time service center server side by calling a time service contract deployed in the block chain system.
And step 314, determining commodity attribute information corresponding to the to-be-marked commodity according to the code value through the issuing contract deployed in the block chain system, and generating commodity code information according to the commodity attribute information and the standard time information.
In step 316, the blockchain system returns the generated commodity code information and the standard time information to the date labeling server.
And 318, the date labeling server returns the commodity code information and the standard time information to the labeling equipment.
And step 320, the marking device marks the acquired standard time information and commodity code information on the commodity to be marked.
The standard time information is used as the production date of the commodity to be marked and marked on the commodity to be marked, and the commodity code information can be used for verifying whether the production date marked on the commodity to be marked is true or not.
In the method for labeling dates based on the block chain provided in the embodiment of the present specification, after receiving a request for obtaining labeling time of a commodity to be labeled sent by a labeling device, a first intelligent contract is used to obtain standard time information corresponding to a current time from a time service center server, and the obtained standard time is used as the labeling time corresponding to the commodity to be labeled; the time information is obtained from the time service center server, so that the accuracy and authority of the obtained time are ensured; in addition, based on the standard time information acquired from the time service center server and the commodity attribute information of the commodity to be marked, commodity code information corresponding to the commodity to be marked is generated through a second intelligent contract, and the commodity code information is returned to the marking equipment, so that the marking equipment marks the commodity code information and the standard time information on the commodity; by means of marking the commodity code information, even if a seller or a distributor falsely tamper the marked time marked on the commodity, the user can inquire the real marked time corresponding to the corresponding commodity through the commodity code information, so that whether the marked time marked on the commodity is real can be verified; in addition, in the embodiment of the specification, the standard time information is acquired through the first intelligent contract, and the commodity code information corresponding to the commodity to be marked is generated through the second intelligent contract, so that the effects of no manual intervention, multi-party witness and incapability of tampering can be achieved, and the authenticity of the generated commodity code information is ensured.
Based on the same idea, the embodiments of the present disclosure also provide a method for querying a date based on a block chain, where the method is applied to a date marking server, that is, an execution subject of the method is a date marking server, and specifically, an execution subject of the method is a date querying device installed on the date marking server and based on the block chain. Fig. 5 is a flowchart of a method of a block chain-based date query method provided in an embodiment of the present specification, and as shown in fig. 5, the method includes at least the following steps:
step 402, receiving a request for querying the labeling time of a commodity to be queried, which is sent by a terminal device.
The time marking inquiry request carries commodity code information of a commodity to be inquired; the commodity code information is generated through a block chain system based on standard time information acquired from a time service center server and commodity attribute information of a commodity to be inquired;
and 404, analyzing the commodity code information through a fourth intelligent contract to obtain the marking time and the commodity attribute information contained in the commodity code information.
And 406, sending the analyzed labeling time and the analyzed commodity attribute information to the terminal equipment so that the terminal equipment displays the analyzed labeling time and the analyzed commodity attribute information.
Optionally, in a specific embodiment, in the step 404, the commodity code information is analyzed through a fourth intelligent contract to obtain the labeling time and the commodity attribute information included in the commodity code information, which may be specifically implemented through the following processes:
calling a fourth intelligent contract deployed in the blockchain system; and analyzing the commodity code information by executing a fourth intelligent contract to obtain the labeling time and the commodity attribute information contained in the commodity code information.
In a specific embodiment, the commodity code information is marked on a corresponding commodity; the commodity code information comprises graphic code information, and the graphic code comprises a two-dimensional code or a bar code.
In specific implementation, a user can use a terminal device with a code scanning function to scan commodity code information marked on the commodity, the commodity code information is carried in a marked time query request and is sent to a date marking server, and after the date marking server receives the marked time query request sent by the terminal device, the commodity code information carried in the marked time query request is analyzed through a block chain system to obtain commodity attribute information and marked time information contained in the commodity code information; after the analysis is finished, the date labeling server returns the analyzed commodity attribute information and the analyzed labeled time information to the terminal equipment, and when the terminal equipment receives the information returned by the date labeling server, the commodity attribute information and the labeled time information returned by the date labeling server are displayed on a display screen of the terminal equipment; therefore, the user can compare the commodity attribute information and the labeling time information obtained based on the query with the information labeled on the commodity to check whether the labeling time labeled on the commodity is true or not.
It should be noted that, in this specification, in an embodiment, a user may scan commodity code information using a rights service client installed on a terminal device, or may also scan commodity code information using another client installed on the terminal device, and this specification does not limit a specific application program for scanning commodity code information, as long as it is possible to send a query request for a tag time carrying the commodity code information to a date tagging service terminal.
Optionally, in a specific embodiment, if the commodity code information of the commodity to be queried is generated based on the commodity attribute information and the correlation information of the standard time information of the commodity to be queried, correspondingly, in step 404, the commodity code information is analyzed through a fourth intelligent contract to obtain the standard time and the commodity attribute information included in the commodity code information, which may be specifically implemented through the following processes:
and analyzing the commodity attribute information through a fourth intelligent contract to obtain associated information corresponding to the commodity attribute information, and restoring the associated information based on a generation rule of the associated information to obtain the commodity attribute information and standard time information corresponding to the associated information.
In addition, the specific labeling manner of the labeling time and the product code on the product mentioned in the embodiments of the present specification may refer to the embodiments shown in fig. 2 to fig. 4, and details are not repeated here.
Optionally, in a specific implementation manner, when the block chain-based date query method provided in the embodiment of the present specification is used to query authenticity of a time stamp marked on a certain commodity, the related system architecture includes a terminal device, a date stamp service end, and a block chain system; the block chain based date query method provided by the embodiment of the present specification will be described below by taking time as an example of production date based on the system architecture. Fig. 6 is an interaction flowchart of a block chain-based date query method provided in an embodiment of the present specification, where, as shown in fig. 6, the method includes at least the following steps:
step 502, the terminal device scans the goods code on the goods to be inquired.
And step 504, the terminal device carries the commodity code in a production date query request and sends the production date query request to a date labeling server.
Step 506, the date marking server side calls a verification contract deployed in the block chain system to analyze the commodity code to obtain the production date and the commodity attribute information contained in the commodity code.
And step 508, the block chain system returns the production date and the commodity attribute information obtained by analysis to the date labeling server.
And step 510, the date labeling server returns the received production date and the commodity attribute information to the terminal equipment.
Step 512, the terminal device displays the received production date information and the commodity attribute information, so that the user can check whether the production date marked on the commodity to be inquired is true or not based on the information.
In the date query method based on the block chain provided in the embodiment of the present specification, the commodity is marked with the marking time and the commodity code information of the commodity, and the commodity code information is generated by the block chain system based on the standard time information acquired from the time service center server and the commodity attribute information of the commodity to be queried; the commodity code information is used for verifying the authenticity of the marked time marked on the commodity; in the embodiment of the specification, the standard time acquired from the time service center server is marked on the commodity as the marked time, so that the accuracy and authority of the acquired time are ensured; in addition, by means of marking the commodity code information, even if a seller or a distributor falsely tamper the marked time marked on the commodity, the user can inquire the real marked time corresponding to the corresponding commodity through the commodity code information, so that whether the marked time marked on the commodity is real or not can be verified; according to the method provided by the embodiment of the specification, the user can inquire the authenticity of the marked time marked on the commodity through the commodity code information marked on the commodity, and the reliability is high.
Corresponding to the methods provided in the embodiments shown in fig. 2 to 4, on the same basis, the embodiments of the present specification provide a block chain-based date labeling apparatus for performing the methods provided in the embodiments shown in fig. 2 to 4 of the present specification. Fig. 7 is a schematic diagram illustrating a module composition of a block chain-based date labeling apparatus according to an embodiment of the present disclosure, and as shown in fig. 7, the apparatus includes:
a first obtaining module 602, configured to, in response to a request for obtaining marking time of a commodity to be marked sent by a marking device, obtain, from a time service center server, standard time information corresponding to a current time through a first intelligent contract;
a generating module 604, configured to generate commodity code information of the commodity to be labeled through a second intelligent contract based on the standard time information and the commodity attribute information of the commodity to be labeled;
a returning module 606, configured to return the product code information to the labeling device, so that the labeling device labels the standard time information and the product code information on the product to be labeled.
The standard time information is used as the marking time of the commodity to be marked; and the commodity code information is used for verifying the authenticity of the marking time on the commodity to be marked.
Optionally, the apparatus provided in this specification further includes: the second acquisition module is used for acquiring commodity attribute information of commodities to be produced within a preset time length from the manufacturer system;
the first storage module is used for storing the commodity attribute information to a block chain system; wherein the commodity attribute information at least comprises commodity identification information and/or commodity batch information,
optionally, the production module 604 specifically includes: the association unit is used for calling a second intelligent contract deployed in the block chain system, and performing association processing on the commodity attribute information of the commodity to be marked and the standard time information by executing the second intelligent contract to obtain corresponding association information; and the generating unit is used for generating the commodity code information of the commodity to be marked based on the associated information.
Optionally, the apparatus provided in this specification further includes: the configuration module is used for configuring the code values corresponding to the commodities; the second storage module is used for storing the code value corresponding to the commodity in a block chain system; the code value is used as identification information of the to-be-labeled commodity and carried in a labeling time acquisition request of the to-be-labeled commodity of the Sovix search sent by the labeling device.
Optionally, the request for obtaining the marked time carries a code value corresponding to the commodity to be marked;
correspondingly, the device that this specification embodiment provided still includes:
the first searching module is used for searching the commodity attribute information corresponding to the commodity to be marked in the commodity attribute information of each commodity stored in the block chain system based on the code value; the block chain system stores the mapping relation between each code value and the corresponding commodity attribute information;
or,
the second searching module is used for determining the commodity name corresponding to the code value and searching the commodity attribute information corresponding to the commodity name in the commodity attribute information of each commodity stored in the block chain system; and the block chain system stores the mapping relation between each commodity name and the corresponding commodity attribute information.
The block chain-based date labeling apparatus provided in the embodiment shown in fig. 7 can implement all the method steps of the method embodiments shown in fig. 2 to fig. 4, and is not described herein again.
In the date labeling device based on the block chain provided in the embodiment of the present specification, after receiving a labeling time acquisition request of a commodity to be labeled sent by a labeling device, standard time information corresponding to a current time is acquired from a time service center server by a first intelligent contract, and the acquired standard time is used as a labeling time corresponding to the commodity to be labeled; the time information is obtained from the time service center server, so that the accuracy and authority of the obtained time are ensured; in addition, based on the standard time information acquired from the time service center server and the commodity attribute information of the commodity to be marked, commodity code information corresponding to the commodity to be marked is generated through a second intelligent contract, and the commodity code information is returned to the marking equipment, so that the marking equipment marks the commodity code information and the standard time information on the commodity; by means of marking the commodity code information, even if a seller or a distributor falsely tamper the marked time marked on the commodity, the user can inquire the real marked time corresponding to the corresponding commodity through the commodity code information, so that whether the marked time marked on the commodity is real can be verified; in addition, in the embodiment of the specification, the standard time information is acquired through the first intelligent contract, and the commodity code information corresponding to the commodity to be marked is generated through the second intelligent contract, so that the effects of no manual intervention, multi-party witness and no tampering can be achieved, and the authenticity of the generated commodity code information is ensured.
Corresponding to the methods provided in the embodiments shown in fig. 5 to 6, based on the same idea, the embodiments of this specification provide a blockchain-based date querying device for executing the methods provided in the embodiments shown in fig. 5 to 6 of this specification. Fig. 8 is a schematic diagram illustrating a module composition of a block chain-based date querying apparatus according to an embodiment of the present disclosure, where as shown in fig. 8, the apparatus includes:
a receiving module 702, configured to receive a query request of a labeling time of a commodity to be queried, where the query request is sent by a terminal device; the time labeling inquiry request carries commodity code information of the commodity to be inquired; the commodity code information is generated through the block chain system based on standard time information acquired from a time service center server and commodity attribute information of the commodity to be inquired;
the analysis module 704 is used for analyzing the commodity code information through a fourth intelligent contract to obtain the labeling time and the commodity attribute information contained in the commodity code information;
a sending module 706, configured to send the analyzed tagged time and the analyzed commodity attribute information to the terminal device, so that the terminal device displays the analyzed tagged time and the analyzed commodity attribute information.
The block chain based date labeling apparatus provided in the embodiment shown in fig. 8 can implement all the method steps of the method embodiments shown in fig. 5 to fig. 6, which are not described herein again.
In the date query device based on the block chain provided in the embodiment of the present specification, a time label and commodity code information of a commodity are labeled on the commodity, and the commodity code information is generated by a block chain system based on standard time information acquired from a time service center server and commodity attribute information of the commodity to be queried; the commodity code information is used for verifying the authenticity of the marked time marked on the commodity; in the embodiment of the specification, the standard time acquired from the time service center server is marked on the commodity as the marked time, so that the accuracy and authority of the acquired time are ensured; in addition, by means of labeling the commodity code information, even if a seller or a distributor falsely tampers the labeled time labeled on the commodity, the user can inquire the real labeled time corresponding to the corresponding commodity through the commodity code information, so that whether the labeled time labeled on the commodity is real or not can be verified; according to the method provided by the embodiment of the specification, the user can inquire the authenticity of the marked time marked on the commodity through the commodity code information marked on the commodity, and the reliability is high.
Further, based on the methods shown in fig. 2 to fig. 4, an embodiment of the present specification further provides a date labeling device based on a block chain, as shown in fig. 9.
The date labeling device based on the block chain can generate larger difference due to different configurations or performances, and can comprise one or more than one processor 801 and a memory 802, wherein one or more than one stored application program or data can be stored in the memory 802. Memory 802 may be, among other things, transient storage or persistent storage. The application program stored in memory 802 may include one or more modules (not shown), each of which may include a series of computer-executable instruction information in a device for annotating a block chain-based date. Still further, the processor 801 may be configured to communicate with the memory 802 to execute a series of computer-executable instruction information in the memory 802 on a blockchain based date labeling device. The block chain based date labeling apparatus may also include one or more power supplies 803, one or more wired or wireless network interfaces 804, one or more input-output interfaces 805, one or more keyboards 806, and the like.
In a particular embodiment, a blockchain based date labeling apparatus includes a memory, and one or more programs, wherein the one or more programs are stored in the memory, and the one or more programs may include one or more modules, and each module may include a series of computer-executable instruction information for the blockchain based date labeling apparatus, and the one or more programs configured to be executed by the one or more processors include computer-executable instruction information for:
responding to a labeling time acquisition request of a commodity to be labeled sent by labeling equipment, and acquiring standard time information corresponding to the current moment from a time service center server side through a first intelligent contract;
generating commodity code information of the commodities to be marked through a second intelligent contract based on the standard time information and the commodity attribute information of the commodities to be marked;
returning the commodity code information to the labeling equipment so that the labeling equipment labels the standard time information and the commodity code information on the commodity to be labeled; and the commodity code information is used for verifying the authenticity of the marking time on the commodity to be marked.
The block chain-based date labeling device provided in the embodiment of the present specification may implement all the method steps of the method embodiments shown in fig. 2 to fig. 4, and is not described herein again.
The method includes the steps that after a labeling time obtaining request of a to-be-labeled commodity sent by a labeling device is received, standard time information corresponding to the current moment is obtained from a time service center server through a first intelligent contract, and the obtained standard time is used as labeling time corresponding to the to-be-labeled commodity; time information is obtained from a time service center server side, and the accuracy and authority of the obtained time are guaranteed; in addition, based on standard time information acquired from the time service center server and commodity attribute information of the commodity to be marked, commodity code information corresponding to the commodity to be marked is generated through a second intelligent contract, and the commodity code information is returned to the marking equipment, so that the marking equipment marks the commodity code information and the standard time information on the commodity; by means of the mode of marking the commodity code information, even if a seller or a distributor falsely tampers the marked time marked on the commodity, a user can inquire the real marked time corresponding to the corresponding commodity through the commodity code information, so that whether the marked time marked on the commodity is true or not can be verified; in addition, in the embodiment of the specification, the standard time information is acquired through the first intelligent contract, and the commodity code information corresponding to the commodity to be marked is generated through the second intelligent contract, so that the effects of no manual intervention, multi-party witness and no tampering can be achieved, and the authenticity of the generated commodity code information is ensured.
Further, based on the methods shown in fig. 5 to fig. 6, an embodiment of the present specification further provides a block chain-based date query device, and a structural schematic of the block chain-based date query device provided in the embodiment of the present specification is as shown with reference to fig. 9.
In a particular embodiment, a blockchain based date querying device includes a memory, and one or more programs, wherein the one or more programs are stored in the memory, and the one or more programs may include one or more modules, and each module may include a series of computer executable instruction information in the device for tagging blockchain based dates, and the one or more programs configured to be executed by the one or more processors include computer executable instruction information for:
receiving a marking time query request of a commodity to be queried, which is sent by terminal equipment; the time labeling inquiry request carries commodity code information of the commodity to be inquired; the commodity code information is generated through the block chain system based on standard time information acquired from a time service center server and commodity attribute information of the commodity to be inquired;
Analyzing the commodity code information through a fourth intelligent contract to obtain marking time and commodity attribute information contained in the commodity code information;
and sending the analyzed labeling time and the analyzed commodity attribute information to the terminal equipment so that the terminal equipment displays the analyzed labeling time and the analyzed commodity attribute information.
The block chain-based date query device provided in this specification may implement all the method steps of the method embodiments shown in fig. 5 to fig. 6, and details are not repeated here.
In the date query device based on the block chain provided in the embodiment of the present specification, the commodity is marked with the marking time and the commodity code information of the commodity, where the commodity code information is generated by the block chain system based on the standard time information acquired from the time service center server and the commodity attribute information of the commodity to be queried; the commodity code information is used for verifying the authenticity of the marked time marked on the commodity; in the embodiment of the specification, the standard time acquired from the time service center server is marked on the commodity as the marked time, so that the accuracy and authority of the acquired time are ensured; in addition, by means of marking the commodity code information, even if a seller or a distributor falsely tamper the marked time marked on the commodity, the user can inquire the real marked time corresponding to the corresponding commodity through the commodity code information, so that whether the marked time marked on the commodity is real or not can be verified; according to the method provided by the embodiment of the specification, the user can inquire the authenticity of the marked time marked on the commodity through the commodity code information marked on the commodity, and the reliability is high.
Further, based on the methods shown in fig. 2 to fig. 4, in a specific embodiment, the storage medium may be a usb disk, an optical disk, a hard disk, or the like, and when executed by a processor, the storage medium stores computer-executable instruction information that implements the following processes:
responding to a marking time acquisition request of a commodity to be marked sent by marking equipment, and acquiring standard time information corresponding to the current moment from a time service center server side through a first intelligent contract;
generating commodity code information of the commodities to be marked through a second intelligent contract based on the standard time information and the commodity attribute information of the commodities to be marked;
returning the commodity code information to the marking equipment so that the marking equipment marks the standard time information and the commodity code information on the commodity to be marked; and the commodity code information is used for verifying the authenticity of the marking time on the commodity to be marked.
In addition, when the computer-executable instruction information stored in the storage medium provided in the embodiment of the present specification is executed by the processor, all the method steps of the method embodiments shown in fig. 2 to fig. 4 may be implemented, and are not described herein again.
When the computer-executable instruction information stored in the storage medium provided in the embodiment of the present specification is executed by a processor, after receiving a request for obtaining a marking time of a commodity to be marked sent by a marking device, obtaining standard time information corresponding to a current time from a time service center server by using a first intelligent contract, and taking the obtained standard time as the marking time corresponding to the commodity to be marked; the time information is obtained from the time service center server, so that the accuracy and authority of the obtained time are ensured; in addition, based on the standard time information acquired from the time service center server and the commodity attribute information of the commodity to be marked, commodity code information corresponding to the commodity to be marked is generated through a second intelligent contract, and the commodity code information is returned to the marking equipment, so that the marking equipment marks the commodity code information and the standard time information on the commodity; by means of marking the commodity code information, even if a seller or a distributor falsely tamper the marked time marked on the commodity, the user can inquire the real marked time corresponding to the corresponding commodity through the commodity code information, so that whether the marked time marked on the commodity is real can be verified; in addition, in the embodiment of the specification, the standard time information is acquired through the first intelligent contract, and the commodity code information corresponding to the commodity to be marked is generated through the second intelligent contract, so that the effects of no manual intervention, multi-party witness and incapability of tampering can be achieved, and the authenticity of the generated commodity code information is ensured.
Further, based on the methods shown in fig. 5 to fig. 6, in a specific embodiment, the storage medium may be a usb disk, an optical disk, a hard disk, or the like, and when executed by a processor, the storage medium stores computer-executable instruction information that implements the following processes:
receiving a marking time query request of a commodity to be queried, which is sent by terminal equipment; the time-marked query request carries commodity code information of the commodity to be queried; the commodity code information is generated through the block chain system based on standard time information acquired from a time service center server and commodity attribute information of the commodity to be inquired;
analyzing the commodity code information through a fourth intelligent contract to obtain marking time and commodity attribute information contained in the commodity code information;
and sending the analyzed marking time and the analyzed commodity attribute information to the terminal equipment so that the terminal equipment displays the analyzed marking time and the analyzed commodity attribute information.
In addition, when the computer-executable instruction information stored in the storage medium provided in the embodiments of the present specification is executed by the processor, all the method steps of the method embodiments shown in fig. 5 to 6 may be implemented, and are not described herein again.
When computer-executable instruction information stored in a storage medium provided in an embodiment of the present specification is executed by a processor, labeling time and commodity code information of a commodity are labeled on the commodity, where the commodity code information is generated by a block chain system based on standard time information acquired from a time service center server and commodity attribute information of a commodity to be queried; the commodity code information is used for verifying the authenticity of the marked time marked on the commodity; in the embodiment of the specification, the standard time acquired from the time service center server is marked on the commodity as the marked time, so that the accuracy and authority of the acquired time are ensured; in addition, by means of marking the commodity code information, even if a seller or a distributor falsely tamper the marked time marked on the commodity, the user can inquire the real marked time corresponding to the corresponding commodity through the commodity code information, so that whether the marked time marked on the commodity is real or not can be verified; according to the method provided by the embodiment of the specification, the user can inquire the authenticity of the marked time marked on the commodity through the commodity code information marked on the commodity, and the reliability is high.
The foregoing description has been directed to specific embodiments of this disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
In the 90 s of the 20 th century, improvements in a technology could clearly distinguish between improvements in hardware (e.g., improvements in circuit structures such as diodes, transistors, switches, etc.) and improvements in software (improvements in process flow). However, as technology advances, many of today's process flow improvements have been seen as direct improvements in hardware circuit architecture. Designers almost always obtain the corresponding hardware circuit structure by programming an improved method flow into the hardware circuit. Thus, it cannot be said that an improvement in the process flow cannot be realized by hardware physical modules. For example, a Programmable Logic Device (PLD), such as a Field Programmable Gate Array (FPGA), is an integrated circuit whose Logic functions are determined by programming the Device by a user. A digital system is "integrated" on a PLD by the designer's own programming without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Furthermore, nowadays, instead of manually making an Integrated Circuit chip, such Programming is often implemented by "logic compiler" software, which is similar to a software compiler used in program development and writing, but the original code before compiling is also written by a specific Programming Language, which is called Hardware Description Language (HDL), and HDL is not only one but many, such as abel (advanced Boolean Expression Language), ahdl (alternate Hardware Description Language), traffic, pl (core universal Programming Language), HDCal (jhdware Description Language), lang, Lola, HDL, laspam, hardward Description Language (vhr Description Language), vhal (Hardware Description Language), and vhigh-Language, which are currently used in most common. It will also be apparent to those skilled in the art that hardware circuitry that implements the logical method flows can be readily obtained by merely slightly programming the method flows into an integrated circuit using the hardware description languages described above.
The controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, an Application Specific Integrated Circuit (ASIC), a programmable logic controller, and an embedded microcontroller, examples of which include, but are not limited to, the following microcontrollers: ARC625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic for the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller as pure computer readable program code, the same functionality can be implemented by logically programming method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers and the like. Such a controller may thus be considered a hardware component, and the means included therein for performing the various functions may also be considered as a structure within the hardware component. Or even means for performing the functions may be regarded as being both a software module for performing the method and a structure within a hardware component.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. One typical implementation device is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functionality of the units may be implemented in one or more software and/or hardware when implementing the present application.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the specification. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instruction information. These computer program instruction information may be provided to a processor of a general purpose computer, special purpose computer, embedded processor or other programmable data processing apparatus to produce a machine, such that the instruction information executed by the processor of the computer or other programmable data processing apparatus produce a means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instruction information may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instruction information stored in the computer-readable memory produce an article of manufacture including instruction information means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instruction information may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instruction information that is executed on the computer or other programmable apparatus provides steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instruction information, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The application may be described in the general context of computer-executable instruction information, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The application may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art to which the present application pertains. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (17)

1. A block chain based date labeling method, the method comprising:
responding to a marking time acquisition request of a commodity to be marked sent by marking equipment, and acquiring standard time information corresponding to the current moment from a time service center server side through a first intelligent contract;
generating commodity code information of the commodity to be marked through a second intelligent contract based on the standard time information and the commodity attribute information of the commodity to be marked;
Returning the commodity code information to the labeling equipment so that the labeling equipment labels the standard time information and the commodity code information on the commodity to be labeled; and the commodity code information is used for verifying the authenticity of the marking time on the commodity to be marked.
2. The method as claimed in claim 1, wherein before the standard time information corresponding to the current time is obtained from the time service center by the first intelligent contract in response to the request for obtaining the labeling time of the commodity to be labeled sent by the labeling device, the method further comprises:
acquiring commodity attribute information of commodities to be produced within a preset time length from a producer system, and storing the commodity attribute information to a block chain system; the commodity attribute information at least comprises commodity identification information and/or commodity batch information.
3. The method as claimed in claim 2, wherein said obtaining the product attribute information of the product to be produced within a preset time period from the manufacturer system and storing the product attribute information to the blockchain system comprises:
and calling a third intelligent contract deployed in the blockchain system, acquiring the commodity attribute information from the manufacturer system by executing the third intelligent contract, and storing the commodity attribute information to the blockchain system.
4. The method as claimed in claim 1, wherein the generating commodity code information of the commodity to be labeled by means of a second intelligent contract based on the standard time information and the commodity attribute information of the commodity to be labeled comprises:
calling a second intelligent contract deployed in the block chain system, and performing association processing on the commodity attribute information of the commodity to be marked and the standard time information by executing the second intelligent contract to obtain corresponding association information; and generating commodity code information of the commodity to be marked based on the associated information.
5. The method as claimed in claim 1, wherein before the standard time information corresponding to the current time is obtained from the time service center by the first intelligent contract in response to the request for obtaining the labeling time of the commodity to be labeled sent by the labeling device, the method further comprises:
configuring a code value corresponding to each commodity and storing the code value corresponding to the commodity in a block chain system; the code value is used as identification information of the to-be-labeled commodity and carried in a labeling time acquisition request of the to-be-labeled commodity sent by the labeling equipment.
6. The method according to claim 5, wherein the request for obtaining the marked time carries a code value corresponding to the commodity to be marked;
Correspondingly, before generating the commodity code information corresponding to the commodity to be marked through a second intelligent contract based on the standard time information and the commodity attribute information of the commodity to be marked, the method further includes:
based on the code value, searching commodity attribute information corresponding to the commodity to be marked in the commodity attribute information of each commodity stored in the block chain system; the block chain system stores the mapping relation between each code value and the corresponding commodity attribute information;
or,
determining the commodity name corresponding to the code value, and searching the commodity attribute information corresponding to the commodity name in the commodity attribute information of each commodity stored in the block chain system; and the block chain system stores the mapping relation between each commodity name and the corresponding commodity attribute information.
7. The method according to claim 6, wherein the request for obtaining the marked time further carries the number of the goods to be marked;
correspondingly, the obtaining of the standard time information corresponding to the current time from the service end of the time service center through the first intelligent contract includes:
calling a first intelligent contract deployed in the block chain system, and sequentially acquiring standard time information from the time service center server side according to a set frequency by executing the first intelligent contract; the quantity of the acquired standard time information is consistent with the quantity of the commodities to be marked;
The generating of the commodity code information corresponding to the commodity to be marked through a second intelligent contract based on the standard time information and the commodity attribute information of the commodity to be marked comprises the following steps:
generating commodity code information corresponding to the commodity to be marked through the second intelligent contract according to the acquired standard time information and the commodity attribute information of the commodity to be marked based on the standard time information;
the returning the commodity code information to the labeling device includes:
and sequentially returning the standard time information and the commodity code information corresponding to the standard time information to the marking equipment according to the time sequence of the standard time information and the set frequency.
8. The method of any one of claims 1 to 7, wherein the merchandise code information comprises graphic code information; the graphic code comprises a two-dimensional code or a bar code.
9. A blockchain based date query method, the method comprising:
receiving a marking time query request of a commodity to be queried, which is sent by terminal equipment; the time-marked query request carries commodity code information of the commodity to be queried; the commodity code information is generated through a block chain system based on standard time information acquired from a time service center server and commodity attribute information of the commodity to be inquired;
Analyzing the commodity code information through a fourth intelligent contract to obtain marking time and commodity attribute information contained in the commodity code information;
and sending the analyzed labeling time and the analyzed commodity attribute information to the terminal equipment so that the terminal equipment displays the analyzed labeling time and the analyzed commodity attribute information.
10. The method as claimed in claim 9, wherein the analyzing the commodity code information through a fourth intelligent contract to obtain the labeling time and commodity attribute information of the commodity to be queried, which are included in the commodity code information, comprises:
calling a fourth intelligent contract deployed in the blockchain system;
and analyzing the commodity code information by executing the fourth intelligent contract to obtain the marking time and the commodity attribute information contained in the commodity code information.
11. The method of claim 9 or 10, wherein the item code information is marked on the corresponding item;
the commodity code information comprises graphic code information; the graphic code comprises a two-dimensional code or a bar code.
12. A block chain based date labeling apparatus, the apparatus comprising:
the first acquisition module is used for responding to a marking time acquisition request of a commodity to be marked sent by marking equipment and acquiring standard time information corresponding to the current moment from a time service center server side through a first intelligent contract;
The generation module is used for generating commodity code information of the commodities to be marked through a second intelligent contract based on the standard time information and the commodity attribute information of the commodities to be marked;
the return module is used for returning the commodity code information to the labeling equipment so as to enable the labeling equipment to label the standard time information and the commodity code information on the commodity to be labeled; and the commodity code information is used for verifying the authenticity of the marking time on the commodity to be marked.
13. A block chain based date query apparatus, the apparatus comprising:
the receiving module is used for receiving a marking time query request of a commodity to be queried, which is sent by the terminal equipment; the time-marked query request carries commodity code information of the commodity to be queried; the commodity code information is generated through a block chain system based on standard time information acquired from a time service center server and commodity attribute information of the commodity to be inquired;
the analysis module analyzes the commodity code information through a fourth intelligent contract to obtain marking time and commodity attribute information contained in the commodity code information;
and the sending module is used for sending the analyzed marking time and the analyzed commodity attribute information to the terminal equipment so that the terminal equipment displays the analyzed marking time and the analyzed commodity attribute information.
14. A blockchain-based date labeling apparatus comprising:
a processor; and
a memory arranged to store computer executable instructions that, when executed, cause the processor to:
responding to a marking time acquisition request of a commodity to be marked sent by marking equipment, and acquiring standard time information corresponding to the current moment from a time service center server side through a first intelligent contract;
generating commodity code information of the commodity to be marked through a second intelligent contract based on the standard time information and the commodity attribute information of the commodity to be marked;
returning the commodity code information to the marking equipment so that the marking equipment marks the standard time information and the commodity code information on the commodity to be marked; and the commodity code information is used for verifying the authenticity of the marking time on the commodity to be marked.
15. A blockchain-based date query device, comprising:
a processor; and
a memory arranged to store computer executable instructions that, when executed, cause the processor to:
receiving a marking time query request of a commodity to be queried, which is sent by terminal equipment; the time-marked query request carries commodity code information of the commodity to be queried; the commodity code information is generated through a block chain system based on standard time information acquired from a time service center server and commodity attribute information of the commodity to be inquired;
Analyzing the commodity code information through a fourth intelligent contract to obtain marking time and commodity attribute information contained in the commodity code information;
and sending the analyzed marking time and the analyzed commodity attribute information to the terminal equipment so that the terminal equipment displays the analyzed marking time and the analyzed commodity attribute information.
16. A storage medium storing computer-executable instructions that, when executed, implement the following:
responding to a marking time acquisition request of a commodity to be marked sent by marking equipment, and acquiring standard time information corresponding to the current moment from a time service center server side through a first intelligent contract;
generating commodity code information of the commodity to be marked through a second intelligent contract based on the standard time information and the commodity attribute information of the commodity to be marked;
returning the commodity code information to the marking equipment so that the marking equipment marks the standard time information and the commodity code information on the commodity to be marked; and the commodity code information is used for verifying the authenticity of the marking time on the commodity to be marked.
17. A storage medium storing computer-executable instructions that, when executed, implement the following:
Receiving a marking time query request of a commodity to be queried, which is sent by terminal equipment; the time-marked query request carries commodity code information of the commodity to be queried; the commodity code information is generated through a block chain system based on standard time information acquired from a time service center server and commodity attribute information of the commodity to be inquired;
analyzing the commodity code information through a fourth intelligent contract to obtain marking time and commodity attribute information contained in the commodity code information;
and sending the analyzed marking time and the analyzed commodity attribute information to the terminal equipment so that the terminal equipment displays the analyzed marking time and the analyzed commodity attribute information.
CN202110512830.2A 2021-05-11 2021-05-11 Block chain-based date labeling and querying method and device Active CN113222084B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110512830.2A CN113222084B (en) 2021-05-11 2021-05-11 Block chain-based date labeling and querying method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110512830.2A CN113222084B (en) 2021-05-11 2021-05-11 Block chain-based date labeling and querying method and device

Publications (2)

Publication Number Publication Date
CN113222084A CN113222084A (en) 2021-08-06
CN113222084B true CN113222084B (en) 2022-07-08

Family

ID=77094823

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110512830.2A Active CN113222084B (en) 2021-05-11 2021-05-11 Block chain-based date labeling and querying method and device

Country Status (1)

Country Link
CN (1) CN113222084B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109146514A (en) * 2018-07-27 2019-01-04 程烨 Livestock products is traced to the source information recording method, device, equipment and storage medium
CN109801088A (en) * 2019-04-03 2019-05-24 上海中商网络股份有限公司 Antiforge method for commodities, device, server and storage medium
CN110083620A (en) * 2019-03-21 2019-08-02 深圳壹账通智能科技有限公司 Based on the data query method and device of block chain, storage medium, electronic device
CN110490605A (en) * 2018-05-14 2019-11-22 上海交通大学 The supply chain data normalization system traced to the source towards block chain based on ontology
CN110543787A (en) * 2019-09-05 2019-12-06 佛山市顺德区平行互联网信息科技有限公司 Storage and acquisition method, storage system and acquisition device for commodity traceability data
CN110648138A (en) * 2019-09-30 2020-01-03 支付宝(杭州)信息技术有限公司 Transaction query and transaction data processing method, device and equipment based on block chain

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110490605A (en) * 2018-05-14 2019-11-22 上海交通大学 The supply chain data normalization system traced to the source towards block chain based on ontology
CN109146514A (en) * 2018-07-27 2019-01-04 程烨 Livestock products is traced to the source information recording method, device, equipment and storage medium
CN110083620A (en) * 2019-03-21 2019-08-02 深圳壹账通智能科技有限公司 Based on the data query method and device of block chain, storage medium, electronic device
CN109801088A (en) * 2019-04-03 2019-05-24 上海中商网络股份有限公司 Antiforge method for commodities, device, server and storage medium
CN110543787A (en) * 2019-09-05 2019-12-06 佛山市顺德区平行互联网信息科技有限公司 Storage and acquisition method, storage system and acquisition device for commodity traceability data
CN110648138A (en) * 2019-09-30 2020-01-03 支付宝(杭州)信息技术有限公司 Transaction query and transaction data processing method, device and equipment based on block chain

Also Published As

Publication number Publication date
CN113222084A (en) 2021-08-06

Similar Documents

Publication Publication Date Title
CN107644286B (en) Workflow processing method and device
CN113434910A (en) Business data chaining method and device
CN111461623B (en) Block chain-based warehouse bill creating method, device and equipment
CN112241506B (en) User behavior backtracking method, device, equipment and system
CN111738737B (en) Method, device and equipment for generating digital property right certificate
CN108134812B (en) Data processing method and device
CN104423961A (en) Method and system for generating testing script
CN111784318A (en) Data processing method and device, electronic equipment and storage medium
CN108596052B (en) Article searching method, system and terminal equipment
CN108648064A (en) The method and apparatus of the quick restocking of product information
CN113254163B (en) Processing method and device of block chain data
CN106933857B (en) Method and device for scheduling tasks in data warehouse
CN113222084B (en) Block chain-based date labeling and querying method and device
CN113569257A (en) User authority management method and device in gray scale release
CN109597695B (en) Data processing method, device and equipment
CN108345600B (en) Management of search application, data search method and device thereof
CN114036132A (en) Object information processing method and device, storage medium and electronic equipment
CN112581141A (en) Transaction processing method, device and system based on block chain
CN103729199A (en) Method for dynamically deploying cloud computing component in ERP software
CN112231377A (en) Data mapping method, system, device, server and storage medium
CN110532248A (en) A kind of server application acquisition of information and method of adjustment based on CMDB
CN111127171A (en) Order data processing method, device, equipment and computer readable storage medium
CN112558973A (en) Front-end page generation method and device, storage medium and electronic device
CN117033471A (en) Statistical display method and device for data asset, electronic equipment and storage medium
CN116976945A (en) Operation strategy prediction method and device, computer equipment and storage medium

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