CN115293309A - Graphic code verification method and device and graphic code registration method and device - Google Patents

Graphic code verification method and device and graphic code registration method and device Download PDF

Info

Publication number
CN115293309A
CN115293309A CN202210988600.8A CN202210988600A CN115293309A CN 115293309 A CN115293309 A CN 115293309A CN 202210988600 A CN202210988600 A CN 202210988600A CN 115293309 A CN115293309 A CN 115293309A
Authority
CN
China
Prior art keywords
graphic code
code
image
data
graphic
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.)
Granted
Application number
CN202210988600.8A
Other languages
Chinese (zh)
Other versions
CN115293309B (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.)
Ant Blockchain Technology Shanghai Co Ltd
Original Assignee
Ant Blockchain Technology Shanghai Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ant Blockchain Technology Shanghai Co Ltd filed Critical Ant Blockchain Technology Shanghai Co Ltd
Priority to CN202210988600.8A priority Critical patent/CN115293309B/en
Publication of CN115293309A publication Critical patent/CN115293309A/en
Application granted granted Critical
Publication of CN115293309B publication Critical patent/CN115293309B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K17/00Methods or arrangements for effecting co-operative working between equipments covered by two or more of main groups G06K1/00 - G06K15/00, e.g. automatic card files incorporating conveying and reading operations
    • G06K17/0022Methods or arrangements for effecting co-operative working between equipments covered by two or more of main groups G06K1/00 - G06K15/00, e.g. automatic card files incorporating conveying and reading operations arrangements or provisious for transferring data to distant stations, e.g. from a sensing device
    • G06K17/0025Methods or arrangements for effecting co-operative working between equipments covered by two or more of main groups G06K1/00 - G06K15/00, e.g. automatic card files incorporating conveying and reading operations arrangements or provisious for transferring data to distant stations, e.g. from a sensing device the arrangement consisting of a wireless interrogation device in combination with a device for optically marking the record carrier
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • 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

Abstract

The disclosure discloses a graphic code verification method and device and a graphic code registration method and device, and aims to solve the problem of low graphic code verification efficiency. Specifically, the graphic code verification method applied to the equipment side comprises the following steps: acquiring image coding data of a first graphic code stored in a cloud end, and acquiring a second graphic code to be verified; analyzing the second graphic code to determine graphic code content data of the second graphic code; and calculating the image coded data of the second graphic code based on the graphic code content data of the second graphic code according to the calculation mode of the image coded data of the first graphic code, and verifying whether the second graphic code is consistent with the first graphic code based on the image coded data of the first graphic code and the image coded data of the second graphic code. The method and the device can directly verify whether the second graphic code is consistent with the first graphic code or not at the equipment end in advance, shorten the time for a user to wait for verification and improve the sensitivity of user experience.

Description

