Data encryption method, data tampering verification method and system based on metering code

By embedding encrypted data information dot matrix into the graphic identifier of electronic certificates, and combining local binary pattern texture features of images and high-frequency components of Fourier transform, a dual anti-tampering system based on metrological codes is constructed, which solves the problem of anti-tampering of electronic certificates and realizes efficient and reliable multi-media verification.

CN120342785BActive Publication Date: 2025-10-17ZHONGBO INFORMATION TECH RES INST CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510811958.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-18
Publication Date
2025-10-17
Estimated Expiration
2045-06-18

AI Technical Summary

Technical Problem

In existing technologies, the methods for preventing tampering with electronic certificates suffer from problems such as QR codes being easily copied, insufficient robustness of digital watermarks, and strong reliance on traditional digital signatures, making it difficult to simultaneously meet the requirements of multi-media adaptability and high-precision tamper-proofing.

Method used

A data encryption method based on measurement codes is adopted. By embedding the information matrix of encrypted data into the graphic identifier of the electronic certificate, a measurement code is generated. Combined with the local binary pattern texture features of the image and the high-frequency components of Fourier transform, a dual anti-tampering system of physical and data layers is constructed. Asymmetric encryption algorithms and cloud platform storage are used to ensure data integrity.

Benefits of technology

It achieves the inseparability of anti-counterfeiting labels, reduces reliance on manual labor, improves verification efficiency, ensures data integrity and verification reliability, and adapts to the high-precision anti-tampering requirements of different media.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120342785B_ABST
    Figure CN120342785B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of information security, and provides a data encryption method and system based on a measurement code, and a data tampering verification method and system, which encrypts and binds a measurement code with an image identifier of an electronic certificate, realizes inseparability of anti-fake identification, breaks through the form limitation of a traditional two-dimensional code, reduces artificial dependence, and improves verification efficiency; a double anti-tampering system of a physical layer and a data layer is constructed, and combined with cloud platform safe storage, data integrity and verification reliability are ensured, and the full life cycle credibility of key electronic files such as measurement certificates and detection reports can be significantly improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of information security, and in particular to a data encryption method, data tampering verification method and system based on a metrology code. BACKGROUND

[0002] With the acceleration of digital transformation, electronic certificates such as metrology certificates and test reports have been widely used in key fields of the national economy such as quality supervision and industrial certification. With the deepening of dependence, the security problem of electronic certificates has become increasingly prominent, especially the tampering problem of electronic certificates, which is related to the integrity of enterprise information and the authenticity of data. In order to cope with this challenge, the industry has developed a variety of anti-tampering technologies.

[0003] The current mainstream anti-tampering technology in the metrology industry mainly relies on means such as two-dimensional codes, digital watermarks and cryptographic signatures, but still has significant defects: two-dimensional codes as public carriers are easy to copy or maliciously replace and cannot resist man-in-the-middle attacks; digital watermarking is limited by the lack of algorithm robustness and is easily invalidated in file compression, printing and other scenarios; traditional digital signatures rely on third-party centralized platforms, which have single point of failure and key leakage risks; and most of them are difficult to balance multi-media adaptability and high-precision anti-tampering requirements, resulting in strong artificial dependence and low verification efficiency. SUMMARY

[0004] The present application provides a data encryption method, data tampering verification method and system based on a metrology code to solve the above technical problems, which solves the problem of easy tampering, poor anti-interference and strong verification dependence of the anti-counterfeiting identifier in the prior art.

[0005] The technical solution adopted by the present application is as follows:

[0006] A data encryption method based on a metrology code, for a metrology code generation end, the method comprising: S11, embedding an information dot array containing encrypted data in a graphical identifier of an electronic certificate issuing agency, generating a metrology code corresponding to the electronic certificate, the encrypted data being the core data of the electronic certificate after encryption, each information dot in the information dot array representing a different binary number; S12, extracting the original image local binary pattern texture feature and the original Fourier transform high frequency component of the metrology code to obtain a physical verification reference of the metrology code; S13, encapsulating the physical verification reference and the core data into a data packet, encrypting the data packet using an asymmetric encryption algorithm and storing it on a cloud platform.

[0007] According to one embodiment of the present application, step S11 specifically comprises: S111, extracting a background area in the graphical logo of the electronic certificate issuing agency as a secure area for embedding the information dot matrix; S112, generating binary encrypted data based on the core data of the electronic certificate according to an encryption hash algorithm, and generating an information dot matrix containing the encrypted data based on the binary encrypted data; S113, embedding the information dot matrix in the secure area based on an Alpha blending technique to obtain a metrological code corresponding to the electronic certificate.

[0008] According to one embodiment of the present application, before step S111, it further comprises: performing image enhancement processing on the graphical logo, the image enhancement processing comprising grayscale, denoising and edge sharpening.

