CN111612476B - Secondary check anti-counterfeiting method, device, equipment and storage medium - Google Patents

Secondary check anti-counterfeiting method, device, equipment and storage medium Download PDF

Info

Publication number
CN111612476B
CN111612476B CN202010387690.6A CN202010387690A CN111612476B CN 111612476 B CN111612476 B CN 111612476B CN 202010387690 A CN202010387690 A CN 202010387690A CN 111612476 B CN111612476 B CN 111612476B
Authority
CN
China
Prior art keywords
code
counterfeiting
value
code value
check
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010387690.6A
Other languages
Chinese (zh)
Other versions
CN111612476A (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.)
Asyun Anti Counterfeiting Technology Fujian Co ltd
Original Assignee
Asyun Anti Counterfeiting Technology Fujian 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 Asyun Anti Counterfeiting Technology Fujian Co ltd filed Critical Asyun Anti Counterfeiting Technology Fujian Co ltd
Priority to CN202010387690.6A priority Critical patent/CN111612476B/en
Publication of CN111612476A publication Critical patent/CN111612476A/en
Application granted granted Critical
Publication of CN111612476B publication Critical patent/CN111612476B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/018Certifying business or products
    • G06Q30/0185Product, service or business identity fraud
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • 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
    • G06K7/1408Methods for optical code recognition the method being specifically adapted for the type of code
    • G06K7/14172D bar codes

Abstract

The invention discloses a secondary check anti-counterfeiting method, a device, equipment and a storage medium, wherein the method comprises two parts of a secondary check anti-counterfeiting code generation algorithm and an anti-counterfeiting check algorithm: the secondary verification anti-counterfeiting code generation algorithm is used for generating a secondary verification anti-counterfeiting two-dimensional code which is difficult to copy in batches for each commodity; the secondary verification anti-counterfeiting two-dimensional code comprises three elements, namely a code value, a two-dimensional code and an offset value, which are generated according to a specific algorithm; the anti-counterfeiting check algorithm checks the code value sent after the code scanning secondary check anti-counterfeiting two-dimensional code of the client. According to the technical scheme, the secondary verification anti-counterfeiting code which is difficult to copy and the anti-counterfeiting verification algorithm corresponding to the secondary verification anti-counterfeiting code are generated, so that the counterfeiting cost is greatly increased, and the anti-counterfeiting strength is enhanced; meanwhile, the security of the anti-counterfeiting check algorithm is improved, the anti-counterfeiting check algorithm is not easy to break, and the robustness of the anti-counterfeiting check algorithm is improved.

Description