Graphic code verification method and device and graphic code registration method and device
Technical Field
The disclosure relates to the technical field of data processing, in particular to a graphic code verification method and device and a graphic code registration method and device.
Background
With the rapid development of information technology and the popularization of graphic code technology, graphic codes such as two-dimensional codes and bar codes are more and more widely applied. A product manufacturer often attaches a graphic code to a produced product so that a user can verify whether the product is a regular product through the graphic code. The end cloud collaborative verification is a graphic code verification method with high security.
However, the verification time required by the current end cloud collaborative verification is long, the verification efficiency is low, so that the user waiting time is long, and the user experience is poor.
Disclosure of Invention
In view of this, the present disclosure provides a graphic code verification method and apparatus, and a graphic code registration method and apparatus, so as to solve the problem of low graphic code verification efficiency.
In a first aspect, a graphic code verification method is provided, which is applied to a device side, and includes: acquiring image coding data of a first graphic code stored at a cloud; acquiring a second graphic code to be verified; analyzing the second graphic code to determine graphic code content data of the second graphic code; calculating the image coded data of the second graphic code based on the graphic code content data of the second graphic code according to the calculation mode of the image coded data of the first graphic code; and verifying whether the second graphic code is consistent with the first graphic code or not based on the image coded data of the first graphic code and the image coded data of the second graphic code.
In a second aspect, a graphic code verification method is provided, which is applied to a cloud, and the graphic code verification method includes: under the condition that the equipment end verifies that the second graphic code is consistent with the first graphic code, receiving the second graphic code sent by the equipment end, wherein the equipment end verifies whether the second graphic code is consistent with the first graphic code based on the method mentioned in the first aspect; and verifying whether the second graphic code is consistent with the first graphic code again.
In a third aspect, a graphic code registration method is provided, which is applied to a cloud, and the graphic code registration method includes: determining image coding data of a first graphic code based on graphic code content data of the first graphic code; and storing the first graphic code and the image coding data of the first graphic code so that the equipment side can verify whether the second graphic code is consistent with the first graphic code based on the method mentioned in the first aspect.
In a fourth aspect, a graphic code verification apparatus is provided, which is applied to an equipment side, and includes: the first acquisition module is configured to acquire image coding data of a first graphic code stored in the cloud; the second acquisition module is configured to acquire a second graphic code to be verified; the analysis module is configured to analyze the second graphic code and determine graphic code content data of the second graphic code; the computing module is configured to compute the image coded data of the second graphic code based on the graphic code content data of the second graphic code according to the computing mode of the image coded data of the first graphic code; and the verification module is configured to verify whether the second graphic code is consistent with the first graphic code or not based on the image coded data of the first graphic code and the image coded data of the second graphic code.
In a fifth aspect, a graphic code verification apparatus is provided, which is applied to a cloud, and includes: the receiving module is configured to receive the second graphic code sent by the equipment terminal under the condition that the equipment terminal verifies that the second graphic code is consistent with the first graphic code, wherein the equipment terminal verifies whether the second graphic code is consistent with the first graphic code based on the method mentioned in the first aspect; and the rechecking module is configured to recheck whether the second graphic code is consistent with the first graphic code.
The graphic code registration device comprises a determining module, a storage module and a display module, wherein the determining module is configured to determine image coding data of a first graphic code based on graphic code content data of the first graphic code; and the storage module is configured to store the first graphic code and the image coding data of the first graphic code, so that the equipment side verifies whether the second graphic code is consistent with the first graphic code based on the method mentioned in the first aspect.
In a seventh aspect, a computer-readable storage medium is provided, which stores instructions that, when executed, can implement the methods mentioned in the first, second and third aspects.
In an eighth aspect, there is provided a computer program product comprising instructions that, when executed, are capable of implementing the methods mentioned in the first, second and third aspects above.
In a ninth aspect, an electronic device is provided, which includes a memory and a processor, wherein the memory stores executable codes, and the processor is configured to execute the executable codes so as to implement the methods mentioned in the first, second and third aspects.
The method and the device can directly verify whether the second graphic code is consistent with the first graphic code at the device side under the condition that the second graphic code is not sent to the cloud. However, in the related art, the device side must send the second graphic code to the cloud side to verify whether the second graphic code is consistent with the first graphic code, so that the time for transmitting the second graphic code to the cloud side is saved, the verification efficiency is improved, the time for the user to wait for verification is reduced, and the user experience is improved.
In addition, the second graphic code acquired by the device side may be a graphic code with lower definition, and it is difficult to verify whether the second graphic code is consistent with the first graphic code based on the image encoding data of the second graphic code with lower definition. Therefore, in the second graphic code verification process, if it cannot be verified whether the second graphic code is consistent with the first graphic code, it is indicated that the acquired second graphic code may be low in definition and needs to be acquired again. Under the condition that the definition of the acquired second graphic code is low, the equipment end only needs to acquire the second graphic code again and verify the second graphic code at the equipment end again, and in the related technology, the equipment end acquires the second graphic code again every time and needs to send the acquired second graphic code to the cloud end for verification. It can be seen that the present disclosure can significantly improve the verification efficiency.
Drawings
Fig. 1 is a schematic view of an application scenario of a graphic code verification method according to an embodiment of the present disclosure.
Fig. 2 is a schematic view of an application scenario of a graphic code verification method according to another embodiment of the disclosure.
Fig. 3 is a schematic view of an application scenario of the graphic code registration method according to an embodiment of the present disclosure.
Fig. 4 is a schematic flow chart of a graphic code verification method according to an embodiment of the present disclosure.
Fig. 5a is a graphic code with an ink anti-counterfeiting means attached along a sawtooth according to an embodiment of the present disclosure.
Fig. 5b is a graphic code with an ink anti-counterfeiting means attached along a sawtooth according to another embodiment of the disclosure.
Fig. 6 is a schematic flow chart of a graphic code verification method according to another embodiment of the present disclosure.
Fig. 7 is a schematic flow chart of a graphic code verification method according to another embodiment of the present disclosure.
Fig. 8 is a schematic flow chart of a graphic code verification method according to another embodiment of the present disclosure.
Fig. 9 is a schematic flow chart of a graphic code verification method according to another embodiment of the present disclosure.
Fig. 10 is a schematic flow chart of a graphic code verification method according to another embodiment of the present disclosure.
Fig. 11 is a schematic flowchart illustrating a graphic code registration method according to an embodiment of the disclosure.
Fig. 12 is a schematic structural diagram of a graphic code verification apparatus according to an embodiment of the present disclosure.
Fig. 13 is a schematic structural diagram of a graphic code verification apparatus according to another embodiment of the present disclosure.
Fig. 14 is a schematic structural diagram of a graphic code registration apparatus according to an embodiment of the present disclosure.
Fig. 15 is a schematic structural diagram of an electronic device according to an embodiment of the disclosure.
Detailed Description
The technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the drawings in the embodiments of the present disclosure, and it is obvious that the described embodiments are only a part of the embodiments of the present disclosure, and not all of the embodiments.
With the rapid development of information technology and the popularization of graphic code technology, graphic codes such as bar codes and two-dimensional codes are more and more widely applied. A product manufacturer often attaches a graphic code to a produced product so that a user can verify whether the product is a regular product through the graphic code.
The end cloud collaborative verification is a graphic code verification method with high security. In general, in the process of generating the graphic code, the terminal cloud collaborative verification needs to acquire an image or a video of the graphic code and then pre-store the image or the video of the graphic code in a cloud terminal. Then, in the graphic code verification stage, the equipment terminal collects the image of the graphic code and sends the collected image to the cloud terminal, and the cloud terminal compares the pre-stored graphic code with the received graphic code sent by the equipment terminal, so that the authenticity of the graphic code collected by the equipment terminal is verified, and a verification result is sent to the equipment terminal. Therefore, in the related art, the equipment end needs to send the graphic code to the cloud end, the cloud end verifies the graphic code to obtain the verification result, and in addition, the cloud end needs to send the verification result to the equipment end. Therefore, the waiting time for user authentication at the device side may be long, and the user experience may be poor.
In contrast, the graphic code verification method provided by the embodiment of the disclosure can directly verify whether the second graphic code is consistent with the first graphic code at the device side in advance, so that the time for a user to wait for verification is shortened, and the user experience quality is improved. Particularly, compared with a scheme that the second graphic code to be verified is sent to the cloud for verification, the time for transmitting the second graphic code to the cloud is saved, and the verification efficiency is improved.
The following description of the application scenarios is made with reference to fig. 1 to 3.
Fig. 1 is a schematic view of an application scenario of a graphic code verification method according to an embodiment of the present disclosure. As shown in fig. 1, the application scenario mentioned in this embodiment is a verification scenario of a graphic code, and the verification scenario includes a cloud terminal 110 and a device terminal 120 communicatively connected to the cloud terminal 110. The device end 120 is configured to obtain image coding data of the first graphic code stored in the cloud end 110, obtain a second graphic code to be verified, analyze the second graphic code, and determine graphic code content data of the second graphic code; and then calculating the image coding data of the second graphic code based on the graphic code content data of the second graphic code according to the calculation mode of the image coding data of the first graphic code, and verifying whether the second graphic code is consistent with the first graphic code based on the image coding data of the first graphic code and the image coding data of the second graphic code.
Illustratively, the device side 120 may be a user terminal such as a mobile phone, a tablet computer, and a notebook computer of the user. The user can be a user with a graphic code verification requirement, such as a purchaser of a product attached with a graphic code. The cloud 110 may be one or more servers, or may also be a virtual computer or a cloud platform, which is not specifically limited in this disclosure.
To further enhance the accuracy of the verification, the application scenario shown in fig. 2 is extended from the application scenario shown in fig. 1. As shown in fig. 2, the application scenario mentioned in the present embodiment is also a verification scenario of a graphic code, and the verification scenario includes a cloud 210 and a device 220 communicatively connected to the cloud 210. One difference between the embodiment shown in fig. 2 and the embodiment shown in fig. 1 is that the device side 220 sends the second graphic code to the cloud end 210 when determining that the second graphic code is consistent with the first graphic code. The cloud 210 receives the second graphic code sent by the device 220, re-verifies whether the second graphic code is consistent with the first graphic code, and sends a re-verification result to the device 220.
The verification scenario of the graphic code is described above with reference to fig. 1 and fig. 2, and the cloud registration scenario of the graphic code is described below with reference to fig. 3. It can be understood that the graphic code can be subjected to subsequent device side verification and secondary cloud side verification after being registered in the cloud side.
Fig. 3 is a schematic view of an application scenario of the graphic code registration method according to an embodiment of the present disclosure. As shown in fig. 3, the application scenario mentioned in this embodiment is a registration scenario of a graphic code, and the registration scenario includes a cloud end 310 and a device end 320 communicatively connected to the cloud end 310. In an actual application process, the cloud 310 determines image encoding data of the first graphic code based on the graphic code content data of the first graphic code, and stores the first graphic code and the image encoding data of the first graphic code, so that the device 320 calls relevant information (such as the image encoding data of the first graphic code) of the first graphic code, thereby verifying whether the second graphic code is consistent with the first graphic code.
Illustratively, after a graphic code manufacturer produces a graphic code, the graphic code manufacturer performs image acquisition on the graphic code to obtain an electronic first graphic code, then determines image encoding data of the first graphic code based on graphic code content data of the first graphic code, and stores the first graphic code and the image encoding data of the first graphic code in a cloud. After the graphic code manufacturer sells the graphic code to the product manufacturer, the product manufacturer attaches (or prints) the graphic code on the product to play a role in product anti-counterfeiting. After a consumer purchases a product, the graphic code on the product is scanned through a mobile phone or a tablet and other devices to obtain an electronic second graphic code, the second graphic code is analyzed to determine graphic code content data of the second graphic code, then the mobile phone or the tablet and other devices obtain image encoding data of the first graphic code, the image encoding data of the second graphic code is calculated based on the graphic code content data of the second graphic code according to the calculation mode of the image encoding data of the first graphic code, and finally whether the second graphic code is consistent with the first graphic code is verified based on the image encoding data of the first graphic code and the image encoding data of the second graphic code.
The graphic code verification method is illustrated below with reference to fig. 4.
Fig. 4 is a schematic flow chart of a graphic code verification method according to an embodiment of the present disclosure. Specifically, the present embodiment can be executed in the device side. As shown in fig. 4, the graphic code verification method provided in this embodiment includes the following steps.
Step S410, acquiring image encoding data of the first graphic code stored in the cloud.
The first graphic code is acquired by an image acquisition device at the cloud end. The image coded data of the first graphic code is data obtained by coding the image characteristics of the first graphic code. The first graphic codes correspond to the image coded data one by one, namely each first graphic code has unique image coded data. Illustratively, the image encoding data of the first graphic code may be a character string.
In some embodiments, obtaining the image encoding data of the first graphic code may specifically be performed as: the device side sends a request for obtaining the image coding data of the first graphic code to the cloud side and receives the image coding data of the first graphic code sent by the cloud side. By the arrangement, the image coding data of the first graphic code can be accurately acquired, and whether the second graphic code is consistent with the first graphic code or not can be conveniently determined and verified subsequently.
Illustratively, the first graphic code may be any type of graphic code, such as a bar code, a two-dimensional code, etc., and the first graphic code may also be a graphic code with any anti-counterfeiting means added thereto, such as a watermark feature anti-counterfeiting means, an ink edge sawtooth anti-counterfeiting means, etc. Taking the anti-counterfeiting means of ink along the saw teeth as an example, because the physical phenomenon that the ink and the paper are impregnated exists in the printing process, the same graphic code cannot completely reproduce the same saw-teeth shape even if the graphic code is printed again. Fig. 5a and 5b show the graphic code with the ink attached along the sawtooth anti-counterfeiting means, and it can be seen that the black edge profiles shown in fig. 5a and 5b are not completely consistent, so that the profile edge can be used as a unique certificate of the graphic code.
In step S420, a second graphic code to be verified is obtained.
The second graphic code is a graphic code acquired by an image acquisition device at the equipment end. Specifically, the first graphic code and the second graphic code may be: and the image acquisition device at the cloud end and the image acquisition device at the equipment end respectively acquire the electronic graphic codes aiming at the graphic codes of the same real object. The graphic code of the real object can be a printed graphic code. Illustratively, after the graphic code of the real object is produced, the graphic code is shot into an electronic graphic code by an image acquisition device at the cloud end and is stored at the cloud end, and the electronic graphic code stored at the cloud end is the first graphic code. The graphic code of the object is attached to the product after being produced, and is shot into an electronic graphic code by an image acquisition device at the equipment end, wherein the electronic graphic code is a second graphic code which needs to be verified.
Step S430, parsing the second graphic code to determine the graphic code content data of the second graphic code.
And analyzing the second graphic code, namely analyzing the second graphic code according to a preset decoding mode. The preset decoding mode is a decoding mode corresponding to an encoding mode of the graphic code content data of the second graphic code. That is, the encoding mode and the decoding mode of the second graphic code are preset reciprocal modes.
The graphic code content data of the second graphic code is the data of the specific content represented by the second graphic code. For example, the content data of the graphic code may be "12345678", the content data of the graphic code "12345678" may be utilized to generate the second graphic code in an encoding manner, and the content data of the graphic code "12345678" may be obtained by scanning or recognizing the second graphic code (i.e., analyzing the second graphic code).
In some embodiments, before parsing the second graphic code and determining the graphic code content data of the second graphic code, the second graphic code may be further preprocessed to improve the accuracy of the second graphic code. The preprocessing may be a process such as a graphic enhancement, an image alignment, etc., and the present disclosure is not particularly limited. In practical application, the second graphic code acquired by the image acquisition device at the equipment end may be an image with various angles and various degrees of definition, so that the definition of the second graphic code can be improved and the angle of the second graphic code can be corrected through preprocessing such as image enhancement and image alignment, thereby improving the accuracy of the second graphic code.
Step S440, calculating the image coded data of the second graphic code based on the graphic code content data of the second graphic code according to the calculation mode of the image coded data of the first graphic code.
Calculating the image coded data of the second graphic code based on the graphic code content data of the second graphic code according to the calculation mode of the image coded data of the first graphic code, and the following steps can be executed: the method comprises the steps that a calculation mode of image coding data of a first graphic code is preset at an equipment end, and after the equipment end obtains graphic code content data of a second graphic code, the image coding data of the second graphic code is calculated based on the graphic code content data of the second graphic code by using the calculation mode of the preset image coding data of the first graphic code. Illustratively, the image encoding data of the first graphic code may be: and encoding the first graphic code by using a fuzzy extraction algorithm to obtain image encoded data. The image encoding data of the second graphic code may be: and coding the second graphic code by using a fuzzy extraction algorithm to obtain image coded data.
Step S450, based on the image coding data of the first graphic code and the image coding data of the second graphic code, verifying whether the second graphic code is consistent with the first graphic code.
Illustratively, the image encoding data of the first graphic code may be image encoding data of a partial image of the first graphic code. The image coded data of the partial image of the first graphic code may be a character string corresponding to a feature vector of the partial image of the first graphic code determined by using a fuzzy extraction algorithm. For example, the size of the first graphic code is 2048 × 2048, and the size of the partial image of the first graphic code is 128 × 128, that is, the partial image is a partial image region of the first graphic code. Accordingly, the image encoding data of the second graphic code may be image encoding data of a partial image of the second graphic code. The image encoding data of the partial image of the second graphic code may be a character string corresponding to a feature vector of the partial image of the second graphic code determined by using a fuzzy extraction algorithm.
Because the image coding data of the second graphic code is obtained according to the image coding data calculation mode of the first graphic code, the partial image of the second graphic code and the partial image of the first graphic code belong to the same image area. For example, if the first graphic code is divided into 256 image areas, the second graphic code is also divided into 256 image areas, and if the partial image of the first graphic code is the 8 th image area of the 256 image areas, the partial image of the second graphic code is also the 8 th image area of the 256 image areas.
Whether the second graphic code is consistent with the first graphic code or not can be verified by comparing the image coding data of the second graphic code with the image coding data of the first graphic code. That is, whether the character string corresponding to the feature vector of the partial image of the second graphic code is consistent with the character string corresponding to the feature vector of the partial image of the first graphic code may be determined by comparing the character string corresponding to the feature vector of the partial image of the second graphic code with the character string corresponding to the feature vector of the partial image of the first graphic code, thereby verifying whether the second graphic code is consistent with the first graphic code.
Exemplarily, if the verification result is that the second graphic code is inconsistent with the first graphic code, it may be determined that the second graphic code is false, so as to determine that the product corresponding to the second graphic code is a counterfeit product. In practical application, if the second graphic code is inconsistent with the first graphic code, a counterfeit product prompt can be sent to a manufacturer of a product corresponding to the first graphic code, so that the manufacturer of the product can carry out subsequent investigation.
In some embodiments, if the verification result is that the second graphic code is consistent with the first graphic code, it may be determined that the second graphic code is true, so as to determine that a product corresponding to the second graphic code is a regular product. In other embodiments, if the verification result is that the second graphic code is consistent with the first graphic code, the second graphic code is sent to the cloud end, so that the cloud end can verify whether the second graphic code is consistent with the first graphic code again, and the accuracy of graphic code verification is further improved.
According to the embodiment of the disclosure, whether the second graphic code is consistent with the first graphic code or not can be verified at the equipment side under the condition that the second graphic code is not sent to the cloud side, and in the related technology, the equipment side needs to send the second graphic code to the cloud side to verify whether the second graphic code is consistent with the first graphic code or not, so that the time for transmitting the second graphic code to the cloud side is reduced, the efficiency for verifying the second graphic code is improved, the time for a user to wait for verification is reduced, and the user experience is improved.
In addition, the second graphic code acquired by the device side may be a graphic code with lower definition, and it is difficult to verify whether the second graphic code is consistent with the first graphic code based on the image encoding data of the second graphic code with lower definition, so in the second graphic code verification process, if it is impossible to verify whether the second graphic code is consistent with the first graphic code, it is indicated that the acquired second graphic code may be lower definition and needs to be acquired again. Under the condition that the acquired second graphic code is low in definition, the device end of the embodiment of the disclosure only needs to acquire the second graphic code again and verify the second graphic code again at the device end, and in the related technology, the device end needs to send the acquired second graphic code to the cloud end every time the device end acquires the second graphic code again. Therefore, the graphic code verification method effectively reduces the times of transmitting the second graphic code to the cloud, and improves the efficiency of verifying the second graphic code.
In order to clarify the specific determination manner of the verification data corresponding to the graphic code, the following example is performed with reference to fig. 6.
Fig. 6 is a schematic flow chart of a graphic code verification method according to another embodiment of the present disclosure. As shown in fig. 6, in the embodiment of the present disclosure, the step of calculating the image encoding data of the second graphic code based on the graphic code content data of the second graphic code includes the following steps.
Step S610, determining local image feature data of the second graphic code based on the graphic code content data of the second graphic code.
Determining local image feature data of the second graphic code based on the graphic code content data of the second graphic code, which may be implemented as: and selecting a local image of the second graphic code according to the graphic code content data of the second graphic code, and then extracting the local image feature data of the local image. The local image feature data may be a feature matrix, a feature vector, or the like.
And S620, coding the local image characteristic data to obtain image coding data of a second graphic code.
Compared with the method for coding the feature data of the whole image of the second graphic code, the method for coding the feature data of the local image obtains the image coding data of the second graphic code, reduces the calculation amount and further improves the efficiency of verifying the second graphic code.
In some embodiments, the global image feature data of the second graphic code may also be determined, and then the image encoding data of the second graphic code is obtained based on the global image feature data of the second graphic code and the graphic code content data of the second graphic code. Specifically, determining the global image feature data of the second graphic code may be performed as: and carrying out image information quantity calculation, gray median calculation, gray variance calculation and the like on the second graphic code to obtain global image characteristic data of the second graphic code. The obtaining of the image encoding data of the second graphic code based on the global image feature data of the second graphic code and the graphic code content data of the second graphic code may be: and performing operation in a preset mode on the global image characteristic data and the graphic code content data to obtain image coding data of a second graphic code. The preset operation may be various function operations, and the disclosure is not particularly limited.
The specific determination manner of the local image feature data of the second graphic code is described in detail below with reference to fig. 7.
Fig. 7 is a schematic flow chart of a graphic code verification method according to another embodiment of the present disclosure. As shown in fig. 7, in the embodiment of the present disclosure, the step of determining the local image feature data of the second graphic code based on the graphic code content data of the second graphic code includes the following steps.
In step S710, a functional relation for determining a local image area is obtained.
Specifically, the functional relation may be a preset relation, for example, y = ax 5 +bx 4 +cx 3 +dx 2 + ex + f. The functional relation may also be other relations, and the disclosure is not particularly limited.
In some embodiments, the functional relationship may be a one-way functional relationship. A one-way function is a function with one-way (also called irreversibility), i.e. for a one-way function y = f (x), y can be easily calculated if x is known, but it is difficult to calculate x = f given y -1 (y) is carried out. Therefore, by determining the functional relation as a one-way functional relation, the local image feature data (i.e., y of the one-way function) can be easily calculated according to x of the one-way function during the registration of the first graphic code. However, in the second graphic code verification process, it is notThe legal personnel can hardly calculate the x of the one-way function according to the local image characteristic data (namely, the y of the one-way function), and the safety of the second graphic code is further improved.
In some embodiments, the one-way functional relationship may be a one-way trapdoor functional relationship. It is understood that a one-way trapdoor function refers to a one-way trapdoor function having a trapdoor. The one-way trapdoor function relation contains two distinct features: one is unidirectional and the other is the presence of trapdoors. The unidirectionality is the same as that of the above-mentioned unidirectional functional relation, and is not described herein again. For a trapdoor (also called back door), for a one-way trapdoor function y = f (x), in the case of a known trapdoor, if y is known at the same time, x = f-1 (y) can be easily calculated. Therefore, the unidirectional functional relation is further set as the unidirectional trapdoor function, so that the probability of the second graphic code being cracked can be further reduced, the complexity of the functional relation is further improved, and the safety of the second graphic code is further improved.
Step S720, performing Hash (Hash) on the graphic code content data to obtain a function parameter of the functional relation.
In particular, hashing is the conversion of an arbitrary length input to a fixed length output by a hashing algorithm. The Hash can be realized by methods such as MD5, SHA1, SHA256 and SHA 256.
Illustratively, the graphical code content data is taken as the input to the hashing, and the output of the hashing is taken as the functional parameter of the functional relation.
Step S730, determining local image feature data based on the functional relation and the functional parameter.
Illustratively, the functional relationship is: y = ax 5 +bx 4 +cx 3 +dx 2 And the specific values of the function parameters a, b, c, d, e and f are substituted into the functional relation expression to obtain the functional relation corresponding to the graphic code content data. For example, a =1,b =3,c =2,d =6,e =9,f =3, and the function relation obtained by substituting the above function relation into the graphic code content data is: y = x 5 +3x 4 +2x 3 +6x 2 +9x+3。
Illustratively, x in the functional relationship corresponding to the graphic code content data may be a fixed value, for example, "0x32a1b3". X in the functional relationship corresponding to the graphic code content data may also be another fixed value, and the disclosure is not particularly limited.
Hash has unidirectionality. In other words, given that data of an arbitrary length (for example, graphic code content data) is obtained, unique data of a fixed length (for example, function parameters) can be easily obtained by hashing. However, given fixed-length data (e.g., function parameters), it is difficult to obtain data of an arbitrary length (e.g., graphic code content data) by inverse operation of Hash. Therefore, the graphic code content data is Hash-processed to obtain the function parameter of the functional relation, and the function parameter of the functional relation can be easily obtained in the first graphic code registration process. However, in the verification process of the graphic code, an illegal person cannot deduce the function parameter of the functional relation formula through Hash inverse operation, and the safety of the second graphic code is further improved.
The Hash time complexity is low, so that the graph code content data is Hash processed to obtain the function parameter of the function relation, and the calculation efficiency is further improved.
The specific determination manner of the local image feature data is further described below with reference to fig. 8.
Fig. 8 is a schematic flow chart of a graphic code verification method according to another embodiment of the present disclosure. As shown in fig. 8, in the embodiment of the present disclosure, the step of determining the local image feature data includes the following steps.
Step S810, obtaining an argument of the functional relation.
Exemplarily, y = f (x) for the functional relation, where x is an independent variable of the functional relation and y is a dependent variable of the functional relation. The argument of the functional relational expression may be preset data, for example, "0x32a1b3".
In step S820, the local image area number is determined based on the argument, the functional relation, and the functional parameter.
Illustratively, dependent variables of the functional relation may be calculated based on the independent variables, the functional relation and the functional parameters. Then, a remainder operation may be performed on the dependent variable of the functional relation, and the remainder may be taken as the local image region number.
In step S830, the second graphic code is subjected to image division to obtain a plurality of image areas and numbers of the plurality of image areas.
After the second graphic code is subjected to image division to obtain a plurality of image areas, the plurality of image areas may be encoded to obtain respective numbers of the plurality of image areas. Illustratively, the image regions may be numbered by Z-order curve coding, and the image regions may also be numbered by other numbering orders, which is not specifically limited in this disclosure.
Illustratively, the second graphic code may be divided into 16 by 16 cells, and then each cell is numbered, resulting in 256 numbers.
For example, the number of image regions may be used as a parameter for the operation of taking the remainder of the dependent variable of the functional relation. For example, if the number of image regions is 256, a remainder 256 operation may be performed on the dependent variable of the functional relation, so that the remainder is a number between 0 and 255. The 256 image regions may be numbered 0-255 respectively so that the remainder and the number correspond one-to-one to facilitate subsequent determination of the partial image regions of the second graphic code.
In step S840, a partial image area of the second graphic code is determined based on the partial image area number and the respective numbers of the plurality of image areas.
Illustratively, if the partial image area code is 15, the image area corresponding to the number 15 is selected among the respective numbers of the plurality of image areas as the partial image area of the second graphic code.
Step S850, performing feature extraction on the local image region to obtain local image feature data.
Illustratively, the local image Feature data may be extracted by a deep learning model (e.g., visual Geometry Group Network (VGG) model or Residual Network (ResNet) model), or may be extracted by Scale Invariant Feature Transform (SIFT), orientation detection and rotation creation (ORB), difference of Gaussian (DOG), and Gray Level Co-occurrence Matrix (GLCM).
The number of the local image area is determined based on the independent variable, the function relation and the function parameter, the second graphic code is subjected to image division to obtain the numbers of the multiple image areas and the multiple image areas, the local image area of the second graphic code is determined based on the number of the local image area and the number of the multiple image areas, the local image area of the second graphic code can be rapidly obtained according to the content data of the second graphic code, the calculation method is simple and reliable, and the calculation efficiency is high.
In some embodiments, the character strings corresponding to the feature vectors of the partial images of the first graphic code may include a random uniform character string and a public help character string. The image encoding data of the partial image of the second graphic code may be a random uniform character string corresponding to the feature vector of the partial image of the second graphic code determined based on the public help character string corresponding to the feature vector of the partial image of the first graphic code by using a fuzzy extraction algorithm. Accordingly, verifying whether the second graphic code is consistent with the first graphic code based on the image encoding data of the first graphic code and the image encoding data of the second graphic code may be performed as: and comparing whether the random uniform character string corresponding to the characteristic vector of the local image of the second graphic code is consistent with the random uniform character string corresponding to the characteristic vector of the local image of the first graphic code, thereby verifying whether the second graphic code is consistent with the first graphic code.
The authentication process based on random uniform strings and public help strings is illustrated in detail below in conjunction with fig. 9.
Fig. 9 is a schematic flow chart of a graphic code verification method according to another embodiment of the present disclosure. As shown in fig. 9, in the embodiment of the present disclosure, the step of verifying whether the second graphic code is consistent with the first graphic code based on the image coded data of the first graphic code and the image coded data of the second graphic code includes the following steps.
Step S910, calculating a random uniform character string of the second graphic code based on the public help character string of the first graphic code.
The image encoding data of the first graphic code includes a random uniform character string and a public help character string determined using a fuzzy extraction algorithm.
The blur extraction algorithm may extract fixed-length values (e.g., random uniform character strings and public help character strings) from feature data (e.g., the first graphic code or partial image feature data of the first graphic code). Therefore, the random uniform character string and the public help character string of the first graphic code are determined by using the fuzzy extraction algorithm, and the transmission of the first graphic code can be replaced by the transmission of the random uniform character string and the public help character string of the first graphic code, so that the safety of data transmission between the equipment side and the cloud side is ensured.
Illustratively, based on the disclosed help strings of the second graphical code and the first graphical code, computing the random uniform string of the second graphical code may be performed as: and calculating a random uniform character string of the second graphic code by using a fuzzy extraction algorithm based on the local image characteristic data of the second graphic code and the public help character string of the first graphic code.
Step S920, comparing the random uniform character string of the second graphic code with the random uniform character string of the first graphic code, thereby verifying whether the second graphic code is consistent with the first graphic code.
And the consistency comparison is carried out on the random uniform character string based on the second graphic code and the random uniform character string of the first graphic code, so that whether the second graphic code is consistent with the first graphic code is verified, only the character strings need to be compared, the calculation is simple, and the graphic code verification efficiency is further improved. In addition, the equipment end only needs to acquire the random uniform character string and the public help character string of the first graphic code of the cloud end, and does not need to acquire the first graphic code of the cloud end, so that the time for data transmission between the equipment end and the cloud end is further reduced.
In some embodiments, the consistency comparison result of the random uniform character string of the second graphic code and the random uniform character string of the first graphic code may be determined by calculating a hamming distance between the random uniform character string of the second graphic code and the random uniform character string of the first graphic code. The hamming distance represents the number of different characters of two character strings of the same length at corresponding positions. Illustratively, the random uniform character string of the second graphic code is subjected to an exclusive or operation with the random uniform character string of the first graphic code, and the statistical result is the number of 0, which is the hamming distance. And then judging the relation between the number and a preset threshold value, and if the number is smaller than the preset threshold value, indicating that the random uniform character string of the second graphic code is inconsistent with the random uniform character string of the first graphic code. And if the number is greater than or equal to a preset threshold value, the random uniform character string of the second graphic code is consistent with the random uniform character string of the first graphic code.
The following describes a specific implementation of the graphic code verification method in the cloud with reference to fig. 10.
Fig. 10 is a schematic flow chart of a graphic code verification method according to another embodiment of the present disclosure. As shown in fig. 10, in the embodiment of the present disclosure, the graphic code verification method includes the following steps.
Step S1010, receiving the second graphic code sent by the equipment terminal under the condition that the equipment terminal verifies that the second graphic code is consistent with the first graphic code.
Specifically, the device side verifies whether the second graphic code is consistent with the first graphic code based on the volume graphic code verification method of the embodiment, and sends the second graphic code to the cloud side under the condition that the second graphic code is consistent with the first graphic code.
In step S1020, it is verified whether the second graphic code is consistent with the first graphic code.
Specifically, under the condition that the device side verifies that the second graphic code is consistent with the first graphic code, in order to further improve the accuracy of graphic code verification, the cloud side verifies whether the second graphic code is consistent with the first graphic code again.
The following describes a specific embodiment of the graphic code registration method with reference to fig. 11.
Fig. 11 is a schematic flowchart illustrating a graphic code registration method according to an embodiment of the disclosure. Specifically, the graphic code registration method is applied to the cloud. As shown in fig. 11, in the embodiment of the present disclosure, the graphic code registration method includes the following steps.
In step S1110, based on the graphics code content data of the first graphics code, the image encoding data of the first graphics code is determined.
Determining the image coding data of the first graphic code based on the graphic code content data of the first graphic code, which can be implemented as: firstly, determining local image characteristic data of a first graphic code based on graphic code content data of the first graphic code, and coding the local image characteristic data of the first graphic code based on a fuzzy extraction algorithm to obtain a random uniform character string and a public help character string of the first graphic code. The specific method for determining the local image feature data of the first graphic code based on the graphic code content data of the first graphic code may refer to the graphic code content data based on the second graphic code, and the specific method for determining the local image feature data of the second graphic code is not described herein again.
Step S1120, storing the first graphic code and the image encoding data of the first graphic code, so that the device side verifies whether the second graphic code is consistent with the first graphic code based on the graphic code verification method.
The storing of the first graphic code and the image encoding data of the first graphic code may be storing the first graphic code and the image encoding data of the first graphic code in a cloud, so that the device side can obtain the image encoding data of the first graphic code in the cloud, or so that the cloud verifies whether the second graphic code is consistent with the first graphic code based on the first graphic code and the second graphic code.
The graphic code verification method or the graphic code registration method in the above embodiments may be implemented by C + + programming in a computer language.
Method embodiments of the present disclosure are described in detail above in conjunction with fig. 4-11, and apparatus embodiments of the present disclosure are described in detail below in conjunction with fig. 12-14. Furthermore, it is to be understood that the description of the method embodiments corresponds to the description of the apparatus embodiments, and therefore reference may be made to the preceding method embodiments for parts which are not described in detail.
Fig. 12 is a schematic structural diagram of a graphic code verification apparatus according to an embodiment of the disclosure. Specifically, as shown in fig. 12, the graphic code verification apparatus 1200 provided by the embodiment of the present disclosure includes: a first obtaining module 1210, a second obtaining module 1220, a parsing module 1230, a calculating module 1240 and a verifying module 1250. The graphic code verification apparatus 1200 is applied to a device side. Specifically, the first obtaining module 1210 is configured to obtain image encoding data of a first graphic code stored in a cloud. The second obtaining module 1220 is configured to obtain a second graphic code to be verified. The parsing module 1230 is configured to parse the second graphic code to determine the graphic code content data of the second graphic code. The calculating module 1240 is used for calculating the image coding data of the second graphic code based on the graphic code content data of the second graphic code according to the calculating mode of the image coding data of the first graphic code. The verification module 1250 is configured to verify whether the second graphic code is consistent with the first graphic code based on the image encoding data of the first graphic code and the image encoding data of the second graphic code.
In some embodiments, the verification module 1250 is further configured to, if it is determined that the second graphic code is consistent with the first graphic code, send the second graphic code to the cloud, so that the cloud verifies whether the second graphic code is consistent with the first graphic code again.
In some embodiments, the calculation module 1240 is further configured to determine local image feature data of the second graphic code based on the graphic code content data of the second graphic code; and coding the local image characteristic data to obtain image coded data of a second graphic code.
In some embodiments, the calculation module 1240 is further configured to obtain a functional relation for determining the local image area; carrying out Hash processing on the graphic code content data to obtain a function parameter of a function relation; and determining local image characteristic data based on the functional relation and the functional parameters.
In some embodiments, the calculation module 1240 is further configured to obtain an argument of the functional relation; determining the number of the local image area based on the independent variable, the function relation and the function parameter; dividing the second graphic code into a plurality of image areas and numbers of the image areas; determining a local image area of the second graphic code based on the local image area number and the respective numbers of the plurality of image areas; and performing feature extraction on the local image area to obtain local image feature data.
In some embodiments, the verification module 1250 is further configured to calculate a random uniform string of the second graphical code based on the public help string of the second graphical code and the first graphical code; and comparing the consistency of the random uniform character string of the second graphic code with the random uniform character string of the first graphic code, thereby verifying whether the second graphic code is consistent with the first graphic code. Wherein the image encoding data of the first graphic code comprises random uniform character strings and public help character strings determined by fuzzy extraction algorithm
Fig. 13 is a schematic structural diagram of a graphic code verification apparatus according to another embodiment of the present disclosure. As shown in fig. 13, a graphic code verification apparatus 1300 provided in an embodiment of the present disclosure includes: a receiving module 1310 and a review module 1320. The graphic code verification apparatus 1300 is applied to the cloud. Specifically, the receiving module 1310 is configured to receive the second graphic code sent by the device side under the condition that it is determined that the device side verifies that the second graphic code is consistent with the first graphic code, where the device side verifies whether the second graphic code is consistent with the first graphic code based on the graphic code verification method in the foregoing embodiment. The review module 1320 is configured to verify whether the second graphic code is consistent with the first graphic code again.
Fig. 14 is a schematic structural diagram of a graphic code registration apparatus according to an embodiment of the present disclosure. As shown in fig. 14, the graphic code registration apparatus 1400 provided by the embodiment of the present disclosure includes: a determination module 1410 and a storage module 1420. The graphic code registration apparatus 1400 is applied to the cloud. Specifically, the determining module 1410 is configured to determine the image encoding data of the first graphic code based on the graphic code content data of the first graphic code. The storage module 1420 is configured to store the first graphic code and the image encoding data of the first graphic code, so that the device verifies whether the second graphic code is consistent with the first graphic code based on the graphic code verification method in the foregoing embodiment.
Fig. 15 is a schematic structural diagram of an electronic device according to an embodiment of the disclosure. An electronic device 1500 (which may be a computer device) shown in fig. 15 includes memory 1501, a processor 1502, a communication interface 1503, and a bus 1504. The memory 1501, the processor 1502, and the communication interface 1503 are communicatively connected to each other by a bus 1504.
The Memory 1501 may be a Read Only Memory (ROM), a static Memory device, a dynamic Memory device, or a Random Access Memory (RAM). The memory 1501 may store programs, and the processor 1502 and the communication interface 1503 are used to perform the steps of the related methods of the embodiments of the present disclosure when the programs stored in the memory 1501 are executed by the processor 1502.
The processor 1502 may be a general-purpose Central Processing Unit (CPU), a microprocessor, an Application Specific Integrated Circuit (ASIC), a Graphics Processing Unit (GPU), or one or more Integrated circuits, and is configured to execute related programs to implement the functions required by the units in the related devices according to the embodiments of the present disclosure.
The processor 1502 may also be an integrated circuit chip having signal processing capabilities. In implementation, the various steps of the related methods of the present disclosure may be performed by instructions in the form of hardware, integrated logic circuits, or software in the processor 1502. The processor 1502 may also be a general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component. The various methods, steps, and logic blocks disclosed in the embodiments of the present disclosure may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present disclosure may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in the memory 1501, and the processor 1502 reads information in the memory 1501, and performs, in conjunction with hardware thereof, functions required to be performed by units included in the related apparatus of the disclosed embodiments, or performs related methods of the disclosed method embodiments.
Communication interface 1503 enables communication between electronic device 1500 and other devices or communication networks using transceiver means such as, but not limited to, a transceiver. For example, the graphic code generation data may be acquired through the communication interface 1503.
Bus 1504 may include pathways to transfer information between components of electronic device 1500 (e.g., memory 1501, processor 1502, communication interface 1503).
It should be noted that although the electronic device 1500 shown in fig. 15 shows only memories, processors, and communication interfaces, in a specific implementation, those skilled in the art will appreciate that the electronic device 1500 also includes other components necessary to achieve normal operation. Also, those skilled in the art will appreciate that the electronic device 1500 may also include hardware components that implement other additional functions, according to particular needs. Furthermore, those skilled in the art will appreciate that the electronic device 1500 may also include only those components necessary to implement the embodiments of the present disclosure, and need not include all of the components shown in FIG. 15.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present disclosure.
It can be clearly understood by those skilled in the art that, for convenience and simplicity of description, the specific working processes of the above-described apparatuses and modules may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present disclosure, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present disclosure may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present disclosure may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present disclosure. And the aforementioned storage medium includes: u disk, removable hard disk, read only memory, random access memory, magnetic or optical disk, etc. for storing program codes.
The above description is only for the specific embodiments of the present disclosure, but the scope of the present disclosure is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present disclosure, and all the changes or substitutions should be covered within the scope of the present disclosure. Therefore, the protection scope of the present disclosure shall be subject to the protection scope of the claims.