[0009] According to one embodiment of the present application, in step S13, when storing the encrypted data packet, the digital signature and the dynamic token of the issuing agency are also attached, and when the issuing agency updates the electronic certificate corresponding to the metrological code on the cloud platform, authorization authentication is also performed based on the digital signature and the dynamic token.

[0010] A data tampering verification method based on a metrological code, for a metrological code verification end, the method comprising: S21, receiving a public key sent by a metrological code generation end; S22, sending a verification request to a cloud platform based on the public key, extracting a data packet corresponding to a metrological code to obtain a physical verification reference of the metrological code and core data of an electronic certificate, the metrological code being generated according to step S11 in the data encryption method described above; S23, extracting image local binary pattern texture features and Fourier transform high-frequency components of the metrological code, and comparing them with the physical verification reference to perform first data tampering verification; S24, decrypting the information dot matrix on the metrological code to obtain current core data corresponding to the encrypted data, and comparing it with the core data stored on the cloud platform to perform second data tampering verification.

[0011] According to one embodiment of the present application, the step of decrypting the information dot matrix on the metrological code to obtain current core data corresponding to the encrypted data specifically comprises: locating the edge profile of the graphical logo in the metrological code through Hough transformation, and performing distortion correction on the metrological code based on the edge profile; locating and traversing the information dot matrix on the metrological code based on a preset secure area positioning algorithm, and decrypting it to obtain current core data corresponding to the encrypted data.

[0012] According to one embodiment of the present application, the hierarchical response based on the results of the first data tampering verification and the second data tampering verification comprises: triggering a first-level response to display the traceability information of the electronic certificate when the metrology code passes the first data tampering verification and the second data tampering verification; triggering a second-level response to prompt manual review when the metrology code only has abnormal Fourier transform high-frequency component verification in the first data tampering verification but passes the second data tampering verification; and triggering a third-level response to prompt suspected tampering when the metrology code has abnormal image local binary pattern texture feature verification in the first data tampering verification or fails to pass the second data tampering verification.

[0013] According to one embodiment of the present application, the cloud platform also stores an original certificate file of the electronic certificate.

[0014] A metrology code-based data encryption system for a metrology code generation end, the system comprising: a generation module configured to embed an information dot array containing encrypted data in a graphical identifier of an electronic certificate issuing agency to generate a metrology code corresponding to the electronic certificate, the encrypted data being core data of the electronic certificate after encryption, and the presence or absence of each information dot in the information dot array representing a different binary number; a first extraction module configured to extract original image local binary pattern texture features and original Fourier transform high-frequency components of the metrology code to obtain physical verification criteria of the metrology code; and a storage module configured to encapsulate the physical verification criteria and the core data into a data packet, encrypt the data packet using an asymmetric encryption algorithm, and store the data packet in a cloud platform.

[0015] A metrology code-based data tampering verification system for a metrology code verification end, the system comprising: a receiving module configured to receive a public key sent by a metrology code generation end; a second extraction module configured to send a verification request to a cloud platform based on the public key, extract a data packet corresponding to the metrology code to obtain physical verification criteria of the metrology code and core data of an electronic certificate, the metrology code being generated using step S11 in the data encryption method described above; a first verification module configured to extract image local binary pattern texture features and Fourier transform high-frequency components of the metrology code, and compare the features and components with the physical verification criteria to perform first data tampering verification; and a second verification module configured to decrypt the information dot array on the metrology code to obtain current core data corresponding to the encrypted data, and compare the current core data with the core data stored in the cloud platform to perform second data tampering verification.

[0016] The present application has the following advantages:

[0017] The data encryption method, data tampering verification method and system based on the metrology code of the present application bind the metrology code and the image identification of the electronic certificate through encryption, which not only realizes the inseparability of the anti-fake identification, but also breaks through the form limitation of the traditional two-dimensional code, reduces the artificial dependence, and improves the verification efficiency; a double anti-tampering system of physical layer and data layer is constructed, and combined with cloud platform safe storage, the data integrity and verification reliability are ensured, which can significantly improve the full life cycle credibility of key electronic files such as metrology certificate and detection report. BRIEF DESCRIPTION OF DRAWINGS

[0018] Figure 1 The flowchart of the data encryption method based on the metrology code of the embodiment of the present application is shown.

[0019] Figure 2 The flowchart of one embodiment of the data tampering verification method of the present application is shown.

[0020] Figure 3 The flowchart of another embodiment of the data tampering verification method of the present application is shown.

[0021] Figure 4 The flowchart of the hierarchical response of the data tampering verification method of one embodiment of the present application is shown.

[0022] Figure 5 The block schematic diagram of the data encryption system based on the metrology code of the embodiment of the present application is shown.

