CN116306754B - Two-dimensional code generation method and device - Google Patents

Two-dimensional code generation method and device Download PDF

Info

Publication number
CN116306754B
CN116306754B CN202310560155.XA CN202310560155A CN116306754B CN 116306754 B CN116306754 B CN 116306754B CN 202310560155 A CN202310560155 A CN 202310560155A CN 116306754 B CN116306754 B CN 116306754B
Authority
CN
China
Prior art keywords
information
layer
dimensional code
parameter value
address
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
CN202310560155.XA
Other languages
Chinese (zh)
Other versions
CN116306754A (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.)
Zhejiang Meilijian Dairy Co ltd
Original Assignee
Zhejiang Meilijian Dairy 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 Zhejiang Meilijian Dairy Co ltd filed Critical Zhejiang Meilijian Dairy Co ltd
Priority to CN202310560155.XA priority Critical patent/CN116306754B/en
Publication of CN116306754A publication Critical patent/CN116306754A/en
Application granted granted Critical
Publication of CN116306754B publication Critical patent/CN116306754B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K19/00Record carriers for use with machines and with at least a part designed to carry digital markings
    • G06K19/06Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code
    • G06K19/06009Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code with optically detectable marking
    • G06K19/06037Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code with optically detectable marking multi-dimensional coding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/10Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
    • G06K7/14Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation using light without selection of wavelength, e.g. sensing reflected white light
    • G06K7/1404Methods for optical code recognition
    • G06K7/1408Methods for optical code recognition the method being specifically adapted for the type of code
    • G06K7/14172D bar codes
    • 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

Abstract

The invention relates to the field of information security, in particular to a two-dimensional code generation method, which comprises the following steps: obtaining first information characterizing a product feature; respectively extracting numbers and letters in the first information, and reordering the numbers and letters in the first information to be used as a first parameter value and a second parameter value; forming a uniform resource locator of the address corresponding to the product; if the time interval between the first time information contained in the first parameter value and the second time information contained in the third parameter value is smaller than the first threshold value, and the time interval between the third time information for generating the two-dimensional code and the second time information contained in the third parameter value is smaller than the second threshold value, generating the two-dimensional code at the time corresponding to the third time information at least based on the uniform resource locator of the address, the first information and the third parameter value. The method solves the technical problem that the relevance between the two-dimensional code and the product in the process of tracing the perishable product is poor, and realizes tracing and information security disclosure of the product.

Description

