CN114298257A - Method and device for realizing authenticity query through one-step code scanning - Google Patents

Method and device for realizing authenticity query through one-step code scanning Download PDF

Info

Publication number
CN114298257A
CN114298257A CN202111391656.7A CN202111391656A CN114298257A CN 114298257 A CN114298257 A CN 114298257A CN 202111391656 A CN202111391656 A CN 202111391656A CN 114298257 A CN114298257 A CN 114298257A
Authority
CN
China
Prior art keywords
dimensional code
image
code
counterfeiting
program
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111391656.7A
Other languages
Chinese (zh)
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.)
Shenzhen Zhenyuan Technology Co ltd
Original Assignee
Shenzhen Zhenyuan Technology 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 Shenzhen Zhenyuan Technology Co ltd filed Critical Shenzhen Zhenyuan Technology Co ltd
Priority to CN202111391656.7A priority Critical patent/CN114298257A/en
Publication of CN114298257A publication Critical patent/CN114298257A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Image Processing (AREA)

Abstract

The invention provides a method and a device for realizing authenticity query by scanning codes in one step, comprising the following steps: the terminal equipment generates an original two-dimensional code and superimposes a specific anti-counterfeiting pattern to obtain an anti-counterfeiting two-dimensional code; a user automatically focuses on the two-dimensional code through a code scanning program to obtain a two-dimensional code image; processing the two-dimensional code image by a user through an address resolution algorithm of a code scanning program to obtain a URL address; the code scanning program of the user sends the acquired two-dimensional code image to an authenticity inquiry device associated with the URL address; the true and false inquiry device starts an inspection program and returns a result to the user after judging the authenticity of the two-dimensional code. According to the invention, the anti-counterfeiting pattern is superposed on the original two-dimensional code to generate a complete integrated anti-counterfeiting two-dimensional code, so that the function that a user can know the authenticity of the two-dimensional code by scanning the code in one step is realized; and the current situation that fraud cases are frequently generated based on false two-dimensional codes is effectively attacked while convenient and quick service is provided for users.

Description

Method and device for realizing authenticity query through one-step code scanning
Technical Field
The invention relates to the field of two-dimensional code identification, in particular to a method and a device for realizing authenticity query through one-step code scanning.
Background
The two-dimensional code records data symbol information by using a pattern of bars and spaces distributed on a plane (two-dimensional direction) according to a certain rule by using a certain specific geometric figure. The two-dimensional code (also called a two-dimensional barcode) includes: high reliability (the reading accuracy rate far exceeds that of manual recording), high efficiency (the reading speed is very high, which is equivalent to 40 characters per second), and the like.
With the development of the internet era, the two-dimensional code enters the lives of thousands of households from the initial scientific research field, and is widely applied to consumers when purchasing commodities. However, individual lawbreakers cheat the consumers into money by making fake two-dimensional codes. The existing two-dimension code anti-counterfeiting method has the characteristics of complex operation and incapability of informing consumers of the authenticity of the two-dimension code in one step on site,
therefore, a method for inquiring authenticity by scanning codes in one step is urgently needed to solve the problems.
Disclosure of Invention
The invention discloses a method and a device for realizing true and false inquiry through one-step code scanning, which comprises the following steps:
the terminal equipment generates an original two-dimensional code and superimposes a specific anti-counterfeiting pattern to obtain an anti-counterfeiting two-dimensional code; a user automatically focuses on the two-dimensional code through a code scanning program to obtain a two-dimensional code image; processing the two-dimensional code image by a user through an address resolution algorithm of a code scanning program to obtain a URL address; a code scanning program of a user sends the acquired two-dimensional code image to a background server associated with the URL address; and the background server starts an inspection program, and returns a result to the user after judging the authenticity of the two-dimensional code.
In order to achieve the effect of combining the anti-counterfeiting pattern and the actual content, a code scanning program needs to load a section of algorithm, and the algorithm can execute the overlapping function of the anti-counterfeiting two-dimensional code.
Further, the algorithm firstly divides a two-dimensional code pattern containing actual content into a plurality of sub-blocks with the size of 5x5 pixels, and then discrete cosine transform is carried out on pixel points of each sub-block to obtain a DJ matrix; then, performing row-column transformation operation of linear algebra on the matrix to obtain a transformed matrix; and then carrying out inverse discrete cosine transform on the transformed matrix to obtain a new pattern, namely the anti-counterfeiting pattern. In order to embed the anti-counterfeiting pattern into the original pattern and realize a two-in-one function, position coordinate values of different pixel points of the anti-counterfeiting pattern are used for obtaining a two-dimensional original array, and linear algebraic row-column operation is carried out on row-column values of the two-dimensional original array and row-column values of a DJ matrix to obtain a two-dimensional code matrix with the anti-counterfeiting function after two-in-one; and operating the two-dimensional code matrix through inverse discrete cosine transform again to obtain the anti-counterfeiting two-dimensional code pattern with the original pattern and the anti-counterfeiting pattern superposed.
Further, in order to enable a user to quickly scan and identify the anti-counterfeiting two-dimensional code, an automatic focusing function needs to be added to the code scanning program. Preferably, the code scanning program firstly invokes an image processing subprogram to smooth the two-dimensional code anti-counterfeiting pattern preliminarily captured by the lens so as to filter noise in the two-dimensional code anti-counterfeiting pattern; then, a code scanning program carries out binarization filtering processing on the processed image pixel points, and the outline of the area where the code eye is located is locked; locking a geometric central point of the outline, namely a code eye, through an image processing subprogram, and sending position information of the code eye to a camera program; and the camera program controls the lens to focus the code eye to automatically identify and focus the two-dimensional code.
Further, since the archived patterns in the database of the backend server need to be automatically transferred to verify the authenticity of the two-dimensional code, an address resolution program is needed to obtain the network link address of the backend server and the ID number of the picture at the same time.
Preferably, the anti-counterfeiting two-dimensional code is divided into an image area and an ID field area, wherein the image area contains the actual content of the two-dimensional code, such as the network address of the background server and other content required to be displayed to the user, and the ID field area stores the ID number of the anti-counterfeiting two-dimensional code pattern so that the background server can automatically and quickly call the archived patterns with the same ID number from the database for comparison.
Since a computer program can recognize only binary digital codes, an encoding method is required to convert image information obtained by a code scanning program into binary digital information. And because the two-dimensional code pattern is a gray pattern, black and white pixel points can represent 0 or 1 respectively, and the eight-bit binary code in the computer byte is corresponding to each group of eight modes according to the arrangement information of the pixel points. At the moment, the address resolution program only needs to call an address resolution algorithm, the algorithm can read the color information of each pixel point in a mode of grouping eight pixels along the horizontal or vertical reverse direction from a certain corner point of the pattern, and because black and white represent 0 or 1 respectively, an eight-bit binary code, namely a byte, can be obtained; and translating the anti-counterfeiting two-dimensional code into letters or numbers according to an international common ASCII character comparison table, and obtaining a complete link address of the background server and the ID number of the pattern after reading all the pixel points of the whole anti-counterfeiting two-dimensional code pattern.
In another aspect, the present invention provides another technical proposal: a device for realizing true and false inquiry by one-step code scanning comprises a memory, a processor and image processing software; the memorizer stores the file pattern which is compared with the two-dimensional code pattern to be verified, the processor can respond to the request of the user terminal, and the image processing software invokes the checking program to verify the authenticity of the received two-dimensional code pattern, and the specific checking program is as follows:
receiving a two-dimensional code picture to be verified and ID field information sent by a user terminal program;
judging whether the ID is valid according to whether the received ID number is located in the range of the serial numbers of the archived pictures in the server database;
if the verification result is invalid, returning verification failure information to the user side; if the number of the archived pictures is valid, the archived pictures with the same number are called for comparison, and the similarity is calculated through a DJSJ method;
if the similarity is higher than the preset threshold, the picture to be verified is a real two-dimensional code, and verification passing information is returned to the user side; if the similarity is lower than the preset threshold, the picture to be verified is a false two-dimensional code, and verification failure information is returned to the user side.
Further, the DJSJ method comprises the following specific implementation steps:
adjusting the image to be detected and the archived image into the same pixel and size through software;
acquiring feature points of an image to be detected and an archived image, wherein the feature points are a group of pixel points of the image to be detected and the archived image;
comparing the characteristic points of the image to be detected with the characteristic points of the archived image one by one, and if the proportion of the total number of the black grids and the white grids in the characteristic points of the two images is the same, successfully matching;
and calculating the number of all successfully matched images, and dividing the number of successfully matched images by the total number of feature points in one image to obtain the image similarity.
Preferably, the number of each group of pixels is 8, and the pattern is generated from any one angular position along the horizontal or vertical direction until the last pixel of the pattern.
Compared with the prior art, the invention has the following advantages and positive effects:
1. according to the invention, a specific anti-counterfeiting pattern which does not influence normal code scanning identification of the two-dimensional code is fused in the blank area of the common two-dimensional code to form a complete integrated anti-counterfeiting two-dimensional code pattern, and an anti-counterfeiting verification pattern can be synchronously obtained during code scanning, so that a foundation is laid for realizing authenticity check by one-step code scanning.
2. The authenticity check is finished by scanning the code in one step, so that the use convenience of a user is greatly improved; meanwhile, the code scanning program can conveniently capture the two-dimensional code feature code eye, so that the best shooting effect on the two-dimensional code graphic region is realized through automatic zooming and automatic focusing, the quality of the obtained anti-counterfeiting verification graphic is also generally superior to the quality of the graphic obtained through secondary shooting, the verification accuracy is improved greatly, and the user experience is further improved.
3. The anti-counterfeiting verification graph and the standard two-dimensional code are integrated, so that the manufacturing process of the anti-counterfeiting marker can be greatly simplified, and the cost is effectively reduced; meanwhile, all functions of the traditional two-dimension code are reserved, and the system application range is wider.
The core of the method is that a user can obtain the content of the two-dimensional code and verify the authenticity of the two-dimensional code by only one step of code scanning, so that the user can obtain convenient experience while perfect fusion of the basic two-dimensional code and the anti-counterfeiting pattern is realized. The existing anti-counterfeiting technology usually needs to scan an anti-counterfeiting verification pattern, so that time and labor are wasted, even special code scanning equipment is needed, and much cost is increased. Compared with the prior art, the method has higher safety, and has no meaning even if a single lawbreaker separates the anti-counterfeiting mark pattern in the anti-counterfeiting two-dimensional code by a specific decoding program, because the method does not simply superpose the original two-dimensional code pattern and the anti-counterfeiting mark pattern, the anti-counterfeiting mark pattern of each original two-dimensional code pattern is different and is dynamically generated on the basis of the original two-dimensional code pattern.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without inventive efforts, wherein:
fig. 1 is a schematic flowchart of a method for implementing an authenticity query by one-step code scanning according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of a two-dimensional code anti-counterfeiting pattern superimposing method according to another embodiment of the present invention;
FIG. 3 is a flowchart illustrating a method for server ping procedure according to another embodiment of the present invention;
fig. 4 is a schematic structural diagram of a two-dimensional code authenticity verification apparatus according to another embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without any inventive step based on the embodiments of the present invention, are within the scope of the present invention.
Example one
Fig. 1 is a schematic flowchart of a method for implementing an authenticity query by scanning a code in one step according to an embodiment of the present invention. The method comprises the following steps:
s1, generating an original two-dimensional code and overlapping a specific anti-counterfeiting pattern to obtain an anti-counterfeiting two-dimensional code;
the programming realization algorithm of the step can use mainstream or non-mainstream languages of the current computer industry, wherein the mainstream languages comprise C + +, C #, Java and the like, and the non-mainstream languages comprise Kotkin, Erlang, OCamll and the like; the carrier of the algorithm can be PC end software, a tablet client, a mobile phone APP, a webpage plug-in and the like, and can be quickly called by an external environment in a function packaging mode. When the algorithm is developed, external variables are not set excessively, so that the occupied system running memory is too high, the response speed of a program to a user request is influenced, stacking can be adopted in the aspect of a data structure, the system can dynamically distribute a generation program according to the actual situation, the life cycle does not need to be told to a compiler in advance, and the running speed is further improved; when the algorithm is developed, a UTF-8 coding mode can be adopted, UTF-8 is a variable-length character code aiming at Unicode, and can be used for representing any character in the Unicode standard, so that the anti-counterfeiting two-dimensional code not only can store the letter information of European languages, but also can store pictographs or special characters in Asia and other areas, the content is fully expanded, and the countries and areas which can be used are greatly increased; when the algorithm is developed, the original two-dimensional code in a function call two-dimensional code storage library can be obtained by using the picture in the language function library, and the mature matrix generation function can be called to split the picture into smaller units and then convert the smaller units into a two-dimensional matrix DJ matrix; carrying out linear algebraic row-column transformation on the DJ matrix to obtain a DJ row-column transformation matrix; performing inverse discrete cosine transform on the DJ row-column transform matrix to obtain an original two-dimensional code anti-counterfeiting pattern; at the moment, a two-dimensional array can be obtained by recording the X coordinate and the Y coordinate of each pixel point of the anti-counterfeiting pattern of the original two-dimensional code, the array can be used as the anti-counterfeiting mark of the DJ matrix, and the anti-counterfeiting mark can be fused into the anti-counterfeiting mark by performing product operation with the DJ matrix of the original two-dimensional code, so that the anti-counterfeiting two-dimensional code matrix containing anti-counterfeiting information can be obtained; and finally, restoring the two-dimensional code matrix into the anti-counterfeiting two-dimensional code by calling an inverse discrete cosine transform function in a system mathematic library.
S2, automatically focusing the two-dimensional code through a code scanning program to obtain a two-dimensional code image;
firstly, initially capturing an anti-counterfeiting two-dimensional code generated by a generating program by utilizing a camera device of a user side; the program can preset a DLL dynamic link interface and is externally connected with a local image processing program of a user side, so that the operating memory of the user side can be directly called and reduced, the speed is improved, and good compatibility can be realized on different carriers such as a computer, a mobile phone and a tablet. And smoothing the two-dimensional code image through a local image processing program so as to filter noise formed in the generation process of the image, reduce interference on code scanning program identification and avoid the situation that the error feedback is made to a user after the noise is identified as a part of the content. After the noise is filtered, the image needs to be processed in one step, so that the data volume in the image is simplified, the outline of the image becomes clearer, and the characteristic area containing the two-dimensional code eye is more obvious. In order to achieve the above purpose, the code scanning program will introduce the binarization processing operation of the image processing program, so called binarization, that is, setting the gray value of the pixel point on the image to 0 or 255, so that the whole image exhibits obvious black-white contrast effect. There are many existing algorithms capable of achieving binarization, such as OTSU algorithm, whose central idea is that the inter-class variance between the target contour and the background threshold in the image is the largest. For one image, when the segmentation threshold of the target contour threshold and the background is T, it is assumed that foreground points account for w0 in image proportion, the average value is u0, the background points account for w1 in image proportion, and the average value is u 1. The average of the entire image is u-w 0 u0+ w1 u 1. And establishing an objective function g (t) w0 (u0-u) 2+ w1 (u1-u) 2, and g (t) which is the inter-class variance expression when the segmentation threshold is t. The OTSU algorithm makes g (t) take the global maximum, and when g (t) is maximum, the corresponding t is called the optimal threshold. The OTSU algorithm is also known as the variance between maximum classes. For another example, the Kittle algorithm has a central idea of calculating a gradient gray level average value of the whole image, and taking the average value as a segmentation threshold of the target contour and the background, thereby visually separating the target contour and the background. The effect of the Kittle algorithm is close to that of the OTSU algorithm, but the speed is higher, and the Kittle algorithm is more suitable for being used in images with higher pixel quality.
After binarization processing, the code scanning program carries out contrast analysis on the processed image by calling the image processing program, so that a target contour area containing the characteristics of the two-dimension code eye can be easily locked, and the position of the two-dimension code eye can be quickly locked after the area is simply operated to obtain a geometric center. The code scanning program calls the camera equipment of the user end to further focus the position, and then the black and white graphic arrangement combination characteristics containing the actual data content in the two-dimensional code image can be presented to the address resolution subprogram built in the code scanning program
S3, processing the two-dimensional code image through an address resolution algorithm to obtain a URL address;
the address resolution subroutine is loaded with an address resolution algorithm, which is an algorithm combining image analysis and data processing. The algorithm firstly analyzes the arrangement combination mode of black pixel points and white pixel points in a target area containing actual data content. In the encoding mode of the anti-counterfeiting two-dimensional code, one pixel point only represents two numerical values of 0 or 1: one black pixel point may represent 1 or one white pixel point may represent 1, or one black pixel point may represent 0 or one white pixel point may represent 0. Because a binary digit is usually 8 bits in a computer language, the invention is set to start from any corner point of an anti-counterfeiting two-dimensional code image, each 8-bit pixel point is a characteristic point, and one characteristic point represents an actual digit or letter. In particular, how each feature point represents an actual number or letter, refer to the ASCII character lookup table, which is an international standard, and the present invention is generally compatible with any computer system. Starting from any corner point of the anti-counterfeiting two-dimensional code image, reading line by line or line by line according to the sequence from left to right or from top to bottom until all information of the anti-counterfeiting two-dimensional code image target area is read, when the last corner point of the rectangular image area is read, the situation that the last feature point is less than 8 pixel points and less than 8 bits can occur, at the moment, the code scanning program automatically supplements 8 bits, the default setting of the numerical value of the supplemented bits is 0, and then the specific content of the feature points is identified after the complete 8 bits are obtained.
S4, sending the acquired two-dimensional code image to a background server associated with the URL address; the target area of the anti-counterfeiting two-dimensional code can be divided into an ID field area and an image area according to the function of contained data, wherein the ID field area contains ID information of each anti-counterfeiting two-dimensional code, and the image area contains actual data content. By identifying the content of the anti-counterfeiting two-dimensional code image area, the URL address of a correlation server can be obtained, and the correlation server is a background server storing anti-counterfeiting comparison patterns. And sending the acquired anti-counterfeiting two-dimensional code to the background server, so that the anti-counterfeiting verification process can be started.
And S5, the background server judges whether the product is true or false according to the checking program and sends the result to the user.
The specific anti-counterfeiting verification process is expanded by a background server, the server firstly receives an anti-counterfeiting two-dimensional code picture sent by a code scanning program, and the ID information in the ID field area of the anti-counterfeiting two-dimensional code can be obtained by calling a two-dimensional code reading program similar to the code scanning program. Then, the server can firstly judge whether the ID number is in the number range of the two-dimensional code comparison pattern in the database of the server; if the verification result is not within the range, the server can directly return the result information that the verification fails to pass to the user side; if the two-dimensional code image is within the range, the server calls the pattern with the same ID number in the database for comparison, and the similarity between the original two-dimensional code image and the comparison pattern is calculated through a DJSJ method. The method firstly adjusts the image to be detected and the comparison image into the same pixel size by taking the smaller one of the two images as the reference, and the two adjusted patterns have the same pixel size so as to prepare for the subsequent characteristic point comparison. And then, calculating the similarity by adopting a mode of comparing the feature points of the pattern to be detected and the comparison pattern one by one, wherein the proportion of the completely same number of the feature points of the pattern to be detected and the comparison pattern to the total number of the feature points of any pattern is a similarity threshold, if the threshold reaches a preset target value or more, the verification is passed, the passing verification information is returned to the user end, otherwise, the failing verification information is returned to the user end, preferably, the threshold can be set to 95% in consideration of the information loss when the anti-counterfeiting two-dimensional code reading and the server adjust the pixel sizes of the image to be detected and the comparison image.
Example two
Fig. 2 is a schematic flow chart of a two-dimensional code anti-counterfeiting pattern superimposing method according to another embodiment of the present invention, which includes the following steps:
s10: dividing the two-dimensional code original image into a plurality of sub-blocks with the size of 5x5 pixels;
s11: performing discrete cosine transform on each sub-block to obtain a DJ matrix;
s12: carrying out inverse discrete cosine transform on a DJ row-column transformation matrix obtained after the DJ matrix is subjected to row-column transformation to obtain an anti-counterfeiting pattern;
s13: obtaining an original array through position coordinate values of different pixel points of the anti-counterfeiting pattern, and performing product operation on the array and the DJ matrix to obtain a two-dimensional code digital matrix with an anti-counterfeiting function;
s14: and performing inverse discrete cosine transform on the two-dimension code digital matrix to obtain the anti-counterfeiting two-dimension code.
EXAMPLE III
Fig. 3 is a flowchart illustrating a method for server ping procedure according to another embodiment of the present invention, where the method includes the following steps:
s50: receiving a two-dimensional code picture to be verified and ID field information sent by a user terminal program;
s51: judging whether the ID is valid according to whether the received ID number is located in the range of the serial numbers of the archived pictures in the server database;
s52: if the verification result is invalid, returning verification failure information to the user side; if the number of the archived pictures is valid, the archived pictures with the same number are called for comparison, and the similarity is calculated through a DJSJ method;
s53: if the similarity is higher than the preset threshold, the picture to be verified is a real two-dimensional code, and verification passing information is returned to the user side; if the similarity is lower than the preset threshold, the picture to be verified is a false two-dimensional code, and verification failure information is returned to the user side.
Example four
Fig. 4 is a schematic structural diagram of a two-dimensional code authenticity verification apparatus according to another embodiment of the present invention. The two-dimensional code authenticity verifying device comprises a processor 100, a memory 200 and image processing software 300. Wherein the processor 100 can also be a Central Processing Unit (CPU). Processor 100 may be an integrated circuit chip having signal processing capabilities. The processor 100 may also be a general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components. A general purpose processor may be a microprocessor or the processor may be any conventional processor, but is not limited thereto. The processor 100 executes the instruction during working to realize the response to the authenticity verification request of the two-dimension code of the user terminal and returns the result of the authenticity verification to the user; the memory 200 provides an operation memory for the image processing software while storing the archived two-dimensional code pattern; the image processing software 300 responds to the checking instruction of the processor 100, reads the feature points of the pattern to be verified and the archived pattern for comparison, and returns the comparison result to the processor.
The above description is only an embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes performed by the present specification and drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A method for realizing true and false inquiry through one-step code scanning is characterized by comprising the following steps:
s1, generating an original two-dimensional code and overlapping a specific anti-counterfeiting pattern to obtain an anti-counterfeiting two-dimensional code;
s2, automatically focusing the two-dimensional code through a code scanning program to obtain a two-dimensional code image;
s3, processing the two-dimensional code image through an address resolution algorithm to obtain a URL address;
s4, sending the acquired two-dimensional code image to a background server associated with the URL address;
and S5, the background server judges whether the product is true or false according to the checking program and sends the result to the user.
2. The method as claimed in claim 1, wherein the anti-counterfeit two-dimensional code in step S1 is a complete integrated anti-counterfeit two-dimensional code pattern formed by superimposing a specific anti-counterfeit pattern on a blank area without affecting normal code scanning identification of the two-dimensional code.
3. The method according to claim 1, wherein the code scanning program performs auto-focusing on the two-dimensional code by locking the area where the two-dimensional code eye is located, so as to complete the acquisition of the two-dimensional code image content in step S2.
4. The method of claim 1, wherein the two-dimensional code image processed by the address resolution algorithm in step S3 is divided into an ID field area and an image area according to area functions: the image area is an area for storing URL address information and other data of the background server, and the ID field area is an area for storing ID information corresponding to the two-dimensional code image one to one.
5. The method according to claim 1, wherein the two-dimensional code image processed by the address resolution algorithm in step S3 is characterized in that the image is encoded in a binary manner in horizontal or vertical direction, and byte values are recorded by black and white squares of squares, and eight bytes form a letter; where a black lattice represents a binary byte 1, a white lattice represents a binary byte 0 or a black lattice represents a binary byte 0, and a white lattice represents a binary byte 1.
6. The method of claim 1, wherein the address resolution algorithm in step S3 is characterized in that the algorithm reads black and white grid arrangement information in the image along the horizontal or vertical direction to obtain a long string of binary bytes; and translating the binary bytes into letters or numbers according to a general ASCII character comparison table, and combining the letters or the numbers into an address of a background server and an ID of the two-dimensional code image.
7. The method of claim 1, wherein the step of examining of step S5 comprises the steps of:
s50: receiving a two-dimensional code picture to be verified and ID field information sent by a user terminal program;
s51: judging whether the ID is valid according to whether the received ID number is located in the range of the serial numbers of the archived pictures in the server database;
s52: if the verification result is invalid, returning verification failure information to the user side; if the number of the archived pictures is valid, the archived pictures with the same number are called for comparison, and the similarity is calculated through a DJSJ method;
s53: if the similarity is higher than the preset threshold, the picture to be verified is a real two-dimensional code, and verification passing information is returned to the user side; if the similarity is lower than the preset threshold, the picture to be verified is a false two-dimensional code, and verification failure information is returned to the user side.
8. The method, DJSJ method of step S52, as recited in claim 7, comprising the steps of:
s520: adjusting the image to be detected and the archived image into the same pixel and size through software;
s521: acquiring characteristic points of an image to be detected and an archived image;
s522: comparing the characteristic points of the image to be detected with the characteristic points of the archived image one by one, and if the proportion of the total number of the black grids and the white grids in the characteristic points of the two images is the same, successfully matching;
s523: and calculating the number of all successfully matched images, and dividing the number of successfully matched images by the total number of feature points in one image to obtain the image similarity.
9. The method according to claim 8, wherein the method for obtaining the feature points in step S521 is characterized in that, starting from any corner point of a rectangular region of the image to be detected and the archived image, respectively and sequentially capturing 8 pixel points as first feature points along a horizontal direction or a vertical direction according to a difference in two-dimensional code encoding directions; and then capturing a second characteristic point by using a first pixel point behind the first characteristic point, and so on.
10. A two-dimensional code authenticity verification apparatus, comprising a processor, a memory and image processing software, wherein the memory is coupled with the image processing software, the processor is coupled with the memory, and the processor executes instructions to implement the program or method according to any one of claims 1 to 9 when in operation.
CN202111391656.7A 2021-11-23 2021-11-23 Method and device for realizing authenticity query through one-step code scanning Pending CN114298257A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111391656.7A CN114298257A (en) 2021-11-23 2021-11-23 Method and device for realizing authenticity query through one-step code scanning

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111391656.7A CN114298257A (en) 2021-11-23 2021-11-23 Method and device for realizing authenticity query through one-step code scanning

