Anti-counterfeiting verification method and device, electronic equipment and storage medium
By storing high-resolution anti-counterfeiting patterns in the server and dynamically generating feature patterns, the problem of anti-counterfeiting patterns due to insufficient environment and accuracy is solved, efficient and reliable anti-counterfeiting verification is achieved, and production and verification costs are reduced.
Patent Information
- Application Number
- CN202510375301.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-27
- Publication Date
- 2025-08-01
AI Technical Summary
Anti-counterfeiting patterns are unable to effectively play the anti-counterfeiting role due to environmental impact, insufficient printing accuracy and shooting accuracy, and existing solutions increase production costs or verification complexity.
Store high-resolution anti-counterfeiting patterns in the server, and obtain high-resolution patterns by scanning low-resolution solid patterns for verification. The feature patterns are arranged at the edges of the basic patterns and are dynamically generated, reducing printing requirements and improving verification reliability.
It effectively avoids environmental factors and insufficient printing accuracy, improves the reliability and flexibility of anti-counterfeiting verification, and reduces production costs and verification complexity.
Smart Images

Figure CN120411547A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of anti-counterfeiting verification, and in particular, to an anti-counterfeiting verification method, device, electronic device and storage medium. Background Art
[0002] To enhance the credibility of the anti-counterfeiting pattern itself, some manufacturers will add characteristic graphics (i.e., anti-counterfeiting features) to the edge of the anti-counterfeiting pattern. Such characteristic graphics are often microtexts, which are local details in the anti-counterfeiting pattern. These local details are difficult to forge, and in the anti-counterfeiting verification process, a more secure and reliable anti-counterfeiting effect can be achieved by obtaining the image of the anti-counterfeiting pattern and comparing and analyzing the local details.
[0003] However, the anti-counterfeiting pattern is often directly printed on the anti-counterfeiting label, resulting in the following problems when this anti-counterfeiting label is actually applied: 1. The physical anti-counterfeiting label is exposed to the environment, causing the printed anti-counterfeiting pattern to be easily affected by the environment and resulting in problems such as fading, discoloration, and wear, thus leading to the loss of local details; 2. Low printing precision will also lead to the loss of local details; 3. If a non-specialized device (such as a mobile phone) is used to take an image of the anti-counterfeiting pattern, if the shooting precision is low or the retouching function is used, it will also lead to the loss of local details.
[0004] The above problems cause the characteristic graphics in the anti-counterfeiting pattern to fail to play their due anti-counterfeiting role. Summary of the Invention
[0005] The purpose of the present invention is to provide an anti-counterfeiting verification method, device, electronic device and storage medium, which solves the problem of the loss of local details caused by various reasons when the anti-counterfeiting pattern is printed on the physical label, achieves the effect of ensuring that the characteristic graphics play an anti-counterfeiting role, and is beneficial to extending the service life of the anti-counterfeiting label.
[0006] In a first aspect, the present invention provides an anti-counterfeiting verification method, including the following steps: S1. Scan the first anti-counterfeiting pattern on the anti-counterfeiting label to obtain the second anti-counterfeiting pattern sent by the server. The image resolution of the first anti-counterfeiting pattern is lower than that of the second anti-counterfeiting pattern, and the first anti-counterfeiting pattern includes a first basic graphic; the second anti-counterfeiting pattern includes a second basic graphic and a characteristic graphic. The characteristic graphic is arranged on the edge of the second basic graphic, and the size of the characteristic graphic is smaller than that of the second basic graphic; S2. Judge the authenticity of the anti-counterfeiting label according to the second anti-counterfeiting pattern.
[0007] The anti-counterfeiting verification method provided by the present invention retrieves a clear and undamaged anti-counterfeiting pattern from the server, thereby accurately determining the authenticity of the anti-counterfeiting label based on the characteristic graphics therein, ensuring that the anti-counterfeiting label can be normally used for anti-counterfeiting verification.
[0008] Further, the specific steps in step S1 include: S11. When scanning the first anti-counterfeiting pattern for the first time to obtain the second anti-counterfeiting pattern, execute: S111. Scan the first anti-counterfeiting pattern to obtain a serial number; the serial number has a unique correspondence with the first anti-counterfeiting pattern; S112. Send the serial number to the server so that the server executes the following steps: A1. Obtain the second basic graphic from the preset database according to the serial number; the serial number has a unique correspondence with the second basic graphic; A2. Generate the second anti-counterfeiting pattern according to the serial number and the second basic graphic; A3. Update the second basic graphic in the preset database to the second anti-counterfeiting pattern and maintain a unique correspondence with the serial number so that when scanning the first anti-counterfeiting pattern next time, the server directly obtains the second anti-counterfeiting pattern from the preset database according to the serial number; S113. Receive the second anti-counterfeiting pattern sent by the server.
[0009] Generating a second anti-counterfeiting pattern for products with anti-counterfeiting verification requirements can effectively relieve the storage pressure on the server, enabling the service provider to flexibly allocate storage resources according to actual needs.
[0010] Further, the shape of the second basic graphic is the same as the shape of the first basic graphic.
[0011] By maintaining the consistency of the basic graphic shape, the problem of excessive design costs caused by different basic graphics is solved. It not only simplifies the production process of the anti-counterfeiting label but also reduces the design cost.
[0012] Further, the shape of the second basic graphic is different from the shape of the first basic graphic; the shape of the second basic graphic corresponding to one serial number in the preset database is the same as the shape of the second basic graphic corresponding to another serial number.
[0013] By having different first basic graphics corresponding to different serial numbers, but allowing the second basic graphics corresponding to different serial numbers in the preset database to have the same shape. This design enables multiple serial numbers to share the second basic graphic with the same shape, thereby reducing the design cost of the second basic graphic.
[0014] Further, the serial number includes a texture category, a complexity level, a time hash value, and an identifier hash value; the second basic graphic is a two-dimensional code including a plurality of squares; When generating the second anti-counterfeiting pattern according to the serial number and the second basic graphic, the server executes: A21. Calculate an edge fluctuation coefficient according to the complexity level, the time hash value, and the identifier hash value; A22. Determine a generation algorithm according to the texture category and the edge fluctuation coefficient, and generate the feature graphic at the edge of the square through the generation algorithm to obtain the second anti-counterfeiting pattern.
[0015] Further, the specific steps in step A21 include: A211. Calculate the edge fluctuation coefficient according to the following formula: ; ; Wherein, is the edge fluctuation coefficient, is the complexity level, , is the sum of the values of each character in the time hash value, is the time hash value, is the local perturbation intensity, is the identifier hash value.
[0016] Further, the texture category includes ripples, cracks, and random noise; The specific steps in step A22 include: A22A. When the texture category is ripples, generate the feature graphic according to the following formula: ; Wherein, is the generation algorithm for , is the coordinate point on the edge of the square, is the axis coordinate of the edge of the square, is the axis coordinate of the edge of the square, is the preset fluctuation frequency, is a random first phase, is a random second phase; A22B. When the texture category is cracks, generate the feature graphic according to the following formula: ; Among them, is the sign function with respect to ; When the texture category of A22C is random noise, the characteristic pattern is generated according to the following formula: ; Among them, is the noise function with respect to , .
[0017] In a second aspect, the present invention provides an anti-counterfeiting verification device, including: An acquisition module, configured to scan a first anti-counterfeiting pattern on an anti-counterfeiting label to obtain a second anti-counterfeiting pattern sent by a server, the image resolution of the first anti-counterfeiting pattern being lower than that of the second anti-counterfeiting pattern and the first anti-counterfeiting pattern including a first basic pattern; the second anti-counterfeiting pattern includes a second basic pattern and a characteristic pattern, the characteristic pattern being arranged at the edge of the second basic pattern and the size of the characteristic pattern being smaller than that of the second basic pattern; A judgment module, configured to judge the authenticity of the anti-counterfeiting label according to the second anti-counterfeiting pattern.
[0018] The anti-counterfeiting verification device provided by the present invention enables the first anti-counterfeiting pattern to obtain a complete high-resolution pattern for verification through the server as long as the basic pattern can still be recognized even if it is partially damaged due to environmental factors. At the same time, since the high-resolution pattern is stored in the server, the problem of detail loss caused by insufficient printing accuracy and shooting accuracy is effectively avoided.
[0019] In a third aspect, the present invention provides an electronic device, including a processor and a memory, the memory storing computer-readable instructions, and when the computer-readable instructions are executed by the processor, the steps in the anti-counterfeiting verification method provided in the first aspect as described above are run.
[0020] In a fourth aspect, the present invention provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps in the anti-counterfeiting verification method provided in the first aspect as described above are run.
[0021] As can be seen from the above, the anti-counterfeiting verification method provided by the present invention stores a high-resolution anti-counterfeiting pattern including a characteristic pattern as image data in a server for users to call. Compared with directly printing it on the anti-counterfeiting label, it can effectively avoid the missing of the characteristic pattern, so as to ensure that the characteristic pattern plays its due anti-counterfeiting role. At the same time, the first anti-counterfeiting pattern printed on the anti-counterfeiting label no longer requires high resolution, so the production difficulty of the anti-counterfeiting label is reduced, and in addition, the service life of the anti-counterfeiting label itself is extended.
[0022] Other features and advantages of the present invention will be described in the subsequent specification, and in part, will become apparent from the specification, or can be understood by implementing the embodiments of the present invention. The objectives and other advantages of the present invention can be achieved and obtained by the structures specifically pointed out in the written specification and the accompanying drawings. Description of the Drawings
[0023] Figure 1 It is a flowchart of an anti-counterfeiting verification method provided for an embodiment of the present invention.
[0024] Figure 2 It is the second anti-counterfeiting pattern generated when the texture category is corrugation in an embodiment of the present invention.
[0025] Figure 3 It is the second anti-counterfeiting pattern generated when the texture category is crack in an embodiment of the present invention.
[0026] Figure 4 It is the second anti-counterfeiting pattern generated when the texture category is random noise in an embodiment of the present invention.
[0027] Figure 5 It is a schematic structural diagram of an anti-counterfeiting verification device provided for an embodiment of the present invention.
[0028] Figure 6 It is a schematic structural diagram of an electronic device provided for an embodiment of the present invention.
[0029] Reference Signs Explanation: 100, acquisition module; 200, judgment module; 13, electronic device; 1301, processor; 1302, memory; 1303, communication bus. Detailed Embodiments
[0030] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Usually, the components of the embodiments of the present invention described and shown in the accompanying drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the claimed present invention, but only represents the selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative efforts fall within the scope of protection of the present invention.
[0031] It should be noted that similar reference numerals and letters indicate similar items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of the present invention, terms such as "first" and "second" are only used for distinguishing descriptions and cannot be understood as indicating or implying relative importance.
[0032] In a typical product anti-counterfeiting application scenario, assume that a high-end electronic product manufacturer uses an anti-counterfeiting label containing microtext graphics features. The anti-counterfeiting pattern on the label includes a basic QR code, and complex tiny textures are added to its edge as feature graphics. In theory, this design can be verified for the authenticity of the product by scanning with a smartphone. However, during actual use, since the product packaging is often subject to friction and environmental influences during transportation and storage, the tiny texture part on the label is worn or faded. In addition, due to the resolution limitation of ordinary smartphone cameras (for example, only 12 million pixels), it is difficult to accurately capture these tiny feature graphics even under ideal light conditions. Even worse, the automatic image enhancement function of some smartphones may further blur these details. Thus, during actual verification, the system often fails to recognize or misidentifies these feature graphics, resulting in a significant reduction in the anti-counterfeiting effect.
[0033] The consequences caused by the above problems will be serious. First, the anti-counterfeiting effect of the product will be greatly reduced, making it easier for counterfeiters to copy or forge the anti-counterfeiting label, thus increasing the risk of counterfeit products flowing into the market. Second, due to the decreased reliability of the anti-counterfeiting system, a large number of misjudgments may occur, either misjudging genuine products as counterfeits or misjudging counterfeits as genuine products, which will seriously affect the reputation of the enterprise and the confidence of consumers. In addition, to make up for this defect, the enterprise may be forced to add other more complex and expensive anti-counterfeiting measures, which will not only increase production costs but also may affect the product design and user experience. In response, first, considering that the anti-counterfeiting label is directly exposed to the environment and is easily affected, a possible solution is to improve the material and printing process of the anti-counterfeiting label to enhance its durability. However, this method may significantly increase production costs and still cannot completely solve the wear problem during long-term use. Second, considering the limitation of printing accuracy, an attempt can be made to improve the printing accuracy of the anti-counterfeiting pattern. But this method not only requires more advanced printing equipment, increasing costs, but also still cannot solve the problems of environmental factors and shooting accuracy. Third, to solve the problem of insufficient shooting accuracy of non-specialized equipment, specialized high-precision scanning equipment can be developed. But this method will greatly increase the verification cost and is not convenient for ordinary users to use.
[0034] In contrast, referring to the attached Figure 1 , the present invention provides an anti-counterfeiting verification method, including the following steps: S1. Scan the first anti-counterfeiting pattern on the anti-counterfeiting label to obtain the second anti-counterfeiting pattern sent by the server. The image resolution of the first anti-counterfeiting pattern is lower than that of the second anti-counterfeiting pattern, and the first anti-counterfeiting pattern includes a first basic graphic; the second anti-counterfeiting pattern includes a second basic graphic and a feature graphic, and the feature graphic is arranged at the edge of the second basic graphic and the size of the feature graphic is smaller than that of the second basic graphic; S2. Determine the authenticity of the anti-counterfeiting label according to the second anti-counterfeiting pattern.
[0035] The advantages of this embodiment are as follows: First of all, it reduces the printing requirements for physical labels and reduces the influence of environmental factors on the anti-counterfeiting effect. Even if the first anti-counterfeiting pattern is worn or faded to a certain extent, as long as the basic graphic can still be recognized, the complete high-resolution pattern can be obtained from the server.
[0036] Secondly, by storing the high-resolution second anti-counterfeiting pattern in the server, the problem of detail loss caused by insufficient printing accuracy is effectively avoided. The server can store and transmit high-quality image data to ensure the integrity of the feature graphic.
[0037] Thirdly, this method overcomes the limitation of insufficient shooting accuracy of non-specialized devices. Even if a common smartphone is used to scan the low-resolution first anti-counterfeiting pattern, the high-quality second anti-counterfeiting pattern in the server can be obtained, thus realizing reliable anti-counterfeiting verification.
[0038] Finally, this solution has good scalability and update capabilities. The second anti-counterfeiting pattern on the server side can be updated or replaced as needed, enhancing the flexibility and security of the anti-counterfeiting system.
[0039] Among them, the first anti-counterfeiting pattern refers to the low-resolution pattern printed on the anti-counterfeiting label, and specifically, common coding forms such as two-dimensional codes or barcodes can be used to implement it.
[0040] Among them, the second anti-counterfeiting pattern refers to the high-resolution pattern sent by the server, and specifically, a composite image including a basic graphic and a feature graphic can be used to implement it.
[0041] Among them, the feature graphic refers to the tiny pattern arranged at the edge of the second basic graphic, and specifically, forms such as microtext, complex textures or special symbols can be used to implement it.
[0042] The core innovation point of this application is to store the high-resolution anti-counterfeiting pattern in the server, and only print the low-resolution basic graphic on the physical anti-counterfeiting label. By scanning the low-resolution pattern to obtain the high-resolution pattern, the problem that the feature graphic in the anti-counterfeiting pattern cannot play its due anti-counterfeiting role due to environmental influence, insufficient printing accuracy and shooting accuracy is effectively solved.
[0043] Specifically, the anti-counterfeiting verification method of this application includes two key steps: scanning and judgment. In the scanning step, first, a first anti-counterfeiting pattern on the anti-counterfeiting label is obtained through a scanning device (such as a smartphone camera). This first anti-counterfeiting pattern has a low image resolution and only contains basic first basic graphics. The scanning device sends the obtained information to the server, and the server then returns a second anti-counterfeiting pattern with high resolution. The second anti-counterfeiting pattern not only contains a second basic graphic corresponding to the first basic graphic but also adds feature graphics with smaller sizes at its edges.
[0044] In the judgment step, the system makes a authenticity judgment based on the received second anti-counterfeiting pattern. Since the second anti-counterfeiting pattern has high resolution and complete feature graphics, it can provide a more reliable anti-counterfeiting verification result. The advantage of this method is that even if the first anti-counterfeiting pattern is partially damaged due to environmental factors, as long as the basic graphics can still be recognized, a complete high-resolution pattern can be obtained from the server for verification. At the same time, because the high-resolution pattern is stored in the server, it effectively avoids the problem of detail loss caused by insufficient printing accuracy and shooting accuracy.
[0045] The reason for choosing to use the first anti-counterfeiting pattern with low resolution as the physical identifier is to reduce the printing requirements and the influence of environmental factors. And storing the second anti-counterfeiting pattern with high resolution in the server is to ensure the integrity and clarity of the feature graphics. The feature graphics are arranged at the edges of the second basic graphic and have smaller sizes. Such a design increases the complexity of the anti-counterfeiting pattern and improves the anti-counterfeiting effect.
[0046] As a preferred implementation manner, the anti-counterfeiting verification method of this application can be applied to the anti-counterfeiting labels of high-end electronic products. For example, a low-resolution QR code is printed on the packaging box of a smartphone as the first anti-counterfeiting pattern. The size of this QR code is 3 cm × 3 cm, printed in black and white, and contains the unique serial number information of the product.
[0047] When a consumer uses a smartphone to scan this QR code, the mobile application will send the scanning result to the manufacturer's server. After receiving the information, the server will return a second anti-counterfeiting pattern with high resolution. The resolution of this second anti-counterfeiting pattern is 1000 × 1000 pixels. It not only contains the basic graphic corresponding to the original QR code but also adds special microtext and complex textures at its edges as feature graphics.
[0048] The design of the feature graphics can be to add a 5 × 5 pixel-sized brand logo at each corner of the QR code, add 2-pixel-wide wavy textures on the four sides, and surround the entire pattern with 1-pixel-wide microtext of the product name. The sizes of these feature graphics are all smaller than the QR code itself, ensuring that they do not interfere with the basic recognition function of the QR code.
[0049] After the consumer's smartphone receives this high-resolution second anti-counterfeiting pattern, it uploads the second anti-counterfeiting pattern to the anti-counterfeiting verification system, which automatically analyzes the characteristic graphics in the pattern. The verification process includes checking the integrity of the logo, the continuity of the wave texture, and the clarity of the microtext. Only when all these features meet the preset standards will the system determine that the product is genuine.
[0050] In this way, even if the QR code on the physical label is slightly worn due to long-term use, consumers can still obtain a complete high-resolution anti-counterfeiting pattern for verification. At the same time, since the characteristic graphics are stored in the server, they can be updated or modified regularly, further enhancing the security and flexibility of the anti-counterfeiting system.
[0051] In some embodiments, the specific steps in step S1 include: S11. Execute when scanning the first anti-counterfeiting pattern for the first time to obtain the second anti-counterfeiting pattern: S111. Scan the first anti-counterfeiting pattern to obtain a serial number; the serial number has a unique correspondence with the first anti-counterfeiting pattern; S112. Send the serial number to the server so that the server executes the following steps: A1. Obtain the second basic graphic from the preset database according to the serial number; the serial number has a unique correspondence with the second basic graphic; A2. Generate the second anti-counterfeiting pattern according to the serial number and the second basic graphic; A3. Update the second basic graphic in the preset database to the second anti-counterfeiting pattern and maintain a unique correspondence with the serial number so that when the first anti-counterfeiting pattern is scanned next time, the server directly obtains the second anti-counterfeiting pattern from the preset database according to the serial number; S113. Receive the second anti-counterfeiting pattern sent by the server.
[0052] In this embodiment, the server obtains the second basic graphic from the preset database. The preset database can be a relational database or a non-relational database, which stores the correspondence between the serial number and the second basic graphic. The second basic graphic can be a high-resolution image file, and its shape can be the same as or different from the first basic graphic.
[0053] Then, the server generates the second anti-counterfeiting pattern according to the serial number and the second basic graphic. This process can include adding characteristic graphics to the second basic graphic. The characteristic graphics can be microtext, special textures, or other details that are difficult to forge. The generation algorithm can determine the specific form of the characteristic graphics according to different parts of the serial number.
[0054] Then, the server updates the second basic graphic in the preset database to the second anti-counterfeiting pattern, and maintains a unique correspondence with the serial number. This step ensures that when the same first anti-counterfeiting pattern is scanned next time, the corresponding second anti-counterfeiting pattern can be directly obtained, improving the verification efficiency.
[0055] Finally, the server sends the second anti-counterfeiting pattern to the user terminal. After receiving the high-resolution second anti-counterfeiting pattern, the user terminal can perform further anti-counterfeiting verification.
[0056] In practical applications, the first anti-counterfeiting pattern can be used only to point to online resources (such as opening a website) and make the second anti-counterfeiting pattern displayed on the user terminal as electronic anti-counterfeiting information. Therefore, there is no need for printing and photographing of the anti-counterfeiting pattern, so the second anti-counterfeiting pattern will not be missing local details due to environmental factors, printing accuracy, and photographing accuracy.
[0057] Generally, electronic anti-counterfeiting information is often pre-stored in the server for users to query. Therefore, the second anti-counterfeiting pattern is naturally pre-stored in the server. Due to the huge demand for anti-counterfeiting labels and the one-code-for-one-item mode, the server needs a large amount of storage space to store the second anti-counterfeiting pattern (it should be noted that since the second anti-counterfeiting pattern includes the second basic graphic and the feature graphic, the second anti-counterfeiting pattern is much more complex than the second basic graphic. Therefore, the storage space required for the second anti-counterfeiting pattern is larger than that of the second basic graphic. For example, if the occupied space of a single second basic graphic is 1MB, the occupied space of the corresponding second anti-counterfeiting pattern must be greater than 1MB. Therefore, storing all the second anti-counterfeiting patterns requires the server to have a larger storage space).
[0058] In real life, when users need to perform anti-counterfeiting verification, it is often the case that users have already purchased the product. However, for products that have not been purchased, the second anti-counterfeiting pattern pre-stored in the server not only fails to play a verification role immediately when it is generated, but also occupies too much storage space on the server, resulting in an overly large amount of data in the server, making the information query and retrieval process time-consuming and not conducive to the server achieving a fast response effect in the anti-counterfeiting verification process.
[0059] In response to this, in this embodiment, by dynamically generating and storing high-resolution second anti-counterfeiting patterns on the server side, the present application not only solves the influence of environmental factors, printing accuracy, and shooting equipment limitations on the anti-counterfeiting effect, but also improves the security and efficiency of the system. At the same time, since the second anti-counterfeiting pattern is generated only for products with anti-counterfeiting verification requirements, this method can effectively relieve the storage pressure on the server, enabling the service provider to flexibly allocate storage resources according to actual needs.
[0060] In practical applications, the technical solution of the present application can be implemented as follows: When the user first scans the first anti-counterfeiting pattern on the anti-counterfeiting label, the user terminal (such as a smartphone) captures an image of the first anti-counterfeiting pattern through the built-in camera. The image processing software extracts the serial number from this image, such as "ABC123456". The user terminal sends this serial number to the anti-counterfeiting verification server through a secure network connection.
[0061] After receiving the serial number, the server looks for the corresponding second basic graphic in the preset MySQL database. Suppose the second basic graphic is a high-resolution QR code image of 300x300 pixels. The server then uses a specialized image processing algorithm to generate a unique feature graphic based on the serial number "ABC123456". This feature graphic may be a series of tiny ripples or textures added to the edge of the QR code.
[0062] The generated second anti-counterfeiting pattern now contains the original QR code and the feature graphic on the edge, with a resolution that may reach 400x400 pixels. The server stores this newly generated second anti-counterfeiting pattern back in the database, replacing the original second basic graphic, and maintaining the unique correspondence with the serial number "ABC123456".
[0063] Finally, the server sends this 400x400 pixel second anti-counterfeiting pattern back to the user terminal through a secure data transmission channel. After receiving this high-resolution second anti-counterfeiting pattern, the user terminal can display it on the screen for the user to conduct detailed anti-counterfeiting verification.
[0064] In this way, even if there are partial details missing in the first anti-counterfeiting pattern due to environmental factors or printing accuracy issues, the user can still obtain a complete and high-resolution second anti-counterfeiting pattern for verification. This greatly improves the reliability and accuracy of anti-counterfeiting.
[0065] Compared with the prior art, traditional methods usually rely on patterns directly printed on anti-counterfeiting labels and are easily affected by the environment and printing quality. While this application effectively overcomes these limitations by dynamically generating and storing high-resolution anti-counterfeiting patterns on the server side. In addition, the method of this application can also dynamically generate anti-counterfeiting patterns according to actual needs, avoiding the waste of resources caused by pre-generating and storing a large number of unused anti-counterfeiting patterns, and reflecting higher efficiency and flexibility.
[0066] In some embodiments, the shape of the second basic graphic is the same as the shape of the first basic graphic.
[0067] This embodiment solves the problem of excessive design costs caused by different basic graphics by maintaining the consistency of the basic graphic shape. It not only simplifies the anti-counterfeiting label production process but also reduces the design cost.
[0068] Furthermore, there are multiple possible implementation ways for the shapes of the second basic graphic and the first basic graphic in this application. For example, these two basic graphics can be the same geometric shapes, such as squares, circles, triangles, etc. Among them, the square basic graphic may be more suitable for anti-counterfeiting patterns of the QR code type, while the circular or other curved shapes may be more suitable for certain special anti-counterfeiting designs.
[0069] In addition, the shapes of these two basic graphics can also be the same irregular graphics, as long as their outlines are exactly the same. This design provides more possibilities for anti-counterfeiting patterns while still maintaining the simplicity of design and production.
[0070] It should be noted that although the shapes of the second basic graphic and the first basic graphic are the same, their sizes can be different. For example, the second basic graphic can be an enlarged version of the first basic graphic, which can provide more details in the high-resolution second anti-counterfeiting pattern without affecting the overall shape of the low-resolution first anti-counterfeiting pattern.
[0071] The technical solution of this application plays an important role in solving the problem of excessively high design costs caused by different basic graphics by making the shape of the second basic graphic the same as that of the first basic graphic. First of all, this design greatly simplifies the design process of anti-counterfeiting patterns. The service provider only needs to design one basic graphic for each serial number, which can be used for both the low-resolution first anti-counterfeiting pattern and the high-resolution second anti-counterfeiting pattern at the same time, thus reducing the design workload.
[0072] Secondly, this design scheme improves the production efficiency of anti-counterfeiting labels. Since the shapes of the first basic graphic and the second basic graphic are the same, the same mold or printing equipment can be used for printing (the process of printing the second basic graphic on the physical label with a lower printing precision is essentially the process of printing the first basic graphic, and the only difference between them is the resolution; similarly, the process of printing the second anti-counterfeiting pattern on the physical label with a lower printing precision is essentially the process of printing the first anti-counterfeiting pattern. On the one hand, since the first basic graphic and the second basic graphic are the same, it does not affect the user's scanning. On the other hand, printing the second anti-counterfeiting pattern with a lower printing precision will make the feature graphic blurred or missing, and the actual display effect is equivalent to the first anti-counterfeiting pattern without setting the feature graphic). This not only saves production time but also reduces production costs.
[0073] In addition, the basic graphics with the same shape are also conducive to improving the accuracy of anti-counterfeiting verification. When the user scans the low-resolution first anti-counterfeiting pattern, the system can more easily match the corresponding high-resolution second anti-counterfeiting pattern because their basic shapes are the same. This consistency reduces the possibility of matching errors, thereby improving the reliability of anti-counterfeiting verification.
[0074] In summary, by making the shape of the second basic graphic the same as that of the first basic graphic, the present application not only effectively reduces the design and production costs, thus solving the technical problem of excessively high design costs caused by different basic graphics, but also improves the accuracy of anti-counterfeiting verification.
[0075] Compared with the prior art, traditional anti-counterfeiting methods usually use different graphics as low-resolution and high-resolution anti-counterfeiting patterns (such as QR codes combined with fingerprint codes), which results in high design costs and increased production complexity. However, the present application simplifies the design and production processes and reduces costs by using basic graphics of the same shape. At the same time, the solution of the present application also improves the accuracy and efficiency of anti-counterfeiting verification because the basic graphics of the same shape make it easier for the system to perform pattern matching. It not only solves the problem of high design costs, but also improves the performance and reliability of the entire anti-counterfeiting system.
[0076] In some embodiments, the shape of the second basic graphic is different from the shape of the first basic graphic; the shape of the second basic graphic corresponding to one serial number in the preset database is the same as the shape of the second basic graphic corresponding to another serial number.
[0077] In the technical solution proposed by the present application, different first basic graphics correspond to different serial numbers, but it is allowed that the second basic graphics corresponding to different serial numbers in the preset database have the same shape. This design enables multiple serial numbers to share the second basic graphics of the same shape, thereby further reducing the design cost of the second basic graphics. At the same time, since the anti-counterfeiting label can judge authenticity based on the characteristic graphic, different characteristic graphics combined with the same second basic graphic can also obtain different anti-counterfeiting labels, which is equivalent to expanding the capacity of a single second basic graphic and making the anti-counterfeiting pattern inexhaustible.
[0078] Specifically, the technical solution of the present application can be implemented in the following ways: First, in the preset database, the same-shaped second basic graphics can be assigned to multiple different serial numbers. For example, serial number A and serial number B can correspond to the same square second basic graphic. This design can significantly reduce the number of different-shaped second basic graphics that need to be stored, thereby optimizing the database structure and storage space.
[0079] Second, to ensure the uniqueness of anti-counterfeiting, when generating the second anti-counterfeiting pattern, the present application adds different characteristic graphics to the second basic graphics of the same shape. The characteristic graphics can be unique textures or patterns generated according to the serial number and arranged on the edge of the second basic graphic. In this way, even if the second basic graphics corresponding to two serial numbers have the same shape, the finally generated second anti-counterfeiting patterns are still unique due to the different characteristic graphics.
[0080] Furthermore, the technical solution of the present application can also dynamically generate feature patterns through algorithms. For example, certain parameters in the serial number (such as timestamp, product category, etc.) can be used as inputs, and unique edge textures can be generated through specific algorithms. This method can achieve almost infinite anti-counterfeiting pattern variations without increasing the storage burden.
[0081] Thus, the technical solution of the present application not only solves the problem of the preset database design in the anti-counterfeiting verification method, but also brings various technical effects: 1. Optimize the database structure and reduce the occupation of storage space. Since multiple serial numbers can share the second basic patterns of the same shape, the number of different-shaped second basic patterns that need to be stored in the database is greatly reduced.
[0082] 2. Reduce the design cost of the second basic pattern. Designers only need to design a limited number of second basic patterns, which can be applied to a large number of serial numbers, greatly improving the design efficiency.
[0083] 3. Expand the capacity of a single second basic pattern. By adding different feature patterns to the second basic patterns of the same shape, a large number of unique anti-counterfeiting labels can be generated, greatly increasing the capacity of the anti-counterfeiting system.
[0084] 4. Improve the flexibility and scalability of the anti-counterfeiting system. By dynamically generating feature patterns through algorithms, new anti-counterfeiting requirements can be easily met without frequently updating the database structure.
[0085] 5. Maintain the unique correspondence between the serial number and the second anti-counterfeiting pattern, ensuring the reliability of anti-counterfeiting verification. Although multiple serial numbers may correspond to the second basic patterns of the same shape, the finally generated second anti-counterfeiting patterns are still unique.
[0086] As a preferred implementation manner, the present application can be implemented as follows: Suppose there are 100 different serial numbers stored in the preset database, but only 10 different-shaped second basic patterns are designed. These 10 shapes can be basic geometric shapes such as squares, circles, triangles, or more complex custom shapes. Each second basic pattern of a shape is assigned to 10 different serial numbers.
[0087] When the user scans the first anti-counterfeiting pattern on the anti-counterfeiting label, the system first obtains the serial number. Then, according to the serial number, the corresponding second basic pattern is obtained from the preset database. Next, the system uses a specific algorithm to generate a unique feature pattern based on the serial number. This algorithm can consider multiple factors in the serial number, such as product category, production date, batch number, etc., to ensure the uniqueness of the generated feature pattern.
[0088] For example, if the serial number is "A123456789", the system may select a square as the second basic graphic from 10 preset shapes. Then, the system may use the part "123456789" in the serial number as a seed to generate a series of random numbers, which are used to determine the specific form of the feature graphic, such as the frequency and amplitude of the ripple. Finally, the system adds the generated feature graphic to the edge of the second basic graphic to form the final second anti-counterfeiting pattern.
[0089] This method not only ensures the uniqueness of the second anti-counterfeiting pattern corresponding to each serial number, but also greatly reduces the number of second basic graphics that need to be pre-designed and stored. At the same time, since the feature graphic is dynamically generated, even if a hacker obtains some serial numbers and the corresponding second anti-counterfeiting patterns, it is difficult to infer the generation algorithm of the feature graphic, thus further improving the security of the anti-counterfeiting system.
[0090] Compared with the traditional method, the traditional method usually requires a unique second basic graphic for each serial number, which results in a linear increase in the database size with the number of serial numbers, and the storage and management costs are high. While the solution of this application significantly reduces the database size by allowing multiple serial numbers to share the second basic graphic of the same shape, and at the same time ensures the uniqueness of the anti-counterfeiting label through the dynamically generated feature graphic. This not only reduces the system cost, but also improves the scalability and flexibility of the system.
[0091] In addition, the solution of this application also enhances the security of the anti-counterfeiting system. In the traditional method, if an attacker obtains some serial numbers and the corresponding second anti-counterfeiting patterns, it may be possible to infer the second anti-counterfeiting patterns of other serial numbers. While in the solution of this application, even if the attacker knows that some serial numbers correspond to the second basic graphic of the same shape, it is impossible to predict the specific form of the feature graphic, because the feature graphic is dynamically generated through a complex algorithm. This greatly increases the difficulty of cracking the anti-counterfeiting system.
[0092] In some embodiments, the serial number includes a texture category, a complexity level, a time hash value, and an identifier hash value; the second basic graphic is a two-dimensional code including a plurality of squares; When the server is used to generate the second anti-counterfeiting pattern according to the serial number and the second basic graphic, it performs: A21. Calculate the edge fluctuation coefficient according to the complexity level, the time hash value, and the identifier hash value; A22. Determine the generation algorithm according to the texture category and the edge fluctuation coefficient and generate a feature graphic at the edge of the square through the generation algorithm to obtain the second anti-counterfeiting pattern.
[0093] This application provides rich input parameters for generating unique feature patterns by including various information in the serial number, such as texture category, complexity level, time hash value, and identifier hash value. The second basic pattern uses a QR code containing multiple squares, providing a structured basis for the feature pattern.
[0094] When generating the second anti-counterfeiting pattern, the server first calculates the edge fluctuation coefficient based on the complexity level, time hash value, and identifier hash value. This step comprehensively considers multiple parameters to generate a key parameter that determines the fluctuation degree of the feature pattern. The introduction of the edge fluctuation coefficient increases the complexity and uniqueness of the anti-counterfeiting pattern, making each generated anti-counterfeiting pattern have unique features.
[0095] Next, the server determines the specific generation algorithm according to the texture category and the edge fluctuation coefficient. The texture category can include various options, such as ripples, cracks, or random noise, etc., and each texture category corresponds to a different generation algorithm. The edge fluctuation coefficient is used to adjust the parameters of the generation algorithm, further increasing the variability of the feature pattern.
[0096] Finally, the server generates the feature pattern at the edge of the QR code squares through the selected generation algorithm, thus obtaining the second anti-counterfeiting pattern. This method cleverly adds difficult-to-replicate detailed features while maintaining the basic structure and function of the QR code.
[0097] The technical solution of this application effectively solves the problem of generating feature patterns in anti-counterfeiting patterns by combining various information to generate unique and difficult-to-replicate feature patterns. By adding these feature patterns to the edge of the QR code, both the basic function of the QR code is ensured and the anti-counterfeiting effect is greatly improved.
[0098] Specifically, the technical solution of this application can be implemented in the following ways: First, the serial number can adopt a specific encoding format to encode the texture category, complexity level, time hash value, and identifier hash value together. For example, the texture category can be represented by numbers from 1 to 3, corresponding to ripples, cracks, and random noise respectively; the complexity level can be represented by numbers from 1 to 10; the time hash value can be the first 8 bits of the MD5 value based on the generation time; the identifier hash value can be the first 8 bits of the SHA256 value based on the product unique identifier.
[0099] As a preferred implementation manner, the following specific embodiments can be considered: Suppose there is a product that needs to generate an anti-counterfeiting label. First, the system generates a unique serial number, such as "2-7-a1b2c3d4-e5f6g7h8". Among them, "2" represents the texture category as cracks, "7" represents the complexity level, "a1b2c3d4" is the time hash value, and "e5f6g7h8" is the identifier hash value.
[0100] Through this method, this application successfully solves the problem of generating feature graphics in anti-counterfeiting patterns. Compared with the traditional method of directly printing anti-counterfeiting patterns, the technical solution of this application has the following advantages: 1. Dynamic generation: Each scan generates a new feature graphic, greatly reducing the risk of being copied.
[0101] 2. High personalization: By combining multiple parameters, each generated anti-counterfeiting pattern is unique.
[0102] 3. Strong anti-interference ability: Even if the anti-counterfeiting label is damaged or contaminated to a certain extent, as long as the serial number can be scanned, a complete anti-counterfeiting pattern can be regenerated.
[0103] 4. Good compatibility: The feature graphic is added to the edge of the QR code, without affecting the basic functions of the QR code.
[0104] 5. Convenient verification: By comparing the high-resolution anti-counterfeiting pattern generated by the server, counterfeits can be easily identified.
[0105] Generally speaking, this application provides an innovative method for generating anti-counterfeiting patterns, effectively solving the problems faced by traditional anti-counterfeiting technologies and providing more secure and reliable technical support for product anti-counterfeiting.
[0106] In some embodiments, the specific steps in step A21 include: A211. Calculate the edge fluctuation coefficient according to the following formula: (Formula 1); (Formula 2); Among them, is the edge fluctuation coefficient, is the complexity level, , is the sum of the values of each character in the time hash value, is the time hash value, is the local perturbation intensity, is the identifier hash value.
[0107] In some embodiments, refer to Appendix Figure 2 , Appendix Figure 3 and AppendixFigure 4 , the texture categories include ripples, cracks, and random noise; The specific steps in step A22 include: A22A. When the texture category is ripples, generate a characteristic pattern according to the following formula: (Formula 3); Wherein, is the generation algorithm for , are the coordinate points of the square edge, is the axis coordinate of the square edge, is the axis coordinate of the square edge, is the preset fluctuation frequency, is the random first phase, is the random second phase; A22B. When the texture category is cracks, generate a characteristic pattern according to the following formula: (Formula 4); Wherein, is the sign function for ; A22C. When the texture category is random noise, generate a characteristic pattern according to the following formula: (Formula 5); Wherein, is the noise function for , .
[0108] In this embodiment, represents the position coordinates of each pixel in the image. Since each QR code pattern is composed of squares (or called modules), the edge of each module is determined by the coordinates of the pixel points.
[0109] For example, the QR code image is a matrix composed of black and white squares, and the position of each square in the image can be represented by coordinates. Here, is not only the position identifier in the image, but also can be used for position offset during image processing (such as when adjusting the edge of the QR code, performing corresponding transformations on the image based on the coordinates). When we use the above formula to adjust the edge of the QR code, in fact, we modify the displacement or offset of each pixel according to these coordinates, thereby changing the shape of the QR code edge.
[0110] Taking Formula 4 as an example for specific explanation: : This is the original coordinate, that is, the position of a certain pixel in the QR code image.
[0111] : This is a coefficient for controlling edge fluctuations, which determines the magnitude of the offset.
[0112] : This is a sign function, which processes the sine wave function and converts its value into +1, 0, or -1, thereby controlling the direction and intensity of the offset.
[0113] ; : This part controls the direction and intensity of the offset. The role of the sign function is to determine whether the offset is positive or negative, and control the intensity of the offset.
[0114] The meaning of the entire formula 4 is: Perform an adjustment on each coordinate , and the amount of adjustment is controlled by . Similarly, it applies to explaining formula 3 and formula 5, which is equivalent to performing a certain random offset or perturbation on the basis of the original coordinates, making the texture effects such as ripples, cracks, and noises on the image edge more natural and irregular.
[0115] Among them, in formula 5, : This is a noise function (the noise type can be but is not limited to uniform noise, Gaussian noise, Perlin noise, etc.), which provides random perturbation values. The role of the noise is to increase randomness and make the texture effect on the image edge more irregular.
[0116] Please refer to Figure 5 , Figure 5 which is an anti-counterfeiting verification device in some embodiments of the present invention. The anti-counterfeiting verification device is integrated in the backend control device in the form of a computer program, and includes: An acquisition module 100, configured to scan a first anti-counterfeiting pattern on the anti-counterfeiting label to obtain a second anti-counterfeiting pattern sent by the server. The image resolution of the first anti-counterfeiting pattern is lower than that of the second anti-counterfeiting pattern, and the first anti-counterfeiting pattern includes a first basic graphic; the second anti-counterfeiting pattern includes a second basic graphic and a feature graphic, and the feature graphic is arranged on the edge of the second basic graphic and the size of the feature graphic is smaller than the size of the second basic graphic; A judgment module 200, configured to judge the authenticity of the anti-counterfeiting label according to the second anti-counterfeiting pattern.
[0117] In some embodiments, when the acquisition module 100 is used to scan the first anti-counterfeiting pattern on the anti-counterfeiting label to obtain the second anti-counterfeiting pattern sent by the server, it executes: When first scanning the first anti-counterfeiting pattern to obtain the second anti-counterfeiting pattern, execute: S111. Scan the first anti-counterfeiting pattern to obtain a serial number; the serial number has a unique correspondence with the first anti-counterfeiting pattern; S112. Send the serial number to the server so that the server executes the following steps: A1. Obtain the second basic graphic from the preset database according to the serial number; the serial number has a unique correspondence with the second basic graphic; A2. Generate the second anti-counterfeiting pattern according to the serial number and the second basic graphic; A3. Update the second basic graphic in the preset database to the second anti-counterfeiting pattern and maintain a unique correspondence with the serial number so that when the first anti-counterfeiting pattern is scanned next time, the server directly obtains the second anti-counterfeiting pattern from the preset database according to the serial number; S113. Receive the second anti-counterfeiting pattern sent by the server.
[0118] In some embodiments, the serial number includes a texture category, a complexity level, a time hash value, and an identifier hash value; the second basic graphic is a two-dimensional code including a plurality of squares; When the obtaining module 100 is used to send the serial number to the server so that the server executes generating the second anti-counterfeiting pattern according to the serial number and the second basic graphic, execute: A21. Calculate the edge fluctuation coefficient according to the complexity level, the time hash value, and the identifier hash value; A22. Determine the generation algorithm according to the texture category and the edge fluctuation coefficient and generate a feature graphic at the edge of the square through the generation algorithm to obtain the second anti-counterfeiting pattern.
[0119] In some embodiments, when the obtaining module 100 is used to send the serial number to the server so that the server executes calculating the edge fluctuation coefficient according to the complexity level, the time hash value, and the identifier hash value, execute: A211. Calculate the edge fluctuation coefficient according to the following formula: ; ; Wherein, is the edge fluctuation coefficient, is the complexity level, , is the sum of the values of each character in the time hash value, is the time hash value, is the local perturbation intensity, is the identifier hash value.
[0120] In some embodiments, the texture categories include ripples, cracks, and random noise; When the obtaining module 100 is used to send the serial number to the server so that the server executes a generation algorithm determined according to the texture category and the edge fluctuation coefficient and generates a feature pattern at the edge of the square through the generation algorithm to obtain a second anti-counterfeiting pattern, it executes: A22A. When the texture category is ripples, generate a feature pattern according to the following formula: ; Wherein, is the generation algorithm for , is the coordinate point of the square edge, is the axis coordinate of the square edge, is the axis coordinate of the square edge, is the preset fluctuation frequency, is the random first phase, is the random second phase; A22B. When the texture category is cracks, generate a feature pattern according to the following formula: ; Wherein, is the sign function for ; A22C. When the texture category is random noise, generate a feature pattern according to the following formula: ; Wherein, is the noise function for , .
[0121] Please refer to Figure 6 , Figure 6A structural schematic diagram of an electronic device provided by an embodiment of the present invention. The present invention provides an electronic device 13, including: a processor 1301 and a memory 1302. The processor 1301 and the memory 1302 are interconnected and communicate with each other through a communication bus 1303 and / or other forms of connection mechanisms (not marked). The memory 1302 stores computer-readable instructions executable by the processor 1301. When the electronic device runs, the processor 1301 executes the computer-readable instructions to execute the anti-counterfeiting verification method in any optional implementation manner of the above embodiment to achieve the following functions: scanning a first anti-counterfeiting pattern on an anti-counterfeiting label to obtain a second anti-counterfeiting pattern sent by a server, where the image resolution of the first anti-counterfeiting pattern is lower than that of the second anti-counterfeiting pattern and the first anti-counterfeiting pattern includes a first basic graphic; the second anti-counterfeiting pattern includes a second basic graphic and a feature graphic, the feature graphic is arranged at the edge of the second basic graphic and the size of the feature graphic is smaller than the size of the second basic graphic; judging the authenticity of the anti-counterfeiting label according to the second anti-counterfeiting pattern.
[0122] An embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it executes the anti-counterfeiting verification method in any optional implementation manner of the above embodiment to achieve the following functions: scanning a first anti-counterfeiting pattern on an anti-counterfeiting label to obtain a second anti-counterfeiting pattern sent by a server, where the image resolution of the first anti-counterfeiting pattern is lower than that of the second anti-counterfeiting pattern and the first anti-counterfeiting pattern includes a first basic graphic; the second anti-counterfeiting pattern includes a second basic graphic and a feature graphic, the feature graphic is arranged at the edge of the second basic graphic and the size of the feature graphic is smaller than the size of the second basic graphic; judging the authenticity of the anti-counterfeiting label according to the second anti-counterfeiting pattern.
[0123] Among them, the computer-readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (abbreviated as SRAM), electrically erasable programmable read-only memory (abbreviated as EEPROM), erasable programmable read-only memory (abbreviated as EPROM), programmable read-only memory (abbreviated as PROM), read-only memory (abbreviated as ROM), magnetic memory, flash memory, a magnetic disk or an optical disc.
[0124] In the embodiments provided by the present invention, it should be understood that the disclosed device and method can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For another example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection between each other can be through some communication interfaces. The indirect coupling or communication connection of the device or unit can be in electrical, mechanical or other forms.
[0125] In addition, the units described as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they can be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0126] Furthermore, in each embodiment of the present invention, the various functional modules can be integrated together to form an independent part, or each module can exist alone, or two or more modules can be integrated to form an independent part.
[0127] In this text, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations.
[0128] The above are only the embodiments of the present invention and are not used to limit the protection scope of the present invention. For those skilled in the art, the present invention can have various changes and modifications. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for anti-counterfeiting verification, characterized in that Including the following steps: S1. Scan the first anti-counterfeiting pattern on the anti-counterfeiting label to obtain the second anti-counterfeiting pattern sent by the server. The image resolution of the first anti-counterfeiting pattern is lower than that of the second anti-counterfeiting pattern, and the first anti-counterfeiting pattern includes a first basic graphic; the second anti-counterfeiting pattern includes a second basic graphic and a characteristic graphic. The characteristic graphic is arranged at the edge of the second basic graphic, and the size of the characteristic graphic is smaller than that of the second basic graphic; S2. Judge the authenticity of the anti-counterfeiting label according to the second anti-counterfeiting pattern.
2. The anti-counterfeiting verification method according to claim 1, wherein, The specific steps in step S1 include: S11. When scanning the first anti-counterfeiting pattern for the first time to obtain the second anti-counterfeiting pattern, execute: S111. Scan the first anti-counterfeiting pattern to obtain a serial number; the serial number has a unique correspondence with the first anti-counterfeiting pattern; S112. Send the serial number to the server so that the server executes the following steps: A1. Obtain the second basic graphic from a preset database according to the serial number; the serial number has a unique correspondence with the second basic graphic; A2. Generate the second anti-counterfeiting pattern according to the serial number and the second basic graphic; A3. Update the second basic graphic in the preset database to the second anti-counterfeiting pattern and maintain a unique correspondence with the serial number so that when scanning the first anti-counterfeiting pattern next time, the server directly obtains the second anti-counterfeiting pattern from the preset database according to the serial number; S113. Receive the second anti-counterfeiting pattern sent by the server.
3. The anti-counterfeiting verification method according to claim 1, wherein The shape of the second basic graphic is the same as that of the first basic graphic.
4. The anti-counterfeiting verification method according to claim 2, wherein The shape of the second basic graphic is different from that of the first basic graphic; the shapes of the second basic graphics corresponding to one serial number in the preset database are the same as those of the second basic graphics corresponding to another serial number.
5. The anti-counterfeiting verification method according to claim 2, characterized in that The serial number includes a texture category, a complexity level, a time hash value, and an identifier hash value; the second basic graphic is a two-dimensional code including a plurality of squares; When the server is used to generate the second anti-counterfeiting pattern according to the serial number and the second basic graphic, execute: A21. Calculate an edge fluctuation coefficient according to the complexity level, the time hash value, and the identifier hash value; A22. Determine a generation algorithm according to the texture category and the edge fluctuation coefficient, and generate the characteristic graphic at the edge of the square through the generation algorithm to obtain the second anti-counterfeiting pattern.
6. The anti-counterfeiting verification method according to claim 5, wherein The specific steps in step A21 include: A211. Calculate the edge fluctuation coefficient according to the following formula: ; ; Among them, is the edge fluctuation coefficient, is the complexity level, , is the sum of the values of each character in the time hash value, is the time hash value, is the local perturbation intensity, is the identifier hash value.
7. The anti-counterfeiting verification method according to claim 6, wherein The texture category includes ripples, cracks, and random noise; The specific steps in step A22 include: A22A. When the texture category is ripples, generate the characteristic graphic according to the following formula: ; Among them, is the generation algorithm for . is the coordinate point of the edge of the block, is the axis coordinate of the edge of the block, is the axis coordinate of the edge of the block, is the preset fluctuation frequency, is the random first phase, is the random second phase; A22B. When the texture category is cracks, generate the characteristic graphic according to the following formula: ; Among them, is the sign function with respect to ; A22C. When the texture category is random noise, generate the characteristic graphic according to the following formula: ; Among them, is the noise function regarding , .
8. An anti-counterfeiting verification device, characterized in that, Including: An acquisition module, configured to scan a first anti-counterfeiting pattern on an anti-counterfeiting label to obtain a second anti-counterfeiting pattern sent by a server, wherein an image resolution of the first anti-counterfeiting pattern is lower than that of the second anti-counterfeiting pattern, and the first anti-counterfeiting pattern includes a first basic graphic; the second anti-counterfeiting pattern includes a second basic graphic and a feature graphic, the feature graphic is arranged at an edge of the second basic graphic, and a size of the feature graphic is smaller than that of the second basic graphic; A judgment module, configured to judge authenticity of the anti-counterfeiting label according to the second anti-counterfeiting pattern.
9. An electronic device, characterized in that, It includes a processor and a memory, the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the steps in the anti-counterfeiting verification method according to any one of claims 1-7 are run.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, the steps in the anti-counterfeiting verification method according to any one of claims 1-7 are run.