Two-dimensional code generation method and device
Technical Field
The invention relates to the field of information security, in particular to a two-dimensional code generation method and device.
Background
The source and the production process of the food are determined by tracking and recording key information in the production, processing and transportation processes of the food, and the method is one of means for ensuring the safety and the quality of the food. The two-dimension codes are printed on the product package, and data such as product information, production batch, production date, processing process, detection report and the like are stored on the server, so that consumers can inquire through scanning the two-dimension codes, and the supervision department can trace back the source and the flow direction of food through scanning the two-dimension codes, and when the food has problems, necessary investigation and processing are carried out. The method can improve the reliability and efficiency of food tracing, is convenient for consumers to acquire food information, and promotes food safety management and supervision. The existing encryption algorithm can ensure the information security in the process of tracing the product through the two-dimension code to a certain extent, but products which are easy to expire, such as fresh milk, yoghourt, fresh and the like, cannot be well associated with the product information in the existing encryption mode.
Disclosure of Invention
The invention provides a two-dimensional code generation method and device and a two-dimensional code-based information acquisition method and device, aiming at the technical problem that in the prior art, correlation is poor in a two-dimensional code-based tracing process of a perishable product, encryption and information display processes.
The first aspect of the present invention provides a method for generating a two-dimensional code, including:
obtaining first information characterizing a product feature, the first information comprising numbers and letters;
respectively extracting numbers and letters in the first information, reordering the numbers in the first information to serve as first parameter values, and reordering the letters in the first information to serve as second parameter values;
forming a uniform resource locator of a corresponding address of the product based on at least the first parameter value, the second parameter value and the third parameter value; the third parameter value includes a time at which a uniform resource locator for the address is formed;
if the time interval between the first time information contained in the first parameter value and the second time information contained in the third parameter value is smaller than a first threshold value, and the time interval between the third time information for generating the two-dimensional code and the second time information contained in the third parameter value is smaller than a second threshold value, generating the two-dimensional code at a time corresponding to the third time information at least based on the uniform resource locator of the address, the first information and the third parameter value; otherwise, stopping generating the two-dimensional code.
In some embodiments, the first information includes batch information including at least a production time of the product.
In some embodiments, the third parameter value further comprises a feature value associated with a reordering rule for the reordering to obtain the first numerical information and the first alphabetical information.
In some embodiments, the third parameter value is obtained by performing an encryption calculation on the characteristic value and the time of forming the uniform resource locator of the address.
The second invention provides an information acquisition method based on a two-dimensional code, which is based on the two-dimensional code generated by the generation method of the two-dimensional code, and comprises the following steps:
obtaining a uniform resource locator of an address at least based on a first parameter value, a second parameter value and a third parameter value in the two-dimensional code, and jumping to the address based on the uniform resource locator of the address;
wherein the first parameter value is a number in first information representing a product feature, the second parameter value is a letter in the first information representing a product, and the third parameter value is a time of forming a uniform resource locator of an address;
and after the first layer of the interface of the address acquires the second information and is verified to be consistent with the first information in the two-dimensional code, displaying the information of the second layer of the interface of the address.
In some embodiments, when the first layer of the interface of the address does not obtain second information consistent with the first information in the two-dimensional code, the second layer is a fuzzy layer with unreadable information; when a first layer of an interface of the address obtains second information inconsistent with first information in the two-dimensional code, a third layer appears on the address, the second layer is kept as a fuzzy layer, and the third layer is used for prompting the first layer to obtain the second information inconsistent with the first information in the two-dimensional code and/or prompting to acquire the second information again.
In some embodiments, the second layer includes a plurality of time information, and the time determination is performed before the second layer changes from the blurred layer to the display information: and if the time information falls into the association range with the first time information, the second time information and the third time information, displaying the information of the second layer, otherwise, keeping the second layer as a fuzzy layer and sending alarm information.
In some embodiments, the second layer includes certificate information, and certificate determination is performed before the second layer changes from the blurred layer to the display information: and if the certificate information passes verification, displaying the information of the second layer, otherwise, keeping the second layer as a fuzzy layer and sending alarm information.
A third aspect of the present invention provides a two-dimensional code generating apparatus, including:
a feature acquisition unit configured to obtain first information characterizing a feature of a product, the first information including numerals and letters;
a feature extraction unit configured to extract numbers and letters in the first information, respectively, reorder the numbers in the first information as first parameter values, reorder the letters in the first information as second parameter values;
an address generation unit configured to form a uniform resource locator for a product corresponding address based at least on the first parameter value, the second parameter value and the third parameter value; the third parameter value includes a time at which a uniform resource locator for the address is formed;
the two-dimensional code generating unit generates a two-dimensional code at a time corresponding to third time information at least based on the uniform resource locator of the address if the time interval between the first time information contained in the first parameter value and the second time information contained in the third parameter value is smaller than a first threshold value and the time interval between the third time information for generating the two-dimensional code and the second time information contained in the third parameter value is smaller than a second threshold value; otherwise, stopping generating the two-dimensional code.
A fourth aspect of the present invention provides an information acquisition device based on a two-dimensional code, including:
two-dimensional code identification unit: obtaining a uniform resource locator of an address at least based on a first parameter value, a second parameter value and a third parameter value in the two-dimensional code, and jumping to the address based on the uniform resource locator of the address;
wherein the first parameter value is a number in first information representing a product feature, the second parameter value is a letter in the first information representing a product, and the third parameter value is a time of forming a uniform resource locator of an address;
display judging unit: and after the first layer of the interface of the address acquires the second information and is verified to be consistent with the first information in the two-dimensional code, displaying the information of the second layer of the interface of the address.
The invention establishes the association of the generated two-dimension code information, the Uniform Resource Locator (URL) of the product information display page and the product time information, accurately and effectively provides the short-period product traceability information, avoids redundant complex encryption algorithm, and realizes the traceability and information security disclosure of the product in a manner of tightly combining with the short-period product time.
The foregoing description is only an overview of the present invention, and is intended to be implemented in accordance with the teachings of the present invention in order that the same may be more clearly understood and to make the same and other objects, features and advantages of the present invention more readily apparent.
Drawings
One or more embodiments are illustrated by way of example and not limitation in the figures of the accompanying drawings, in which like references indicate similar elements, and in which the figures of the drawings are not to be taken in a limiting sense, unless otherwise indicated.
Fig. 1 is a flow chart of a two-dimensional code generating method according to an embodiment of the present invention;
fig. 2 is a schematic block diagram of a two-dimensional code generating device according to an embodiment of the present invention;
fig. 3 is a schematic flow chart of an information obtaining method based on a two-dimensional code according to an embodiment of the present invention;
fig. 4 is a schematic block diagram of an information acquisition device based on a two-dimensional code according to an embodiment of the present invention.
Detailed Description
In order to make the present application solution better understood by those skilled in the art, the following description will clearly and completely describe the technical solution in the embodiments of the present application with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present application.
The terms first, second and the like in the description and in the claims of the present application and in the above-described figures, are used for distinguishing between different objects and not for describing a particular sequential order. Furthermore, the terms "comprise" and "have," as well as any variations thereof, are intended to cover a non-exclusive inclusion. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those listed steps or elements but may include other steps or elements not listed or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the present application. The appearances of such phrases in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those of skill in the art will explicitly and implicitly appreciate that the embodiments described herein may be combined with other embodiments.
When in production, manufacturers can attach two-dimension codes on the packages, record the information such as production time, production place, raw material sources, detection reports and the like, and upload the information to the server. In addition, parameters such as temperature, humidity and the like of the fresh food monitored in the transportation process can also be updated to the database. When the consumer purchases, the consumer can acquire the relevant information of the fresh food, such as production time, production place, quality guarantee period, detection report and the like, through scanning the two-dimensional code, so that the consumer can know the real situation of the food and can avoid purchasing unqualified food.
The existing method for tracing the product based on the two-dimension code realizes tracing and anti-counterfeiting of the product by improving an encryption algorithm. However, the method does not consider the characteristic of the short-period perishable product on time sensitivity, and does not fuse the time sensitivity into the process of generating the two-dimensional code and acquiring the information based on the two-dimensional code, so that the traceability and the information sharing system for the short-period perishable product are poor in adaptability to the product.
In view of the above, the present invention provides a method and apparatus for generating a two-dimensional code, and a method and apparatus for acquiring information based on the two-dimensional code.
Fig. 1 is a flow chart of a two-dimensional code generating method according to an embodiment of the present invention.
Referring to fig. 1, the two-dimensional code generating method includes:
s101 obtains first information characterizing a product feature, the first information including numbers and letters.
The first information characterizing the product features at least comprises batch information of the product, wherein the batch information at least comprises production time in a digital form and batch features in an alphabetical form. Typically, the production time is at least accurate to the production date, i.e. the production time comprises eight digits consisting of four digits production year, two digits production month, two digits production date. An example is 20230330M for a yogurt product based on the batch information formed in the format described above. For shorter cycle products, the production time is further accurate to the moment, i.e. on the basis of the above eight digits, it is also possible to include two digits production hours, two digits production minutes and two digits production seconds.
S102, respectively extracting numbers and letters in the first information, reordering the numbers in the first information to be used as first parameter values, and reordering the letters in the first information to be used as second parameter values.
Because the uniform resource locator is explicit address data, the digits and letters in the first information are reordered for improved security. In some further embodiments, the reordered numeric strings and alphabetic strings are processed for feature values, respectively, and the processed information is used as the first parameter value and the second parameter value.
In some embodiments, the reordering rule for reordering the numbers and letters in the first information may be changed with time, and the reordering rule adopted by the reordering rule may be written in the two-dimensional code in combination with other information. In the analysis process, a reordering rule is determined by analyzing the reordering identifier obtained by the other information in the two-dimensional code, and the reordering rule is used for processing the first parameter value to obtain a character string which represents the production time in the first information so as to be used for calculating the time interval in the subsequent step.
S103, forming a uniform resource locator of a corresponding address of the product based on at least the first parameter value, the second parameter value and the third parameter value; the third parameter value includes a time at which the uniform resource locator of the address was formed.
It will be appreciated that the first parameter value, the second parameter value and the third parameter value form key value pairs in the query parameter of the uniform resource locator. In addition, the first parameter value, the second parameter value and the third parameter value do not restrict the path part in the uniform resource location, and do not restrict the segment specified by the anchor point if necessary. After the three parameters are determined, the three parameters are added into the query parameters as key value pairs, and are converted into character string formats to be spliced into uniform resource locations corresponding to the products.
The third parameter value includes a data structure of a time at which the address uniform resource locator is formed in correspondence with a data structure of a production time of the product. Continuing with the above example of a yogurt product, the lot information of the product is 20230330M and the production time is 20230330, and the data structure of the time of forming the address uniform resource locator included in the third parameter value of the yogurt product is also an eight-digit number consisting of four-digit year of production, two-digit month of production, and two-digit day of production. For shorter period products, such as tens digits with production time accurate to production hours, twelve digits with production time accurate to production minutes, or fourteen digits with production time accurate to seconds, the data structure of the time of the corresponding uniform resource locator is consistent with the data structure, which is the corresponding tens digits, twelve digits, or fourteen digits.
And displaying the corresponding data of the product on the address corresponding to the uniform resource locator so as to be checked after the consumer or supervision scans the two-dimensional code and verifies. The corresponding data of the product comprises information of a production stage before the generated two-dimensional code is printed and information of a transportation and sales stage after the generated two-dimensional code is printed. The information in the production stage is directly updated to the address after the address corresponding to the uniform resource locator is generated, and the information in the transportation and sales stage is uploaded to a database in real time in each subsequent environment and updated to the address.
Illustratively, the information of the production stage before the generated two-dimensional code is printed, such as basic information, lot information, supervision spot check, sunshine factory, brand propaganda, and the like. Taking a certain yogurt product as an example, the basic information includes: product name, business name, shelf life, specified unit, commodity bar code, etc.; the batch information includes: business name, unified social credit code, inspection report, etc.; the supervision spot check comprises: current batch spot check report, other batch spot check report, etc.; the solar plant includes real-time video of the production line that produced the product; the brand promotion then includes a corresponding graphic or food description of the business of the product.
Illustratively, the information of the transportation sales stage after the generated two-dimensional code is printed, such as transportation information, sales information, and the like. Typical shipping information includes: real-time transportation conditions such as transportation temperature, humidity and the like, and logistics information such as starting point position and time, end point position and time, passing transit position and time and the like. The sales information includes sales channels, time, and the like.
It should be noted that, the data related to the product includes time data of multiple stages, and the time data of the multiple stages is used as an auxiliary verification mode in the process of scanning the two-dimensional code for inquiring, so as to timely identify and avoid website tampering or other information vulnerabilities. Of course, the data dimensions related to the above products are merely examples, and are not limited to uploading and displaying of the data dimensions of other necessary products.
In addition, the third parameter value also represents a characteristic value of a reordering rule for reordering the digits and letters in the first information, and in order to improve confidentiality, the characteristic value and the time of forming the uniform resource locator of the address are subjected to encryption calculation to obtain the third parameter value. The method can not determine the production time through the reverse ordering of the re-ordering rule under the condition that the re-ordering rule is not obtained, and the step which is introduced in the comparison process of the time period threshold value and is in the production time is combined, so that the situation that a consumer or a supervisor obtains tampered information in the process of obtaining product information through code scanning is effectively avoided. The characteristic value of the reordering rule is that the cross association between the uniform resource locator of the address and the two-dimensional code is established, the reordering rule can be changed periodically along with time, and the production time, the address time, the two-dimensional code generation time and the like of a product can be further checked by combining the selection of the reordering rule on a time node and the characteristic value of the corresponding time.
S104, if the time interval between the first time information contained in the first parameter value and the second time information contained in the third parameter value is smaller than a first threshold value, and the time interval between the third time information for generating the two-dimensional code and the second time information contained in the third parameter value is smaller than a second threshold value, generating the two-dimensional code at the time corresponding to the third time information at least based on the uniform resource locator of the address, wherein the first information and the third parameter value are the same as each other; otherwise, stopping generating the two-dimensional code.
In some embodiments, the first time information, e.g., the production time, contained by the first parameter value is defined to be less than a first threshold value with the second time information, e.g., the time to generate the uniform resource locator of the address, contained by the third parameter value; and limiting the third time information for generating the two-dimensional code and the second time information contained in the third parameter value, namely, the time for generating the uniform resource locator of the address, to be smaller than a second threshold value, and excluding products which are not suitable for being sold towards the market for a certain period of time. The first time threshold and the second time threshold are selected according to the expiration period of the product.
According to the embodiment, the time sensitive characteristic of the short-period product is combined with the uniform resource locator of the address of the public product information and the two-dimensional code of the address of the associated product and the address of the public product information, and the time difference between the three is used as the judging basis for forming the two-dimensional code, so that the temporary product is stopped from flowing to the market from the source. In addition, the two-dimensional code generation method provided by the embodiment writes the time characteristics into the uniform resource locator and the two-dimensional code at the same time, and writes the uniform resource locator and the two-dimensional code which are established by re-ordering as the cross relation of the association into the two-dimensional code, thereby providing a security foundation for the subsequent information query based on the two-dimensional code.
Fig. 2 is a schematic block diagram of a two-dimensional code generating device according to an embodiment of the present invention.
Referring to fig. 2, the two-dimensional code generating device provided in this embodiment includes:
a feature acquisition unit 201 configured to obtain first information characterizing a feature of a product, the first information including numerals and letters;
a feature extraction unit 202 configured to extract numbers and letters in the first information, respectively, reorder the numbers in the first information as first parameter values, reorder the letters in the first information as second parameter values;
an address generation unit 203 configured to form a uniform resource locator of a product corresponding address based at least on the first parameter value, the second parameter value and the third parameter value; the third parameter value includes a time at which a uniform resource locator for the address is formed;
the two-dimensional code generating unit 204 generates a two-dimensional code at a time corresponding to third time information at least based on the uniform resource locator of the address if a time interval between first time information included in the first parameter value and second time information included in the third parameter value is smaller than a first threshold value and a time interval between third time information for generating the two-dimensional code and second time information included in the third parameter value is smaller than a second threshold value; otherwise, stopping generating the two-dimensional code.
It should be noted that, for convenience and brevity of description, specific working processes of the above-described apparatus and each module and unit may refer to corresponding processes in the foregoing two-dimensional code generating method embodiment, and will not be described herein again.
Fig. 3 is a flow chart of an information obtaining method based on a two-dimensional code according to an embodiment of the present invention.
Referring to fig. 3, the two-dimensional code-based information acquisition method includes:
s301, obtaining a uniform resource locator of an address at least based on a first parameter value, a second parameter value and a third parameter value in the two-dimensional code, and jumping to the address based on the uniform resource locator of the address;
the first parameter value is a number in first information representing a product characteristic, the second parameter value is a letter in the first information representing the product, and the third parameter value is a time for forming a uniform resource locator of an address.
It will be appreciated that the address also includes the necessary paths, anchors, etc. Wherein the first parameter value, the second parameter value, and the third parameter value form key value pairs in a query parameter of the uniform resource locator.
The address is used for displaying corresponding data of the product so as to be checked after a consumer or supervision scans the two-dimensional code and verifies the two-dimensional code. The corresponding data of the product comprises information of a production stage before the generated two-dimensional code is printed and information of a transportation and sales stage after the generated two-dimensional code is printed. The information in the production stage is directly updated to the address after the address corresponding to the uniform resource locator is generated, and the information in the transportation and sales stage is uploaded to a database in real time in each subsequent environment and updated to the address.
Illustratively, the information of the production stage before the generated two-dimensional code is printed, such as basic information, lot information, supervision spot check, sunshine factory, brand propaganda, and the like. Taking a certain yogurt product as an example, the basic information includes: product name, business name, shelf life, specified unit, commodity bar code, etc.; the batch information includes: business name, unified social credit code, inspection report, etc.; the supervision spot check comprises: current batch spot check report, other batch spot check report, etc.; the solar plant includes real-time video of the production line that produced the product; the brand promotion then includes a corresponding graphic or food description of the business of the product.
Illustratively, the information of the transportation sales stage after the generated two-dimensional code is printed, such as transportation information, sales information, and the like. Typical shipping information includes: real-time transportation conditions such as transportation temperature, humidity and the like, and logistics information such as starting point position and time, end point position and time, passing transit position and time and the like. The sales information includes sales channels, time, and the like.
It should be noted that, the data related to the product includes time data of multiple stages, and the time data of the multiple stages is used as an auxiliary verification mode in the process of scanning the two-dimensional code for inquiring, so as to timely identify and avoid website tampering or other information vulnerabilities. Of course, the data dimensions related to the above products are merely examples, and are not limited to uploading and displaying of the data dimensions of other necessary products.
S302, after the second information is acquired at the first layer of the interface of the address and is verified to be consistent with the first information in the two-dimensional code, displaying the information of the second layer of the interface of the address.
When a first layer of the interface of the address does not obtain second information consistent with the first information in the two-dimensional code, the second layer is a fuzzy layer with unreadable information; when a first layer of an interface of the address obtains second information inconsistent with first information in the two-dimensional code, a third layer appears on the address, the second layer is kept as a fuzzy layer, and the third layer is used for prompting the first layer to obtain the second information inconsistent with the first information in the two-dimensional code and/or prompting to acquire the second information again.
In some exemplary embodiments, the first layer and the third layer are dialog boxes suspended over the second layer that are interactable by input. Continuing with the example of a yogurt product described above, batch information, such as 20230330M, is entered as indicated in a first layer containing an importable dialog box. Multiple verifications can be performed based on the entered batch information prior to jumping to the web site, with typical verification procedures as follows:
verification batch: verify 20230330M is 20230330M consistent with the content related to the product lot in the web site.
And (3) time verification: time information in the batch information is extracted, for example, 20230330 in this example. And verifying the uniform resource locator of the address and the time in the two-dimensional code. Specifically, extracting a characteristic value representing a reordering rule stored in the two-dimensional code in an encrypted manner, determining the ordering rule based on the characteristic value, and judging whether the time in a first parameter value obtained after analysis of the ordering rule is 20230330 or not.
The method can not determine the production time through the reverse ordering of the re-ordering rule under the condition that the re-ordering rule is not obtained, and the step which is introduced in the subsequent comparison process of the time period threshold and is in the production time is combined, so that the situation that a consumer or a supervisor obtains tampered information in the process of obtaining the product information by scanning the code is effectively avoided. The characteristic value of the reordering rule is that the cross association between the uniform resource locator of the address and the two-dimensional code is established, the reordering rule can be changed periodically along with time, and the production time, the address time, the two-dimensional code generation time and the like of a product can be further checked by combining the selection of the reordering rule on a time node and the characteristic value of the corresponding time.
In some embodiments, the verification means further comprises time-dependent verification. The second layer comprises a plurality of time information, and the time judgment is carried out before the second layer changes from the fuzzy layer to the display information: and if the time information falls into the association range with the first time information, the second time information and the third time information, displaying the information of the second layer, otherwise, keeping the second layer as a fuzzy layer and sending alarm information.
The plurality of time information are exemplified as: production time, packaging time, multiple node time during the logistics process, time in the inspection report, etc. According to the embodiment, through the attribute of the product with the shorter shelf life and time sensitivity, the possible error of the time relation in any link process is judged, and then the possible tampering or uploading error of part of data is timely identified. Therefore, the embodiment can effectively stop the falsified unreal data provided to the consumer or the supervision department and timely feed back the abnormal situation.
In some embodiments, the authentication means further comprises certificate authentication. The second layer comprises certificate information, and certificate judgment is carried out before the second layer changes from a fuzzy layer to display information: and if the certificate information passes verification, displaying the information of the second layer, otherwise, keeping the second layer as a fuzzy layer and sending alarm information.
According to the information acquisition method of the two-dimensional code, the relationship between the uniform resource locator and the address of the public product information and the two-dimensional code of the address of the associated product and the address of the public product information is established by combining the characteristic of the short-period product on time sensitivity, when verification based on the time information of the short-period product passes, the corresponding product information is disclosed, the disclosure and the provision of websites on tampered or wrong data are effectively avoided, and the tracing safety of the product and the credibility of data disclosure are improved.
Fig. 4 is a schematic block diagram of an information acquisition device based on a two-dimensional code according to an embodiment of the present invention.
Referring to fig. 4, the two-dimensional code based information acquisition apparatus provided in the present embodiment includes:
two-dimensional code recognition unit 401: obtaining a uniform resource locator of an address at least based on a first parameter value, a second parameter value and a third parameter value in the two-dimensional code, and jumping to the address based on the uniform resource locator of the address;
wherein the first parameter value is a number in first information representing a product feature, the second parameter value is a letter in the first information representing a product, and the third parameter value is a time of forming a uniform resource locator of an address;
display judgment unit 402: and after the first layer of the interface of the address acquires the second information and is verified to be consistent with the first information in the two-dimensional code, displaying the information of the second layer of the interface of the address.
It should be noted that, for convenience and brevity of description, specific working processes of the above-described apparatus and each module and unit may refer to corresponding processes in the foregoing two-dimensional code-based information acquisition method embodiment, which are not described herein again.
Those skilled in the art will appreciate that implementing all or part of the above-described methods in the embodiments may be accomplished by computer programs to instruct related hardware, and the programs may be stored in a computer readable storage medium, which when executed may include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM) or the like.
It will be understood by those of ordinary skill in the art that the foregoing embodiments are specific examples of carrying out the invention and that various changes in form and details may be made therein without departing from the spirit and scope of the invention.