Secondary check anti-counterfeiting method, device, equipment and storage medium
Technical Field
The invention relates to the field of information processing, in particular to a secondary verification anti-counterfeiting method, a secondary verification anti-counterfeiting device, secondary verification anti-counterfeiting equipment and a storage medium.
Background
At present, the anti-counterfeiting identification method for the commodity is usually realized by a user scanning an anti-counterfeiting two-dimensional code attached to the commodity through a mobile phone, wherein the anti-counterfeiting two-dimensional code comprises a group of anti-counterfeiting codes consisting of characters or numbers and a common two-dimensional code. The anti-counterfeiting working principle is that the back-end server compares the anti-counterfeiting codes sent after the mobile phone scans the codes to identify the authenticity of the commodities and sends a verification result to the mobile phone of the user.
However, the biggest problem of this method is that after the anti-counterfeiting code is revealed, batch copying can be realized at very low cost, so that the anti-counterfeiting defense means is limited; moreover, the checking algorithm is easy to be cracked by reverse derivation.
Disclosure of Invention
The embodiment of the invention provides a secondary verification anti-counterfeiting method, a secondary verification anti-counterfeiting device, equipment and a storage medium, and aims to solve the problems that the existing anti-counterfeiting codes are easy to copy in batches, and a verification algorithm is fragile.
A secondary check anti-counterfeiting method comprises a secondary check anti-counterfeiting code generation algorithm and an anti-counterfeiting check algorithm, wherein the secondary check anti-counterfeiting code generation algorithm comprises the following steps:
allocating a unique code value with a preset length to each commodity according to a preset code value generation algorithm;
after encrypting and checking the code value, carrying out remainder operation to obtain offset values which are in one-to-one correspondence with the code value;
synthesizing the code value and a two-dimensional code picture generated by a preset two-dimensional code generation algorithm to obtain a two-dimensional code vector diagram;
embedding the deviation value into a preset position in the two-dimensional code vector diagram;
positioning the corresponding position of the code value according to the offset value, and marking the corresponding position to obtain a secondary verification anti-counterfeiting two-dimensional code;
the anti-counterfeiting verification algorithm comprises the following steps:
searching the code value sent after the secondary verification anti-counterfeiting two-dimensional code is scanned by the client, if the code value exists, determining that the commodity is true, and if the code value does not exist, determining that the commodity is false;
encrypting the code value, performing checksum operation, and then taking the remainder to obtain a target offset value; and sending the target offset value to the client.
The utility model provides a secondary check-up anti-fake device, includes secondary check-up anti-fake code generation module and anti-fake check-up module, secondary check-up anti-fake code generation module includes:
the global unique code generation module is used for distributing a unique code value with a preset length for each commodity according to a preset code value generation algorithm;
the offset value generating module is used for encrypting the code value, checking and calculating, and then taking the rest to obtain the offset values corresponding to the code value one by one;
the two-dimensional code production module is used for synthesizing the code value and a two-dimensional code picture generated by a preset two-dimensional code generation algorithm to obtain a two-dimensional code vector diagram;
the synthesis module is used for embedding the deviation value into a preset position in the two-dimensional code vector diagram;
the offset value positioning image processing module is used for positioning the corresponding position of the code value according to the offset value and marking the corresponding position to obtain a secondary verification anti-counterfeiting two-dimensional code;
the anti-counterfeiting check module comprises:
the code value retrieval module is used for retrieving the code value sent after the secondary check anti-counterfeiting two-dimensional code is scanned by the client;
the first counterfeit identification module is used for determining that the commodity is false if the code value is not searched;
the second counterfeit identification module is used for encrypting, checking and operating the code value and then taking the remainder to obtain a target offset value if the code value is searched; and sending the target offset value to the client.
A computer device comprises a memory, a processor and a computer program which is stored in the memory and can run on the processor, wherein the processor executes the computer program to realize the secondary verification anti-counterfeiting method.
A computer-readable storage medium, in which a computer program is stored, and the computer program, when executed by a processor, implements the above-mentioned secondary verification anti-counterfeiting method.
The secondary verification anti-counterfeiting method, the device, the equipment and the storage medium comprise two parts of generating a secondary verification anti-counterfeiting two-dimensional code different from a common two-dimensional code and verifying the secondary verification anti-counterfeiting two-dimensional code, wherein the two parts respectively correspond to a secondary verification anti-counterfeiting code generation algorithm and an anti-counterfeiting verification algorithm.
The secondary verification anti-counterfeiting code generation algorithm firstly distributes a code value with a preset length and only for each commodity through a preset code value generation algorithm; carrying out encryption, checksum operation and remainder operation in sequence on the basis of the code value to obtain an offset value corresponding to the code value; that is, the offset value is derived from the code value and corresponds to the id of the code value; in the verification process, the authenticity of the commodity can be determined only by verifying the code value and the deviant value through an anti-counterfeiting verification algorithm, so that the anti-counterfeiting strength is increased, and the problem that the detection algorithm is fragile and easy to crack is solved. Meanwhile, the two-dimensional code vector graph contains code values which are clear at a glance and accord with the habit of identifying the fake by scanning the code by a user; more importantly, the offset value is embedded into a preset position of the two-dimensional code vector diagram, and a corresponding position of the code value positioned through the offset value is also marked to obtain a secondary verification anti-counterfeiting two-dimensional code, so that the secondary verification anti-counterfeiting two-dimensional code is different from a common two-dimensional code and has high identifiability; even if the code values are leaked, a counterfeiter cannot obtain the offset value corresponding to each code value, and the secondary verification anti-counterfeiting two-dimensional codes are difficult to copy in batches in production, so that the anti-counterfeiting strength is greatly improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments of the present invention will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without inventive labor.
FIG. 1 is a schematic diagram of an application environment of a secondary verification anti-counterfeiting method according to an embodiment of the present invention;
FIG. 2 is a flow chart of a secondary verification anti-counterfeit code generation algorithm in an embodiment of the present invention;
FIG. 3 is a schematic diagram of a secondary verification anti-counterfeit code according to an embodiment of the present invention;
FIG. 4 is a flow chart of an anti-counterfeit verification algorithm in an embodiment of the present invention;
FIG. 5 is a flowchart of a preset code value generation algorithm according to an embodiment of the present invention;
FIG. 6 is a flow chart of determining the authenticity of a product based on the number of searches in accordance with an embodiment of the present invention;
FIG. 7 is a schematic view of a secondary verification anti-counterfeiting device in an embodiment of the present invention;
FIG. 8 is a schematic diagram of a computer device in an embodiment of the 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 some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The secondary verification anti-counterfeiting method can be applied to an application environment shown in figure 1, wherein the secondary verification anti-counterfeiting two-dimensional code can be attached to a sold commodity in a label form, so that a user can conveniently scan the code and identify the fake; the client is intelligent terminal equipment such as a mobile phone and a tablet personal computer which can perform code scanning operation; the server is a computer server or a server cluster used for generating the secondary verification anti-counterfeiting two-dimensional code and performing verification; the secondary verification anti-counterfeiting two-dimensional code and the server for verification can be the same physical host or independent hosts. The secondary verification anti-counterfeiting method provided by the embodiment of the invention is applied to a server.
In an embodiment, as shown in fig. 2, a secondary verification anti-counterfeiting code generation algorithm in a secondary verification anti-counterfeiting method is provided, and a specific implementation flow includes the following steps:
s1: and according to a preset code value generation algorithm, allocating a unique code value with a preset length to each commodity.
Code values are a set of strings of numbers or characters, or a combination of both, such as 201039c485960a; the length of the bit can be flexibly determined according to the requirements of practical application, for example, 12-36 bits. The code value is used to uniquely identify each item. The preset code value generation algorithm is a code value generation method that can be flexibly selected according to actual needs, for example, a random numerical value of a server memory is used as a code value.
S2: and after the code values are encrypted and subjected to checksum operation, the offset values corresponding to the code values one to one are obtained by taking the remainder.
The offset value is a value derived from the code value, usually 0 to 9; the offset value is the re-identification of the code value, and in the checking process, the code value and the offset value need to be checked simultaneously to determine the authenticity of the commodity. The obtaining of the offset value comprises three steps of encryption, checksum operation and remainder, wherein the code value is encrypted firstly, and the encryption can adopt various modes, such as MD5 algorithm and the like; then, carrying out checksum operation on the encryption result, such as CRC (cyclic redundancy check) and the like, and converting the encryption result into a numerical value of a fixed bit number; and finally, carrying out remainder calculation on the numerical value of the fixed digit to obtain the offset value. For example, when the checksum operation yields 3456676, the bits are added up to 37 and the remainder is taken to yield an offset of 7.
S3: and synthesizing the code value and a two-dimensional code picture generated by a preset two-dimensional code generation algorithm to obtain a two-dimensional code vector diagram.
The preset two-dimensional code generation algorithm can be a two-dimensional code vector diagram generated after code values are input based on a two-dimensional code open source diagram library generation algorithm. The two-dimensional code vector diagram contains link information with code values, for example, https:// abc.com/test.phpid =1234567. Wherein, the '1234567' is the code value; and after the code is scanned by the user, the authenticity of the commodity can be verified by requesting the server through the link information. Meanwhile, the code values are placed below the two-dimensional codes of the two-dimensional code vector diagram (as shown in fig. 3). It is understood that the code values can be placed on the upper side or both sides, and determined according to the actual typesetting requirements.
S4: and embedding the deviation value into a preset position in the two-dimensional code vector diagram.
The preset position in the two-dimensional code vector diagram can be flexibly determined according to actual needs, and the conventional offset value can be placed at the center of the two-dimensional code area, so that the user can conveniently identify the two-dimensional code.
S5: and positioning the corresponding position of the code value according to the deviation value, and marking the corresponding position to obtain the secondary verification anti-counterfeiting two-dimensional code.
Taking the offset value as 6 as an example, the corresponding position of the code value may be from the first bit to the 6 th bit on the right side of the code value; alternatively, the code value is ordered from the first bit to the 6 th bit on the left side. It is understood that the corresponding position can also be a position in the order or the inverse from any bit of the code value. Namely, the complexity of the check algorithm can be increased by multiple choices, and the robustness of the check algorithm is improved.
The marking processing refers to image processing of the two-dimensional code vector image, and marks the corresponding position of the code value positioned by the offset value so as to play a role in identification. The marking processing mode is various and can be distinguished by adopting the differences of colors, fonts and the like. A typical double-check anti-counterfeit two-dimensional code is shown in fig. 3, in which the offset value is 6, and the "1" corresponding to the 6 th ordinal digit on the right side of the code value is marked in bold.
The secondary verification anti-counterfeiting code generation algorithm is used for generating a secondary verification anti-counterfeiting two-dimensional code which is difficult to copy in batches, different from a common two-dimensional code, the secondary verification anti-counterfeiting two-dimensional code is overlapped with three elements, namely the two-dimensional code, a code value and an offset value, and the security is higher.
In the verification process, as shown in fig. 4, the anti-counterfeiting verification algorithm in the secondary verification anti-counterfeiting method specifically realizes a flow, and includes the following steps:
s6: and retrieving the code value sent after the secondary verification anti-counterfeiting two-dimensional code is scanned by the client.
The code value is attached to the link information of the secondary verification anti-counterfeiting two-dimensional code, when the client initiates a verification request to the server, the server analyzes the received information, retrieves the obtained code value, and the retrieval can occur in a local server or a server cluster.
S7: and if the code value is not detected to exist, determining that the commodity is false.
That is, if the server cannot retrieve the code value matching the code value transmitted by the client, the product is false.
S8: if the code value exists, encrypting the code value, checking and operating, and then obtaining the remainder to obtain a target offset value; and sends the target offset value to the client.
If the server retrieves the code value matching the code value sent by the client, the offset value of the code value needs to be further verified. Namely, the step of obtaining the offset value in the secondary check anti-counterfeiting code generation method is repeated, the code value is encrypted, subjected to checksum operation and subjected to residue taking to obtain a target offset value, and the target offset value is sent to the client. The user can check whether the target deviant is consistent with the value embedded in the secondary check anti-counterfeiting two-dimensional code or not and the mark bits different from other bits in the code value by himself to determine the authenticity of the commodity. As another implementation, the server may also directly send the result of matching the target offset value to the client.
The anti-counterfeiting verification algorithm is used for identifying authenticity of the commodity attached with the secondary verification anti-counterfeiting two-dimensional code, namely, the code value and the deviant are verified twice to ensure that the commodity to be verified is not a counterfeit product, and compared with a common verification algorithm, the anti-counterfeiting verification algorithm is higher in safety.
Further, in an embodiment, as shown in fig. 5, a specific implementation flow of the preset code value generation algorithm includes the following steps:
s11: a random number is generated based on the current timestamp.
The current time is the local time of the server, and specifically, the server can be used as an input seed at present and call a random function to generate a random number.
S12: and combining the random number with the unique identification of each distributed node of the back-end server and the preset user identification information to generate a code value.
Each distributed node of the back-end Server, that is, the back-end Server, is a distributed network composed of a plurality of servers, each node corresponds to one Server, and the Server ID of the node is the unique identifier in the distributed network, for example, server01.
The preset user identification information includes the name of the user, the commodity type, the generated batch and other related information, for example, clientA _ book _11.
Specifically, the random number, the unique identifier, and the preset user identifier information may be sequentially arranged, for example, the code value is Server01_ clientA _ book _11_18224795323; or, any bit character in the three is extracted for splicing, and the like.
In the embodiment, the code value is generated by combining the random number, the server identifier and the preset user information, so that the uniqueness of the code value is further ensured, and repeated collision is avoided.
Further, in an embodiment, the encrypting and checksum operation on the code value includes the steps of:
s21: AES encryption is carried out on the code value, and CRC checksum operation is carried out on the encryption result according to bits.
AES encryption, i.e., advanced encryption standard, symmetric encryption algorithm; CRC is a cyclic redundancy check code.
In the embodiment, the offset value obtained from the code value has higher security and is not easy to be cracked reversely by AES encryption and bit-by-bit CRC checksum operation.
Further, in an embodiment, the marking process for the corresponding position includes the steps of:
s51: and highlighting or reversing the corresponding position.
Highlighting and reverse processing, namely, highlighting the color of the numerical value at the corresponding position in an image processing mode so as to distinguish the color from other numerical values in the code value.
In this embodiment, the corresponding position in the code value is easier to be visually recognized by the user after the highlight or reverse color processing is performed.
Further, in an embodiment, after step S6 and before step S7, that is, after retrieving the code value sent after the code scanning by the client for the second verification of the anti-counterfeit two-dimensional code, and before determining that the commodity is false if the code value is not found, the method further includes the following steps:
s9: storing and recording the retrieval times;
that is, the number of times each retrieved code value is requested to be authenticated is recorded. For example, when the code value a is searched 3 times, the code value a and the number of searches 3 are recorded.
Step S7 further includes the steps of:
s71: and if the retrieval times are larger than a preset threshold value, determining that the commodity is false.
The preset threshold is used to define whether the number of times of search exceeds the standard, and taking the preset threshold as 5 as an example, if the number of times of search exceeds 5, it represents that there is a possibility of being counterfeited, and thus it is determined that the product is false.
S72: if the code value exists in the searched state and the searching times are less than or equal to the preset threshold value, the code value is encrypted, checked and calculated, and then the remainder is obtained to obtain a target offset value; and sends the target offset value to the client.
And based on the limit of the retrieval times, after the code value is retrieved to exist, further comparing the retrieval times with a preset threshold value. And if the retrieval times are less than or equal to the preset threshold, sequentially encrypting, checking and calculating the code value, and then taking the remainder to obtain a target offset value, sending the target offset value to the client, and automatically judging whether the target offset value is equal to the value marked in the secondary check anti-counterfeiting two-dimensional code by the user.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by functions and internal logic of the process, and should not limit the implementation process of the embodiments of the present invention in any way.
In an embodiment, a secondary verification anti-counterfeiting device is provided, and the secondary verification anti-counterfeiting device corresponds to the secondary verification anti-counterfeiting method in the embodiment one to one. As shown in fig. 7, the secondary verification anti-counterfeiting device comprises a secondary verification anti-counterfeiting code generation module 7001 and an anti-counterfeiting verification module 7002. The functional modules are explained in detail as follows:
the secondary check anti-counterfeiting code generation module comprises:
the global unique code generating module 71 is configured to allocate a unique code value of a preset length to each commodity according to a preset code value generating algorithm;
the offset value generation module 72 is configured to encrypt, check and sum the code value, and then obtain the offset values corresponding to the code value one by one;
the two-dimensional code production module 73 is configured to synthesize the code value with a two-dimensional code picture generated by a preset two-dimensional code generation algorithm to obtain a two-dimensional code vector diagram;
a synthesizing module 74, configured to embed the offset value into a preset position in the two-dimensional code vector diagram;
the offset value positioning image processing module 75 is configured to position a corresponding position of the code value according to the offset value, and mark the corresponding position to obtain a secondary verification anti-counterfeiting two-dimensional code;
the anti-counterfeiting check module comprises:
the code value retrieval module 76 is used for retrieving the code value sent after the anti-counterfeiting two-dimensional code is scanned by the client for the second time;
a first counterfeit detection module 77, configured to determine that the commodity is false if the code value is not found;
the second counterfeit identification module 78 is configured to, if the code value is found to exist, encrypt, check and sum the code value, and then take the remainder to obtain a target offset value; and sends the target offset value to the client.
Further, the globally unique code generating module 71 further includes:
a random number generation submodule 711 for generating a random number according to the current timestamp;
and an information combining submodule 712, configured to combine the random number with the unique identifier of each distributed node of the back-end server and preset user identifier information, so as to generate a code value.
Further, the offset value generating module 72 further includes:
and the symmetric encryption check operation submodule 721 is configured to perform AES encryption on the code value, and perform CRC checksum operation on an encryption result by bit.
Further, the offset value positioning image processing module 75 further includes:
and a color difference processing submodule 751 for highlighting or inverting the corresponding position.
Further, the anti-counterfeiting check module further comprises:
a verification frequency recording module 79 for storing and recording the retrieval frequency;
the second authentication module 78 further comprises:
the verification frequency judgment first sub-module 781 is used for determining that the commodity is false if the retrieval frequency is greater than a preset threshold;
the verification frequency judgment second sub-module 782, configured to, if the code value is found, and the retrieval frequency is smaller than or equal to the preset threshold, encrypt, check and sum the code value, and then take the remainder to obtain a target offset value; and sends the target offset value to the client.
For specific limitations of the secondary verification anti-counterfeiting device, reference may be made to the above limitations of the secondary verification anti-counterfeiting method, which are not described herein again. All or part of each module in the secondary verification anti-counterfeiting device can be realized through software, hardware and a combination of the software and the hardware. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as shown in fig. 8. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to realize a secondary verification anti-counterfeiting method.
In one embodiment, a computer device is provided, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the steps of the secondary verification anti-counterfeiting method in the above embodiments are implemented, for example, steps S1 to S8 shown in fig. 2 and 3. Or, the processor implements the functions of each module/unit of the secondary verification anti-counterfeiting device in the above embodiments when executing the computer program. To avoid repetition, further description is omitted here.
In an embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and the computer program, when being executed by a processor, implements the secondary verification anti-counterfeiting method in the above method embodiment, or the computer program, when being executed by the processor, implements the functions of each module/unit in the secondary verification anti-counterfeiting in the above device embodiment. To avoid repetition, further description is omitted here.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, databases, or other media used in embodiments provided herein may include non-volatile and/or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), rambus (Rambus) direct RAM (RDRAM), direct Rambus Dynamic RAM (DRDRAM), and Rambus Dynamic RAM (RDRAM), among others.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not depart from the spirit and scope of the embodiments of the present invention, and they should be construed as being included therein.

