Electronic seal impression anti-counterfeiting method based on bar code technology
By integrating anti-counterfeiting barcode information into electronic seals and identifying numbers using the electronic seal query system, the problem of anti-counterfeiting identification of electronic seals in the existing technology is solved, efficient judgment on the authenticity of electronic seals is achieved, and the security of commercial transactions is improved.
Patent Information
- Application Number
- CN202410944549.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-15
- Publication Date
- 2024-11-12
AI Technical Summary
The existing electronic seal anti-counterfeiting technology cannot effectively identify the authenticity of electronic seals, especially the fact that the seal information cannot be read after the file is converted. Simple anti-counterfeiting information cannot guarantee the effectiveness of anti-counterfeiting and is easily used by imitators.
The electronic seal stamp anti-counterfeiting method based on barcode technology is adopted to form an electronic seal stamp image through seal extraction, color enhancement, image noise reduction, size cutting, border drawing and background transparency processing, and the anti-counterfeiting barcode information is integrated into the stamp. Use the electronic seal query system to identify the number on the barcode to determine the authenticity.
By reducing the color difference between the anti-counterfeiting information and the seal until it is invisible to the naked eye, counterfeiters are avoided from paying attention to anti-counterfeiting technology, improving the effectiveness of anti-counterfeiting, and ensuring the rapid judgment of the authenticity of electronic seals and the security of commercial transactions.
Smart Images