[0023] Figure 6 The block schematic diagram of the data tampering verification system based on the metrology code of the embodiment of the present application is shown. DETAILED DESCRIPTION

[0024] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.

[0025] As shown in the figure, the data encryption method based on the metrology code of the embodiment of the present application is used for the metrology code generation end, and the data encryption method includes the following steps S11-S14: Figure 1

[0026] S11, in the graphic identification of the electronic certificate issuing authority, embed the information dot matrix containing encrypted data to generate the metrology code corresponding to the electronic certificate, the encrypted data is the core data of the encrypted electronic certificate, and whether each information dot in the information dot matrix exists represents different binary numbers.

[0027] ​Optionally, the metering code generation end can be a smart service device of an electronic certificate issuing agency, or a smart service device of a metering code generation agency commissioned by the issuing agency to generate metering codes, etc., and the present embodiment is not limited thereto,

[0028] In one embodiment of the present application, step S11 specifically comprises steps S111-S113:

[0029] S111, extracting a background region in the graphical identification of the electronic certificate issuing agency, and embedding the background region as a secure region of the information dot matrix. Specifically, the watershed algorithm can be used to segment the Logo main body and the background region, and the gradient amplitude calculation can be combined to select the background region or the low-interference non-critical region of the edge as the secure region for subsequent information dot matrix embedding.

[0030] In one embodiment of the present application, in order to improve the image quality and improve the subsequent segmentation and embedding accuracy, before step S111, image enhancement processing can also be performed on the graphical identification provided by the issuing agency, wherein the image enhancement processing can include grayscale, denoising, edge sharpening, etc., and the present embodiment is not limited thereto.

[0031] S112, generating binary encrypted data based on the core data of the electronic certificate based on the encryption hash algorithm, and generating an information dot matrix containing the encrypted data based on the binary encrypted data.

[0032] The core data of the electronic certificate can include a certificate hash value, a unique code, a timestamp, and a file storage address. The binary encrypted data generated by the encryption hash algorithm can be used to verify the integrity of the certificate data, and any content modification will cause the hash value to change irreversibly; the unique code is a unique identification code for each metering certificate, which ensures the permanent non-repetition of different certificates in the cloud platform; the timestamp accurately records the time when the certificate is issued; and the file storage address points to the original PDF (Portable Document Format) file, which facilitates quick retrieval.

[0033] Specifically, a random sequence can be generated based on the core data of the electronic certificate through the Logistic chaotic mapping algorithm, and the data bits are encrypted by combining the private key of the issuing agency to dynamically determine the coordinate distribution of the information points in the grid, thereby preventing the regularity of the information point distribution from being cracked.

[0034] S113, embedding the information dot array into the security area based on an Alpha blending technique to obtain a metrological code corresponding to the electronic certificate. That is, the information dots and the logo background pixels are weighted and superimposed based on the Alpha value. Specifically, light color information dots with low transparency can be used in dark areas, and dark gray can be used in light color areas to improve contrast while retaining the original color levels of the image, ensuring that the embedded information dots are visually integrated with the original logo and avoiding abnormal perception by the human eye.

[0035] Specifically, by adjusting the transparency and color gradient parameters of the information dots, the embedded area can be naturally integrated with the original background, and then a visually lossless metrological code image can be output. The metrological code retains the visual features of the original logo while supporting high-resolution output to meet the clarity requirements of different media. For example, each information dot is set to a circle or square with a diameter of no more than 0.5 mm, and the color difference between the color of each information dot and the color of the logo background is controlled within the professional color standard ΔE ≤ 5, ensuring that the normal visual effect of the logo is not affected.

[0036] In one specific embodiment of the present application, the graphical identification of the issuing agency is a logo of the issuing agency, which is a circular badge with a dark blue background, a light gray instrument icon in the center, and a Chinese agency name at the bottom. When generating the metrological code, the logo can be first grayscale processed, and then the logo image clarity is optimized through denoising and edge sharpening. The outer ring dark background is separated from the center icon and text using an image segmentation algorithm, and the outer ring is selected as the security area, avoiding the bottom text and dividing it into a 12x12 grid, with each cell size being 0.4mm x 0.4mm to adapt to A4 paper printing, ensuring that the visual effect of the core elements of the logo is not damaged during subsequent information dot embedding. After image preprocessing, the outer ring background area accounts for about 30%, providing a hidden and stable embedding space for encrypted data.

[0037] When embedding the information dot array, light gray information dots (RGB: 200, 200, 200) are embedded in the dark blue outer ring area with a transparency of 8% to naturally integrate with the background; dark gray information dots (RGB: 80, 80, 80) are embedded in the edge of the light gray icon with a transparency of 12%; and at the junction of dark blue and light gray, the parameters are adjusted synchronously to make the information dots and the background naturally integrated. The final output metrological code image retains the original visual effect of the logo while meeting the different resolution requirements of 300dpi printing and 72dpi screen display, so that the metrological code meets the concealment requirements of the information dots whether it is printed on a paper certificate or displayed in an electronic document.

