WO2019127514A1 - Graphic code generation method and apparatus, graphic code verification method and apparatus, device, and storage medium - Google Patents

Graphic code generation method and apparatus, graphic code verification method and apparatus, device, and storage medium Download PDF

Info

Publication number
WO2019127514A1
WO2019127514A1 PCT/CN2017/120244 CN2017120244W WO2019127514A1 WO 2019127514 A1 WO2019127514 A1 WO 2019127514A1 CN 2017120244 W CN2017120244 W CN 2017120244W WO 2019127514 A1 WO2019127514 A1 WO 2019127514A1
Authority
WO
WIPO (PCT)
Prior art keywords
identifier
graphic code
byte
code
verified
Prior art date
Application number
PCT/CN2017/120244
Other languages
French (fr)
Chinese (zh)
Inventor
张振山
Original Assignee
国民技术股份有限公司
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 国民技术股份有限公司 filed Critical 国民技术股份有限公司
Priority to CN201780098120.1A priority Critical patent/CN112106072A/en
Priority to PCT/CN2017/120244 priority patent/WO2019127514A1/en
Publication of WO2019127514A1 publication Critical patent/WO2019127514A1/en

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
    • 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
    • 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/06046Constructional details
    • 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
    • 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
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/30Payment architectures, schemes or protocols characterised by the use of specific devices or networks
    • G06Q20/32Payment architectures, schemes or protocols characterised by the use of specific devices or networks using wireless devices
    • G06Q20/327Short range or proximity payments by means of M-devices
    • G06Q20/3276Short range or proximity payments by means of M-devices using a pictured code, e.g. barcode or QR-code, being read by the M-device
    • 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
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction

Definitions

  • the present invention relates to the field of graphic codes, and in particular, to a method and device for generating and verifying a graphic code, a device, and a storage medium.
  • the graphic code such as the two-dimensional code plays an increasingly important role in daily life, for example, the user uses the payment code/payment code for mobile payment, and the user uses the two-dimensional code for making friends.
  • the invention provides a method, a device, a device and a storage medium for generating and verifying a graphic code, so as to solve the problem that the existing two-dimensional code and the like are not easily detected by being tampered with or replaced.
  • the present invention adopts the following technical solutions:
  • a graphic code generating method includes:
  • the identifier being a bytecode that satisfies the coding requirement of the graphic code
  • the identifier is added as a check portion of the graphic code to the preset position of the main body portion to generate a graphic code.
  • obtaining the identifier verified by the uniqueness includes:
  • the identifier to be verified is an identifier that is verified by uniqueness.
  • the method further includes: adding the identifier to the identifier database.
  • adding the identifier as a verification portion of the graphic code to the preset position of the main body portion includes:
  • binding the to-be-encoded byte corresponding to the graphic code to the identifier includes:
  • a tag byte for marking the processed identifier is added to the to-be-coded byte to generate a bound byte to be encoded.
  • a graphic code verification method includes:
  • the identifier corresponding to the verification part has a legal binding relationship with the byte to be verified
  • a graphic code generating device includes:
  • An obtaining module configured to obtain an identifier verified by uniqueness, the identifier being a bytecode that satisfies a graphic code encoding requirement
  • a binding module configured to bind the to-be-encoded byte corresponding to the graphic code to the identifier
  • An encoding module configured to encode the bound byte to be encoded to generate a main body portion of the graphic code
  • a generating module configured to add the identifier as a check portion of the graphic code to a preset position of the main body portion to generate a graphic code.
  • a graphic code verification device includes:
  • a scanning module configured to scan a graphic code, and divide the graphic code into a verification part and a main part according to a preset position of the verification part;
  • a decoding module configured to decode the main body part, and obtain a corresponding to-be-executed byte
  • a verification module configured to verify whether a identifier corresponding to the verification part has a legal binding relationship with the to-be-verified byte
  • the execution module is configured to refuse to perform an operation corresponding to the to-be-executed byte if it does not exist.
  • An apparatus comprising: a processor, a memory, and a communication bus, wherein
  • the communication bus is used to implement connection communication between the processor and the memory
  • the processor is operative to execute one or more programs stored in the memory to implement the steps of the graphics code generation method provided by the present invention, or the steps of the graphics code verification method.
  • a computer readable storage medium storing one or more programs, one or more programs executable by one or more processors to implement the steps of the graphics code generation method provided by the present invention, Or the steps of the graphic code verification method.
  • the invention provides a graphic code generation and verification method and device, device and storage medium.
  • the generation method first acquires a unique identifier, binds the identifier to the byte to be encoded, and then binds according to the binding.
  • the to-be-coded byte generates a main part of the graphic code, and uses the identifier as a verification part of the graphic code to generate a complete graphic code; the generated graphic code has a verification part compared with the existing graphic code, and the merchant
  • the user can observe whether the verification part has been changed to determine whether the graphic code such as the two-dimensional code has been tampered with or replaced, which is intuitive and simple, and solves the problem that the existing two-dimensional code and the like are falsified or replaced, and the problem is enhanced.
  • User experience At the same time, based on the graphic code provided by the present invention, the user such as the buyer can also remind the terminal whether the graphic code has been tampered with or replaced after scanning the code, thereby enhancing the security of the operation such as
  • FIG. 1 is a flowchart of a method for generating a graphic code according to Embodiment 1 of the present invention
  • FIG. 2 is a schematic structural diagram of a graphic code generating apparatus according to Embodiment 1 of the present invention.
  • FIG. 3 is a flowchart of a method for verifying a graphic code according to Embodiment 2 of the present invention.
  • FIG. 4 is a schematic structural diagram of a graphic code verification apparatus according to Embodiment 2 of the present invention.
  • FIG. 5 is a flowchart of a method for processing a graphic code according to Embodiment 3 of the present invention.
  • FIG. 6 is a first schematic diagram of a graphics code according to an embodiment of the present invention.
  • FIG. 7 is a second schematic diagram of a graphics code according to an embodiment of the present invention.
  • FIG. 8 is a schematic structural diagram of a device according to an embodiment of the present invention.
  • the invention is applicable to all terminal devices, including PCs, mobile phones, PADs, deposit machines, and the like.
  • the present invention will be further described in detail below with reference to the accompanying drawings.
  • Embodiment 1 is a diagrammatic representation of Embodiment 1:
  • FIG. 1 is a flowchart of a method for generating a graphic code according to Embodiment 1 of the present invention.
  • the method for generating a graphic code provided by this embodiment includes the following steps:
  • S101 Acquire an identifier that is verified by uniqueness, and the identifier is a bytecode that satisfies the coding requirement of the graphic code.
  • the step includes: receiving an identifier to be verified; calling an identifier database; finding whether the identifier to be verified exists in the identifier database; if not, the identifier to be verified is verified by uniqueness Identifier.
  • the present invention can provide an interface interface for the user to input a personalized identifier, such as a person name, a store name, a mobile phone number, an ID card number, an organization code, etc., which satisfies the coding requirements of the graphic code such as the two-dimensional code.
  • a personalized identifier such as a person name, a store name, a mobile phone number, an ID card number, an organization code, etc.
  • Bytecode then look up in the identifier database to find out if the identifier entered by the user already exists. If it does not exist, use it as the identifier for uniqueness verification. If it already exists, remind the user to re-enter, or The graphic code bound by the identifier is displayed to the user for the user to determine whether the graphic code needs to be invalidated to reapply the graphic code.
  • the method further comprises: adding the identifier to the identifier database.
  • the step includes: processing the identifier according to a preset processing rule; inserting the processed identifier into the byte to be encoded according to the preset insertion position; adding in the byte to be encoded A tag byte used to mark the processed identifier to generate a bound byte to be encoded.
  • the preset processing rule can be selected by the user, and a general processing rule can be used, for example, directly using the identifier itself as a processed identifier, or encrypting the identifier, etc., such general processing rules do not need to be performed in the graphic code. It can also be a user-defined processing rule, such as recombining the parity of the bytecode, for example, reorganizing "00001111" according to the odd-numbered bits and then "00110011". These personalized processing rules are required. Write the graphic code for later verification.
  • the binding may be a one-to-one association or the like in the background of the device.
  • the preset insertion position may be any position, for example, at the beginning, end or middle of the byte to be encoded.
  • the tag byte can be implemented by an adjacent byte, for example, 2 bytes of R8, indicating that 8 bytes after the byte R are identifiers, which can be implemented by non-adjacent bytes, such as A and B, indicating bytes.
  • the byte between A and byte B is an identifier, which can also be implemented by a single byte, such as L, indicating that all bytes before byte L are identifiers, such as H, indicating all bytes after byte H. Is an identifier.
  • S103 Encode the bound byte to be encoded to generate a main part of the graphic code.
  • This step is a conventional encoding process for implementing text-to-graphic conversion.
  • the implementation can refer to the prior art and will not be described again.
  • the step includes: acquiring a location setting parameter; determining a preset location according to the location setting parameter; and adding the identifier to the preset location.
  • the position setting parameter can be set by the user or the system default. For example, as shown in FIG. 6, the position setting parameter is to set the four outer corners of the main part as the preset position, and the identifier “1234” is sequentially added to the second.
  • the four outer corner edges of the dimension code for example, as shown in FIG. 7, the position setting parameter is that the lower edge of the body portion is taken as the preset position, and the identifier "1234" is sequentially added to the lower edge of the two-dimensional code.
  • the graphic code generating apparatus 2 is a schematic structural diagram of a graphic code generating apparatus according to Embodiment 1 of the present invention.
  • the graphic code generating apparatus 2 provided in this embodiment includes:
  • the obtaining module 21 is configured to obtain an identifier that is verified by uniqueness, and the identifier is a bytecode that satisfies a graphic code encoding requirement;
  • the binding module 22 is configured to bind the to-be-encoded byte corresponding to the graphic code to the identifier
  • the encoding module 23 is configured to encode the bound byte to be encoded to generate a main body portion of the graphic code
  • the generating module 24 is configured to add the identifier as a check portion of the graphic code to the preset position of the main body portion to generate a graphic code.
  • the obtaining module 21 is specifically configured to receive the identifier to be verified; call the identifier database; and find whether the identifier to be verified exists in the identifier database; if not, the identifier to be verified is unique The identifier of the sexual verification; if it exists, the user is reminded to re-export the identifier to be verified until the identifier to be verified is the identifier verified by the uniqueness.
  • the acquisition module 21 is further configured to add an identifier to the identifier database after generating the graphics code.
  • the generating module 24 is specifically configured to acquire a location setting parameter, determine a preset location according to the location setting parameter, and add the identifier to the preset location.
  • the binding module 22 is specifically configured to process the identifier according to the preset processing rule; insert the processed identifier into the byte to be encoded according to the preset insertion position; A tag byte for marking the processed identifier is added to the section to generate a bound byte to be encoded.
  • the embodiment provides a method and a device for generating a graphic code.
  • the method first acquires a unique identifier, binds the identifier to the byte to be encoded, and then generates a graphic according to the bound byte to be encoded.
  • the main part of the code, and the identifier as the check part of the graphic code generates a complete graphic code; the generated graphic code has a verification part compared with the existing graphic code, and the user can observe the verification part Whether it is changed or not, to judge whether the graphic code such as the two-dimensional code has been tampered with or replaced is intuitive and simple, and solves the problem that the existing two-dimensional code and the like are falsified or replaced, and the user experience is enhanced.
  • Embodiment 2 is a diagrammatic representation of Embodiment 1:
  • FIG. 3 is a flowchart of a method for verifying a graphic code according to Embodiment 2 of the present invention.
  • the method for verifying a graphic code provided by this embodiment includes the following steps:
  • S301 Scan the graphic code, and divide the graphic code into a verification part and a main part according to the preset position of the verification part.
  • the terminal can divide the graphic code into the verification part and the main part according to the preset position of the verification part.
  • the preset position of the check portion is the outer edge of the four corners of the main body portion, and the portion of the outer edge of the four corners of the two-dimensional code is used as an identifier, that is, the identifier is "1234".
  • the rest is the main part; as shown in Fig. 7, the preset position of the check part is the lower edge of the main part, and the part of the lower edge of the two-dimensional code is used as the identifier, that is, the identifier is "1234", and the rest Part is the main part.
  • S302 Decode the main body part to obtain a corresponding to-be-executed byte.
  • This step is a decoding step, and the image-to-text conversion is implemented.
  • the implementation is referred to the prior art, and will not be described again.
  • step S303 Verify that the identifier corresponding to the verification part has a legal binding relationship with the to-be-verified byte. If yes, go to step S304. If not, go to step S305.
  • the step includes: acquiring a tag byte in the byte to be executed; determining, according to the tag byte, an identifier carried by the byte to be executed; and an identifier and a check carried than the byte to be executed Whether the corresponding identifier meets the preset condition; if yes, the identifier corresponding to the verification part has a legal binding relationship with the byte to be verified; if not, the identifier corresponding to the verification part and the byte to be verified are not There is a legal binding relationship.
  • the tag bytes have been described in the first embodiment and will not be described again.
  • the preset condition corresponds to the processing rule in the first embodiment, and may be various; for example, the processing rule directly uses the identifier itself as the processed identifier, and then the preset condition at this time is carried by the to-be-executed byte.
  • the identifier corresponding to the identifier and the verification part need to be the same. If the processing rule is to encrypt the identifier, the identifier carried by the execution byte is decrypted to obtain a decrypted identifier.
  • the identifier corresponding to the decrypted identifier needs to be the same as the identifier, and if the processing rule is to recombine the parity of the bytecode, the identifier carried by the executed byte is reversely reorganized to obtain a reverse recombination.
  • the identifier the default condition at this time, is that the identifier after the reverse reorganization needs to be the same as the identifier corresponding to the check portion.
  • S304 Perform operations corresponding to the to-be-executed byte, such as payment, payment, and adding a friend.
  • S305 Rejecting the operation corresponding to the to-be-executed byte, and reminding the user that there is a problem with the graphic code such as the two-dimensional code.
  • the graphic code verification apparatus 4 is a schematic structural diagram of a graphic code verification apparatus according to Embodiment 2 of the present invention.
  • the graphic code verification apparatus 4 provided in this embodiment includes:
  • the scanning module 41 is configured to scan the graphic code, and divide the graphic code into the verification part and the main part according to the preset position of the verification part;
  • the decoding module 42 is configured to decode the main body part to obtain a corresponding to-be-executed byte
  • the verification module 43 is configured to verify whether the identifier corresponding to the verification part has a legal binding relationship with the to-be-verified byte;
  • the execution module 44 is configured to: if yes, execute an operation corresponding to the byte to be executed, and if not, refuse to perform an operation corresponding to the byte to be executed.
  • the verification module 43 is specifically configured to acquire a tag byte in a byte to be executed; according to the tag byte, determine an identifier carried by the byte to be executed; and an identifier carried by the byte to be executed Whether the identifier corresponding to the verification part satisfies the preset condition; if yes, the identifier corresponding to the verification part has a legal binding relationship with the byte to be verified; if not, the identifier corresponding to the verification part and the word to be verified There is no legal binding relationship in the section.
  • the embodiment provides a graphic code verification method and device. Based on the graphic code provided by the present invention, after the user scans the code, the user can also remind the terminal whether the graphic code has been tampered with or replaced, and enhance the operation of the user. safety.
  • Embodiment 3 is a diagrammatic representation of Embodiment 3
  • the graphic code is taken as a two-dimensional code as an example for description.
  • QR code is maliciously altered or replaced (for example, the criminal uses the legal QR code generated by itself to replace or obscure the merchant's QR code), and it is not easy to detect, resulting in economic loss.
  • the owner has no leisure time to confirm whether each customer's payment has been paid. Even worse, if the owner does not carry the mobile device with him, it is impossible to get the customer's payment in time.
  • QRID QR ID around the QR code
  • the code identification is implemented by an identifier, and the naked eye recognition can quickly determine whether the two-dimensional code information has been tampered with, and provides a means for identifying whether the two-dimensional code is replaced or subjected to tampering. This embodiment is proposed on the basis of a very fast and effective method.
  • the database storage identifier is pre-established, and before the user applies for the two-dimensional code, an identifier (which may be a legal format of all legal two-dimensional codes, such as numbers, letters, Chinese characters, etc.) is selected, and the database is searched for whether it already exists.
  • the identifier if present, reselects the new identifier, if not present, adds the identifier to the database; then, adds the identifier of the QR code to a predetermined location of the QR code generation information, and Mark the position, generate a two-dimensional code, and print the identifier around the two-dimensional code.
  • scan the QR code scan the code together with the information identifier around the two-dimensional code.
  • After decoding, set according to advance. Good position extract the QR code identifier, compare it with the identifier around the QR code, if it is consistent, continue the next operation; otherwise, terminate the current operation and give the QR code illegal Information alert.
  • FIG. 5 is a flowchart of a graphics processing method according to Embodiment 3 of the present invention.
  • the graphics code processing method provided in this embodiment includes the following steps:
  • the user can input any identifier, which can be a number, a letter, a Chinese character, etc., all symbols satisfying the two-dimensional code encoding format, and whether the previously recorded identifier information is completely consistent with the identifier input by the user in the database; , then use it as the identifier of the QR code and store it in the database, and continue to the next step; otherwise, remind the user to re-enter.
  • any identifier can be a number, a letter, a Chinese character, etc., all symbols satisfying the two-dimensional code encoding format, and whether the previously recorded identifier information is completely consistent with the identifier input by the user in the database; , then use it as the identifier of the QR code and store it in the database, and continue to the next step; otherwise, remind the user to re-enter.
  • the location is marked by: xxxxx...AmmmB...xxxxx or AmmmB xxxxxxxxxx or xxxxxxxxxxAmmmB, etc.
  • the position of the location in the QR code generation information is not fixed, as long as it is agreed in advance.
  • the A mark starts to record the identifier information, the B mark the QRID information record is terminated, and the mmm is the specific content of the identifier.
  • This step implements the binding of the identifier to the two-dimensional code to be generated to ensure the uniqueness of each two-dimensional code.
  • Decoding the main part of the two-dimensional code and extracting the identifier of the main picture part and comparing the identifier obtained by the direct scan code according to the position mark of the identifier; if the two are consistent, the verification is passed, and the subsequent payment is continued. Wait for the steps; otherwise, terminate the current operation and give a warning that the QR code is illegal.
  • the two-dimensional code before generating the two-dimensional code, it is necessary to select an identifier QRID capable of indicating the uniqueness of the two-dimensional code, which identifier is not used previously (that is, different from other identifiers stored in the database). And, the identifier needs to be stored in the database; the identifier is added to a fixed location for generating the QR code information to generate a two-dimensional code. Adding an identifier around the generated two-dimensional code, the two-dimensional code includes surrounding identifiers, and after the scan code is decoded, the extracted identifier is verified, and if not, the two-dimensional code is illegally notified, thereby Implement the binding of the identifier to the QR code.
  • This embodiment is a great improvement on the existing two-dimensional code security authentication, but it can be quickly judged whether the two-dimensional code is maliciously altered or replaced by visual observation, which is a great improvement on the existing two-dimensional code security authentication mechanism. It can be used to effectively solve the problem that the merchant's collection QR code is maliciously tampering, replacing, etc., which is not available in other existing two-dimensional code security authentication technologies.
  • an embodiment of the present invention further provides a device, such as a terminal, a server, and the like, including: a processor 71, a memory 72, and a communication bus 73, where
  • the communication bus 73 is used to implement connection communication between the processor 71 and the memory 72;
  • the processor 71 is operative to execute one or more programs stored in the memory 72 to implement the steps of the methods provided by all embodiments of the present invention.
  • the present invention also provides a computer readable storage medium having stored one or more programs, one or more programs being executed to implement the steps of the methods provided by all embodiments of the present invention.
  • the invention provides a graphic code generation and verification method and device, device and storage medium.
  • the generation method first acquires a unique identifier, binds the identifier to the byte to be encoded, and then binds according to the binding.
  • the to-be-coded byte generates a main part of the graphic code, and uses the identifier as a verification part of the graphic code to generate a complete graphic code; the generated graphic code has a verification part compared with the existing graphic code, and the merchant
  • the user can observe whether the verification part has been changed to determine whether the graphic code such as the two-dimensional code has been tampered with or replaced, which is intuitive and simple, and solves the problem that the existing two-dimensional code and the like are falsified or replaced, and the problem is enhanced.
  • User experience At the same time, based on the graphic code provided by the present invention, the user such as the buyer can also remind the terminal whether the graphic code has been tampered with or replaced after scanning the code, thereby enhancing the security of the operation such as

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • General Business, Economics & Management (AREA)
  • Strategic Management (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Health & Medical Sciences (AREA)
  • Electromagnetism (AREA)
  • General Health & Medical Sciences (AREA)
  • Toxicology (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Computer Security & Cryptography (AREA)
  • Finance (AREA)
  • Storage Device Security (AREA)
  • Editing Of Facsimile Originals (AREA)

Abstract

A graphic code generation method and apparatus, a graphic code verification method and apparatus, a device, and a computer-readable storage medium. The generation method comprises: firstly acquiring a unique identifier (S101); binding the identifier to a byte to be encoded (S102); then generating a main body portion of a graphic code according to the bound byte to be encoded (S103); and using the identifier as a check portion of the graphic code to generate a complete graphic code (S104). Compared with existing graphic codes, the graphic code generated by means of the method has a check portion, so that a user such as a merchant can observe whether the check portion is changed so as to determine whether a graphic code such as a two-dimensional code has been tampered with or replaced. The method is intuitive and simple, and the problem of it not being easy to discover that an existing graphic code such as a two-dimensional code is tampered with or replaced is solved, and the use experience of a user is enhanced.

Description

一种图形码生成、验证方法及装置、设备、存储介质Graphic code generation and verification method and device, device and storage medium 技术领域Technical field
本发明涉及图形码领域,尤其涉及一种图形码生成、验证方法及装置、设备、存储介质。The present invention relates to the field of graphic codes, and in particular, to a method and device for generating and verifying a graphic code, a device, and a storage medium.
背景技术Background technique
二维码等图形码在日常生活中的作用越来越大,例如用户使用收款码/付款码进行移动支付,使用用户二维码进行交友等。The graphic code such as the two-dimensional code plays an increasingly important role in daily life, for example, the user uses the payment code/payment code for mobile payment, and the user uses the two-dimensional code for making friends.
伴随着二维码的重要性日益增大,其安全性越来越受到关注,现有不法分子用自己生成的合法的二维码去替换或遮掩商家的二维码的新闻也日益增多,二维码被恶意篡改或替换不容易发觉,最终造成经济损失。With the increasing importance of two-dimensional codes, their security has received more and more attention. The news that existing criminals use their own legal QR codes to replace or obscure the merchant's QR code is also increasing. The tampering or replacement of the code is not easy to detect, and ultimately causes economic losses.
技术问题technical problem
本发明提供一种图形码生成、验证方法及装置、设备、存储介质,以解决现有二维码等图形码被篡改或替换不容易发觉的问题。The invention provides a method, a device, a device and a storage medium for generating and verifying a graphic code, so as to solve the problem that the existing two-dimensional code and the like are not easily detected by being tampered with or replaced.
 
技术解决方案Technical solution
为解决上述技术问题,本发明采用以下技术方案:In order to solve the above technical problems, the present invention adopts the following technical solutions:
一种图形码生成方法,其包括:A graphic code generating method includes:
获取通过唯一性验证的标识符,标识符为满足图形码编码要求的字节码;Obtaining an identifier verified by uniqueness, the identifier being a bytecode that satisfies the coding requirement of the graphic code;
将图形码对应的待编码字节与标识符进行绑定;Binding the byte to be encoded corresponding to the graphic code to the identifier;
对绑定后的待编码字节进行编码,生成图形码的主体部分;Encoding the bound bytes to be encoded to generate a main body portion of the graphic code;
将标识符作为图形码的校验部分,添加至主体部分的预设位置,生成图形码。The identifier is added as a check portion of the graphic code to the preset position of the main body portion to generate a graphic code.
进一步地,获取通过唯一性验证的标识符包括:Further, obtaining the identifier verified by the uniqueness includes:
接收待验证标识符;Receiving an identifier to be verified;
调用标识符数据库;Call the identifier database;
查找待验证标识符是否在标识符数据库中存在;Find if the identifier to be verified exists in the identifier database;
若不存在,则待验证标识符为通过唯一性验证的标识符。If not, the identifier to be verified is an identifier that is verified by uniqueness.
进一步地,在生成图形码之后,还包括:将标识符添加至标识符数据库中。Further, after generating the graphic code, the method further includes: adding the identifier to the identifier database.
进一步地,将标识符作为图形码的校验部分,添加至主体部分的预设位置包括:Further, adding the identifier as a verification portion of the graphic code to the preset position of the main body portion includes:
获取位置设置参数;Get the location setting parameters;
根据位置设置参数,确定预设位置;Determining a preset position according to a position setting parameter;
将标识符,添加到预设位置。Add the identifier to the preset location.
进一步地,将图形码对应的待编码字节与标识符进行绑定包括:Further, binding the to-be-encoded byte corresponding to the graphic code to the identifier includes:
根据预设处理规则,对标识符处理;Handling identifiers according to preset processing rules;
根据预设插入位置,将处理后的标识符插入至待编码字节中;Inserting the processed identifier into the byte to be encoded according to the preset insertion position;
在待编码字节中添加用于标记处理后的标识符的标记字节,生成绑定后的待编码字节。A tag byte for marking the processed identifier is added to the to-be-coded byte to generate a bound byte to be encoded.
一种图形码验证方法,其包括:A graphic code verification method includes:
扫描图形码,根据校验部分的预设位置,将图形码分为校验部分和主体部分;Scanning the graphic code, and dividing the graphic code into a verification part and a main part according to the preset position of the verification part;
对主体部分进行解码,获取对应的待执行字节;Decoding the main body portion to obtain a corresponding to-be-executed byte;
验证校验部分对应的标识符与待验证字节是否存在合法的绑定关系;Verifying that the identifier corresponding to the verification part has a legal binding relationship with the byte to be verified;
若不存在,则拒绝执行待执行字节对应的操作。If it does not exist, the operation corresponding to the byte to be executed is refused.
进一步地,验证校验部分对应的标识符与待验证字节是否存在合法的绑定关系包括:Further, whether the identifier corresponding to the verification check part and the to-be-verified byte have a legal binding relationship include:
获取待执行字节中的标记字节;Get the tag byte in the byte to be executed;
根据标记字节,确定待执行字节携带的标识符;Determining an identifier carried by the byte to be executed according to the tag byte;
比对待执行字节携带的标识符与校验部分对应的标识符是否满足预设条件;Whether the identifier corresponding to the identifier carried by the execution byte and the check portion satisfies a preset condition;
若是,则校验部分对应的标识符与待验证字节存在合法的绑定关系;If yes, the identifier corresponding to the verification part has a legal binding relationship with the byte to be verified;
若否,则校验部分对应的标识符与待验证字节不存在合法的绑定关系。If not, there is no legal binding relationship between the identifier corresponding to the verification part and the byte to be verified.
一种图形码生成装置,其包括:A graphic code generating device includes:
获取模块,用于获取通过唯一性验证的标识符,标识符为满足图形码编码要求的字节码;An obtaining module, configured to obtain an identifier verified by uniqueness, the identifier being a bytecode that satisfies a graphic code encoding requirement;
绑定模块,用于将图形码对应的待编码字节与标识符进行绑定;a binding module, configured to bind the to-be-encoded byte corresponding to the graphic code to the identifier;
编码模块,用于对绑定后的待编码字节进行编码,生成图形码的主体部分;An encoding module, configured to encode the bound byte to be encoded to generate a main body portion of the graphic code;
生成模块,用于将标识符作为图形码的校验部分,添加至主体部分的预设位置,生成图形码。And a generating module, configured to add the identifier as a check portion of the graphic code to a preset position of the main body portion to generate a graphic code.
一种图形码验证装置,其包括:A graphic code verification device includes:
扫描模块,用于扫描图形码,根据校验部分的预设位置,将图形码分为校验部分和主体部分;a scanning module, configured to scan a graphic code, and divide the graphic code into a verification part and a main part according to a preset position of the verification part;
解码模块,用于对主体部分进行解码,获取对应的待执行字节;a decoding module, configured to decode the main body part, and obtain a corresponding to-be-executed byte;
验证模块,用于验证校验部分对应的标识符与待验证字节是否存在合法的绑定关系;a verification module, configured to verify whether a identifier corresponding to the verification part has a legal binding relationship with the to-be-verified byte;
执行模块,用于若不存在,则拒绝执行待执行字节对应的操作。The execution module is configured to refuse to perform an operation corresponding to the to-be-executed byte if it does not exist.
一种设备,其包括:处理器、存储器及通信总线,其中,An apparatus comprising: a processor, a memory, and a communication bus, wherein
通信总线用于实现处理器和存储器之间的连接通信;The communication bus is used to implement connection communication between the processor and the memory;
处理器用于执行存储器中存储的一个或者多个程序,以实现本发明提供的图形码生成方法的步骤,或者图形码验证方法的步骤。The processor is operative to execute one or more programs stored in the memory to implement the steps of the graphics code generation method provided by the present invention, or the steps of the graphics code verification method.
一种计算机可读存储介质,该计算机可读存储介质存储有一个或者多个程序,一个或者多个程序可被一个或者多个处理器执行,以实现本发明提供的图形码生成方法的步骤,或者图形码验证方法的步骤。A computer readable storage medium storing one or more programs, one or more programs executable by one or more processors to implement the steps of the graphics code generation method provided by the present invention, Or the steps of the graphic code verification method.
 
有益效果Beneficial effect
本发明提供了一种图形码生成、验证方法及装置、设备、存储介质,该生成方法首先获取一个具备唯一性的标识符,将标识符与待编码字节进行绑定,然后根据绑定后的待编码字节生成图形码的主体部分,并将标识符作为图形码的校验部分,生成完整的图形码;这样生成的图形码与现有图形码相比,增加了校验部分,商家等用户可以观察校验部分是否被更改,来判断二维码等图形码是否被篡改或替换,直观简单,解决了现有二维码等图形码被篡改或替换不容易发觉的问题,增强了用户的使用体验。同时,基于本发明提供的图形码,买家等用户在扫码后,也可以由终端提醒图形码是否被篡改或替换,增强用户支付等操作的安全性。The invention provides a graphic code generation and verification method and device, device and storage medium. The generation method first acquires a unique identifier, binds the identifier to the byte to be encoded, and then binds according to the binding. The to-be-coded byte generates a main part of the graphic code, and uses the identifier as a verification part of the graphic code to generate a complete graphic code; the generated graphic code has a verification part compared with the existing graphic code, and the merchant The user can observe whether the verification part has been changed to determine whether the graphic code such as the two-dimensional code has been tampered with or replaced, which is intuitive and simple, and solves the problem that the existing two-dimensional code and the like are falsified or replaced, and the problem is enhanced. User experience. At the same time, based on the graphic code provided by the present invention, the user such as the buyer can also remind the terminal whether the graphic code has been tampered with or replaced after scanning the code, thereby enhancing the security of the operation such as payment by the user.
附图说明DRAWINGS
图1为本发明实施例一提供的图形码生成方法的流程图;1 is a flowchart of a method for generating a graphic code according to Embodiment 1 of the present invention;
图2为本发明实施例一提供的图形码生成装置的结构示意图;2 is a schematic structural diagram of a graphic code generating apparatus according to Embodiment 1 of the present invention;
图3为本发明实施例二提供的图形码验证方法的流程图;3 is a flowchart of a method for verifying a graphic code according to Embodiment 2 of the present invention;
图4为本发明实施例二提供的图形码验证装置的结构示意图;4 is a schematic structural diagram of a graphic code verification apparatus according to Embodiment 2 of the present invention;
图5为本发明实施例三提供的图形码处理方法的流程图;FIG. 5 is a flowchart of a method for processing a graphic code according to Embodiment 3 of the present invention; FIG.
图6为本发明实施例提供的图形码的第一种示意图;FIG. 6 is a first schematic diagram of a graphics code according to an embodiment of the present invention;
图7为本发明实施例提供的图形码的第二种示意图;FIG. 7 is a second schematic diagram of a graphics code according to an embodiment of the present invention;
图8为本发明实施例提供的设备的结构示意图。FIG. 8 is a schematic structural diagram of a device according to an embodiment of the present invention.
本发明的最佳实施方式BEST MODE FOR CARRYING OUT THE INVENTION
本发明适用于所有的终端设备,包括PC、手机、PAD、存款机等。下面通过具体实施方式结合附图对本发明作进一步详细说明。The invention is applicable to all terminal devices, including PCs, mobile phones, PADs, deposit machines, and the like. The present invention will be further described in detail below with reference to the accompanying drawings.
实施例一:Embodiment 1:
图1为本发明实施例一提供的图形码生成方法的流程图,请参考图1,本实施例提供的图形码生成方法包括以下步骤:FIG. 1 is a flowchart of a method for generating a graphic code according to Embodiment 1 of the present invention. Referring to FIG. 1, the method for generating a graphic code provided by this embodiment includes the following steps:
S101:获取通过唯一性验证的标识符,标识符为满足图形码编码要求的字节码。S101: Acquire an identifier that is verified by uniqueness, and the identifier is a bytecode that satisfies the coding requirement of the graphic code.
在本发明一些实施例中,本步骤包括:接收待验证标识符;调用标识符数据库;查找待验证标识符是否在标识符数据库中存在;若不存在,则待验证标识符为通过唯一性验证的标识符。In some embodiments of the present invention, the step includes: receiving an identifier to be verified; calling an identifier database; finding whether the identifier to be verified exists in the identifier database; if not, the identifier to be verified is verified by uniqueness Identifier.
具体的,本发明可以向用户提供一个接口界面,供用户输入个性化的标识符,如人名、商店名称、手机号码、身份证号码、机构代码等任意的满足二维码等图形码编码要求的字节码,然后在标识符数据库进行查找,查找用户输入的标识符是否已经存在,若不存在,则将其作为通过唯一性验证的标识符,若已经存在,则提醒用户重新输入,或者将该标识符绑定的图形码展示给用户,供用户判断是否需要将这个图形码无效,以重新申请图形码。Specifically, the present invention can provide an interface interface for the user to input a personalized identifier, such as a person name, a store name, a mobile phone number, an ID card number, an organization code, etc., which satisfies the coding requirements of the graphic code such as the two-dimensional code. Bytecode, then look up in the identifier database to find out if the identifier entered by the user already exists. If it does not exist, use it as the identifier for uniqueness verification. If it already exists, remind the user to re-enter, or The graphic code bound by the identifier is displayed to the user for the user to determine whether the graphic code needs to be invalidated to reapply the graphic code.
为了保证标识符数据库的准确性,在生成图形码之后,还包括:将标识符添加至标识符数据库中。In order to ensure the accuracy of the identifier database, after generating the graphic code, the method further comprises: adding the identifier to the identifier database.
S102:将图形码对应的待编码字节与标识符进行绑定。S102: Bind the to-be-encoded byte corresponding to the graphic code to the identifier.
在本发明一些实施例中,本步骤包括:根据预设处理规则,对标识符处理;根据预设插入位置,将处理后的标识符插入至待编码字节中;在待编码字节中添加用于标记处理后的标识符的标记字节,生成绑定后的待编码字节。In some embodiments of the present invention, the step includes: processing the identifier according to a preset processing rule; inserting the processed identifier into the byte to be encoded according to the preset insertion position; adding in the byte to be encoded A tag byte used to mark the processed identifier to generate a bound byte to be encoded.
预设处理规则可以由用户选择,可以使用通用的处理规则,例如直接将标识符本身作为处理后的标识符,或者对标识符进行加密等,此类通用的处理规则不需要在图形码中进行体现;还可以是用户自定义的处理规则,例如对字节码的奇偶位进行重组等,例如将“00001111”根据先奇数位后偶数位,重组为“00110011”,这些个性化的处理规则需要写入图形码,供后期验证使用。The preset processing rule can be selected by the user, and a general processing rule can be used, for example, directly using the identifier itself as a processed identifier, or encrypting the identifier, etc., such general processing rules do not need to be performed in the graphic code. It can also be a user-defined processing rule, such as recombining the parity of the bytecode, for example, reorganizing "00001111" according to the odd-numbered bits and then "00110011". These personalized processing rules are required. Write the graphic code for later verification.
在本发明其他一些实施例中,绑定可以是在设备后台内进行一对一的关联等。预设插入位置可以是任意的位置,例如在待编码字节的开头、结尾或者中间等位置。标记字节可以由相邻字节实现,例如R8这2个字节,表示字节R之后的8个字节是标识符,可以不相邻的字节实现,例如A和B,表示字节A和字节B之间的字节是标识符,也可以由单个字节实现,例如L,表示字节L之前的所有字节是标识符,例如H,表示字节H之后的所有字节是标识符。In some other embodiments of the present invention, the binding may be a one-to-one association or the like in the background of the device. The preset insertion position may be any position, for example, at the beginning, end or middle of the byte to be encoded. The tag byte can be implemented by an adjacent byte, for example, 2 bytes of R8, indicating that 8 bytes after the byte R are identifiers, which can be implemented by non-adjacent bytes, such as A and B, indicating bytes. The byte between A and byte B is an identifier, which can also be implemented by a single byte, such as L, indicating that all bytes before byte L are identifiers, such as H, indicating all bytes after byte H. Is an identifier.
S103:对绑定后的待编码字节进行编码,生成图形码的主体部分。S103: Encode the bound byte to be encoded to generate a main part of the graphic code.
本步骤是常规的编码过程,用于实现文本到图形的转换,其实现可以参照现有技术,不再赘述。This step is a conventional encoding process for implementing text-to-graphic conversion. The implementation can refer to the prior art and will not be described again.
S104:将标识符作为图形码的校验部分,添加至主体部分的预设位置,生成图形码。S104: Add the identifier as a check portion of the graphic code to the preset position of the main body portion to generate a graphic code.
在本发明一些实施例中,本步骤包括:获取位置设置参数;根据位置设置参数,确定预设位置;将标识符,添加到预设位置。位置设置参数可以由用户设置,也可以系统默认,例如图6所示,位置设置参数为将主体部分的4个顶角外边缘作为预设位置,此时将标识符“1234”依次添加到二维码的4个顶角外边缘,例如图7所示,位置设置参数为将主体部分的下边缘作为预设位置,此时将标识符“1234”依次添加到二维码的下边缘。In some embodiments of the present invention, the step includes: acquiring a location setting parameter; determining a preset location according to the location setting parameter; and adding the identifier to the preset location. The position setting parameter can be set by the user or the system default. For example, as shown in FIG. 6, the position setting parameter is to set the four outer corners of the main part as the preset position, and the identifier “1234” is sequentially added to the second. The four outer corner edges of the dimension code, for example, as shown in FIG. 7, the position setting parameter is that the lower edge of the body portion is taken as the preset position, and the identifier "1234" is sequentially added to the lower edge of the two-dimensional code.
 
图2为本发明实施例一提供的图形码生成装置的结构示意图,请参考图2,本实施例提供的图形码生成装置2包括:2 is a schematic structural diagram of a graphic code generating apparatus according to Embodiment 1 of the present invention. Referring to FIG. 2, the graphic code generating apparatus 2 provided in this embodiment includes:
获取模块21,用于获取通过唯一性验证的标识符,标识符为满足图形码编码要求的字节码;The obtaining module 21 is configured to obtain an identifier that is verified by uniqueness, and the identifier is a bytecode that satisfies a graphic code encoding requirement;
绑定模块22,用于将图形码对应的待编码字节与标识符进行绑定;The binding module 22 is configured to bind the to-be-encoded byte corresponding to the graphic code to the identifier;
编码模块23,用于对绑定后的待编码字节进行编码,生成图形码的主体部分;The encoding module 23 is configured to encode the bound byte to be encoded to generate a main body portion of the graphic code;
生成模块24,用于将标识符作为图形码的校验部分,添加至主体部分的预设位置,生成图形码。The generating module 24 is configured to add the identifier as a check portion of the graphic code to the preset position of the main body portion to generate a graphic code.
在本发明一些实施例中,获取模块21具体用于接收待验证标识符;调用标识符数据库;查找待验证标识符是否在标识符数据库中存在;若不存在,则待验证标识符为通过唯一性验证的标识符;若存在,则提醒用户重新输出待验证标识符,直至待验证标识符为通过唯一性验证的标识符。In some embodiments of the present invention, the obtaining module 21 is specifically configured to receive the identifier to be verified; call the identifier database; and find whether the identifier to be verified exists in the identifier database; if not, the identifier to be verified is unique The identifier of the sexual verification; if it exists, the user is reminded to re-export the identifier to be verified until the identifier to be verified is the identifier verified by the uniqueness.
在本发明一些实施例中,获取模块21在生成图形码之后,还用于将标识符添加至标识符数据库中。In some embodiments of the invention, the acquisition module 21 is further configured to add an identifier to the identifier database after generating the graphics code.
在本发明一些实施例中,生成模块24具体用于获取位置设置参数;根据位置设置参数,确定预设位置;将标识符,添加到预设位置。In some embodiments of the present invention, the generating module 24 is specifically configured to acquire a location setting parameter, determine a preset location according to the location setting parameter, and add the identifier to the preset location.
在本发明一些实施例中,绑定模块22具体用于根据预设处理规则,对标识符处理;根据预设插入位置,将处理后的标识符插入至待编码字节中;在待编码字节中添加用于标记处理后的标识符的标记字节,生成绑定后的待编码字节。In some embodiments of the present invention, the binding module 22 is specifically configured to process the identifier according to the preset processing rule; insert the processed identifier into the byte to be encoded according to the preset insertion position; A tag byte for marking the processed identifier is added to the section to generate a bound byte to be encoded.
本实施例提供了一种图形码生成方法及装置,该方法首先获取一个具备唯一性的标识符,将标识符与待编码字节进行绑定,然后根据绑定后的待编码字节生成图形码的主体部分,并将标识符作为图形码的校验部分,生成完整的图形码;这样生成的图形码与现有图形码相比,增加了校验部分,商家等用户可以观察校验部分是否被更改,来判断二维码等图形码是否被篡改或替换,直观简单,解决了现有二维码等图形码被篡改或替换不容易发觉的问题,增强了用户的使用体验。The embodiment provides a method and a device for generating a graphic code. The method first acquires a unique identifier, binds the identifier to the byte to be encoded, and then generates a graphic according to the bound byte to be encoded. The main part of the code, and the identifier as the check part of the graphic code, generates a complete graphic code; the generated graphic code has a verification part compared with the existing graphic code, and the user can observe the verification part Whether it is changed or not, to judge whether the graphic code such as the two-dimensional code has been tampered with or replaced is intuitive and simple, and solves the problem that the existing two-dimensional code and the like are falsified or replaced, and the user experience is enhanced.
 
实施例二:Embodiment 2:
图3为本发明实施例二提供的图形码验证方法的流程图,请参考图3,本实施例提供的图形码验证方法包括以下步骤:FIG. 3 is a flowchart of a method for verifying a graphic code according to Embodiment 2 of the present invention. Referring to FIG. 3, the method for verifying a graphic code provided by this embodiment includes the following steps:
S301:扫描图形码,根据校验部分的预设位置,将图形码分为校验部分和主体部分。S301: Scan the graphic code, and divide the graphic code into a verification part and a main part according to the preset position of the verification part.
用户使用摄像头扫描二维码等图形码,或者识别存储在本地的图形码,然后终端根据校验部分的预设位置,即可将图形码分为校验部分和主体部分。如图6所示,校验部分的预设位置是主体部分的4个顶角外边缘,此时将二维码的4个顶角外边缘的部分作为标识符,即标识符为“1234”,其余部分为主体部分;如图7所示,校验部分的预设位置是主体部分的下边缘,此时将二维码下边缘的部分作为标识符,即标识符为“1234”,其余部分为主体部分。The user scans the graphic code such as the two-dimensional code by using the camera, or recognizes the graphic code stored locally, and then the terminal can divide the graphic code into the verification part and the main part according to the preset position of the verification part. As shown in FIG. 6, the preset position of the check portion is the outer edge of the four corners of the main body portion, and the portion of the outer edge of the four corners of the two-dimensional code is used as an identifier, that is, the identifier is "1234". The rest is the main part; as shown in Fig. 7, the preset position of the check part is the lower edge of the main part, and the part of the lower edge of the two-dimensional code is used as the identifier, that is, the identifier is "1234", and the rest Part is the main part.
S302:对主体部分进行解码,获取对应的待执行字节。S302: Decode the main body part to obtain a corresponding to-be-executed byte.
本步骤为解码步骤,实现图像到文本的转换,其实现参照现有技术即可,不再赘述。This step is a decoding step, and the image-to-text conversion is implemented. The implementation is referred to the prior art, and will not be described again.
S303:验证校验部分对应的标识符与待验证字节是否存在合法的绑定关系,若存在,则执行步骤S304,若不存在,则执行步骤S305。S303: Verify that the identifier corresponding to the verification part has a legal binding relationship with the to-be-verified byte. If yes, go to step S304. If not, go to step S305.
在本发明一些实施例中,本步骤包括:获取待执行字节中的标记字节;根据标记字节,确定待执行字节携带的标识符;比对待执行字节携带的标识符与校验部分对应的标识符是否满足预设条件;若是,则校验部分对应的标识符与待验证字节存在合法的绑定关系;若否,则校验部分对应的标识符与待验证字节不存在合法的绑定关系。In some embodiments of the present invention, the step includes: acquiring a tag byte in the byte to be executed; determining, according to the tag byte, an identifier carried by the byte to be executed; and an identifier and a check carried than the byte to be executed Whether the corresponding identifier meets the preset condition; if yes, the identifier corresponding to the verification part has a legal binding relationship with the byte to be verified; if not, the identifier corresponding to the verification part and the byte to be verified are not There is a legal binding relationship.
标记字节在实施例一中已经进行了描述,不再赘述。预设条件与实施例一中的处理规则对应,可以是多种多样的;例如处理规则是直接将标识符本身作为处理后的标识符,那么此时的预设条件就是待执行字节携带的标识符与校验部分对应的标识符需要相同,又如处理规则是对标识符进行加密,则对待执行字节携带的标识符进行解密,得到一个解密后的标识符,此时的预设条件就是解密后的标识符与校验部分对应的标识符需要相同,又如处理规则是对字节码的奇偶位进行重组,则对待执行字节携带的标识符进行逆向重组,得到一个逆向重组后的标识符,此时的预设条件就是逆向重组后的标识符与校验部分对应的标识符需要相同。The tag bytes have been described in the first embodiment and will not be described again. The preset condition corresponds to the processing rule in the first embodiment, and may be various; for example, the processing rule directly uses the identifier itself as the processed identifier, and then the preset condition at this time is carried by the to-be-executed byte. The identifier corresponding to the identifier and the verification part need to be the same. If the processing rule is to encrypt the identifier, the identifier carried by the execution byte is decrypted to obtain a decrypted identifier. That is, the identifier corresponding to the decrypted identifier needs to be the same as the identifier, and if the processing rule is to recombine the parity of the bytecode, the identifier carried by the executed byte is reversely reorganized to obtain a reverse recombination. The identifier, the default condition at this time, is that the identifier after the reverse reorganization needs to be the same as the identifier corresponding to the check portion.
S304:执行待执行字节对应的操作,例如支付、收款、加好友等操作。S304: Perform operations corresponding to the to-be-executed byte, such as payment, payment, and adding a friend.
S305:拒绝执行待执行字节对应的操作,并提醒用户二维码等图形码存在问题。S305: Rejecting the operation corresponding to the to-be-executed byte, and reminding the user that there is a problem with the graphic code such as the two-dimensional code.
 
图4为本发明实施例二提供的图形码验证装置的结构示意图,请参考图4,本实施例提供的图形码验证装置4包括:4 is a schematic structural diagram of a graphic code verification apparatus according to Embodiment 2 of the present invention. Referring to FIG. 4, the graphic code verification apparatus 4 provided in this embodiment includes:
扫描模块41,用于扫描图形码,根据校验部分的预设位置,将图形码分为校验部分和主体部分;The scanning module 41 is configured to scan the graphic code, and divide the graphic code into the verification part and the main part according to the preset position of the verification part;
解码模块42,用于对主体部分进行解码,获取对应的待执行字节;The decoding module 42 is configured to decode the main body part to obtain a corresponding to-be-executed byte;
验证模块43,用于验证校验部分对应的标识符与待验证字节是否存在合法的绑定关系;The verification module 43 is configured to verify whether the identifier corresponding to the verification part has a legal binding relationship with the to-be-verified byte;
执行模块44,用于若存在,则执行待执行字节对应的操作,若不存在,则拒绝执行待执行字节对应的操作。The execution module 44 is configured to: if yes, execute an operation corresponding to the byte to be executed, and if not, refuse to perform an operation corresponding to the byte to be executed.
在本发明一些实施例中,验证模块43具体用于获取待执行字节中的标记字节;根据标记字节,确定待执行字节携带的标识符;比对待执行字节携带的标识符与校验部分对应的标识符是否满足预设条件;若是,则校验部分对应的标识符与待验证字节存在合法的绑定关系;若否,则校验部分对应的标识符与待验证字节不存在合法的绑定关系。In some embodiments of the present invention, the verification module 43 is specifically configured to acquire a tag byte in a byte to be executed; according to the tag byte, determine an identifier carried by the byte to be executed; and an identifier carried by the byte to be executed Whether the identifier corresponding to the verification part satisfies the preset condition; if yes, the identifier corresponding to the verification part has a legal binding relationship with the byte to be verified; if not, the identifier corresponding to the verification part and the word to be verified There is no legal binding relationship in the section.
本实施例提供了一种图形码验证方法及装置,基于本发明提供的图形码,买家等用户在扫码后,也可以由终端提醒图形码是否被篡改或替换,增强用户支付等操作的安全性。The embodiment provides a graphic code verification method and device. Based on the graphic code provided by the present invention, after the user scans the code, the user can also remind the terminal whether the graphic code has been tampered with or replaced, and enhance the operation of the user. safety.
 
实施例三:Embodiment 3:
本实施例以图形码为二维码为例进行说明。In this embodiment, the graphic code is taken as a two-dimensional code as an example for description.
移动支付的方式越来越普遍,许多商家设置微信和支付宝的二维码,供消费者扫码付款。二维码被恶意篡改或替换(如不法分子用自己生成的合法的二维码去替换或遮掩商家的二维码),也不容易发觉,最终造成经济损失。(比如说商店在售货高峰期,店主没有闲暇的时间一一确认每位顾客的付款是否到账。甚至更糟糕的事情,如果店主没有随身携带移动设备,也是无法及时获得顾客的付款是否到账。这种情况下,如果商家的二维码被恶意篡改或替换,商家是不容易及时发现的,直接导致顾客扫码经过篡改或替换后的二维码,将钱付给非法分子,造成经济损失)。如果在二维码的周围增加QRID(Quick Response Code identification,二维码身份标识,在本实施例中,由标识符实现)标示,通过肉眼识别就可以快速判断二维码信息是否被篡改,为识别二维码是否被替换或遭受篡改提供了极大的快速、有效的方法,在此基础上,提出了本实施例。Mobile payment methods are becoming more and more popular. Many merchants set the QR code of WeChat and Alipay for consumers to scan the code for payment. The QR code is maliciously altered or replaced (for example, the criminal uses the legal QR code generated by itself to replace or obscure the merchant's QR code), and it is not easy to detect, resulting in economic loss. (For example, when the store is at the peak of the sales period, the owner has no leisure time to confirm whether each customer's payment has been paid. Even worse, if the owner does not carry the mobile device with him, it is impossible to get the customer's payment in time. In this case, if the merchant's QR code is maliciously altered or replaced, the merchant is not easy to find in time, directly causing the customer to scan the code after tampering or replacing the QR code, and the money is paid to the illegal molecule, resulting in Economic losses). If you add a QRID around the QR code (Quick Response The code identification, in the embodiment, is implemented by an identifier, and the naked eye recognition can quickly determine whether the two-dimensional code information has been tampered with, and provides a means for identifying whether the two-dimensional code is replaced or subjected to tampering. This embodiment is proposed on the basis of a very fast and effective method.
本实施例预先建立数据库存放标识符,在用户申请二维码之前,选择一个标识符 (可以是数字,字母,汉字等所有合法的二维码编码数据格式),并在数据库中检索是否已经存在该标识符,如果存在,重新选择新的标识符,如果不存在,将该标识符添加到数据库中;然后,将二维码的标示符添加到二维码生成信息的某个约定位置,并标记出该位置,生成二维码,并将标示符印在二维码的周围,在对二维码扫码时,连同二维码周围的信息标示符一起扫码,解码后,根据提前设置好的位置,提取出二维码标示符, 与二维码周围的标识符进行比对,如果一致,继续进行下一步的操作;否则,终止当前的操作,并给出二维码不合法的信息警示。In this embodiment, the database storage identifier is pre-established, and before the user applies for the two-dimensional code, an identifier (which may be a legal format of all legal two-dimensional codes, such as numbers, letters, Chinese characters, etc.) is selected, and the database is searched for whether it already exists. The identifier, if present, reselects the new identifier, if not present, adds the identifier to the database; then, adds the identifier of the QR code to a predetermined location of the QR code generation information, and Mark the position, generate a two-dimensional code, and print the identifier around the two-dimensional code. When scanning the QR code, scan the code together with the information identifier around the two-dimensional code. After decoding, set according to advance. Good position, extract the QR code identifier, compare it with the identifier around the QR code, if it is consistent, continue the next operation; otherwise, terminate the current operation and give the QR code illegal Information alert.
图5为本发明实施例三提供的图形处理证方法的流程图,请参考图5,本实施例提供的图形码处理方法包括以下步骤:FIG. 5 is a flowchart of a graphics processing method according to Embodiment 3 of the present invention. Referring to FIG. 5, the graphics code processing method provided in this embodiment includes the following steps:
S501:获取二维码的标识符。S501: Obtain an identifier of the two-dimensional code.
用户可以输入任意的标识符,可以是数字,字母,汉字等所有满足二维码编码格式的符号,在数据库中检索此前记录的标识符信息是否有与用户输入的标识符完全一致的;如果无,则将其作为二维码的标识符,并存入数据库,继续下一步;否则,提醒用户重新输入。The user can input any identifier, which can be a number, a letter, a Chinese character, etc., all symbols satisfying the two-dimensional code encoding format, and whether the previously recorded identifier information is completely consistent with the identifier input by the user in the database; , then use it as the identifier of the QR code and store it in the database, and continue to the next step; otherwise, remind the user to re-enter.
S502:将标识符添加到二维码消息中的约定位置,并进行标记。S502: Add an identifier to an agreed location in the QR code message and mark it.
在用以生成二维码的二维码消息中的某个约定位置增加标识符,并标记标识符的位置,位置的标记方式为:xxxxx…AmmmB…xxxxx或AmmmB xxxxxxxxxx或xxxxxxxxxxAmmmB等,即标识符的位置在二维码生成信息中的位置不固定,只要是提前约定好即可。其中A标识开始记录标识符信息,B标识QRID信息记录终止,mmm为标识符的具体内容。Adding an identifier to an agreed position in the two-dimensional code message used to generate the two-dimensional code, and marking the location of the identifier, the location is marked by: xxxxx...AmmmB...xxxxx or AmmmB xxxxxxxxxx or xxxxxxxxxxAmmmB, etc. The position of the location in the QR code generation information is not fixed, as long as it is agreed in advance. The A mark starts to record the identifier information, the B mark the QRID information record is terminated, and the mmm is the specific content of the identifier.
本步骤实现了将标识符与要生成的二维码的绑定,用来保证每个二维码的唯一性。This step implements the binding of the identifier to the two-dimensional code to be generated to ensure the uniqueness of each two-dimensional code.
S503:生成二维码。S503: Generate a two-dimensional code.
根据插入标识符之后的二维码消息,生成二维码的主体部分(即图6或图7中的图像部分),并在二维码的主体部分的周围增加标识符作为校验部分(即图6或图7中的1234字段),在扫码时,同时扫描二维码的主体部分及其周围的作为校验部分的标识符。Generating a body portion of the two-dimensional code (ie, the image portion in FIG. 6 or FIG. 7) according to the two-dimensional code message after the insertion of the identifier, and adding an identifier as a check portion around the body portion of the two-dimensional code (ie, In Fig. 6 or Fig. 7 and 1234, when scanning the code, the body portion of the two-dimensional code and its surrounding identifier as the check portion are simultaneously scanned.
S504:对二维码进行解码并验证。S504: Decode and verify the two-dimensional code.
对二维码的主体部分进行解码,根据标识符的位置标记,提取出主图部分的标识符与直接扫码获得的标识符进行比对;如果二者一致,则验证通过,继续后续的支付等步骤步骤;否则,终止当前的操作,并给出二维码不合法的警示。Decoding the main part of the two-dimensional code, and extracting the identifier of the main picture part and comparing the identifier obtained by the direct scan code according to the position mark of the identifier; if the two are consistent, the verification is passed, and the subsequent payment is continued. Wait for the steps; otherwise, terminate the current operation and give a warning that the QR code is illegal.
在本实施例中,在生成二维码之前,需要选择一个能够标示二维码唯一性的标示符QRID,该标识符是先前没有被用的(即与数据库中存储的其他的标识符都不同),而且需要将该标示符存到数据库;将该标识符添加到用以生成二维码信息的某个固定位置,生成二维码。在生成二维码的周围增加标识符,二维码包括周围的标识符,经过扫码解码后,对提取出的标识符进行校验,如果不一致,给出二维码不合法的警示,从而实现标识符与二维码的绑定。同时,可以快速识别二维码是否被替换,由于二维码与标识符的绑定和标识符的唯一性,只是通过肉眼观察标识符信息,就可以判断二维码是否被替换或篡改。In this embodiment, before generating the two-dimensional code, it is necessary to select an identifier QRID capable of indicating the uniqueness of the two-dimensional code, which identifier is not used previously (that is, different from other identifiers stored in the database). And, the identifier needs to be stored in the database; the identifier is added to a fixed location for generating the QR code information to generate a two-dimensional code. Adding an identifier around the generated two-dimensional code, the two-dimensional code includes surrounding identifiers, and after the scan code is decoded, the extracted identifier is verified, and if not, the two-dimensional code is illegally notified, thereby Implement the binding of the identifier to the QR code. At the same time, it is possible to quickly identify whether the two-dimensional code is replaced. Due to the binding of the two-dimensional code to the identifier and the uniqueness of the identifier, it is possible to judge whether the two-dimensional code is replaced or falsified by visually observing the identifier information.
本实施例是对现有二维码安全认证的极大改进,只是通过肉眼观察就可以快速判断二维码是否被恶意篡改或替换,是对现有的二维码安全认证机制的极大改进,可以用来有效解决上面所述的商家的收款二维码被恶意篡改、替换等痛点问题,这是现有其他二维码的安全认证技术所不具备的。This embodiment is a great improvement on the existing two-dimensional code security authentication, but it can be quickly judged whether the two-dimensional code is maliciously altered or replaced by visual observation, which is a great improvement on the existing two-dimensional code security authentication mechanism. It can be used to effectively solve the problem that the merchant's collection QR code is maliciously tampering, replacing, etc., which is not available in other existing two-dimensional code security authentication technologies.
 
具体的,如图7所示,本发明实施例还提供了一种设备,如终端、服务器等,其包括:处理器71、存储器72及通信总线73,其中,Specifically, as shown in FIG. 7, an embodiment of the present invention further provides a device, such as a terminal, a server, and the like, including: a processor 71, a memory 72, and a communication bus 73, where
通信总线73用于实现处理器71和存储器72之间的连接通信;The communication bus 73 is used to implement connection communication between the processor 71 and the memory 72;
处理器71用于执行存储器72中存储的一个或者多个程序,以实现本发明所有实施例所提供的方法的步骤。The processor 71 is operative to execute one or more programs stored in the memory 72 to implement the steps of the methods provided by all embodiments of the present invention.
 
本发明还提供了一种计算机可读存储介质,计算机可读存储介质存储有一个或者多个程序,一个或者多个程序被执行,以实现本发明所有实施例所提供的方法的步骤。The present invention also provides a computer readable storage medium having stored one or more programs, one or more programs being executed to implement the steps of the methods provided by all embodiments of the present invention.
 
通过以上实施例的实施可知,本发明具备以下有益效果:It can be seen from the implementation of the above embodiments that the present invention has the following beneficial effects:
本发明提供了一种图形码生成、验证方法及装置、设备、存储介质,该生成方法首先获取一个具备唯一性的标识符,将标识符与待编码字节进行绑定,然后根据绑定后的待编码字节生成图形码的主体部分,并将标识符作为图形码的校验部分,生成完整的图形码;这样生成的图形码与现有图形码相比,增加了校验部分,商家等用户可以观察校验部分是否被更改,来判断二维码等图形码是否被篡改或替换,直观简单,解决了现有二维码等图形码被篡改或替换不容易发觉的问题,增强了用户的使用体验。同时,基于本发明提供的图形码,买家等用户在扫码后,也可以由终端提醒图形码是否被篡改或替换,增强用户支付等操作的安全性。The invention provides a graphic code generation and verification method and device, device and storage medium. The generation method first acquires a unique identifier, binds the identifier to the byte to be encoded, and then binds according to the binding. The to-be-coded byte generates a main part of the graphic code, and uses the identifier as a verification part of the graphic code to generate a complete graphic code; the generated graphic code has a verification part compared with the existing graphic code, and the merchant The user can observe whether the verification part has been changed to determine whether the graphic code such as the two-dimensional code has been tampered with or replaced, which is intuitive and simple, and solves the problem that the existing two-dimensional code and the like are falsified or replaced, and the problem is enhanced. User experience. At the same time, based on the graphic code provided by the present invention, the user such as the buyer can also remind the terminal whether the graphic code has been tampered with or replaced after scanning the code, thereby enhancing the security of the operation such as payment by the user.
 
以上内容是结合具体的实施方式对本发明所作的进一步详细说明,不能认定本发明的具体实施只局限于这些说明。对于本发明所属技术领域的普通技术人员来说,在不脱离本发明构思的前提下,还可以做出若干简单推演或替换,都应当视为属于本发明的保护范围。The above is a further detailed description of the present invention in connection with the specific embodiments, and the specific embodiments of the present invention are not limited to the description. It will be apparent to those skilled in the art that the present invention may be made without departing from the spirit and scope of the invention.

Claims (11)

  1. 一种图形码生成方法,其特征在于,包括:A method for generating a graphic code, comprising:
    获取通过唯一性验证的标识符,所述标识符为满足图形码编码要求的字节码;Obtaining an identifier verified by uniqueness, the identifier being a bytecode that satisfies a graphic code encoding requirement;
    将图形码对应的待编码字节与所述标识符进行绑定;Binding the to-be-encoded byte corresponding to the graphic code to the identifier;
    对绑定后的待编码字节进行编码,生成图形码的主体部分;Encoding the bound bytes to be encoded to generate a main body portion of the graphic code;
    将所述标识符作为所述图形码的校验部分,添加至所述主体部分的预设位置,生成所述图形码。The identifier is added as a check portion of the graphic code to a preset position of the main body portion to generate the graphic code.
  2. 如权利要求1所述的图形码生成方法,其特征在于,所述获取通过唯一性验证的标识符包括:The method of generating a graphic code according to claim 1, wherein the obtaining the identifier verified by the uniqueness comprises:
    接收待验证标识符;Receiving an identifier to be verified;
    调用标识符数据库;Call the identifier database;
    查找所述待验证标识符是否在所述标识符数据库中存在;Finding whether the identifier to be verified exists in the identifier database;
    若不存在,则所述待验证标识符为通过唯一性验证的标识符。If not, the identifier to be verified is an identifier that is verified by uniqueness.
  3. 如权利要求2所述的图形码生成方法,其特征在于,在生成所述图形码之后,还包括:将所述标识符添加至所述标识符数据库中。The graphics code generating method according to claim 2, further comprising: adding the identifier to the identifier database after generating the graphics code.
  4. 如权利要求1所述的图形码生成方法,其特征在于,将所述标识符作为所述图形码的校验部分,添加至所述主体部分的预设位置包括:The method of generating a graphic code according to claim 1, wherein the adding the identifier as a verification portion of the graphic code to a preset position of the main body portion comprises:
    获取位置设置参数;Get the location setting parameters;
    根据所述位置设置参数,确定所述预设位置;Determining the preset position according to the location setting parameter;
    将所述标识符,添加到所述预设位置。Adding the identifier to the preset location.
  5. 如权利要求1至4任一项所述的图形码生成方法,其特征在于,将图形码对应的待编码字节与所述标识符进行绑定包括:The method for generating a graphic code according to any one of claims 1 to 4, wherein binding the byte to be encoded corresponding to the graphic code to the identifier comprises:
    根据预设处理规则,对所述标识符处理;Processing the identifier according to a preset processing rule;
    根据预设插入位置,将处理后的标识符插入至所述待编码字节中;Inserting the processed identifier into the byte to be encoded according to a preset insertion position;
    在所述待编码字节中添加用于标记所述处理后的标识符的标记字节,生成所述绑定后的待编码字节。Adding a tag byte for marking the processed identifier to the to-be-coded byte, and generating the bound byte to be encoded.
  6. 一种图形码验证方法,其特征在于,包括:A method for verifying a graphic code, comprising:
    扫描图形码,根据校验部分的预设位置,将所述图形码分为校验部分和主体部分;Scanning the graphic code, and dividing the graphic code into a verification part and a main part according to a preset position of the verification part;
    对所述主体部分进行解码,获取对应的待执行字节;Decoding the main body portion to obtain a corresponding to-be-executed byte;
    验证所述校验部分对应的标识符与所述待验证字节是否存在合法的绑定关系;Verifying that the identifier corresponding to the check portion has a legal binding relationship with the to-be-verified byte;
    若不存在,则拒绝执行所述待执行字节对应的操作。If not, the operation corresponding to the to-be-executed byte is refused to be performed.
  7. 如权利要求6所述的图形码验证方法,其特征在于,验证所述校验部分对应的标识符与所述待验证字节是否存在合法的绑定关系包括:The method of verifying a graphic code according to claim 6, wherein the verifying whether the identifier corresponding to the check portion and the byte to be verified have a legal binding relationship includes:
    获取所述待执行字节中的标记字节;Obtaining a tag byte in the to-be-executed byte;
    根据所述标记字节,确定所述待执行字节携带的标识符;Determining, according to the tag byte, an identifier carried by the to-be-executed byte;
    比对所述待执行字节携带的标识符与所述校验部分对应的标识符是否满足预设条件;Aligning whether an identifier carried by the to-be-executed byte and an identifier corresponding to the check portion meet a preset condition;
    若是,则所述校验部分对应的标识符与所述待验证字节存在合法的绑定关系;If yes, the identifier corresponding to the check part has a legal binding relationship with the to-be-verified byte;
    若否,则所述校验部分对应的标识符与所述待验证字节不存在合法的绑定关系。If no, the identifier corresponding to the verification part does not have a legal binding relationship with the to-be-verified byte.
  8. 一种图形码生成装置,其特征在于,包括:A graphic code generating device, comprising:
    获取模块,用于获取通过唯一性验证的标识符,所述标识符为满足图形码编码要求的字节码;An obtaining module, configured to obtain an identifier verified by uniqueness, the identifier being a bytecode that satisfies a graphic code encoding requirement;
    绑定模块,用于将图形码对应的待编码字节与所述标识符进行绑定;a binding module, configured to bind the to-be-encoded byte corresponding to the graphic code to the identifier;
    编码模块,用于对绑定后的待编码字节进行编码,生成图形码的主体部分;An encoding module, configured to encode the bound byte to be encoded to generate a main body portion of the graphic code;
    生成模块,用于将所述标识符作为所述图形码的校验部分,添加至所述主体部分的预设位置,生成所述图形码。And a generating module, configured to add the identifier as a check portion of the graphic code to a preset position of the main body portion to generate the graphic code.
  9. 一种图形码验证装置,其特征在于,包括:A graphic code verification device, comprising:
    扫描模块,用于扫描图形码,根据校验部分的预设位置,将所述图形码分为校验部分和主体部分;a scanning module, configured to scan a graphic code, and divide the graphic code into a verification part and a main part according to a preset position of the verification part;
    解码模块,用于对所述主体部分进行解码,获取对应的待执行字节;a decoding module, configured to decode the main body part, and obtain a corresponding to-be-executed byte;
    验证模块,用于验证所述校验部分对应的标识符与所述待验证字节是否存在合法的绑定关系;a verification module, configured to verify whether a identifier corresponding to the check portion has a legal binding relationship with the to-be-verified byte;
    执行模块,用于若不存在,则拒绝执行所述待执行字节对应的操作。The execution module is configured to refuse to perform the operation corresponding to the to-be-executed byte if it does not exist.
  10. 一种设备,其特征在于,包括:处理器、存储器及通信总线,其中,An apparatus, comprising: a processor, a memory, and a communication bus, wherein
    所述通信总线用于实现所述处理器和所述存储器之间的连接通信;The communication bus is configured to implement connection communication between the processor and the memory;
    所述处理器用于执行所述存储器中存储的一个或者多个程序,以实现如权利要求1至5任一项所述的图形码生成方法的步骤,或者如权利要求6或7所述的图形码验证方法的步骤。The processor is configured to execute one or more programs stored in the memory to implement the steps of the graphic code generating method according to any one of claims 1 to 5, or the graphic according to claim 6 or The steps of the code verification method.
  11. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有一个或者多个程序,所述一个或者多个程序可被一个或者多个处理器执行,以实现如权利要求1至5任一项所述的图形码生成方法的步骤,或者如权利要求6或7所述的图形码验证方法的步骤。A computer readable storage medium, wherein the computer readable storage medium stores one or more programs, the one or more programs being executable by one or more processors to implement claim 1 The steps of the method of generating a graphic code according to any one of the preceding claims, or the step of the method of verifying the graphic code according to claim 6 or 7.
PCT/CN2017/120244 2017-12-29 2017-12-29 Graphic code generation method and apparatus, graphic code verification method and apparatus, device, and storage medium WO2019127514A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201780098120.1A CN112106072A (en) 2017-12-29 2017-12-29 Graphic code generation and verification method and device, equipment and storage medium
PCT/CN2017/120244 WO2019127514A1 (en) 2017-12-29 2017-12-29 Graphic code generation method and apparatus, graphic code verification method and apparatus, device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2017/120244 WO2019127514A1 (en) 2017-12-29 2017-12-29 Graphic code generation method and apparatus, graphic code verification method and apparatus, device, and storage medium

Publications (1)

Publication Number Publication Date
WO2019127514A1 true WO2019127514A1 (en) 2019-07-04

Family

ID=67064448

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/120244 WO2019127514A1 (en) 2017-12-29 2017-12-29 Graphic code generation method and apparatus, graphic code verification method and apparatus, device, and storage medium

Country Status (2)

Country Link
CN (1) CN112106072A (en)
WO (1) WO2019127514A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116720535B (en) * 2023-04-18 2024-01-26 浙江微特码信息技术有限公司 Micro-stack code management method, system, storage medium and computer device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103593618A (en) * 2013-10-28 2014-02-19 北京实数科技有限公司 Verification method and system for adoptability of electronic data evidence
CN104392260A (en) * 2014-12-17 2015-03-04 肖学静 Two-dimensional code anti-counterfeiting method based on additional information
CN104424568A (en) * 2013-08-22 2015-03-18 成都市易恒信科技有限公司 Authentication false-proof traceability system employing circuit core chip ID number as identification
CN104751341A (en) * 2015-04-14 2015-07-01 贵州天酒酒业销售有限公司 Commodity anti-counterfeiting method based on two-dimensional code dynamic passwords
CN106650545A (en) * 2016-09-30 2017-05-10 浙江涵信科技有限公司 Anti-counterfeiting two-dimensional code tracing label and the method for generating and identifying the same

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102270294A (en) * 2011-08-12 2011-12-07 华南农业大学 Bar code and two-dimension code hybrid coding and decoding methods and devices
CN107423611B (en) * 2017-06-26 2021-04-06 口碑控股有限公司 Graphic code identification method and device and electronic equipment
CN107506817B (en) * 2017-07-13 2023-06-27 拍拍看(海南)人工智能有限公司 Commodity virtual coding method and system based on personality patterns

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104424568A (en) * 2013-08-22 2015-03-18 成都市易恒信科技有限公司 Authentication false-proof traceability system employing circuit core chip ID number as identification
CN103593618A (en) * 2013-10-28 2014-02-19 北京实数科技有限公司 Verification method and system for adoptability of electronic data evidence
CN104392260A (en) * 2014-12-17 2015-03-04 肖学静 Two-dimensional code anti-counterfeiting method based on additional information
CN104751341A (en) * 2015-04-14 2015-07-01 贵州天酒酒业销售有限公司 Commodity anti-counterfeiting method based on two-dimensional code dynamic passwords
CN106650545A (en) * 2016-09-30 2017-05-10 浙江涵信科技有限公司 Anti-counterfeiting two-dimensional code tracing label and the method for generating and identifying the same

Also Published As

Publication number Publication date
CN112106072A (en) 2020-12-18

Similar Documents

Publication Publication Date Title
US11216627B2 (en) Method and device for providing and verifying two-dimensional code
US11373265B2 (en) Digital identification document
US20190364038A1 (en) Digital Identification Document
US9306944B2 (en) Secure information handling system matrix bar code
US9070000B2 (en) Secondary information for an information handling system matrix bar code function
US10957005B2 (en) System and method for digital watermarking
TWI335546B (en)
US10249015B2 (en) System and method for digitally watermarking digital facial portraits
CN108683667B (en) Account protection method, device, system and storage medium
CN105976005A (en) Two-dimensional code encrypting method, two-dimensional code generating device and two-dimensional code scanning device
CN108256863A (en) The method of Quick Response Code generation, storage, identification and related encryption and decryption based on SE
CN105809015A (en) Electronic ticket information hiding and verifying method, device and system
EP2910042B1 (en) Secure information transfer via bar codes
KR101638787B1 (en) Mobile ticket security system and method of based location information and terminal unique number
US10460163B2 (en) System and method for digitally watermarking digital facial portraits
WO2019127514A1 (en) Graphic code generation method and apparatus, graphic code verification method and apparatus, device, and storage medium
KR102138077B1 (en) System and method for preventing forgery and alteration of documents
KR101242684B1 (en) User certification system and method for 2 dimensional barcode
CN115471860B (en) Express real name checking method, system and computer readable storage medium
WO2016188079A1 (en) Data storage method for terminal device and terminal device
US11593580B1 (en) Securing private information using two-dimensional barcodes
CN113988242A (en) Multi-region-based anti-counterfeiting code generation and verification method, system, equipment and medium
US11088824B2 (en) Method and apparatus for use in information processing
TW201222317A (en) Data processing methods and systems for processing data in an operation having a predetermined flow based on CAPTCHA (Completely Automated Public Test to tell Computers and Humans Apart) data, and computer program products thereof
Mantoro et al. Real-time printed document authentication using watermarked qr code

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17936585

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 17/11/2020)

122 Ep: pct application non-entry in european phase

Ref document number: 17936585

Country of ref document: EP

Kind code of ref document: A1