Figure CN118942105A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of electronic seal mold anti-counterfeiting, in particular to the technical fields of mold anti-counterfeiting, seal verification and the like, and is an electronic seal mold anti-counterfeiting method based on barcode technology. Background Art
[0002] This section merely provides background information related to the present disclosure and is not necessarily prior art.
[0003] Electronic seal technology uses advanced digital technology to simulate traditional physical seals. It can simulate the appearance and function of traditional physical seals, produce identity recognition based on trusted cryptographic technology, and express it in electronic data graphics, mainly used to sign electronic documents. The electronic documents stamped by it have the same appearance, validity and usage as paper documents stamped by physical seals. It produces identity recognition based on trusted cryptographic technology and expresses it in electronic data graphics, mainly used to sign electronic documents.
[0004] The existing seal anti-counterfeiting technology mainly uses electronic signature technology to verify the authenticity and validity of electronic seals. It often relies on a specific file reader to read the electronic seal information and determine whether the seal in the file has been tampered with. When the electronic document is converted into WORD or PDF, especially for the file that is printed and then scanned into PDF, the electronic seal information cannot be read and the authenticity of the electronic seal cannot be identified. The existing technology simply integrates the anti-counterfeiting information with the target seal and cannot play an anti-counterfeiting role. The obvious anti-counterfeiting mark makes the counterfeiter consciously use the entire anti-counterfeiting seal to forge. Secondly, simple anti-counterfeiting information cannot guarantee the effectiveness of anti-counterfeiting. Summary of the invention
[0005] In view of the shortcomings of the prior art, the present invention provides an electronic seal mold anti-counterfeiting design based on barcode technology, comprising the following steps:
[0006] Step 1, stamp production: The physical stamp image is processed through stamp extraction, color enhancement, image noise reduction, size cropping, border drawing, background transparency, etc. to form an electronic stamp stamp image.
[0007] Step 2, anti-counterfeiting fusion: Generate an anti-counterfeiting barcode image based on the seal number, and after color conversion, width and height stretching and other processing, convert the barcode image into a transparent image with the same width and height as the stamp, and then merge the stamp and the barcode to form a stamp image with anti-counterfeiting code.
[0008] Step 3: Seal identification. Upload or scan the file containing the electronic seal, convert the stamp image into a barcode through seal extraction, size cropping, color conversion, etc., identify the number on the barcode, and query the electronic seal query system interface to obtain the relevant information of the electronic seal, so as to quickly determine the authenticity of the electronic seal.
[0009] In order to solve the problem that obvious anti-counterfeiting marks make counterfeiters consciously use the entire anti-counterfeiting stamp to forge, this method reduces the color difference between the anti-counterfeiting information and the target stamp to a level that is invisible to the naked eye, thus preventing counterfeiters from consciously noticing the anti-counterfeiting technology.
[0010] In step 1, the physical seal image is processed through seal extraction, color enhancement, image noise reduction, size cropping, border drawing, background transparency, etc. to form an electronic seal mold image.
[0011] Step 1-1, seal extraction. After uploading and receiving the seal collection file through the management page, convert the seal collection file into image format, convert the image into three sets of RGB two-dimensional arrays, remove the black text value on the seal image (the text and seal color can be set through the management page, here mainly based on the description of most cases where the text is black and the seal is red), and retain the red seal information.
[0012] Step 1-2, color enhancement. Remove the values corresponding to the two arrays GB in RGB in the image, set the enhancement parameters (0-255, default value 55) through the management page, and change the values of red R greater than 200 to 255, and those less than this value to 0, to enhance the contrast of the seal.
[0013] Step 1-3, image noise reduction. Use the filter algorithm to reduce the noise in the seal image and remove the "small white particles" in the seal image, making the red color of the seal image fuller and better connected.
[0014] Steps 1-4, size cropping. Automatically locate the height and width and crop the stamp image.
[0015] Step 1-5, border drawing. According to the seal border parameters, determine whether it is a circle, rectangle, or square. According to the seal border width and seal image size, calculate the seal border pixel value, and fill it with red R value of 255.
[0016] Step 1-6, background transparency. Traverse the two-dimensional pixels of the stamp image, convert the stamp image into ARGB values, and change the A value with R value less than 255 to 0, so as to achieve the effect of background transparency.
[0017] In view of the problem that simple anti-counterfeiting information cannot guarantee the effectiveness of anti-counterfeiting, consideration is given to adding seal codes, usage time and usage location to the anti-counterfeiting information.
[0018] In step 2, an anti-counterfeiting barcode image is generated according to the seal number. After color conversion, size cropping, width and height stretching, the barcode image is converted into a transparent image with the same width and height as the stamp. The stamp and the barcode are then merged to form a stamp image with an anti-counterfeiting code.
[0019] Step 2-1, generate a barcode. Use the barcode generation algorithm to generate an anti-counterfeiting barcode image with the seal number.
[0020] Step 2-2, color conversion. Read the barcode image, convert the image into three RGB two-dimensional arrays, set the fusion parameters (0-255, default 15) through the management page, obtain the RGB color and convert black and white into red-like values.
[0021] Step 2-3, width and height stretching. According to the proportional scaling method, stretch the barcode image horizontally and vertically to the same height and width as the mold image.
[0022] Step 2-4, pixel fusion. Traverse the pixel points of the stamp, and convert the values into the color values of the corresponding positions of the barcode except for the transparent background pixels, to complete the fusion of the stamp image and the barcode, so that they are not obvious to the naked eye and can be distinguished by pixel values.
[0023] The barcode information includes information such as seal code, usage time, production unit and signing unit, so that one anti-counterfeiting number is used at a time, preventing counterfeiters from simply using high-definition images of anti-counterfeiting seals to commit counterfeiting.
[0024] The difference between the similar red values ranges from 1 to 15, and the color difference is not noticeable to the naked eye, which prevents counterfeiters from consciously noticing the anti-counterfeiting technology and carrying out targeted counterfeiting.
[0025] When the barcode information is generated, the encoding complexity can be increased by an encryption algorithm, or dynamic anti-counterfeiting information can be further included to further improve the anti-counterfeiting effect.
[0026] In step 3, upload or scan the file containing the electronic seal, convert the stamp image into a barcode through seal extraction, size cropping, color conversion and other processes, identify the number on the barcode, and obtain the relevant information of the electronic seal through the electronic seal query system interface, so as to quickly determine the authenticity of the electronic seal.
[0027] Step 3-1, seal extraction. After uploading the file containing the electronic seal through the management page or scanning it with a mobile phone, convert the seal collection file into an image format, convert the image into a three-dimensional array of RGB, and remove the black text value on the seal image.
[0028] Step 3-2, color conversion. Read the stamp image, obtain the RGB color, set the conversion parameters (0-255, default value 200) through the management page, remove the pixels whose red value is less than the conversion parameter 200, and use the clustering algorithm to divide the red R values into two categories, and convert the two categories of red values into 255 and 240 color values.
[0029] Step 3-3, angle correction. Read the red R value of the stamp image, according to the algorithm of 0-360 degrees with a step length of 1, initially 0, rotate the image to calculate whether the red R value 240 is in the same column, if not, continue to rotate until the red R value 240 is in the same column.
[0030] Step 3-4, size cropping. Automatically locate the height and width and crop the barcode image.
[0031] Step 3-5, barcode generation. Traverse the pixels in the first row, obtain the value of red R, and change the R value of the entire column to the first R value of the column, and change the values 255 and 240 to the corresponding values of black and white, respectively, to form a barcode image.
[0032] Step 3-6, code recognition: Use the barcode recognition algorithm to convert the barcode into a code.
[0033] Step 3-7, obtain information. Encapsulate the seal code data as input parameters, query the local database or query the electronic seal query system through the interface, obtain the seal information and determine the authenticity.
[0034] The color difference between the anti-counterfeiting information and the target seal can be adjusted to a minimum as required to improve the anti-counterfeiting ability.
[0035] The problem is solved by reducing the color difference between the anti-counterfeiting information and the target stamp to a level that is invisible to the naked eye, thus preventing counterfeiters from consciously noticing the anti-counterfeiting technology and carrying out targeted counterfeiting.
[0036] The barcode information includes a variety of information such as seal code, usage time, production unit and signing unit, so as to achieve the effect of generating an anti-counterfeiting number after using the seal once, preventing counterfeiters from simply using the high-definition image of the anti-counterfeiting seal to commit counterfeiting.
[0037] The present invention discloses an anti-counterfeiting design method for electronic seal molds based on barcode technology. The method comprises scanning an electronic seal file, converting a mold image into a barcode through seal extraction, size cutting, color conversion and other processes. After identifying the number on the barcode, the electronic seal related information can be obtained by querying through an electronic seal query system interface, thereby judging the authenticity of the electronic seal. The method can be used as a means of rapid identification of electronic seals. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] The present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments, and the above and / or other advantages of the present invention will become more clear.
[0039] Figure 1 It is the overall flow chart of the present invention.
[0040] Figure 2This is a functional composition diagram of the anti-counterfeiting design of electronic seal mold based on barcode technology.
[0041] Figure 3 It is a flow chart of mold making of the present invention.
[0042] Figure 4 This is the anti-counterfeiting fusion flow chart of the present invention.
[0043] Figure 5 It is a flow chart of seal identification of the present invention.
[0044] Figure 6 It is a schematic diagram of the multiple fusion extraction process of barcode and impression image of the present invention.
[0045] Figure 7 It is a schematic diagram of the fusion result of the barcode and the stamp image with a color difference of 50 according to the present invention. DETAILED DESCRIPTION
[0046] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0047] Figure 1 It is the overall flow chart of the present invention.
[0048] The electronic seal mold anti-counterfeiting design based on barcode technology consists of Figure 2 As shown, it includes three parts: mold making, anti-counterfeiting fusion and seal identification. The specific implementation includes the following steps:
[0049] (1) The impression making module works as follows Figure 3 First, upload and obtain the physical seal file and convert it into a picture; second, after seal extraction, color enhancement, image noise reduction, size cropping, border drawing, background transparency and other processing, an electronic seal impression image is formed;
[0050] (2) The anti-counterfeiting fusion module works as follows Figure 4 First, an anti-counterfeiting barcode image is generated according to the stamp number; secondly, the barcode image is converted into a transparent image with the same width and height as the stamp after color conversion, size cropping, width and height stretching, etc.; finally, the stamp and the barcode are merged to form a stamp image with an anti-counterfeiting code;
[0051] (3) The seal identification module works as follows Figure 5 First, upload or scan the file containing the electronic seal; second, convert the stamp image into a barcode through seal extraction, size cropping, color conversion and other processes; finally, identify the number on the barcode and query the electronic seal query system interface to obtain the relevant information of the electronic seal, so as to quickly determine the authenticity of the electronic seal.
[0052] According to the functions and processes designed by the present invention, the specific experimental environment is shown in Table 1.
[0053] Table 1. Software and hardware experimental environment
[0054]
[0055] The purpose of the present invention is to provide an anti-counterfeiting design of an electronic seal mold based on barcode technology. First, a physical seal image is converted into an electronic seal mold image, and then a barcode image carrying seal number information is merged with the mold to form a mold image with an anti-counterfeiting code. Finally, a mobile phone program is used to scan the electronic seal file, and the mold image is converted into a barcode through seal extraction, size cutting, color conversion and other processes. The number on the barcode is identified, and the electronic seal related information can be obtained by querying the electronic seal query system interface, thereby quickly judging the authenticity of the electronic seal.
[0056] Example 1
[0057] The electronic seal with the seal code of "AAA" (circular, with a radius of 5.0 cm and a side width of 0.2 cm, with the circular text "XXXX Company", the horizontal text "Special Seal", and the middle pattern is the XX logo), the usage time is converted into the digital code "XXX1", and the longitude and latitude of the production unit and the signing unit are converted into the digital codes "XXX2" and "XXX3" respectively. After the barcode is merged, the seal code is scanned by the mobile phone. The specific operation is as follows:
[0058] Step 1: Making the mold.
[0059] Step 1-1, seal extraction. After uploading the file with the seal image through the management page, remove the black text on the seal.
[0060] Step 1-2, color enhancement. Set the enhancement parameter to 55 on the general page, and change the values of red R that are greater than 200 to 255, and those that are less than this value to 0.
[0061] Step 1-3: Image noise reduction. Use the filter algorithm to remove the "small white particles" on the borders, circular text, horizontal text, and the middle pattern.
[0062] Step 1-4, size cropping. Get the area within the border and crop it to form a picture with only the stamp.
[0063] Step 1-5, border drawing. Based on the seal border width of 0.2 cm and the seal image radius of 5.0 cm, calculate the seal border pixel value and fill the area inside the border with red R value of 255.
[0064] Step 1-6, background transparency. Traverse the two-dimensional pixels of the stamp image, convert them into ARGB values through the stamp image, and change the A values with R values less than 255 to 0.
[0065] Step 2, anti-counterfeiting fusion.
[0066] Step 2-1, generate a barcode. Use the barcode generation algorithm to generate an anti-counterfeiting barcode image with the stamp number "AAAXXX1XXX2XXX3".
[0067] Step 2-2, color conversion. Read the barcode image, convert the image into three RGB two-dimensional arrays, set the fusion parameter to 15 through the management page, obtain the RGB color and convert black and white into red values of 255 and 240.
[0068] Step 2-3, width and height stretching. According to the proportional scaling method, stretch the barcode image horizontally and vertically to the same height and width as the mold image.
[0069] Step 2-4, pixel fusion. Traverse the pixel points of the stamp, and convert the values into the color values of the corresponding positions of the barcode except for the transparent background pixels, to complete the fusion of the stamp image and the barcode, so that they are not obvious to the naked eye and can be distinguished by pixel values.
[0070] Step 3: Seal identification.
[0071] Step 3-1, seal extraction. After uploading the file containing the electronic seal through the management page or scanning it with a mobile phone, convert the seal collection file into an image format, convert the image into a three-dimensional array of RGB, and remove the black text value on the seal image.
[0072] Supplement 3-2, color conversion. Read the stamp image, obtain the RGB color, set the conversion parameter 200 through the management page, remove the pixels whose red value is less than the conversion parameter 200, and use the clustering algorithm to divide the red R values into two categories, and convert the two categories of red values into 255 and 240 color values.
[0073] Step 3-3, angle correction. Read the red R value of the stamp image, according to the algorithm of 0-360 degrees with a step length of 1, initially 0, rotate the image to calculate whether the red R value 240 is in the same column, if not, continue to rotate until the red R value 240 is in the same column.
[0074] Step 3-4, size cropping. Get the area within the border and crop it to form a picture with only the stamp.
[0075] Step 3-5, barcode generation. Traverse the pixels in the first row, obtain the value of red R, and change the R value of the entire column to the first R value of the column, and change the values 255 and 240 to the corresponding values of black and white, respectively, to form a barcode image.
[0076] Step 3-6, code recognition: Use the barcode recognition algorithm to convert the barcode into the code "AAAXXX1XXX2XXX3".
[0077] Step 3-7, get information. Encapsulate the seal code "AAAXXX1XXX2XXX3" as an input parameter, query the electronic seal query system through the interface, and get the seal information (circular, with a radius of 5.0 cm and a side width of 0.2 cm. The circular text is "XXX Company", the horizontal text is "Special Seal", and the middle pattern is the XX logo).
[0078] Example 2
[0079] We selected various types of stamp images, such as square stamps, rectangular stamps, oval stamps, and circular stamps, and generated different barcodes. We conducted multiple experiments to verify their anti-counterfeiting performance. The results of the five experiments are as follows: Figure 6 shown.
[0080] Barcode generation uses the barcode4j-2.1 tool to generate a Code-39 barcode image from the stamp ID.
[0081] Secondly, the barcode image is integrated and embedded with the electronic seal impression image, the white part in the impression image is changed to a transparent background, and the redundant white part around it is deleted. Since the integrated barcode is only reflected in the seal border, and the color difference is about 10 pixels, the human eye cannot distinguish it. In order to improve the intuitive feeling, the color difference is changed to 50 pixels, and the hidden barcode can be observed. Figure 7 shown.
[0082] Finally, the pixels of the fused image are classified through a clustering algorithm, converted into black and white, and the excess white parts around them are deleted to restore the barcode image. The image width is the same as the original barcode, and the height is the same as the fused stamp image. The barcode can be parsed by the spire.barcode-5.4.2 tool to obtain the corresponding stamp ID value.
[0083] Experimental results show that this technology can integrate the barcode into the impression image without affecting the sensory perception of the naked eye, and can use a program to extract the hidden information in the impression image, which can effectively prevent the forgery and tampering of electronic seals and improve the security of commercial transactions.
[0084] The present invention provides a method and idea of an electronic seal mold anti-counterfeiting method based on barcode technology. There are many methods and ways to implement the technical solution. The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the present invention. These improvements and modifications should also be regarded as the protection scope of the present invention. All components not specified in this embodiment can be implemented by existing technologies.
Claims
1. An electronic seal mold anti-counterfeiting method based on barcode technology, characterized in that: The steps include: Step 1, stamp making, pre-processing the physical stamp image to obtain the electronic stamp stamp image; Step 2: anti-counterfeiting fusion, generating an anti-counterfeiting barcode image and fusing it with the electronic seal impression image obtained in step 1; Step 3, seal identification, image processing of the target electronic seal, identification of the bar code and comparison with the anti-counterfeiting seal obtained in step 2 to determine the authenticity of the target electronic seal.
2. The electronic seal mold anti-counterfeiting method based on barcode technology according to claim 1, characterized in that: In step 1, the preprocessing includes seal extraction, color enhancement, image noise reduction, size cropping, border drawing and background transparency.
3. The electronic seal mold anti-counterfeiting method based on barcode technology according to claim 2, characterized in that: Step 1 includes: Step 1-1, seal extraction, collect seal files and convert them into images, convert the image pixels into three two-dimensional arrays of R, G and B, remove the black text pixels on the seal image, and retain the red seal information; Step 1-2: Color enhancement. Remove the values corresponding to the G and B arrays in the image pixels, set the enhancement parameter to 55, set the threshold to adjust the R value, replace the values greater than the threshold with 255, and replace the values less than the threshold with 0. Steps 1-3, image denoising, using a filter algorithm to reduce noise in the stamp image; Steps 1-4, size cropping, automatically locate the height and width and crop the stamp image; Step 1-5, border drawing, determine the seal shape and seal image size according to the seal border parameters, calculate the seal border pixel value, and replace the R value with 255; In steps 1-6, the background is transparent and the stamp image is retained.
4. The electronic seal mold anti-counterfeiting method based on barcode technology according to claim 3, characterized in that: The threshold in step 1-2 is 200.
5. The electronic seal mold anti-counterfeiting method based on barcode technology according to claim 3, characterized in that: Steps 1-6 include converting the seal image into ARGB color mode, traversing the pixels of the seal image, and replacing the A values of the pixels whose R values are less than 255 with 0.
6. The electronic seal mold anti-counterfeiting method based on barcode technology according to claim 1, characterized in that: Step 2 includes performing image processing on the anti-counterfeiting barcode image, and the image processing includes color conversion, width and height stretching, and size cropping.
7. The electronic seal mold anti-counterfeiting method based on barcode technology according to claim 6, characterized in that: Step 2 includes: Step 2-1, generate a barcode, use the barcode generation algorithm to generate an anti-counterfeiting barcode image with the seal number; Step 2-2, color conversion, read the barcode image, convert the image into three two-dimensional arrays of R, G and B, set the fusion parameter to 15, obtain the RGB color and convert the black and white colors into values close to red respectively; Step 2-3, width and height stretching, according to the proportional scaling method, stretch the barcode image horizontally and vertically to the same height and width as the stamp image; Step 2-4, pixel fusion, traverses the pixel points of the stamp, and converts the values into color values of the corresponding positions of the barcode except for the pixels with transparent background, completing the fusion of the stamp image and the barcode, making it inconspicuous to the naked eye and can be distinguished by pixel values.
8. The electronic seal mold anti-counterfeiting method based on barcode technology according to claim 7, characterized in that: The information of the barcode includes the seal code, the production unit and the signing unit.
9. The electronic seal mold anti-counterfeiting method based on barcode technology according to claim 7, characterized in that: The difference range of the red similar values is 1-15.
10. The electronic seal mold anti-counterfeiting method based on barcode technology according to claim 8, characterized in that: Step 3 includes: Step 3-1, seal extraction, extract the seal image from the file, convert the image pixels into three RGB two-dimensional arrays, convert the image numerically into three RGB two-dimensional arrays, and remove the black text value on the seal image; Step 3-2, color conversion, read the stamp image, set the conversion parameter to 200, remove the pixels whose red value is less than the conversion parameter 200, and use the clustering algorithm to divide the pixels into two categories according to the value of R, and convert the R values of the two categories of pixels into 255 and 240 respectively; Step 3-3, angle correction, rotate the seal image until the frame is in a horizontal position, read the red R value of the seal image pixel, according to the algorithm of 0-360 degrees with a step length of 1, initially 0, rotate the image to calculate whether the pixel with an R value of 240 is in the same column, if not, continue to rotate until it is in the same column. ; Step 3-4, size cropping, automatically locate the height and width and crop the barcode image; Step 3-5, barcode generation, traverse the pixels in the first row, obtain the value of red R, and change the R value of the entire column to the first R value of the column, and change the values 255 and 240 to the corresponding values of black and white, respectively, to form a barcode image; Step 3-6, identify the code, use the barcode recognition algorithm to convert the barcode into a code; Step 3-7, obtain information, encapsulate the seal encoding data into input parameters, query the local database or query the electronic seal query system through the interface, obtain the seal information and determine the authenticity.