[0038] S12, extract the original image local binary pattern (LBP, Local Binary Pattern) texture features and the original Fourier transform high frequency component of the metering code to obtain the physical verification reference of the metering code. The local binary pattern texture feature is a binary code generated by analyzing the brightness difference between the pixel point and the surrounding neighborhood, and is mainly used for quantifying the micro-texture features of the local area of the image and focusing on local detail anomalies. The Fourier transform high frequency component decomposes the image into different frequency components, focuses on the edge and detail information in the high frequency band, and the abnormal change of high frequency energy can determine whether the overall structure of the image is destroyed.

[0039] S13, encapsulate the physical verification reference and the core data into a data packet, encrypt the data packet using an asymmetric encryption algorithm, and store it in the cloud platform.

[0040] Based on the storage service characteristics of the cloud platform, the original data of the electronic certificate can be classified and managed, the lightweight core data associated with the metering code is stored in the cloud database, supporting high-frequency reading and writing and fast retrieval; the original certificate file is stored in the cloud object storage service, which can be quickly retrieved through the hash index, and the cloud platform audit log function is enabled to record data access behavior and operation traces.

[0041] In an embodiment of the application, when the encrypted data packet is stored in step S13, a digital signature of the issuing agency and a dynamic token can also be attached. The issuing agency updates the electronic certificate corresponding to the metering code on the cloud platform, and also performs authorization authentication based on the digital signature and the dynamic token, ensuring that only the metering code verification end with authorization can access the data, and ensuring the legality of each sending request.

[0042] In an embodiment of the application, the metering code generation end or the issuing agency can also perform role permission control on the cloud platform, that is, predefine role assignment operation permissions, such as the administrator role of the metering code generation end or the issuing agency, which can upload and modify the reference feature value, including but not limited to the physical verification reference of the metering code, while the metering code verification end can only read data, ensuring the minimization of permissions.

[0043] When the issuing agency uploads the instrument calibration certificate, the cloud platform first verifies the dynamic token in the request to confirm the identity of the issuing agency, and then matches whether the role of the request terminal has data upload permission. After verification, the data is allowed to be stored and the audit log is recorded; if the permission verification fails, an alarm will be triggered and the access permission of the abnormal terminal will be frozen.

[0044] According to the data encryption method based on the metrology code, the metrology code is encrypted and bound with the carrier image of the electronic certificate, that is, the graphic identification, so that the inseparability of the anti-fake identification is realized, and the form limitation of the traditional two-dimensional code is broken; the physical verification reference and the core data are encapsulated and encrypted on the cloud platform, so that the data integrity and the verification reliability are ensured, so that the metrology code verification end can realize multi-dimensional verification through the physical feature verification and the digital feature verification when performing data tampering verification, the tampering verification precision is improved, the artificial dependence is reduced, and the verification efficiency is improved; moreover, the image local binary pattern texture feature is sensitive to slight tampering, and the Fourier transform high-frequency component can effectively identify image blurring, stretching deformation or large-area covering and other global tampering, the two characteristics are complementary, can cover the physical attack scene from micro to macro, and has strong tampering identification capability.

[0045] As shown in Figure 2 The data tampering verification method based on the metrology code of the embodiment of the application is used for a metrology code verification end, and the data tampering verification method comprises steps S21-S24:

[0046] S21, receiving the public key sent by the metrology code generation end. The public key can be generated by the metrology code generation end based on an asymmetric encryption algorithm when encapsulating the data packet corresponding to the metrology code, so that the metrology code verification end can perform data tampering verification through the cloud platform based on the metrology code and the public key corresponding to the metrology code.

[0047] Optionally, the metrology code verification end can be a mobile client application, and can also be a client system, and the embodiment is not limited thereto,

[0048] S22, sending a verification request to the cloud platform based on the public key, extracting the data packet corresponding to the metrology code, obtaining the physical verification reference of the metrology code and the core data of the electronic certificate, and the metrology code can be generated by the step S11 in the data encryption method.

[0049] S23, extracting the image local binary pattern texture feature and the Fourier transform high-frequency component of the metrology code, and comparing the physical verification reference to perform first data tampering verification.

[0050] S24, decrypting the information dot matrix on the metrology code to obtain the current core data corresponding to the encrypted data, and comparing the core data stored on the cloud platform to perform second data tampering verification.