Claims (12)

1. A graphic code verification method is applied to a device side, and comprises the following steps:
acquiring image coding data of a first graphic code stored in a cloud;
acquiring a second graphic code to be verified;
analyzing the second graphic code to determine graphic code content data of the second graphic code;
calculating the image coded data of the second graphic code based on the graphic code content data of the second graphic code according to the calculation mode of the image coded data of the first graphic code;
and verifying whether the second graphic code is consistent with the first graphic code or not based on the image coding data of the first graphic code and the image coding data of the second graphic code.
2. The method of claim 1, further comprising, after verifying whether the second graphical code is consistent with the first graphical code based on the first graphical code and the second graphical code, further comprising:
and if the verification result is that the second graphic code is consistent with the first graphic code, sending the second graphic code to the cloud so that the cloud can verify whether the second graphic code is consistent with the first graphic code again.
3. The method according to claim 1 or 2, wherein the calculating the image encoding data of the second graphic code based on the graphic code content data of the second graphic code comprises:
determining local image characteristic data of the second graphic code based on the graphic code content data of the second graphic code;
and coding the local image characteristic data to obtain image coded data of the second graphic code.
4. The method according to claim 3, wherein the determining the local image feature data of the second graphic code based on the graphic code content data of the second graphic code comprises:
acquiring a function relation for determining a local image area;
carrying out Hash on the graphic code content data to obtain a function parameter of the function relation;
and determining the local image characteristic data based on the functional relation and the functional parameter.
5. The method of claim 4, the determining the local image feature data based on the functional relation and the functional parameter, comprising:
obtaining an independent variable of the functional relation;
determining a local image area number based on the independent variable, the function relation and the function parameter;
performing image division on the second graphic code to obtain a plurality of image areas and respective numbers of the plurality of image areas;
determining a local image area of the second graphic code based on the local image area number and the respective numbers of the plurality of image areas;
and performing feature extraction on the local image area to obtain the local image feature data.
6. The method of claim 1 or 2, the first graphical code of image encoding data comprising a random uniform character string and a public helper character string determined using a fuzzy extraction algorithm,
wherein the verifying whether the second graphic code is consistent with the first graphic code based on the image coding data of the first graphic code and the image coding data of the second graphic code comprises:
calculating a random uniform character string of the second graphic code based on the public help character string of the first graphic code;
and comparing the consistency of the random uniform character string of the second graphic code with the random uniform character string of the first graphic code, thereby verifying whether the second graphic code is consistent with the first graphic code.
7. A graphic code verification method is applied to a cloud end, and comprises the following steps:
receiving a second graphic code sent by a device side under the condition that the device side verifies that the second graphic code is consistent with a first graphic code, wherein the device side verifies whether the second graphic code is consistent with the first graphic code based on the method of any one of the claims 1 to 6;
and verifying whether the second graphic code is consistent with the first graphic code again.
8. A graphic code registration method is applied to a cloud, and comprises the following steps:
determining image coding data of a first graphic code based on graphic code content data of the first graphic code;
storing the first graphical code and image encoding data of the first graphical code so that a device verifies whether the second graphical code is identical to the first graphical code based on the method of any one of claims 1 to 6.
9. A graphic code verification device is applied to an equipment side, and the device comprises:
the first acquisition module is configured to acquire image coding data of a first graphic code stored in the cloud;
the second acquisition module is configured to acquire a second graphic code to be verified;
the analysis module is configured to analyze the second graphic code and determine graphic code content data of the second graphic code;
the computing module is configured to compute the image coded data of the second graphic code based on the graphic code content data of the second graphic code according to the computing mode of the image coded data of the first graphic code;
and the verification module is configured to verify whether the second graphic code is consistent with the first graphic code or not based on the image coded data of the first graphic code and the image coded data of the second graphic code.
10. A graphic code verification device is applied to a cloud end and comprises:
a receiving module, configured to receive a second graphic code sent by a device side when it is determined that the device side verifies that the second graphic code is consistent with a first graphic code, wherein the device side verifies whether the second graphic code is consistent with the first graphic code based on the method of any one of claims 1 to 6;
and the rechecking module is configured to recheck whether the second graphic code is consistent with the first graphic code.
11. A graphic code registration device is applied to a cloud end and comprises:
the determining module is configured to determine image coding data of a first graphic code based on graphic code content data of the first graphic code;
a storage module configured to store the first graphical code and image encoding data of the first graphical code so that a device end verifies whether the second graphical code is identical to the first graphical code based on the method of any one of claims 1 to 6.
12. An electronic device comprising a memory having executable code stored therein and a processor configured to execute the executable code to implement the method of any of claims 1 to 8.
CN202210988600.8A 2022-08-17 2022-08-17 Graphic code verification method and device, graphic code registration method and device Active CN115293309B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210988600.8A CN115293309B (en) 2022-08-17 2022-08-17 Graphic code verification method and device, graphic code registration method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210988600.8A CN115293309B (en) 2022-08-17 2022-08-17 Graphic code verification method and device, graphic code registration method and device