Claims (10)

1. A secondary verification anti-counterfeiting method is characterized by comprising a secondary verification anti-counterfeiting code generation algorithm and an anti-counterfeiting verification algorithm, wherein the secondary verification anti-counterfeiting code generation algorithm comprises:
allocating a unique code value with a preset length to each commodity;
after encrypting and checking the code value, carrying out residue taking to obtain offset values corresponding to the code value one by one;
synthesizing the code value and a two-dimensional code picture generated by a preset two-dimensional code generation algorithm to obtain a two-dimensional code vector diagram;
embedding the offset value into the two-dimensional code vector diagram;
positioning the corresponding position of the code value according to the offset value, and marking the corresponding position to obtain a secondary verification anti-counterfeiting two-dimensional code; the marking processing is used for carrying out image processing on the two-dimensional code vector graph, and marking the corresponding position of the code value positioned by the offset value to play a role in identification;
the anti-counterfeiting verification algorithm comprises the following steps:
searching the code value sent by the client after scanning the secondary verification anti-counterfeiting two-dimensional code;
if the code value does not exist in the search, determining that the commodity is false;
if the code value exists, encrypting the code value, performing checksum operation, and then taking the remainder to obtain a target offset value; and sending the target offset value to the client.
2. The secondary verification anti-counterfeiting method according to claim 1, wherein the step of assigning a unique code value with a preset length to each commodity comprises the following steps:
generating a random number according to the current timestamp;
and combining the random number with the unique identification of each distributed node of the back-end server and preset user identification information to generate the code value.
3. The secondary verification anti-counterfeiting method according to claim 1, wherein the encrypting, checking and calculating the code value comprises:
and carrying out AES encryption on the code value, and carrying out CRC checksum operation on the encryption result according to bits.
4. The secondary verification anti-counterfeiting method according to claim 1, wherein the marking of the corresponding position comprises:
and highlighting or reversing the corresponding position.
5. The secondary verification anti-counterfeiting method according to claim 1, wherein after the code value sent after the client scans the secondary verification anti-counterfeiting two-dimensional code is retrieved, and before the commodity is determined to be false if the code value is not retrieved, the method further comprises:
storing and recording the retrieval times;
if the code value exists, encrypting the code value, checking and operating, and then obtaining the remainder to obtain a target offset value; and sending the target offset value to the client, including:
if the retrieval times are larger than a preset threshold value, determining that the commodity is false;
if the code value exists in the searched code value and the searching times are smaller than or equal to a preset threshold value, carrying out encryption, checksum operation and remainder on the code value to obtain a target offset value; and sending the target offset value to the client.
6. The utility model provides a secondary check anti-counterfeiting device, its characterized in that, secondary check anti-counterfeiting device includes secondary check anti-counterfeiting code generation module and anti-counterfeiting check module, secondary check anti-counterfeiting code generation module includes:
the global unique code generating module is used for distributing a unique code value with a preset length to each commodity;
the offset value generation module is used for carrying out encryption, checksum operation on the code value and then obtaining offset values corresponding to the code value one by taking the remainder;
the two-dimension code production module is used for synthesizing the code value and a two-dimension code picture generated by a preset two-dimension code generation algorithm to obtain a two-dimension code vector diagram;
the synthesis module is used for embedding the offset value into the two-dimensional code vector diagram;
the offset value positioning image processing module is used for positioning the corresponding position of the code value according to the offset value and marking the corresponding position to obtain a secondary verification anti-counterfeiting two-dimensional code; the marking processing is used for carrying out image processing on the two-dimensional code vector diagram, and marking the corresponding position of the code value positioned by the offset value to play a role in identification;
the anti-counterfeiting check module comprises:
the code value retrieval module is used for retrieving the code value sent by the client after scanning the secondary verification anti-counterfeiting two-dimensional code;
the first counterfeit identification module is used for determining that the commodity is false if the code value is not searched;
the second counterfeit identification module is used for encrypting the code value, checking and calculating the code value and then obtaining the remainder to obtain a target offset value if the code value is searched; and sending the target offset value to the client.
7. The double-check anti-counterfeiting device according to claim 6, wherein the globally unique code generating module comprises:
the random number generation submodule is used for generating a random number according to the current timestamp;
and the information combination submodule is used for combining the random number with the unique identifier of each distributed node of the back-end server and preset user identifier information to generate the code value.
8. The double-check anti-counterfeiting device according to claim 6, wherein the offset value generation module comprises:
and the symmetric encryption check submodule is used for carrying out AES encryption on the code value and carrying out CRC checksum operation on an encryption result according to bits.
9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the secondary proof method according to any one of claims 1 to 5 when executing the computer program.
10. A computer-readable storage medium, in which a computer program is stored, and the computer program is executed by a processor to implement the secondary verification anti-counterfeiting method according to any one of claims 1 to 5.
CN202010387690.6A 2020-05-09 2020-05-09 Secondary check anti-counterfeiting method, device, equipment and storage medium Active CN111612476B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010387690.6A CN111612476B (en) 2020-05-09 2020-05-09 Secondary check anti-counterfeiting method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010387690.6A CN111612476B (en) 2020-05-09 2020-05-09 Secondary check anti-counterfeiting method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111612476A CN111612476A (en) 2020-09-01
CN111612476B true CN111612476B (en) 2023-04-07