[0051] It is understandable that the first data tampering verification and the second data tampering verification can be performed on the metering code verification terminal or on the cloud platform. When the data tampering verification is performed on the cloud platform, the metering code verification terminal, when sending a verification request to the cloud platform, also sends the image local binary pattern texture features and Fourier transform high-frequency components extracted from the metering code, the feature hash value of the current core data obtained by decrypting the information dot matrix on the metering code, and the dynamic token. After verifying the legitimacy of the dynamic token, the data signature, and the hash consistency, the cloud platform can perform the first data tampering verification and the second data tampering verification, and return the data tampering verification result.

[0052] In one embodiment of the present invention, the step of decrypting the information dot matrix on the metering code to obtain the current core data corresponding to the encrypted data specifically includes the following steps S241-S242:

[0053] S241, locating the edge contour of the graphic identifier in the measurement code through Hough transform, and performing distortion correction on the measurement code based on the edge contour, thereby correcting image distortion problems caused by shooting angle, distance, etc.

[0054] S242: Locate the information dot matrix on the traversal metering code based on a preset security area positioning algorithm, and decrypt it to obtain the current core data corresponding to the encrypted data.

[0055] In the scenario of printing paper measurement certificates, the measurement code verification end may also face problems such as low printing quality, stains or creases when scanning the measurement code. At this time, the Reed-Solomon error correction code can be used to automatically repair the loss of some information points caused by ink smudges. At the same time, the watershed algorithm is used to separate the crease area and prioritize the analysis of information points with clear edges.

[0056] In one embodiment of the present invention, the data obtained after decryption by the metering code verification terminal is a hash value corresponding to the current core data, i.e., a binary sequence. The current core data text may not be parsed by the metering code verification terminal. Instead, the hash value of the current core data may be directly compared with the hash value of the core data stored on the cloud platform for consistency, thereby implementing the second data tampering verification. This embodiment is not limited to this.

[0057] like Figure 3 As shown, in one embodiment of the present invention, the data tampering verification method further includes: S25, performing a hierarchical response based on the results of the first data tampering verification and the second data tampering verification. Step S25 may specifically include the following steps S251-S253:

[0058] S251: When the metrology code passes both the first and second data tampering verifications, a first-level response is triggered, displaying the traceability information of the electronic certificate. The traceability information may include the certificate's authenticity, issuing authority information, test instrument number, and test / calibration time.

[0059] S252: When the metering code only has a Fourier transform high-frequency component verification anomaly during the first data tampering verification, but passes the second data tampering verification, it indicates that the metering code image may have suffered overall damage, triggering a secondary response and prompting manual review.

[0060] S253: If the metrology code encounters an anomaly in the local binary pattern texture feature verification during the first data tampering verification, or fails the second data tampering verification, a Level 3 response is triggered, indicating suspected tampering. An anomaly in the local binary pattern texture feature verification indicates the possibility of localized targeted tampering, thus directly triggering a Level 3 response. The anomaly area can also be located for manual review.

[0061] like Figure 4 As shown, in one embodiment of the present invention, step S25 can be performed simultaneously with steps S23 and S24. During the first data tampering verification in step S23, if an abnormality occurs in the image local binary pattern (LBP) texture feature verification, a third-level response can be directly triggered, indicating suspected tampering, without continuing with the second data tampering verification in step S24. This simplifies the verification process, improves response efficiency, and avoids resource waste. If the metering code passes the first data tampering verification or only the Fourier transform high-frequency component verification is abnormal, step S24 is continued to perform the second data tampering verification. If the second data tampering verification fails, the third-level response is triggered. Otherwise, based on the result of the first data tampering verification (physical layer pass or physical layer abnormality), a comprehensive judgment is made based on the second data tampering verification, triggering either the first or second-level response.

[0062] By providing graded responses to different data tampering verification results, it can effectively ensure verification reliability, improve the credibility of measurement certificates throughout their life cycle, and provide traceable and irrefutable digital credentials for scenarios such as quality supervision and judicial evidence collection.

[0063] In one embodiment of the present invention, the cloud platform also stores the original certificate file of the electronic certificate. When the first-level response is triggered, the user can also read the original certificate file of the electronic certificate from the cloud platform through the metering code verification terminal.

[0064] According to the data tampering verification method based on the metrological code provided in the application, the metrological code is subjected to data tampering verification based on the physical verification reference and the core data stored on the cloud platform, a multi-level verification architecture of 'physical characteristics-encrypted data-cloud storage' is formed, the core contradiction of coexistence of carrier vulnerability and verification dependency is solved, and the long-term storage, high tamper resistance and cross-medium verification requirements of electronic certificates are met; moreover, the image local binary pattern texture feature is sensitive to subtle tampering, and the Fourier transform high-frequency component can effectively identify global tampering such as image blurring, stretching deformation or large-area covering, the two features are complementary, can cover the physical attack scene from micro to macro, and have strong tampering identification capability.