Publications (2)

Publication Number Publication Date
CN115293309A true CN115293309A (en) 2022-11-04
CN115293309B CN115293309B (en) 2024-04-05

Family

ID=83829956

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210988600.8A Active CN115293309B (en) 2022-08-17 2022-08-17 Graphic code verification method and device, graphic code registration method and device

Country Status (1)

Country Link
CN (1) CN115293309B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109345268A (en) * 2018-09-21 2019-02-15 联桥网云信息科技(长沙)有限公司 Two-dimensional code anti-counterfeiting label, label register method and label identification method based on NFC
CN111221734A (en) * 2020-01-08 2020-06-02 西安芯瞳半导体技术有限公司 Graphical interface verification method and device and computer storage medium
US20200293811A1 (en) * 2016-11-30 2020-09-17 Hangzhou Hikrobot Technology Co., Ltd Method and device for obtaining image of form sheet
US20210326429A1 (en) * 2019-06-26 2021-10-21 Shenzhen Sensetime Technology Co., Ltd. Access control method and device, electronic device and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200293811A1 (en) * 2016-11-30 2020-09-17 Hangzhou Hikrobot Technology Co., Ltd Method and device for obtaining image of form sheet
CN109345268A (en) * 2018-09-21 2019-02-15 联桥网云信息科技(长沙)有限公司 Two-dimensional code anti-counterfeiting label, label register method and label identification method based on NFC
US20210326429A1 (en) * 2019-06-26 2021-10-21 Shenzhen Sensetime Technology Co., Ltd. Access control method and device, electronic device and storage medium
CN111221734A (en) * 2020-01-08 2020-06-02 西安芯瞳半导体技术有限公司 Graphical interface verification method and device and computer storage medium