Claims (8)

1. The information acquisition method based on the two-dimensional code is characterized by comprising the following steps of:
obtaining a uniform resource locator of an address at least based on a first parameter value, a second parameter value and a third parameter value in the two-dimensional code, and jumping to the address based on the uniform resource locator of the address;
wherein the first parameter value is a number in first information representing a product feature, the second parameter value is a letter in the first information representing a product, and the third parameter value is a time of forming a uniform resource locator of an address;
acquiring second information from a first layer of the interface of the address, and displaying information of the second layer of the interface of the address after the second information is verified to be consistent with the first information in the two-dimensional code;
when a first layer of the interface of the address does not obtain second information consistent with the first information in the two-dimensional code, the second layer is a fuzzy layer with unreadable information; when a first layer of an interface of the address obtains second information inconsistent with first information in the two-dimensional code, a third layer appears on the address, the second layer is kept as a fuzzy layer, and the third layer is used for prompting the first layer to obtain the second information inconsistent with the first information in the two-dimensional code and/or prompting to acquire the second information again.
2. The two-dimensional code based information acquisition method according to claim 1, wherein the second layer includes a plurality of time information, and the time judgment is performed before the second layer changes from the blurred layer to the display information: and if the time information falls into the association range with the first time information, the second time information and the third time information, displaying the information of the second layer, otherwise, keeping the second layer as a fuzzy layer and sending alarm information.
3. The two-dimensional code-based information acquisition method according to claim 1, wherein the second layer includes certificate information, and certificate judgment is performed before the second layer changes from a blurred layer to display information: and if the certificate information passes verification, displaying the information of the second layer, otherwise, keeping the second layer as a fuzzy layer and sending alarm information.
4. The two-dimensional code-based information acquisition method according to claim 1, wherein the two-dimensional code generation method comprises:
obtaining first information characterizing a product feature, the first information comprising numbers and letters;
respectively extracting numbers and letters in the first information, reordering the numbers in the first information to serve as first parameter values, and reordering the letters in the first information to serve as second parameter values;
forming a uniform resource locator of a corresponding address of the product based on at least the first parameter value, the second parameter value and the third parameter value; the third parameter value includes a time at which a uniform resource locator for the address is formed;
if the time interval between the first time information contained in the first parameter value and the second time information contained in the third parameter value is smaller than a first threshold value, and the time interval between the third time information for generating the two-dimensional code and the second time information contained in the third parameter value is smaller than a second threshold value, generating the two-dimensional code at a time corresponding to the third time information at least based on the uniform resource locator of the address, the first information and the third parameter value; otherwise, stopping generating the two-dimensional code.
5. The two-dimensional code based information acquisition method according to claim 4, wherein the first information includes lot information including at least a production time of a product.
6. The two-dimensional code based information acquisition method according to claim 4, wherein the third parameter value further includes a feature value associated with a reordering rule for the reordering obtaining the first numerical information and the first alphabetical information.
7. The two-dimensional code based information acquisition method according to claim 6, wherein the characteristic value and the time of forming the address uniform resource locator are subjected to encryption calculation to obtain a third parameter value.
8. An information acquisition device based on two-dimensional code, characterized by comprising:
two-dimensional code identification unit: obtaining a uniform resource locator of an address at least based on a first parameter value, a second parameter value and a third parameter value in the two-dimensional code, and jumping to the address based on the uniform resource locator of the address;
wherein the first parameter value is a number in first information representing a product feature, the second parameter value is a letter in the first information representing a product, and the third parameter value is a time of forming a uniform resource locator of an address;
display judging unit: acquiring second information from a first layer of the interface of the address, and displaying information of the second layer of the interface of the address after the second information is verified to be consistent with the first information in the two-dimensional code;
when a first layer of the interface of the address does not obtain second information consistent with the first information in the two-dimensional code, the second layer is a fuzzy layer with unreadable information; when a first layer of an interface of the address obtains second information inconsistent with first information in the two-dimensional code, a third layer appears on the address, the second layer is kept as a fuzzy layer, and the third layer is used for prompting the first layer to obtain the second information inconsistent with the first information in the two-dimensional code and/or prompting to acquire the second information again.
CN202310560155.XA 2023-05-18 2023-05-18 Two-dimensional code generation method and device Active CN116306754B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310560155.XA CN116306754B (en) 2023-05-18 2023-05-18 Two-dimensional code generation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310560155.XA CN116306754B (en) 2023-05-18 2023-05-18 Two-dimensional code generation method and device