[0065] Corresponding to the above-mentioned data encryption method based on the metrological code, the application also provides a data encryption system based on the metrological code, which is used for a metrological code generation end.

[0066] As shown in Figure 5 The data encryption system of the embodiment of the application comprises: a generation module 11, a first extraction module 12 and a storage module 13, wherein the generation module 11 is used for embedding an information dot array containing encrypted data in the graphic identification of the electronic certificate issuing authority, generating a metrological code corresponding to the electronic certificate, the encrypted data being the core data of the encrypted electronic certificate, and each information dot in the information dot array representing a different binary number; the first extraction module 12 is used for extracting the original image local binary pattern texture feature and the original Fourier transform high-frequency component of the metrological code to obtain a physical verification reference of the metrological code; and the storage module 13 is used for encapsulating the physical verification reference and the core data into a data packet, encrypting the data packet by using an asymmetric encryption algorithm and storing the data packet on a cloud platform.

[0067] In an embodiment of the application, the generation module 11 is specifically configured to: extract a background area in the graphic identification of the electronic certificate issuing authority, and embed the background area as a security area of the information dot array; generate binary encrypted data based on an encryption hash algorithm according to the core data of the electronic certificate, and generate the information dot array containing the encrypted data based on the binary encrypted data; and embed the information dot array in the security area based on an Alpha blending technology to obtain the metrological code corresponding to the electronic certificate.

[0068] In an embodiment of the application, the data encryption system further comprises an image enhancement module configured to perform image enhancement processing on the graphic identification, and the image enhancement processing comprises grayscale processing, denoising and edge sharpening.

[0069] In an embodiment of the application, when storing the encrypted data packet, the storage module 13 further attaches a digital signature and a dynamic token of the issuing authority, and when the issuing authority updates the electronic certificate corresponding to the metrological code on the cloud platform, the digital signature and the dynamic token are further used for authorization authentication.

[0070] According to the data encryption system based on the metrology code provided in the application, the metrology code is encrypted and bound with the carrier image of the electronic certificate, that is, the graphic mark, so that the inseparability of the anti-fake mark is realized and the form limitation of the traditional two-dimensional code is broken; the physical verification reference and the core data are encapsulated and encrypted on the cloud platform, so that the data integrity and the verification reliability are ensured, the metrology code verification end can realize multi-dimensional verification through the physical feature verification and the digital feature verification when performing data tampering verification, the tampering verification precision is improved, the artificial dependency is reduced, and the verification efficiency is improved; moreover, the image local binary pattern texture feature is sensitive to slight tampering, and the Fourier transform high-frequency component can effectively identify global tampering such as image blurring, stretching deformation or large-area covering, the two features are complementary, can cover the physical attack scene from the micro to the macro, and have strong tampering identification capability.

[0071] Corresponding to the data tampering verification method based on the metrology code, the application further provides a data tampering verification system based on the metrology code for the metrology code verification end.

[0072] As shown in Figure 6 The data tampering verification system of the embodiment of the application comprises: a receiving module 21, a second extraction module 22, a first verification module 23 and a second verification module 24, wherein the receiving module 21 is configured to receive the public key sent by the metrology code generation end; the second extraction module 22 is configured to send a verification request to the cloud platform based on the public key, extract the data packet corresponding to the metrology code, obtain the physical verification reference of the metrology code and the core data of the electronic certificate, and the metrology code is generated by the step S11 in the data encryption method described above; the first verification module 23 is configured to extract the image local binary pattern texture feature and the Fourier transform high-frequency component of the metrology code, and perform first data tampering verification by comparing the physical verification reference; and the second verification module 24 is configured to decrypt the information dot array on the metrology code to obtain the current core data corresponding to the encrypted data, and perform second data tampering verification by comparing the core data stored on the cloud platform.

[0073] In an embodiment of the application, the step of the second verification module 24 decrypting the information dot array on the metrology code to obtain the current core data corresponding to the encrypted data specifically comprises: positioning the edge profile of the graphic mark in the metrology code through Hough transformation, and correcting the distortion of the metrology code based on the edge profile; and positioning and traversing the information dot array on the metrology code based on a preset security area positioning algorithm, and decrypting the information dot array to obtain the current core data corresponding to the encrypted data.

[0074] In one embodiment of the present application, the data tampering verification system further comprises a response module, which performs a hierarchical response based on the results of the first data tampering verification and the second data tampering verification, specifically including: when the metrology code passes the first data tampering verification and the second data tampering verification, triggering a first-level response, displaying the traceability information of the electronic certificate; when the metrology code only has abnormal Fourier transform high-frequency component verification in the first data tampering verification, but passes the second data tampering verification, triggering a second-level response, prompting manual review; when the metrology code has abnormal image local binary pattern texture feature verification in the first data tampering verification, or fails to pass the second data tampering verification, triggering a third-level response, prompting suspected tampering.