Also Published As

Publication number Publication date
CN115293309B (en) 2024-04-05

Similar Documents

Publication Publication Date Title
CN109756746B (en) Video auditing method, device, server and storage medium
JP3345350B2 (en) Document image recognition apparatus, method thereof, and recording medium
CN105471575B (en) Information encryption and decryption method and device
Swaminathan et al. Robust and secure image hashing
JP2020009452A (en) User authentication method and handwriting sign-in server
CN116485620A (en) Watermark data embedding and extracting method
US10554851B2 (en) Method for determining whether printed encoding information is not falsified
CN111079816A (en) Image auditing method and device and server
CN112307520A (en) Electronic seal adding and verifying method and system
CN112088378A (en) Image hidden information detector
KR101925463B1 (en) Method of record and validation of image hash value and apparatus using the same
CN115830723A (en) Correlation method and correlation device for training set images
CN108986008A (en) Image processing method, device and equipment
US8363885B2 (en) Method, device, and program for embedding, displaying, and recognizing data
CN111143858B (en) Data checking method and device
CN111046997B (en) Image security code generation method based on anti-counterfeiting encryption and visual identification
WO2023241242A1 (en) Data recognition method and mobile terminal
CN110992155A (en) Bidding and enclosing processing method and related product
CN115293309A (en) Graphic code verification method and device and graphic code registration method and device
CN109003190B (en) Nuclear protection method, computer readable storage medium and terminal equipment
CN113988242A (en) Multi-region-based anti-counterfeiting code generation and verification method, system, equipment and medium
CN112911341A (en) Image processing method, decoder network training method, device, equipment and medium
TWI639124B (en) Providing devices and methods, recording media and computer program products containing payment information of QR code
CN117648680B (en) Electronic signature format file generation method and system
CN113034337B (en) Image detection method and related device

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