Family

ID=72204775

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010387690.6A Active CN111612476B (en) 2020-05-09 2020-05-09 Secondary check anti-counterfeiting method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111612476B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113326394A (en) * 2021-06-30 2021-08-31 合肥高维数据技术有限公司 Vector diagram watermark embedding and tracing method and system
CN114661730B (en) * 2022-05-25 2022-09-09 江苏无痕防伪科技有限公司 Anti-counterfeiting data processing method suitable for printed matter
JP7320309B1 (en) * 2022-06-20 2023-08-03 三郷コンピュータホールディングス株式会社 A code printed with a reader-readable identifier

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101377837A (en) * 2007-08-29 2009-03-04 北京方维银通科技有限公司 Method for generating and checking electronic check two-dimension code credence
CN103605950A (en) * 2013-11-25 2014-02-26 广西大学 Method and system for hiding signature in credible two-dimensional code
CN104751337A (en) * 2013-12-31 2015-07-01 腾讯科技(深圳)有限公司 Product anti-fake method, device and system
CN106295755A (en) * 2015-05-27 2017-01-04 东莞文胜鼎电子科技有限公司 Two-dimensional code generation method, detection method, detection device and antifalsification label
CN106529977A (en) * 2016-11-04 2017-03-22 深圳盛灿科技股份有限公司 Anti-counterfeiting method and system with support of terminal memory based on WeChat public account
CN107169775A (en) * 2017-05-11 2017-09-15 成都水微信息技术有限公司 False proof marketing system and the method for tracing to the source based on wechat
CN107423797A (en) * 2017-07-31 2017-12-01 成都新得利电子有限公司 A kind of security code information generating method
CN107545427A (en) * 2017-09-19 2018-01-05 深圳市光域物联科技有限公司 Light Quick Response Code payment mechanism, system and method
CN107609873A (en) * 2017-09-08 2018-01-19 阿里巴巴集团控股有限公司 A kind of barcode scanning safe checking method and device
WO2018103755A1 (en) * 2016-12-09 2018-06-14 北京大码技术有限公司 Combined two-dimensional code, electronic certificate carrier, and generation and reading apparatus and method
WO2018103756A1 (en) * 2016-12-09 2018-06-14 北京大码技术有限公司 Combined two-dimensional code anti-counterfeiting system and method, combined two-dimensional code and reading apparatus

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101377837A (en) * 2007-08-29 2009-03-04 北京方维银通科技有限公司 Method for generating and checking electronic check two-dimension code credence
CN103605950A (en) * 2013-11-25 2014-02-26 广西大学 Method and system for hiding signature in credible two-dimensional code
CN104751337A (en) * 2013-12-31 2015-07-01 腾讯科技(深圳)有限公司 Product anti-fake method, device and system
CN106295755A (en) * 2015-05-27 2017-01-04 东莞文胜鼎电子科技有限公司 Two-dimensional code generation method, detection method, detection device and antifalsification label
CN106529977A (en) * 2016-11-04 2017-03-22 深圳盛灿科技股份有限公司 Anti-counterfeiting method and system with support of terminal memory based on WeChat public account
WO2018103755A1 (en) * 2016-12-09 2018-06-14 北京大码技术有限公司 Combined two-dimensional code, electronic certificate carrier, and generation and reading apparatus and method
WO2018103756A1 (en) * 2016-12-09 2018-06-14 北京大码技术有限公司 Combined two-dimensional code anti-counterfeiting system and method, combined two-dimensional code and reading apparatus
CN108229596A (en) * 2016-12-09 2018-06-29 北京大码技术有限公司 Combined two-dimension code, digital certificates carrier, generation, reading device and method
CN107169775A (en) * 2017-05-11 2017-09-15 成都水微信息技术有限公司 False proof marketing system and the method for tracing to the source based on wechat
CN107423797A (en) * 2017-07-31 2017-12-01 成都新得利电子有限公司 A kind of security code information generating method
CN107609873A (en) * 2017-09-08 2018-01-19 阿里巴巴集团控股有限公司 A kind of barcode scanning safe checking method and device
CN107545427A (en) * 2017-09-19 2018-01-05 深圳市光域物联科技有限公司 Light Quick Response Code payment mechanism, system and method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
字符二维码识别系统的设计与实现;郭淑君;《中国优秀硕士学位论文全文数据库》;20160915;全文 *