[0075] In one embodiment of the present application, the cloud platform also stores the original certificate file of the electronic certificate. When the first-level response is triggered, the user can also read the original certificate file of the electronic certificate from the cloud platform through the metrology code verification end.

[0076] According to the data tampering verification system of the embodiment of the present application, the metrology code is subjected to data tampering verification based on the physical verification reference and the core data stored on the cloud platform, forming a multi-level verification architecture of “physical features-encrypted data-cloud storage”, solving the core contradiction of coexistence of carrier vulnerability and verification dependency, meeting the long-term storage, high tamper resistance and cross-media verification requirements of electronic certificates; and the image local binary pattern texture feature is sensitive to subtle tampering, and the Fourier transform high-frequency component can effectively identify global tampering such as image blur, stretching deformation or large-area covering, the characteristics of the two are complementary, and can cover the physical attack scene from micro to macro, and the tampering identification ability is strong.

[0077] In the description of the present application, the terms “first” and “second” are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Therefore, the features defined with “first” and “second” can explicitly or implicitly include one or more of the features. The meaning of “a plurality of” is two or more, unless otherwise specifically limited.

[0078] In the description of the specification, the description of the terms "one embodiment", "some embodiments", "an example", "a specific example", or "some examples" and the like means that the specific feature, structure, material or characteristic being described is included in at least one embodiment or example of the present application. The illustrative descriptions of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples. Furthermore, the different embodiments or examples described in the specification can be combined and combined with each other in any suitable manner without mutual contradiction.

[0079] Any process or method descriptions or descriptions of the flow diagrams in the specification can be understood as representing code modules, segments, or portions of code which include one or more executable instructions for implementing specific logic functions (or steps) in the process, and the various preferred embodiments of the application include additional or different code modules, segments, or portions of code for implementing the application. The various processes and methods described in the specification can be understood as representing a process or method, including the functions specified in the flow diagrams, and the preferred embodiments of the application include additional or different processes or methods, which can be implemented in hardware, software, firmware, or any combination thereof, as desired.

[0080] The logic and / or steps represented in the flow diagrams or otherwise described in the specification, for example, can be considered as a list of executable instructions for implementing the logic function, and the various preferred embodiments of the application include additional or different code modules, segments, or portions of code for implementing the application. The various processes and methods described in the specification can be understood as representing a process or method, including the functions specified in the flow diagrams, and the preferred embodiments of the application include additional or different processes or methods, which can be implemented in hardware, software, firmware, or any combination thereof, as desired. For the purposes of this specification, a "computer readable medium" can be any device or apparatus that can contain, store, communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer readable medium include the following: an electrical connection having one or more wires (electrical devices), a portable computer diskette (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). In addition, the computer readable medium can even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, for example, by optically scanning the paper or other suitable medium, then electronically converted into a form that is suitable for use by the instruction execution system, apparatus, or device. The computer readable medium can also be a medium that can be programmed by the user or it can be a medium that is programmed to store data for use by or in connection with the instruction execution system, apparatus, or device.

[0081] It should be understood that parts of the present application can be implemented in hardware, software, firmware or a combination thereof. In the above embodiments, a plurality of steps or methods can be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, and as in another embodiment, it can be implemented using any or a combination of the following technologies, which are well known in the art: discrete logic circuitry having logic gates for implementing logic functions on data signals, application specific integrated circuits having appropriate combinational logic gates, programmable gate arrays (PGA), field programmable gate arrays (FPGA), etc.

[0082] Those skilled in the art can understand that all or part of the steps carried out by the above-mentioned embodiment methods can be completed by programs instructing relevant hardware, and the programs can be stored in a computer readable storage medium, and when the programs are executed, one or a combination of the steps of the method embodiments is included.

[0083] In addition, each functional unit in each embodiment of the present application can be integrated into one processing module, or each unit can exist physically, or two or more units can be integrated into one module. The above integrated module can be realized in the form of hardware or in the form of a software functional module. The integrated module, if realized in the form of a software functional module and sold or used as an independent product, can also be stored in a computer readable storage medium.

[0084] Although the embodiments of the present application have been shown and described above, it should be understood that the above embodiments are exemplary and cannot be understood as limiting the present application, and those skilled in the art can make changes, modifications, replacements and variations to the above embodiments within the scope of the present application.

Claims

1. A data encryption method based on a metering code, used for a metering code generating end, characterized in that: The method comprises: S11, embedding an information dot matrix containing encrypted data in the graphic logo of the electronic certificate issuing institution to generate a measurement code corresponding to the electronic certificate, wherein the encrypted data is the encrypted core data of the electronic certificate. The presence or absence of each information dot in the information dot matrix represents a different binary digit; S12, extracting the local binary pattern texture features of the original image of the metrology code and the original Fourier transform high-frequency components to obtain a physical verification benchmark of the metrology code; S13, encapsulating the physical verification benchmark and the core data into a data packet, encrypting the data packet using an asymmetric encryption algorithm, and storing the data packet in a cloud platform.

