Marathon certificate anti-counterfeiting method based on DWT wavelet transform and asymmetric encryption
By applying DWT wavelet transform and asymmetric encryption technology to the marathon certificate, the certificate information is embedded in the low-frequency area of the QR code image, which solves the problems of easy forgery of certificates and loss of data features, and achieves high security and anti-interference certificate verification. process.
Patent Information
- Application Number
- CN202410641654.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-23
- Publication Date
- 2024-09-03
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing marathon certificates are easy to forge, and mainstream signature verification schemes such as MD5 are not suitable for marathon certificates. As a result, the data characteristics of the certificate cannot be retained during the transmission and sharing process, and there is a lack of effective anti-counterfeiting and security.
Using a method based on DWT wavelet transform and asymmetric encryption, the certificate information is encrypted through an asymmetric encryption algorithm, converted into a QR code image, and embedded in the low-frequency area of the wavelet domain image to generate an anti-interference and robust Anti-counterfeiting images.
It improves the security and anti-interference ability of the certificate, ensures that the certificate is not easily forged during the transmission process, enhances the convenience and accuracy of verification, and ensures the integrity and reliability of the certificate information.
Smart Images

Figure CN118587076A
Abstract
Description
Technical Field
[0001] The invention relates to the field of information security technology, in particular to digital image processing technology, and specifically to a marathon certificate anti-counterfeiting method based on wavelet transform and asymmetric encryption. Background Art
[0002] Digital watermarking is an important branch of information hiding technology. The watermark is the secret information to be transmitted, and the transmission carrier includes images, audio, video, etc. Digital watermarking technology embeds the watermark into the transmission carrier, achieving the purpose of information secret transmission without affecting the normal value of the transmission carrier. Based on this, digital watermarking can be used to achieve copyright protection, authenticity identification, certificate anti-counterfeiting, etc.
[0003] In recent years, marathon has become popular in China and has gradually become a mass activity participated by all the people. For the contestants, they hope to get some commemorative items, and the marathon certificate is one of them. The marathon certificate is an important certificate to record and prove the results of the marathon race, and it is also a way for the contestants to show their efforts and achievements. Many marathon races require the submission of certificates of previous races when registering. However, the current mainstream marathon certificate is essentially an ordinary picture, and it is technically very simple to forge a certificate. Moreover, mainstream signature verification schemes such as MD5 are not applicable to marathon certificates. When runners save or share certificates, they often use some social apps, which causes the certificate image to be re-encoded or scaled, resulting in the data features of the certificate image not being retained. Summary of the invention
[0004] In view of the shortcomings of the prior art, the purpose of the present invention is to provide a marathon certificate anti-counterfeiting method based on DWT wavelet transform and asymmetric encryption, encrypting data information through asymmetric encryption technology, and at the same time improving the robustness and anti-interference ability of the certificate image based on wavelet transform image watermark technology, so that the image can resist the influence of various noises and interferences during transmission.
[0005] The above technical objectives of the present invention are achieved through the following technical solutions: a marathon certificate anti-counterfeiting method based on DWT wavelet transform and asymmetric encryption, including a marathon certificate, wherein the generation of the marathon certificate includes the following steps:
[0006] a1) The issuing agency obtains the certificate template and athlete data information, and pre-processes the athlete data information to form certificate information, which is expressed in text form;
[0007] a2) Preprocess the certificate template to generate the original certificate image;
[0008] a3) Encrypt the certificate information using the private key of the issuing authority through an asymmetric encryption algorithm, and convert the encrypted certificate information into a two-dimensional code image, which forms a watermark image;
[0009] a4) Perform secondary wavelet transform on the original certificate image to obtain the low-frequency area, embed the watermark image obtained in the previous step into the sub-band of the low-frequency area, and generate a wavelet domain image;
[0010] a5) performing inverse wavelet transform on the wavelet domain image, converting the wavelet domain image from the wavelet domain to the pixel domain, and obtaining an anti-counterfeiting image that can be normally recognized by humans after the conversion;
[0011] a6) Output the anti-counterfeiting image to obtain the marathon certificate image.
[0012] The present invention is further configured as follows: the marathon certificate verification includes the following steps:
[0013] b1) Load the marathon certificate image to be verified and pre-process the marathon certificate image;
[0014] b2), according to the method of embedding the watermark image, performing inverse wavelet transform on the anti-counterfeiting image, and extracting the two-dimensional code image containing the encrypted information from the anti-counterfeiting image;
[0015] b3) Read the QR code image through recognition software and convert the QR code image into text information;
[0016] b4) Decoding the text information extracted from the QR code image using the public key of the issuing agency to obtain the original certificate information;
[0017] b5) Verify the text information and compare and analyze the text information with the certificate information. If the text information is consistent with the certificate information, it means that the marathon certificate image verification has passed.
[0018] The present invention is further configured as follows: the certificate template is a file template including the issuing agency information, logo and standard text header, the certificate template facilitates the issuing agency to quickly fill in the athlete data information, and can perform rapid preliminary verification through the standard text header.
[0019] The present invention is further configured as follows: the standard text header includes background information and text information, an anti-counterfeiting pattern can be added to the background information, the text information is embedded in the background information, and when in use, the standard text header is set at the end of the certificate template. When the certificate template is loaded, the anti-counterfeiting pattern of the standard text header is first verified. When it is found that the anti-counterfeiting pattern is copied or cropped, thereby causing deformation of the anti-counterfeiting pattern, the inverse wavelet transform step is not entered.
[0020] The present invention is further configured as follows: the athlete data information includes athlete identity information, athlete photo or image, competition time, competition results and competition location, and the athlete data information is used to identify the athlete identity and record the athlete results.
[0021] The present invention is further configured as follows: in the step a4), the wavelet transform is a discrete wavelet transform, and the original certificate image is first subjected to a primary wavelet transform to obtain high and low frequency components, and a secondary wavelet transform decomposes the high and low frequency components into smaller frequency components based on the primary wavelet transform to obtain the low frequency components required after the wavelet transform, and the low frequency area is located in the low frequency components.
[0022] The present invention is further configured such that the marathon certificate image can be stored, displayed and shared in the form of an electronic image, and can also be made into a paper certificate.
[0023] In summary, the present invention has the following beneficial effects:
[0024] 1. Based on asymmetric encryption technology, the encrypted public key of the Marathon certificate can be made public to achieve decentralization, so that institutions or individuals who need to authenticate the authenticity of the Marathon certificate can authenticate the certificate by themselves, which improves the convenience of certificate authentication and the security of certificate information.
[0025] 2. The certificate information is converted into a QR code image. The QR code image has strong anti-interference ability. At the same time, the QR code adopts error correction coding technology in the encoding process, which can resist the influence of interference and noise to a certain extent. The decoding algorithm of the QR code also has a certain anti-interference ability and can correctly parse the information in the barcode. Even if the barcode is missing or damaged, it can still correctly parse the information in it, further improving the security of the certificate information.
[0026] 3. The low-frequency area is obtained through the secondary wavelet transform, and the watermark image is embedded in the sub-band of the low-frequency area. It has high robustness. Even when the image is damaged or degraded to varying degrees, the wavelet transform can still extract effective feature information.
[0027] 4. The anti-counterfeiting pattern of the standard text header makes the marathon certificate image difficult to be forged. At the same time, it improves the comparability of factors and verification efficiency when verifying authenticity, further enhancing the security of the marathon certificate image. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1 A flow chart of the steps for generating a marathon certificate of the present invention;
[0029] Figure 2 It is a flow chart of the marathon certificate verification steps of the present invention. DETAILED DESCRIPTION
[0030] The present invention is described in detail below in conjunction with the accompanying drawings and embodiments.
[0031] like Figure 1 , Figure 2 As shown, the present invention is a marathon certificate anti-counterfeiting method based on DWT wavelet transform and asymmetric encryption. The robustness, security and anti-counterfeiting effect of the marathon certificate image are improved through wavelet transform and asymmetric encryption technology. Asymmetric encryption, the asymmetric encryption key pair includes two keys: a public key and a private key; the public key can be published to the outside and can be used by anyone in need to decrypt data; the private key is kept secretly by the certificate generator and is used to encrypt data; wavelet transform digital watermark is an image watermark technology based on wavelet transform. This technology utilizes the multi-resolution analysis characteristics of wavelet transform and the characteristics of the human visual system to embed digital watermark information into the low-frequency sub-band texture area of the image after wavelet transform. This watermark technology has the following advantages: wavelet transform has high robustness. Even when the image is damaged or degraded to varying degrees, wavelet transform can still extract effective feature information, which makes wavelet transform have wide application value in image recognition, target tracking and other fields. Wavelet transform can concentrate the energy of the image in certain specific frequency ranges, and can effectively remove noise through threshold processing, which makes the image after wavelet transform have strong anti-interference ability and can resist the influence of various noises and interferences during transmission; two-dimensional code technology, two-dimensional code has strong anti-interference ability, which is due to its design characteristics. The error correction coding technology is used in the encoding process of the two-dimensional code, which can resist the influence of interference and noise to a certain extent. The decoding algorithm of the two-dimensional code also has a certain anti-interference ability, and can correctly parse the information in the barcode, even if the barcode is missing or damaged.
[0032] like Figure 1 As shown, the Marathon certificate generation includes the following steps:
[0033] a1) The issuing agency obtains the certificate template and athlete data information, and pre-processes the athlete data information to form certificate information, which is expressed in text form;
[0034] a2) Preprocess the certificate template to generate the original certificate image;
[0035] a3) Encrypt the certificate information using the private key of the issuing authority through an asymmetric encryption algorithm, and convert the encrypted certificate information into a two-dimensional code image, which forms a watermark image;
[0036] a4) Perform secondary wavelet transform on the original certificate image to obtain the low-frequency area, embed the watermark image obtained in the previous step into the sub-band of the low-frequency area, and generate a wavelet domain image;
[0037] a5) performing inverse wavelet transform on the wavelet domain image, converting the wavelet domain image from the wavelet domain to the pixel domain, and obtaining an anti-counterfeiting image that can be normally recognized by humans after the conversion;
[0038] a6) Output the anti-counterfeiting image to obtain the marathon certificate image.
[0039] In the above steps, the issuing agency referred to is the event organizer or a third-party agency entrusted by it. The certificate template is a pre-designed electronic template module. The certificate template contains information about the issuing agency, such as the full name of the event organizer, the event organizing committee and the corresponding signatures. The logo is the theme LOGO of this event. The standard text header is a file title with anti-counterfeiting effect, which generally includes background information and text information. Anti-counterfeiting patterns are added to the background information, and the text information is embedded in the background information; the athlete data information includes the athlete's identity information, the athlete's photo or image, the time of the competition, the results of the competition and the location of the competition; the above-mentioned certificate template and athlete data information are two independent units. When used, the certificate template and athlete data information are pre-processed respectively. The pre-processing step is mainly to verify the unit content and whether the layout is correct, and to image the certificate template to generate the original certificate The certificate information is encrypted through an asymmetric encryption algorithm and converted into a two-dimensional code image. The two-dimensional code image is optimized to form a watermark image. The original certificate image is first subjected to a first-level wavelet transform through discrete wavelet transform to obtain high and low frequency components. The second-level wavelet transform decomposes the high and low frequency components into smaller frequency components on the basis of the first-level wavelet transform to obtain the low frequency components required after the wavelet transform. The low frequency components include the low frequency area. The watermark image is embedded into the sub-band of the low frequency area to generate a wavelet domain image. The wavelet domain image is inversely transformed to obtain an anti-counterfeiting image recognizable by the human eye. The anti-counterfeiting image is exported to obtain a marathon certificate image. Participants can obtain their own marathon certificate images on the corresponding website with their personal information. At the same time, the marathon certificate image can also be made into a paper certificate.
[0040] like Figure 2 As shown, Marathon certificate verification includes the following steps:
[0041] b1) Load the marathon certificate image to be verified and pre-process the marathon certificate image;
[0042] b2), according to the method of embedding the watermark image, performing inverse wavelet transform on the anti-counterfeiting image, and extracting the two-dimensional code image containing the encrypted information from the anti-counterfeiting image;
[0043] b3) Read the QR code image through recognition software and convert the QR code image into text information;
[0044] b4) Decoding the text information extracted from the QR code image using the public key of the issuing agency to obtain the original certificate information;
[0045] b5) Verify the text information and compare and analyze the text information with the certificate information. If the text information is consistent with the certificate information, it means that the marathon certificate image verification has passed.
[0046] When it is necessary to authenticate the authenticity of a marathon certificate, firstly, the marathon certificate image is loaded into the corresponding verification program. During the verification, the marathon certificate image is compared with the processing program to scan and compare whether the information recorded on the marathon certificate image is consistent. If it is consistent, the next step is carried out, otherwise it is directly determined to be a forged certificate; the next step is to verify the anti-counterfeiting pattern of the standard text header. When it is found that the anti-counterfeiting pattern is copied or cropped, thereby causing the anti-counterfeiting pattern to be deformed, it can be determined to be a forged certificate; if the above processing steps are consistent with the original certificate, the anti-counterfeiting image is subjected to an inverse wavelet transform, and the anti-counterfeiting image is inversely transformed into a wavelet domain image, and then a two-dimensional code image containing encrypted information is extracted from the wavelet domain image, the text information in the two-dimensional code image is read through software recognition, and the text information is decrypted through the public key of the issuing agency. When the public key and the private key correspond, the decryption is successful to obtain the original certificate information, which proves that the verification is passed. When the public key and the private key do not match, it proves to be a forged certificate.
[0047] This technical solution applies asymmetric encryption, discrete wavelet transform and QR code technology respectively, which enhances the security and robustness of the marathon certificate, improves the fair competition standards, and effectively protects the interests of the contestants; the marathon certificate image made by the above steps has a strong anti-interference ability, can maintain a high quality during the transmission and sharing process, and is conducive to long-term preservation.
[0048] The above is only a preferred embodiment of the present invention, and the protection scope of the present invention is not limited to the above embodiments. All technical solutions under the concept of the present invention belong to the protection scope of the present invention. It should be pointed out that for ordinary technicians in this technical field, some improvements and modifications without departing from the principle of the present invention should also be regarded as the protection scope of the present invention.
Claims
1. A marathon certificate anti-counterfeiting method based on DWT wavelet transform and asymmetric encryption, characterized in that: Including a marathon certificate, the marathon certificate includes the following steps when it is generated: a1) The issuing agency obtains the certificate template and athlete data information, and pre-processes the athlete data information to form certificate information, which is expressed in text form; a2) Preprocess the certificate template to generate the original certificate image; a3) Encrypt the certificate information using the private key of the issuing authority through an asymmetric encryption algorithm, and convert the encrypted certificate information into a two-dimensional code image, which forms a watermark image; a4) Perform secondary wavelet transform on the original certificate image to obtain the low-frequency area, embed the watermark image obtained in the previous step into the sub-band of the low-frequency area, and generate a wavelet domain image; a5) performing inverse wavelet transform on the wavelet domain image, converting the wavelet domain image from the wavelet domain to the pixel domain, and obtaining an anti-counterfeiting image that can be normally recognized by humans after the conversion; a6) Output the anti-counterfeiting image to obtain the marathon certificate image.
2. According to claim 1, a marathon certificate anti-counterfeiting method based on DWT wavelet transform and asymmetric encryption is characterized in that: The Marathon certificate verification includes the following steps: b1) Load the marathon certificate image to be verified and pre-process the marathon certificate image; b2), according to the method of embedding the watermark image, performing inverse wavelet transform on the anti-counterfeiting image, and extracting the two-dimensional code image containing the encrypted information from the anti-counterfeiting image; b3) Read the QR code image through recognition software and convert the QR code image into text information; b4) Decoding the text information extracted from the QR code image using the public key of the issuing agency to obtain the original certificate information; b5) Verify the text information and compare and analyze the text information with the certificate information. If the text information is consistent with the certificate information, it means that the marathon certificate image verification has passed.
3. The anti-counterfeiting method for marathon certificates based on DWT wavelet transform and asymmetric encryption according to claim 1 is characterized in that: The certificate template is a file template that includes the issuing agency information, logo and standard text header. The certificate template facilitates the issuing agency to quickly fill in the athlete data information and can perform rapid preliminary verification through the standard text header.
4. The anti-counterfeiting method for marathon certificates based on DWT wavelet transform and asymmetric encryption according to claim 3 is characterized in that: The standard text header includes background information and text information. An anti-counterfeiting pattern can be added to the background information, and the text information is embedded in the background information. When in use, the standard text header is set at the end of the certificate template. When the certificate template is loaded, the anti-counterfeiting pattern of the standard text header is first verified. When it is found that the anti-counterfeiting pattern is copied or cropped, thereby causing deformation of the anti-counterfeiting pattern, the inverse wavelet transform step is not entered.
5. The anti-counterfeiting method for marathon certificates based on DWT wavelet transform and asymmetric encryption according to claim 1 is characterized in that: The athlete data information includes athlete identity information, athlete photo or image, competition time, competition results and competition location. The athlete data information is used to identify the athlete's identity and record the athlete's results.
6. The anti-counterfeiting method for marathon certificates based on DWT wavelet transform and asymmetric encryption according to claim 1, characterized in that: In the step a4), the wavelet transform is a discrete wavelet transform, and the original certificate image is first subjected to a primary wavelet transform to obtain high- and low-frequency components. The secondary wavelet transform decomposes the high- and low-frequency components into smaller frequency components based on the primary wavelet transform to obtain the low-frequency components required after the wavelet transform, and the low-frequency area is located in the low-frequency components.
7. The anti-counterfeiting method for marathon certificates based on DWT wavelet transform and asymmetric encryption according to claim 1 is characterized in that: The marathon certificate image can be stored, displayed and shared in the form of an electronic image, and can also be made into a paper certificate.