Publications (1)

Publication Number Publication Date
CN114298257A true CN114298257A (en) 2022-04-08

Family

ID=80965095

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111391656.7A Pending CN114298257A (en) 2021-11-23 2021-11-23 Method and device for realizing authenticity query through one-step code scanning

Country Status (1)

Country Link
CN (1) CN114298257A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115230359A (en) * 2022-09-22 2022-10-25 江苏铨通印数字印刷有限公司 Intelligent digital printing anti-counterfeiting mark generation and use method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115230359A (en) * 2022-09-22 2022-10-25 江苏铨通印数字印刷有限公司 Intelligent digital printing anti-counterfeiting mark generation and use method

Similar Documents

Publication Publication Date Title
CN110008809B (en) Method and device for acquiring form data and server
KR101617681B1 (en) Text detection using multi-layer connected components with histograms
WO2020119301A1 (en) Two-dimensional code identification method, apparatus, and device
US7106902B2 (en) Personal authentication system and method thereof
CN109753953B (en) Method and device for positioning text in image, electronic equipment and storage medium
CN106875408B (en) Screenshot method and device and terminal equipment
JP2005316755A (en) Two-dimensional rectangular code symbol reader and two-dimensional rectangular code symbol reading method
KR101960290B1 (en) Method for embedding and extraction of watermarking data
CN111899270A (en) Card frame detection method, device and equipment and readable storage medium
CN114298257A (en) Method and device for realizing authenticity query through one-step code scanning
CN113052754B (en) Method and device for blurring picture background
CN112052702A (en) Method and device for identifying two-dimensional code
JP7101258B2 (en) 2D barcode generation method, authentication method, server, and 2D barcode
CN111767752B (en) Two-dimensional code identification method and device
KR100569194B1 (en) Correction method of geometrical distortion for document image by camera
CN111080683B (en) Image processing method, device, storage medium and electronic equipment
CN116976372A (en) Picture identification method, device, equipment and medium based on square reference code
CN115035523A (en) Data identification method and mobile terminal
CN115063280A (en) Watermark superposition and recovery method and device
CN113537218A (en) Image recognition method and device
CN115221910A (en) Two-dimensional code identification method, device and equipment and computer readable storage medium
CN112036342A (en) Document snapshot method, device and computer storage medium
CN113283262A (en) Two-dimensional code positioning method and device, electronic equipment and machine readable medium
CN111753573A (en) Two-dimensional code image identification method and device, electronic equipment and readable storage medium
CN111818141A (en) Method, system, device, terminal and storage medium for transmitting file

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