Publications (2)

Publication Number Publication Date
CN116306754A CN116306754A (en) 2023-06-23
CN116306754B true CN116306754B (en) 2023-08-04

Family

ID=86798147

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310560155.XA Active CN116306754B (en) 2023-05-18 2023-05-18 Two-dimensional code generation method and device

Country Status (1)

Country Link
CN (1) CN116306754B (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106257521A (en) * 2016-07-23 2016-12-28 东莞市麦蔻电子科技有限公司 A kind of based on two-dimension code anti-counterfeit method for preventing goods from altering
CN106960411A (en) * 2017-03-27 2017-07-18 珠海丹德图像技术有限公司 Quick Response Code is superimposed the method and its recognition methods and identifying system of digital watermarking
CN206348843U (en) * 2016-12-09 2017-07-21 北京大码技术有限公司 Combined two-dimension code anti-fake system, reading device
CN107590667A (en) * 2017-08-28 2018-01-16 深圳市金天速科技有限公司 False proof source tracing method, system and mobile terminal based on multi-code unification
US9979725B1 (en) * 2014-04-14 2018-05-22 Symantec Corporation Two-way authentication using two-dimensional codes
CN110391914A (en) * 2019-09-18 2019-10-29 尤尼泰克(嘉兴)信息技术有限公司 A kind of file acquisition method and equipment, two-dimensional code generation method based on two dimensional code
CN111539502A (en) * 2020-03-25 2020-08-14 中国平安财产保险股份有限公司 Anti-counterfeiting two-dimensional code generation method and device, server and storage medium
CN111639734A (en) * 2020-05-21 2020-09-08 北京矩石科技有限公司 Novel QR code embedded two-dimensional code coding and anti-counterfeiting application method
WO2022143417A1 (en) * 2020-12-29 2022-07-07 华为技术有限公司 Qr code generation method and related device
CN115511030A (en) * 2022-09-30 2022-12-23 南京维沃软件技术有限公司 Anti-counterfeiting verification method and device and electronic equipment
CN115906905A (en) * 2022-09-01 2023-04-04 中国银行股份有限公司 Application method and device of two-dimensional code

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9979725B1 (en) * 2014-04-14 2018-05-22 Symantec Corporation Two-way authentication using two-dimensional codes
CN106257521A (en) * 2016-07-23 2016-12-28 东莞市麦蔻电子科技有限公司 A kind of based on two-dimension code anti-counterfeit method for preventing goods from altering
CN206348843U (en) * 2016-12-09 2017-07-21 北京大码技术有限公司 Combined two-dimension code anti-fake system, reading device
CN106960411A (en) * 2017-03-27 2017-07-18 珠海丹德图像技术有限公司 Quick Response Code is superimposed the method and its recognition methods and identifying system of digital watermarking
CN107590667A (en) * 2017-08-28 2018-01-16 深圳市金天速科技有限公司 False proof source tracing method, system and mobile terminal based on multi-code unification
CN110391914A (en) * 2019-09-18 2019-10-29 尤尼泰克(嘉兴)信息技术有限公司 A kind of file acquisition method and equipment, two-dimensional code generation method based on two dimensional code
CN111539502A (en) * 2020-03-25 2020-08-14 中国平安财产保险股份有限公司 Anti-counterfeiting two-dimensional code generation method and device, server and storage medium
CN111639734A (en) * 2020-05-21 2020-09-08 北京矩石科技有限公司 Novel QR code embedded two-dimensional code coding and anti-counterfeiting application method
WO2022143417A1 (en) * 2020-12-29 2022-07-07 华为技术有限公司 Qr code generation method and related device
CN115906905A (en) * 2022-09-01 2023-04-04 中国银行股份有限公司 Application method and device of two-dimensional code
CN115511030A (en) * 2022-09-30 2022-12-23 南京维沃软件技术有限公司 Anti-counterfeiting verification method and device and electronic equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Md. Salahuddin Ahamed ; Hossen Asiful Mustafa.A Secure QR Code System for Sharing Personal Confidential Information.《2019 International Conference on Computer, Communication, Chemical, Materials and Electronic Engineering (IC4ME2)》.2020,第1-4页. *

Also Published As

Publication number Publication date
CN116306754A (en) 2023-06-23

Similar Documents

Publication Publication Date Title
CN109598540B (en) Advertisement accurate pushing method and advertisement accurate pushing system
US11423351B2 (en) Blockchain-based food product shelf-life management
CN111414429B (en) Block chain-based commodity information management method, electronic equipment and storage medium
CN109978573B (en) Information traceability system based on block chain
US20190188732A1 (en) System and method for ensuring credibility of items in a supply chain management
US10147025B2 (en) Visual indicator status recognition
Azuara et al. Improving RFID traceability systems with verifiable quality
JP4787262B2 (en) Food tracing apparatus, food tracing system, and food tracing method
US20100076872A1 (en) Product Information Management System and Product Information Management Method
CN106447362B (en) Method and device for preventing counterfeit and shoddy commodities from entering circulation field
CN109583917A (en) A kind of two dimensional code source tracing method and system based on block chain
CN111429162A (en) Energized block chain agricultural product quality credible traceability system based on nondestructive detection technology
CN111737343B (en) Information labeling method based on block chain
US20200226741A1 (en) Image-based origin validation
US9536570B2 (en) Method and system for systematization of production-process video data
CN107977845A (en) Food traceability system and method based on label information
WO2023005309A1 (en) Blockchain-based product information processing method, and computer-readable storage medium
CN111092851A (en) Data verification method and device of Internet of things temperature detection equipment based on block chain
CN110930167A (en) Block chain-based medicine information recording method, equipment and medium
CN112288441A (en) Method, equipment and medium for tracing imported frozen meat based on block chain
CN112348535B (en) Traceability application method and system based on blockchain technology
CN116306754B (en) Two-dimensional code generation method and device
CN110069937A (en) Data source tracing method, system and device based on block chain
CN102855513A (en) Device and system thereof for generating anti-fake and quality data code
US20080162167A1 (en) Commodity logistics service system and a counterfeit-impeding method thereof

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
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: A Method and Device for Generating QR Codes

Effective date of registration: 20230908

Granted publication date: 20230804

Pledgee: Zhejiang Deqing rural commercial bank Limited by Share Ltd.

Pledgor: ZHEJIANG MEILIJIAN DAIRY CO.,LTD.

Registration number: Y2023980055818

PE01 Entry into force of the registration of the contract for pledge of patent right