2. The data encryption method according to claim 1, wherein: Step S11 specifically includes: S111, extracting a background area from the graphic logo of the electronic certificate issuing organization, and using the background area as a secure area for embedding information dot matrix; S112, generating binary encrypted data according to the core data of the electronic certificate based on an encrypted hash algorithm, and generating an information dot matrix containing the encrypted data based on the binary encrypted data; S113, embedding the information dot matrix into the security area based on Alpha blending technology to obtain a measurement code corresponding to the electronic certificate.

3. The data encryption method according to claim 2, wherein: Before step S111 , the method further includes: performing image enhancement processing on the graphic logo, wherein the image enhancement processing includes grayscale conversion, denoising and edge sharpening.

4. The data encryption method according to claim 1, wherein: In step S13, when storing the encrypted data packet, the digital signature and dynamic token of the issuing agency are also attached. When the issuing agency updates the electronic certificate corresponding to the metering code on the cloud platform, authorization authentication is also performed based on the digital signature and the dynamic token.

5. A data tampering verification method based on a metering code, used for a metering code verification terminal, characterized in that: The method comprises: S21, receiving the public key sent by the metering code generating end; S22, sending a verification request to the cloud platform based on the public key, extracting the data packet corresponding to the metering code, and obtaining the physical verification benchmark of the metering code and the core data of the electronic certificate; S23, extracting the image local binary pattern texture features and Fourier transform high-frequency components of the metrology code, and comparing them with the physical verification reference to perform a first data tampering verification; S24, decrypting the information dot matrix on the metering code to obtain current core data corresponding to the encrypted data, and comparing it with the core data stored on the cloud platform to perform a second data tampering verification.

6. The data tampering verification method according to claim 5, characterized in that: The step of decrypting the information dot matrix on the metering code to obtain the current core data corresponding to the encrypted data specifically includes: Locating an edge contour of a graphic identifier in the measurement code by using Hough transform, and performing distortion correction on the measurement code based on the edge contour; The information dot matrix on the metering code is located and traversed based on a preset security area positioning algorithm, and is decrypted to obtain the current core data corresponding to the encrypted data.

7. The data tampering verification method according to claim 5, characterized in that: The method further includes performing a hierarchical response based on the results of the first data tampering verification and the second data tampering verification, specifically including: When the metering code passes the first data tampering verification and the second data tampering verification, a first-level response is triggered, and the traceability information of the electronic certificate is displayed; When the metering code only shows an abnormality in the Fourier transform high-frequency component verification during the first data tampering verification, but passes the second data tampering verification, a secondary response is triggered, prompting manual review; When the metrology code has an abnormality in the verification of the image local binary pattern texture feature during the first data tampering verification, or fails to pass the second data tampering verification, a third-level response is triggered, prompting tampering.

8. The data tampering verification method according to claim 5, characterized in that: The cloud platform also stores the original certificate file of the electronic certificate.

9. A data encryption system based on a metering code, used for a metering code generating end, characterized in that: The system comprises: a generation module configured to embed an information dot matrix containing encrypted data in a graphic logo of an electronic certificate issuing institution, and generate a measurement code corresponding to the electronic certificate, wherein the encrypted data is the encrypted core data of the electronic certificate, and the presence or absence of each information dot in the information dot matrix represents a different binary digit; a first extraction module, configured to extract local binary pattern texture features and original Fourier transform high-frequency components of the original image of the metrology code to obtain a physical verification benchmark of the metrology code; A storage module is used to encapsulate the physical verification benchmark and the core data into a data packet, encrypt the data packet using an asymmetric encryption algorithm, and store the data packet in a cloud platform.

10. A data tampering verification system based on a metering code, used for a metering code verification terminal, characterized in that: The system comprises: A receiving module, configured to receive a public key sent by a metering code generating terminal; a second extraction module, configured to send a verification request to the cloud platform based on the public key, extract the data packet corresponding to the metering code, and obtain the physical verification benchmark of the metering code and the core data of the electronic certificate; a first verification module, configured to extract image local binary pattern texture features and Fourier transform high-frequency components of the metrology code and perform a first data tampering verification by comparing the features with the physical verification reference; The second verification module is used to decrypt the information dot matrix on the metering code to obtain the current core data corresponding to the encrypted data, and compare it with the core data stored on the cloud platform to perform a second data tampering verification.

Citation Information

Patent Citations

  • Efficient information lattice image and its generation and decoding method

    CN101086761A

  • Method and apparatus for binding data in combined anti-counterfeit label

    CN104883383A