Also Published As

Publication number Publication date
CN111612476A (en) 2020-09-01

Similar Documents

Publication Publication Date Title
CN111612476B (en) Secondary check anti-counterfeiting method, device, equipment and storage medium
US10210386B2 (en) Storing identification data as virtual personally identifiable information
EP1520369B1 (en) Biometric authentication system
US20180219681A1 (en) Electronically signing and distributing identification data as a service that provides proof of identity, integrity, validity and origin of data for non-repudiation and id validation methods
US11615176B2 (en) Registration and verification of biometric modalities using encryption techniques in a deep neural network
CN109361669B (en) Identity authentication method, device and equipment of communication equipment
CN110581860A (en) identity authentication method, device, storage medium and equipment based on block chain
CN105096143A (en) Anti-counterfeiting method, anti-counterfeiting system, server and intelligent terminal
CN103281386B (en) A kind ofly provide the method for safeguard protection for article mark and analysis service thereof
US20090327762A1 (en) Methods and Systems for Secure Encryption of Data
CN110224833B (en) Bill data processing method and system
CN111612963B (en) Bill voucher anti-counterfeiting detection method and device based on intelligent equipment
CN110555779A (en) data processing method, data processing device, computer equipment and storage medium
CN115514585B (en) Database security management method and system
CN110457916B (en) Electronic contract encryption method and device and terminal equipment
CN111125748A (en) Judgment method and device for unauthorized query, computer equipment and storage medium
CN116503183B (en) Safety data security encryption method and system
CN116432238B (en) Data storage method and device and storage chip
CN110990410B (en) Information searching method and device in block chain, storage medium and computer equipment
CN112541102A (en) Abnormal data filtering method, device, equipment and storage medium
CN115511030A (en) Anti-counterfeiting verification method and device and electronic equipment
CN110968275A (en) The anti-counterfeiting tracing system and method for the printed document
CN112307445B (en) Identity management method and device based on block chain
CN110084329A (en) The set code method of centre letter code
CN112069522A (en) Electronic prescription processing method and device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant