WO2020237881A1 - Method and apparatus for injecting anti-counterfeit information, computer device, and storage medium - Google Patents

Method and apparatus for injecting anti-counterfeit information, computer device, and storage medium Download PDF

Info

Publication number
WO2020237881A1
WO2020237881A1 PCT/CN2019/103453 CN2019103453W WO2020237881A1 WO 2020237881 A1 WO2020237881 A1 WO 2020237881A1 CN 2019103453 W CN2019103453 W CN 2019103453W WO 2020237881 A1 WO2020237881 A1 WO 2020237881A1
Authority
WO
WIPO (PCT)
Prior art keywords
preset
picture
fragments
fragment
counterfeiting information
Prior art date
Application number
PCT/CN2019/103453
Other languages
French (fr)
Chinese (zh)
Inventor
肖玉宾
杨将
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2020237881A1 publication Critical patent/WO2020237881A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K19/00Record carriers for use with machines and with at least a part designed to carry digital markings
    • G06K19/06Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code
    • G06K19/06009Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code with optically detectable marking
    • G06K19/06037Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code with optically detectable marking multi-dimensional coding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K19/00Record carriers for use with machines and with at least a part designed to carry digital markings
    • G06K19/06Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code
    • G06K19/06009Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code with optically detectable marking
    • G06K19/06046Constructional details
    • G06K19/06103Constructional details the marking being embedded in a human recognizable image, e.g. a company logo with an embedded two-dimensional code
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing

Definitions

  • This application relates to the field of computers, in particular to methods, devices, computer equipment and storage media for adding anti-counterfeiting information.
  • Watermarking is to add some digital information to data multimedia (such as images, sounds, video signals, etc.) to achieve functions such as authenticity identification and copyright protection.
  • the embedded watermark information is hidden in the host document and does not affect the observability and integrity of the original document.
  • the watermark algorithm can identify the owner's anti-counterfeiting information embedded in the protected object (such as registered user numbers, product logos, or meaningful text, etc.), and can extract and destroy the anti-counterfeiting information when needed. Watermark can be used to judge whether the object is protected, and can monitor the spread of protected data, authenticity identification, and illegal copy control.
  • the main purpose of this application is to provide a method for adding anti-counterfeiting information, which aims to solve the technical problem that the existing watermark anti-counterfeiting information is easily counterfeited and destroyed.
  • This application proposes a method for adding anti-counterfeiting information, including:
  • Each number is sequentially hidden in a preset picture according to preset rules, where the preset picture is a picture that needs to be added with anti-counterfeiting information;
  • This application also provides a device for adding anti-counterfeiting information, including:
  • a generating module for generating a QR code from the anti-counterfeiting information according to a preset QR code rule
  • the first obtaining module is used to obtain an array corresponding to the two-dimensional code, where the array is composed of multiple numbers;
  • the hiding module is used to hide each number in a preset picture in sequence according to a preset rule, where the preset picture is a picture that needs to be added with anti-counterfeiting information;
  • the display module is used to display a preset picture carrying anti-counterfeiting information.
  • the present application also provides a computer device, including a memory and a processor, the memory stores a computer program, and the processor implements the steps of the foregoing method when the computer program is executed.
  • the present application also provides a computer-readable storage medium on which a computer program is stored, and the computer program is executed by a processor to realize the steps of the above method.
  • This application generates a two-dimensional code from the anti-counterfeiting information, and hides the numbers corresponding to the two-dimensional code in a preset picture in order of arrangement to realize the protection of the anti-counterfeiting information.
  • This solution The anti-counterfeiting information can be hidden in the preset picture, which is not easy to detect, and the ownership of the preset picture can be protected to the greatest extent, and the anti-counterfeiting information is not easy to be counterfeited.
  • This application hides the numbers corresponding to the anti-counterfeiting information in the fragments containing the preset pixel area, and the fragments that do not contain the preset pixel area are not used to hide the numbers, which is convenient for analyzing the anti-counterfeiting information and easily obtain the corresponding by identifying the preset pixel area.
  • the hidden digits are restored to a QR code, and the corresponding anti-counterfeiting information can be obtained by parsing the QR code.
  • the first preset spacing on which the line cutting of this application is based is the line spacing of the text.
  • the second preset spacing is a preset spacing distance perpendicular to the longitudinal direction of the line, which is smaller than the character spacing of the text.
  • the requirement of greater than the second preset spacing will be slit at the interval, even if there is a space greater than the second preset spacing in the same character in the longitudinal direction perpendicular to the line, it will also be slit.
  • the concealment of the cutting law is not easy to detect, and the uneven partition of the preset picture is realized.
  • the partition size is different, and the cutting law is more concealed. It is not easy for counterfeiters to extract anti-counterfeiting information, and it is not easy to be counterfeited or destroyed.
  • FIG. 1 is a schematic flowchart of a method for adding anti-counterfeiting information according to an embodiment of the present application
  • FIG. 2 is a schematic structural diagram of a device for adding anti-counterfeiting information according to an embodiment of the present application
  • Fig. 3 is a schematic diagram of the internal structure of a computer device according to an embodiment of the present application.
  • the method for adding anti-counterfeiting information includes:
  • S1 Generate a QR code based on the anti-counterfeiting information according to a preset QR code rule.
  • the anti-counterfeiting information in this embodiment includes text password information, digital passwords, logo images and any other information that can generate a two-dimensional code.
  • the above-mentioned preset QR code rules vary according to the type of anti-counterfeiting information, but the preset QR code rules include at least three parts: the positioning pattern of the QR code, the function data of the QR code, and the content of the QR code data, so as to be based on the preset
  • the QR code rules generate corresponding QR codes.
  • the two-dimensional code technology is similar to the existing two-dimensional code generation process and will not be repeated.
  • the two-dimensional code of this embodiment can store more anti-counterfeiting information, and by converting the anti-counterfeiting information into a two-dimensional code, the integrity of the anti-counterfeiting information can be guaranteed.
  • the two-dimensional code is parsed into an array of binary numbers 0 and/or 1, and the array is sorted according to a specified sorting rule, for example, the two-dimensional code is parsed sequentially from left to right and top to bottom.
  • the black pattern corresponds to 1
  • the white pattern corresponds to 0, so that the two-dimensional code can be parsed into a binary array.
  • S3 Each number is hidden in a preset picture in sequence according to a preset rule, where the preset picture is a picture to which anti-counterfeiting information needs to be added.
  • the digits corresponding to the two-dimensional code are sequentially hidden in the preset picture in the order of arrangement, so as to realize the hiding protection of the anti-counterfeiting information.
  • the anti-counterfeiting information of this embodiment can form a corresponding two-dimensional code.
  • the preset pictures with anti-counterfeiting information and the original preset pictures cannot be distinguished directly from the surface when printed, and the anti-counterfeiting information is not easy to be counterfeited or destroyed.
  • the aforementioned preset pictures include product pictures, data pictures, contract document pictures, etc.
  • the preset picture is formed by splicing a specified number of fragments, and the step S3 of sequentially hiding each number in the preset picture according to a preset rule includes:
  • S31 Determine in sequence according to a preset order whether the first fragment includes a preset pixel area, wherein the first fragment is included in a specified number of fragments.
  • the preset picture in this embodiment is formed by splicing fragments, which means that the preset picture is divided into multiple small partitions through virtual fragments.
  • the number of the above-mentioned partitions is greater than or equal to the total number of corresponding numbers in the array, so that the number and the fragments are the same. Matching the one, it is convenient to hide the numbers in the picture orderly, and it is convenient to manage the hidden array.
  • the numbers are hidden in the fragments containing the preset pixel area, and the fragments that do not contain the preset pixel area are not used to hide the numbers. It is convenient to obtain the corresponding hidden numbers by identifying the preset pixel area when analyzing the anti-counterfeiting information.
  • the above-mentioned preset pixel area includes a pixel matrix of a specified size, which can satisfy the pixel matrix contained in basically every fragment or most fragments, so as to meet the purpose of hiding numbers through fragments and facilitating management of hidden numbers.
  • a 3 ⁇ 3 pixel matrix, a 5 ⁇ 5 pixel matrix, etc., the preset pixel area can be implemented in a preset manner.
  • the preset sequence from left to right and top to bottom is used to determine whether there is a preset pixel area in each fragment. If so, the fragment is included in the first In a sorting, in order to hide the numbers in the array according to the first sorting order.
  • the first sort in this embodiment is sorted by the coordinate data of each first fragment in the preset picture, for example, the third fragment in the first row of slices corresponds to the sequence number 3 in the first sort; it is located in the first row
  • the fifth fragment in the slice corresponds to the sequence number 4 in the first sort
  • the third fragment in the first row of slices is the coordinate data of the first fragment in the preset picture.
  • This embodiment obtains the serial numbers of the fragments in the first sorting, and then forms a one-to-one correspondence according to the preset correspondence between the serial numbers and the number sorting, so as to realize the orderly hiding of numbers, facilitate management and extraction, and improve the reliability of anti-counterfeiting information. consistency.
  • the preset correspondence relationship is that the same-direction order corresponds to the numerical order in the array one-to-one, that is, all have one-to-one correspondence from small to large, and the fragment numbers 1 to 100 form the first order from small to large;
  • the above-mentioned numerical order is an array The sequence of numbers formed from left to right in the middle, that is, the fragment numbers 1 to 100 form the first order, and the numbers in the corresponding array are ordered from 1 to 100, that is, the fragment with the fragment number 1 hides the first number in the array, the fragment number The second digit in the array is hidden for the fragments of 2, and so on, so that a corresponding digit is hidden in each fragment.
  • the preset correspondence relationship is that the reverse order corresponds to the numerical order in the array one by one, that is, the first order of the fragments is from small to large, and the first order of fragments corresponds to the numerical order from large to small. , That is, the numbers in the array are hidden in each fragment in reverse order, increasing the difficulty of obtaining anti-counterfeiting information from the fragments, and increasing the difficulty coefficient of destroying the anti-counterfeiting information.
  • the identification of different numbers is realized, for example, a full black pixel matrix of a specified size is selected, corresponding to the identification number 0, and some pixels in the full black pixel matrix are selected.
  • the dot is changed to white to correspond to the identification number 1, so that all the binary numbers corresponding to the array can be hidden in each fragment through the above-mentioned change law of the pixel characteristic value.
  • the fragments above include at least one preset pixel area. If multiple preset pixel areas are included, the first preset pixel area in the fragment is selected in the order from left to right and top to bottom. The preset pixel area is used to hide a corresponding number.
  • the digital symbol itself can also be photoprinted on the preset pixel area to realize hiding.
  • the corresponding pixels of the first grid in the preset pixel area are changed from black to white, and the anti-counterfeiting information or encrypted information is copied in black font on the first grid, where the first grid is in the preset pixel area Any one of all corresponding grids.
  • step S31 of sequentially determining whether the first fragment contains the preset pixel area according to the preset order the method includes:
  • S30a Cutting the preset picture uniformly and parallelly along the first direction according to the first preset spacing to form multiple lines of pictures, and performing first encoding on each line of pictures according to the number of lines of each line of pictures in the preset picture.
  • S30b Cut each row of pictures in the second direction according to the second preset interval to form fragments, and perform a second encoding on each fragment according to the arrangement order of the fragments in the row picture, wherein the first direction and the second direction are mutually vertical.
  • the fragments in this embodiment are virtual partitions of a preset picture, that is, the preset picture is formed into a partition through virtual cutting according to a preset rule.
  • the preset picture is divided into multiple rectangular partitions by row cutting and vertical cutting perpendicular to the row direction, and the row and column sort numbers of the fragments are identified as the coordinate coding of each fragment so as to pass the coordinates Encoding directly restores the splicing of fragments to the preset picture.
  • the first preset distance and the second preset distance are kept unchanged during cutting, so that the preset pictures can be ordered and ordered. Regular partitions.
  • the preset picture is a text picture
  • the first preset spacing is the line spacing in the text picture
  • the second preset spacing is the word spacing of two adjacent characters in the same line in the text picture, according to the second preset spacing
  • S302 Cut two adjacent characters from the first interval in a direction perpendicular to the line to form fragments, and sort the fragments according to the position of each fragment in the line picture, and perform the second encoding on each fragment.
  • the preset picture in this embodiment is a text picture, that is, the preset picture is a picture formed by a text file, including large paragraphs of text text.
  • the first preset spacing on which the line cutting in this embodiment is based is the line spacing of the text.
  • the second preset spacing in this embodiment is the word spacing between two adjacent characters in the same line of the text picture. Each word in the text is correspondingly cut into fragments through line cutting and longitudinal cutting, so as to realize the comparison of the preset picture Evenly partition, the partition size is the same.
  • the preset picture is a text picture
  • the first preset spacing is the line spacing in the text picture
  • each line of the picture is cut in the second direction according to the second preset spacing to form fragments
  • each fragment is located in the line picture according to the Arranging the order
  • the step S30b of performing the second encoding on each fragment includes:
  • S303 Determine whether the second interval between two adjacent characters and the third interval within the characters are greater than the second preset interval
  • the second preset spacing perpendicular to the longitudinal direction of the line is smaller than the character spacing of the text.
  • slitting will be performed at the intervals, even if there are intervals greater than the second preset interval in the same word in the longitudinal direction perpendicular to the line. It will be longitudinally cut, and the cutting law is not easy to detect. It realizes uneven partitioning of the preset pictures. The partition size is different, and the cutting law is more hidden. For example, "Zhen" corresponds to three to four fragments after longitudinal cutting.
  • a line of text is "Central District Co., Ltd.”
  • the fragments formed by slitting are one fragment corresponding to " ⁇ ", two fragments corresponding to "Heart", one fragment corresponding to "Zone", " “Yes” corresponds to one fragment, “Limit” corresponds to two fragments, “Gong” corresponds to one fragment, and “Division” corresponds to one fragment.
  • "Heart” and “Limit” are divided into two fragments longitudinally from the space because the characters include a space larger than the second preset distance.
  • the preset pictures are cut uniformly and parallelly along the first direction according to the first preset interval to form multiple rows of pictures, and according to the number of rows of each row of pictures in the preset picture, before step S30a of first encoding each row of pictures ,include:
  • S30d Determine whether the text to be added with the anti-counterfeiting information is in a picture format.
  • the document to be encrypted in this embodiment is a document planned to be added with anti-counterfeiting information through anti-counterfeiting, such as a text data file such as a contract document, and the format of the above text data file needs to be converted into a picture format. If the above-mentioned text data file is in Word or Excel format, convert it to picture format through PDF conversion.
  • the preset pixel area is an all black pixel matrix with a preset matrix size, and the numbers include binary numbers 0 and/or 1.
  • the step S35 of hiding the first number in the preset pixel area in the first fragment includes:
  • the preset matrix size in this embodiment is 3 ⁇ 3, and the preset pixel area is a 3 ⁇ 3 all-black pixel matrix, which includes a 9-square-distributed all-black pixel area and contains fragments of the aforementioned 3 ⁇ 3 all-black pixel matrix. Fragments for hidden numbers. If the corresponding hidden number in the current number sorting is 1, then the black pixel value of the center grid in the 9th grid will be converted into a white pixel value, such as converting 255*255*255 to 0*0*0 to achieve black pixels The value is converted to a white pixel value. By changing the pixel feature value corresponding to the preset pixel area, the identification and hiding of the number 1 and the number 0 are realized.
  • step S3 of sequentially hiding each number in the preset picture according to the preset rule it includes:
  • S5 Form the first picture into fragments according to a preset cutting rule.
  • S6 Extract hidden numbers from the fragments in order to form the first array.
  • This embodiment also provides the process of extracting the anti-counterfeiting information from the first picture with the anti-counterfeiting information, which is reciprocal to the above hiding process, including the fragmentation process of the same principle, and obtaining the hidden numbers from the fragments, and forming the first image in the order of extraction.
  • Array and convert the first array into a designated two-dimensional code, and obtain the orientation mark by solving the designated two-dimensional code.
  • the above process of obtaining hidden numbers from fragments is inverse to the process of hidden numbers, such as identifying whether there is a 3 ⁇ 3 all-black pixel matrix or a 3 ⁇ 3 matrix with white pixel values at the center of the fragment, and if so, record the findings in turn
  • the order is used as the arrangement order of the numbers in the array, and the 3 ⁇ 3 all black pixel matrix is counted as number 1, and the 3 ⁇ 3 center point is the white pixel value matrix as 0.
  • the process of decoding the designated two-dimensional code in this embodiment can be symmetrically encrypted by AES (Advanced Encryption Standard, Advanced Encryption Standard) to improve security.
  • AES Advanced Encryption Standard
  • the process of obtaining anti-counterfeiting information from the designated two-dimensional code in this embodiment is fault-tolerant, and the anti-counterfeiting information can still be obtained correctly even when the number within 30% is lost.
  • the anti-counterfeiting information is generated by generating a two-dimensional code, and the numbers corresponding to the two-dimensional code are sequentially hidden in the preset picture in the order of arrangement, so as to realize the hiding protection of the anti-counterfeiting information.
  • this The solution can hide the anti-counterfeiting information in the preset picture, which is not easy to detect, can protect the ownership of the preset picture to the greatest extent, and the anti-counterfeiting information is not easy to be counterfeited.
  • the numbers corresponding to the anti-counterfeiting information are respectively hidden in the fragments containing the preset pixel area, and the fragments not containing the preset pixel area are not used to hide the numbers, which is convenient for analyzing the anti-counterfeiting information by identifying the preset pixel area.
  • the corresponding hidden number is restored to a two-dimensional code, and the corresponding anti-counterfeiting information is obtained by parsing the two-dimensional code.
  • the first preset spacing on which the line cutting in this embodiment is based is the line spacing of the text.
  • the second preset spacing is a preset spacing distance perpendicular to the longitudinal direction of the line, which is smaller than the character spacing of the text.
  • the requirement of greater than the second preset pitch will be slit at the interval, even if there is a space greater than the second preset interval in the same word in the longitudinal direction perpendicular to the line, it will also be slit.
  • the cutting law is not easy to detect, and the uneven partition of the preset picture is realized. The partition size is different, and the cutting law is more concealed. It is not easy for counterfeiters to extract anti-counterfeiting information, and it is not easy to be counterfeited or destroyed.
  • the device for adding anti-counterfeiting information includes:
  • the generating module 1 is used to generate a two-dimensional code from the anti-counterfeiting information according to a preset two-dimensional code rule.
  • the anti-counterfeiting information in this embodiment includes text password information, digital passwords, logo images and any other information that can generate a two-dimensional code.
  • the above-mentioned preset QR code rules vary according to the type of anti-counterfeiting information, but the preset QR code rules include at least three parts: the positioning pattern of the QR code, the function data of the QR code, and the content of the QR code data, so as to be based on the preset
  • the QR code rules generate corresponding QR codes.
  • the two-dimensional code technology is similar to the existing two-dimensional code generation process and will not be repeated.
  • the two-dimensional code of this embodiment can store more anti-counterfeiting information, and by converting the anti-counterfeiting information into a two-dimensional code, the integrity of the anti-counterfeiting information can be guaranteed.
  • There are 40 sizes of QR codes, and the unit size is also named Version (variant). Version has a linear relationship. For example, Version 1 is a 21 ⁇ 21 matrix, and Version 2 is a 25 ⁇ 25 matrix. Each time you add a Version, the size will increase by 4. The maximum value of Version is 40, so the maximum size of the QR code is (40 -1)*4+21 177, which is 177 x 177 matrix.
  • the first obtaining module 2 is used to obtain an array corresponding to the two-dimensional code, where the array is composed of multiple numbers.
  • the two-dimensional code is parsed into an array of binary numbers 0 and/or 1, and the array is sorted according to a specified sorting rule, for example, the two-dimensional code is parsed sequentially from left to right and top to bottom.
  • the black pattern corresponds to 1
  • the white pattern corresponds to 0, so that the two-dimensional code can be parsed into a binary array.
  • the hiding module 3 is used to hide each number in a preset picture in sequence according to a preset rule, where the preset picture is a picture that needs to be added with anti-counterfeiting information.
  • the display module is used to display a preset picture carrying anti-counterfeiting information.
  • the digits corresponding to the two-dimensional code are sequentially hidden in the preset picture in the order of arrangement, so as to realize the hiding protection of the anti-counterfeiting information.
  • the anti-counterfeiting information of this embodiment can form a corresponding two-dimensional code.
  • the preset pictures with anti-counterfeiting information and the original preset pictures cannot be distinguished directly from the surface when printed, and the anti-counterfeiting information is not easy to be counterfeited or destroyed.
  • the aforementioned preset pictures include product pictures, data pictures, contract document pictures, etc.
  • the hidden module 3 includes:
  • the first judging unit is configured to sequentially judge whether the first fragment contains the preset pixel area according to the preset order, wherein the first fragment is contained in a specified number of fragments.
  • the preset picture in this embodiment is formed by splicing fragments, which means that the preset picture is divided into multiple small partitions through virtual fragments.
  • the number of the above-mentioned partitions is greater than or equal to the total number of corresponding numbers in the array, so that the number and the fragments are the same. Matching the one, it is convenient to hide the numbers in the picture orderly, and it is convenient to manage the hidden array.
  • the numbers are hidden in the fragments containing the preset pixel area, and the fragments that do not contain the preset pixel area are not used to hide the numbers. It is convenient to obtain the corresponding hidden numbers by identifying the preset pixel area when analyzing the anti-counterfeiting information.
  • the above-mentioned preset pixel area includes a pixel matrix of a specified size, which can satisfy the pixel matrix contained in basically every fragment or most fragments, so as to meet the purpose of hiding numbers through fragments and facilitating management of hidden numbers.
  • a 3 ⁇ 3 pixel matrix, a 5 ⁇ 5 pixel matrix, etc., the preset pixel area can be implemented in a preset manner.
  • the first forming unit is configured to, if the first fragments include the preset pixel area, count the first fragments into the sorting, and form the first sorting according to the preset order according to the position of each first fragment in the preset picture.
  • the preset sequence from left to right and top to bottom is used to determine whether there is a preset pixel area in each fragment. If so, the fragment is included in the first In a sorting, in order to hide the numbers in the array according to the first sorting order.
  • the first sort in this embodiment is sorted by the coordinate data of each first fragment in the preset picture, for example, the third fragment in the first row of slices corresponds to the sequence number 3 in the first sort; it is located in the first row
  • the fifth fragment in the slice corresponds to the sequence number 4 in the first sort
  • the third fragment in the first row of slices is the coordinate data of the first fragment in the preset picture.
  • the first acquiring unit is configured to acquire the serial number of the first fragment in the first sorting.
  • the second acquiring unit is used to acquire the first number in the corresponding serial number in the array according to the serial number.
  • This embodiment obtains the serial numbers of the fragments in the first sorting, and then forms a one-to-one correspondence according to the preset correspondence between the serial numbers and the number sorting, so as to realize the orderly hiding of numbers, facilitate management and extraction, and improve the reliability of anti-counterfeiting information. consistency.
  • the preset correspondence relationship is that the same-direction order corresponds to the numerical order in the array one-to-one, that is, all have one-to-one correspondence from small to large, and the fragment numbers 1 to 100 form the first order from small to large;
  • the above-mentioned numerical order is an array The sequence of numbers formed from left to right in the middle, that is, the fragment numbers 1 to 100 form the first order, and the numbers in the corresponding array are ordered from 1 to 100, that is, the fragment with the fragment number 1 hides the first number in the array, the fragment number The second digit in the array is hidden for the fragments of 2, and so on, so that a corresponding digit is hidden in each fragment.
  • the preset correspondence relationship is that the reverse order corresponds to the numerical order in the array one by one, that is, the first order of the fragments is from small to large, and the first order of fragments corresponds to the numerical order from large to small. , That is, the numbers in the array are hidden in each fragment in reverse order, increasing the difficulty of obtaining anti-counterfeiting information from the fragments, and increasing the difficulty coefficient of destroying the anti-counterfeiting information.
  • the hiding unit is used to hide the first number in the preset pixel area in the first fragment.
  • the identification of different numbers is realized, for example, a full black pixel matrix of a specified size is selected, corresponding to the identification number 0, and some pixels in the full black pixel matrix are selected.
  • the dot is changed to white to correspond to the identification number 1, so that all the binary numbers corresponding to the array can be hidden in each fragment through the above-mentioned change law of the pixel characteristic value.
  • the fragments above include at least one preset pixel area. If multiple preset pixel areas are included, the first preset pixel area in the fragment is selected in the order from left to right and top to bottom. The preset pixel area is used to hide a corresponding number.
  • the digital symbol itself can also be photoprinted on the preset pixel area to realize hiding.
  • the corresponding pixels of the first grid in the preset pixel area are changed from black to white, and the anti-counterfeiting information or encrypted information is copied in black font on the first grid, where the first grid is in the preset pixel area Any one of all corresponding grids.
  • the hidden module 3 includes:
  • the second forming unit is configured to cut the preset picture uniformly and parallelly along the first direction according to the first preset pitch to form multiple lines of pictures, and perform first encoding on each line of pictures according to the number of lines of each line of pictures in the preset picture .
  • the third forming unit is used to cut each row of pictures in a second direction according to a second preset interval to form fragments, and perform a second encoding on each fragment according to the arrangement order of each fragment in the row picture, wherein the first direction It is perpendicular to the second direction.
  • the fourth forming unit is used to form coordinate codes corresponding to each fragment according to the first code and the second code.
  • the fragments in this embodiment are virtual partitions of a preset picture, that is, the preset picture is formed into a partition through virtual cutting according to a preset rule.
  • the preset picture is divided into multiple rectangular partitions by row cutting and vertical cutting perpendicular to the row direction, and the row and column sort numbers of the fragments are identified as the coordinate coding of each fragment so as to pass the coordinates Encoding directly restores the splicing of fragments to the preset picture.
  • the first preset distance and the second preset distance are kept unchanged during cutting, so that the preset pictures can be ordered and ordered. Regular partitions.
  • the preset picture is a text picture
  • the first preset spacing is the line spacing in the text picture
  • the second preset spacing is the word spacing of two adjacent characters in the same line in the text picture
  • the third forming unit includes :
  • the recognition subunit is used to recognize the first interval between two adjacent characters according to the second preset interval.
  • the first cutting subunit is used for cutting two adjacent characters from the first interval in a direction perpendicular to the line to form fragments, and sorting the fragments according to the position of each fragment in the line picture, and performing the second encoding on each fragment.
  • the preset picture in this embodiment is a text picture, that is, the preset picture is a picture formed by a text file, including large paragraphs of text text.
  • the first preset spacing on which the line cutting in this embodiment is based is the line spacing of the text.
  • the second preset spacing in this embodiment is the word spacing between two adjacent characters in the same line of the text picture. Each word in the text is correspondingly cut into fragments through line cutting and longitudinal cutting, so as to realize the comparison of the preset picture Evenly partition, the partition size is the same.
  • the preset picture is a text picture
  • the first preset spacing is the line spacing in the text picture
  • the third forming unit includes:
  • the first determining subunit is used to determine whether the second interval between two adjacent characters and the third interval within the characters are greater than the second preset interval;
  • the second cutting subunit is used for if the second interval between two adjacent characters and the third interval within the characters are greater than the second preset interval, then the two adjacent characters are perpendicular to the line from the second interval Cut the same text from the third interval in the direction perpendicular to the line to form fragments and sort the fragments according to their location in the line picture, and perform the second encoding on each fragment.
  • the second preset spacing perpendicular to the longitudinal direction of the line is smaller than the character spacing of the text.
  • slitting will be performed at the intervals, even if there are intervals greater than the second preset interval in the same word in the longitudinal direction perpendicular to the line. It will be longitudinally cut, and the cutting law is not easy to detect. It realizes uneven partitioning of the preset pictures. The partition size is different, and the cutting law is more hidden. For example, "Zhen" corresponds to three to four fragments after longitudinal cutting.
  • a line of text is "Central District Co., Ltd.”
  • the fragments formed by slitting are one fragment corresponding to " ⁇ ", two fragments corresponding to "Heart", one fragment corresponding to "Zone", " “Yes” corresponds to one fragment, “Limit” corresponds to two fragments, “Gong” corresponds to one fragment, and “Division” corresponds to one fragment.
  • "Heart” and “Limit” are divided into two fragments longitudinally from the space because the characters include a space larger than the second preset distance.
  • the hidden module 3 includes:
  • the second determining unit is used to determine whether the text to be added with the anti-counterfeiting information is in a picture format.
  • the conversion unit is configured to, if the text to be added with the anti-counterfeiting information is not in a picture format, convert the to-be-encrypted file into a picture format according to a preset conversion method to form a text picture.
  • the file to be encrypted in this embodiment is a file planned to be added with anti-counterfeiting information, such as a text data file such as a contract document, and the format of the above text data file needs to be converted into a picture format. If the above-mentioned text data file is in Word or Excel format, convert it to picture format through PDF conversion.
  • the preset pixel area is an all black pixel matrix with a preset matrix size
  • the numbers include binary numbers 0 and/or 1
  • the hidden unit includes:
  • the second judgment subunit is used to judge whether the first number is 1.
  • the first marking subunit is used for converting the pixel value of the center point of the all-black pixel matrix into the pixel value corresponding to the white pixel if the first number is 1, and marking 1.
  • the second marking subunit is used to mark the all-black pixel matrix as 0 if the first number is not 1, then it is determined as 0.
  • the preset matrix size in this embodiment is 3 ⁇ 3, and the preset pixel area is a 3 ⁇ 3 all-black pixel matrix, which includes a 9-square-distributed all-black pixel area and contains fragments of the aforementioned 3 ⁇ 3 all-black pixel matrix. Fragments for hidden numbers. If the corresponding hidden number in the current number sorting is 1, then the black pixel value of the center grid in the 9th grid will be converted into a white pixel value, such as converting 255*255*255 to 0*0*0 to achieve black pixels The value is converted to a white pixel value. By changing the pixel feature value corresponding to the preset pixel area, the identification and hiding of the number 1 and the number 0 are realized.
  • the device for adding anti-counterfeiting information includes:
  • the second acquiring module is used to acquire the first picture added with the anti-counterfeiting information.
  • the cutting module is used to form the first picture into fragments according to a preset cutting rule.
  • the extraction module is used to sequentially extract hidden numbers from the fragments to form the first array.
  • the conversion module is used to convert the first array into a specified two-dimensional code.
  • the identification module is used to identify the anti-counterfeiting information corresponding to the specified QR code.
  • This embodiment also provides the process of extracting the anti-counterfeiting information from the first picture with the anti-counterfeiting information, which is reciprocal to the above hiding process, including the fragmentation process of the same principle, and obtaining the hidden numbers from the fragments, and forming the first image in the order of extraction.
  • Array and convert the first array into a designated two-dimensional code, and obtain the orientation mark by solving the designated two-dimensional code.
  • the above process of obtaining hidden numbers from fragments is inverse to the process of hidden numbers, such as identifying whether there is a 3 ⁇ 3 all-black pixel matrix or a 3 ⁇ 3 matrix with white pixel values at the center of the fragment, and if so, record the findings in turn
  • the order is used as the arrangement order of the numbers in the array, and the 3 ⁇ 3 all black pixel matrix is counted as number 1, and the 3 ⁇ 3 center point is the white pixel value matrix as 0.
  • the process of de-assigning the two-dimensional code in this embodiment can be symmetrically encrypted by AES to improve security.
  • the process of obtaining anti-counterfeiting information from the designated two-dimensional code in this embodiment is fault-tolerant, and the anti-counterfeiting information can still be obtained correctly even when the number within 30% is lost.
  • an embodiment of the present application also provides a computer device.
  • the computer device may be a server, and its internal structure may be as shown in FIG. 3.
  • the computer equipment includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the computer designed processor is used to provide calculation and control capabilities.
  • the memory of the computer device includes a non-volatile storage medium and an internal memory.
  • the non-volatile storage medium stores an operating system, a computer program, and a database.
  • the memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium.
  • the database of the computer equipment is used to store all the data required for the process of adding anti-counterfeiting information.
  • the network interface of the computer device is used to communicate with an external terminal through a network connection.
  • the computer program is executed by the processor to realize the method of adding anti-counterfeiting information.
  • An embodiment of the present application further provides a computer non-volatile readable storage medium, on which computer readable instructions are stored, and when the computer readable instructions are executed, the processes as in the foregoing method embodiments are executed.
  • a computer non-volatile readable storage medium on which computer readable instructions are stored, and when the computer readable instructions are executed, the processes as in the foregoing method embodiments are executed.

Abstract

A method for injecting anti-counterfeit information, comprising: according to a preset QR code rule, generating anti-counterfeit information into a QR code (S1); acquiring an array corresponding to the QR code, the array being composed by arranging a plurality of digits (S2); sequentially hiding each digit in a preset image according to a preset rule (S3); and displaying the preset image carrying the anti-counterfeit information (S4). In the described method, by means of generating anti-counterfeit information into a QR code and hiding same in a preset image, the anti-counterfeit information is hidden and protected.

Description

加注防伪信息的方法、装置、计算机设备及存储介质Method, device, computer equipment and storage medium for adding anti-counterfeiting information
本申请要求2019年05月31日提交中国专利局、申请号为201910470652.4,发明名称为“加注防伪信息的方法、装置、计算机设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed with the Chinese Patent Office on May 31, 2019 with the application number 201910470652.4 and the invention title "Methods, devices, computer equipment and storage media for adding anti-counterfeiting information". The reference is incorporated in this application.
技术领域Technical field
本申请涉及到计算机领域,特别是涉及到加注防伪信息的方法、装置、计算机设备及存储介质。This application relates to the field of computers, in particular to methods, devices, computer equipment and storage media for adding anti-counterfeiting information.
背景技术Background technique
现有文档为给版权保护的信息产品,提供完全和可靠的归属证据,多用水印进行处理。水印是向数据多媒体(如图像、声音、视频信号等)中添加某些数字信息以达到真伪鉴别、版权保护等功能。嵌入的水印信息隐藏于宿主文档中,不影响原始文档的可观性和完整性。但水印算法可识别被嵌入到保护对象中的所有者的防伪信息(如注册的用户号码、产品标志或有意义的文字等),并能在需要的时候将防伪信息提取出来,并破坏。水印可以用来判别对象是否受到保护,并能够监视被保护数据的传播、真伪鉴别以及非法拷贝控制等。但目前攻击者完全可以破坏掉文档中的水印,或复制出一个理论上存在的“原始水印”,目前对于文档空域水印方法通过肉眼能够进行清楚识别,所以防伪信息容易被模仿、被仿冒,这导致文档所有者不能令人信服地提供版权归属的有效证据。Existing documents are information products protected by copyright, providing complete and reliable evidence of attribution, and are often processed with watermarks. Watermarking is to add some digital information to data multimedia (such as images, sounds, video signals, etc.) to achieve functions such as authenticity identification and copyright protection. The embedded watermark information is hidden in the host document and does not affect the observability and integrity of the original document. However, the watermark algorithm can identify the owner's anti-counterfeiting information embedded in the protected object (such as registered user numbers, product logos, or meaningful text, etc.), and can extract and destroy the anti-counterfeiting information when needed. Watermark can be used to judge whether the object is protected, and can monitor the spread of protected data, authenticity identification, and illegal copy control. But at present, the attacker can completely destroy the watermark in the document, or copy a theoretically existing "original watermark". At present, the airspace watermark method of the document can be clearly identified by the naked eye, so the anti-counterfeiting information is easy to be imitated and counterfeited. As a result, the owner of the document cannot convincingly provide valid evidence of copyright ownership.
技术问题technical problem
本申请的主要目的为提供加注防伪信息的方法,旨在解决现有水印的防伪信息容易被仿冒、被破坏的技术问题。The main purpose of this application is to provide a method for adding anti-counterfeiting information, which aims to solve the technical problem that the existing watermark anti-counterfeiting information is easily counterfeited and destroyed.
技术解决方案Technical solutions
本申请提出一种加注防伪信息的方法,包括:This application proposes a method for adding anti-counterfeiting information, including:
将防伪信息根据预设二维码规则生成二维码;Generate a QR code based on the anti-counterfeiting information according to the preset QR code rules;
获取二维码对应的数组,其中数组由多个数字排列组成;Get the array corresponding to the QR code, where the array is composed of multiple numbers;
将各数字按照预设规则分别依次隐藏于预设图片中,其中,预设图片为需要加注防伪信息的图片;Each number is sequentially hidden in a preset picture according to preset rules, where the preset picture is a picture that needs to be added with anti-counterfeiting information;
显示携带防伪信息的预设图片。Display a preset picture with anti-counterfeiting information.
本申请还提供了一种加注防伪信息的装置,包括:This application also provides a device for adding anti-counterfeiting information, including:
生成模块,用于将防伪信息根据预设二维码规则生成二维码;A generating module for generating a QR code from the anti-counterfeiting information according to a preset QR code rule;
第一获取模块,用于获取二维码对应的数组,其中数组由多个数字排列组成;The first obtaining module is used to obtain an array corresponding to the two-dimensional code, where the array is composed of multiple numbers;
隐藏模块,用于将各数字按照预设规则分别依次隐藏于预设图片中,其中,预设图片为需要加注防伪信息的图片;The hiding module is used to hide each number in a preset picture in sequence according to a preset rule, where the preset picture is a picture that needs to be added with anti-counterfeiting information;
显示模块,用于显示携带防伪信息的预设图片。The display module is used to display a preset picture carrying anti-counterfeiting information.
本申请还提供了一种计算机设备,包括存储器和处理器,存储器存储有计算机程序,处理器执行计算机程序时实现上述方法的步骤。The present application also provides a computer device, including a memory and a processor, the memory stores a computer program, and the processor implements the steps of the foregoing method when the computer program is executed.
本申请还提供了一种计算机可读存储介质,其上存储有计算机程序,计算机程序被处理器执行时实现上述的方法的步骤。The present application also provides a computer-readable storage medium on which a computer program is stored, and the computer program is executed by a processor to realize the steps of the above method.
有益效果Beneficial effect
本申请通过将防伪信息生成二维码,并将二维码对应的数字按照排列次序依次隐藏于预设图片中,实现对防伪信息的隐藏保护,相比于现有的水印防伪技术,本方案可将防伪信息隐藏于预设图片,不易察觉,可最大限度地保护预设图片的权属,防伪信息不容易被仿冒。本申请将防伪信息对应的数字分别隐藏于含有预设像素区域的碎片中,不含有预设像素区域的碎片不用于隐藏数字,方便在解析防伪信息时,方便通过识别预设像素区域获取到对应的隐藏数字,并重新还原为二维码,并通过解析二维码获取到对应的防伪信息。本申请的行切依据的第一预设间距为文字文本的行间距。第二预设间距为垂直于行的纵向上的预设间距距离,小于文字文本的字符间距。本申请中大于第二预设间距的要求则会在间隔处进行纵切,即便当同一个字中垂直于行的纵向上存在大于第二预设间距的间隔区,也同样会被纵切,切割规律隐蔽不容易察觉,实现对预设图片的不均匀分区,分区大小不相同,切割规律更隐蔽,造假者不容易提取到防伪信息,不容易被仿冒或破坏。This application generates a two-dimensional code from the anti-counterfeiting information, and hides the numbers corresponding to the two-dimensional code in a preset picture in order of arrangement to realize the protection of the anti-counterfeiting information. Compared with the existing watermark anti-counterfeiting technology, this solution The anti-counterfeiting information can be hidden in the preset picture, which is not easy to detect, and the ownership of the preset picture can be protected to the greatest extent, and the anti-counterfeiting information is not easy to be counterfeited. This application hides the numbers corresponding to the anti-counterfeiting information in the fragments containing the preset pixel area, and the fragments that do not contain the preset pixel area are not used to hide the numbers, which is convenient for analyzing the anti-counterfeiting information and easily obtain the corresponding by identifying the preset pixel area. The hidden digits are restored to a QR code, and the corresponding anti-counterfeiting information can be obtained by parsing the QR code. The first preset spacing on which the line cutting of this application is based is the line spacing of the text. The second preset spacing is a preset spacing distance perpendicular to the longitudinal direction of the line, which is smaller than the character spacing of the text. In this application, the requirement of greater than the second preset spacing will be slit at the interval, even if there is a space greater than the second preset spacing in the same character in the longitudinal direction perpendicular to the line, it will also be slit. The concealment of the cutting law is not easy to detect, and the uneven partition of the preset picture is realized. The partition size is different, and the cutting law is more concealed. It is not easy for counterfeiters to extract anti-counterfeiting information, and it is not easy to be counterfeited or destroyed.
附图说明Description of the drawings
图1 本申请一实施例的加注防伪信息的方法流程示意图;FIG. 1 is a schematic flowchart of a method for adding anti-counterfeiting information according to an embodiment of the present application;
图2本申请一实施例的加注防伪信息的装置结构示意图;FIG. 2 is a schematic structural diagram of a device for adding anti-counterfeiting information according to an embodiment of the present application;
图3 本申请一实施例的计算机设备内部结构示意图。Fig. 3 is a schematic diagram of the internal structure of a computer device according to an embodiment of the present application.
本发明的最佳实施方式The best mode of the invention
参照图1,本申请一实施例的加注防伪信息的方法,包括:1, the method for adding anti-counterfeiting information according to an embodiment of the present application includes:
S1:将防伪信息根据预设二维码规则生成二维码。S1: Generate a QR code based on the anti-counterfeiting information according to a preset QR code rule.
本实施例的防伪信息包括文字密码信息、数字密码、logo标志图等任何可生成二维码的信息。上述预设二维码规则根据防伪信息的类型不同而不同,但预设二维码规则中至少包括二维码定位图案、二维码功能数据、二维码数据内容三部分,以便根据预设二维码规则生成对应的二维码。二维码技术与现有二维码的生成过程类同,不赘述。本实施例的二维码可以存储更多的防伪信息,通过将防伪信息转化为二维码,能够保证防伪信息的完整性。二维码存在 40 种尺寸,单位尺寸又被命名为 Version,二维码尺寸与 Version 存在线性关系,如Version1是21×21的矩阵,Version 2是25×25的矩阵,每增加一个 Version,尺寸都会增加 4,Version 的最大值是40,故二维码尺寸最大值是(40-1)*4+21= 177,即177 x 177的矩阵。The anti-counterfeiting information in this embodiment includes text password information, digital passwords, logo images and any other information that can generate a two-dimensional code. The above-mentioned preset QR code rules vary according to the type of anti-counterfeiting information, but the preset QR code rules include at least three parts: the positioning pattern of the QR code, the function data of the QR code, and the content of the QR code data, so as to be based on the preset The QR code rules generate corresponding QR codes. The two-dimensional code technology is similar to the existing two-dimensional code generation process and will not be repeated. The two-dimensional code of this embodiment can store more anti-counterfeiting information, and by converting the anti-counterfeiting information into a two-dimensional code, the integrity of the anti-counterfeiting information can be guaranteed. There are 40 sizes of QR codes, and the unit size is named Version. Version has a linear relationship. For example, Version 1 is a 21×21 matrix, and Version 2 is a 25×25 matrix. Each time you add a Version, the size will increase by 4. The maximum value of Version is 40, so the maximum size of the QR code is (40 -1)*4+21= 177, which is 177 x 177 matrix.
S2:获取二维码对应的数组,其中数组由多个数字排列组成。S2: Obtain an array corresponding to the two-dimensional code, where the array is composed of multiple numbers.
本实施例通过将二维码解析成二进制数字0和/或1组成的数组,按照指定的排序规则形成数组排序,比如从左到右,从上到下依次解析二维码,二维码中黑色图案对应为1,白色图案对应为0,以便将二维码解析为二进制数组。In this embodiment, the two-dimensional code is parsed into an array of binary numbers 0 and/or 1, and the array is sorted according to a specified sorting rule, for example, the two-dimensional code is parsed sequentially from left to right and top to bottom. The black pattern corresponds to 1, and the white pattern corresponds to 0, so that the two-dimensional code can be parsed into a binary array.
S3:将各数字按照预设规则分别依次隐藏于预设图片中,其中,预设图片为需要加注防伪信息的图片。S3: Each number is hidden in a preset picture in sequence according to a preset rule, where the preset picture is a picture to which anti-counterfeiting information needs to be added.
S4:显示携带防伪信息的预设图片。S4: Display a preset picture carrying anti-counterfeiting information.
本实施例通过将二维码对应的数字按照排列次序依次隐藏于预设图片中,实现对防伪信息的隐藏保护。举例地,本实施例的防伪信息可形成对应的二维码,通过将防伪信息进行隐藏保护,相比于现有的水印防伪技术,本方案可将防伪信息隐藏于预设图片,不易察觉,可最大限度地保护预设图片的权属,不容易被仿冒,加入防伪信息的预设图片和原始预设图片打印出来无法直接从表面进行区别,防伪信息不容易被仿冒、被破坏。上述预设图片包括产品图片、资料图片、合同文档图片等。In this embodiment, the digits corresponding to the two-dimensional code are sequentially hidden in the preset picture in the order of arrangement, so as to realize the hiding protection of the anti-counterfeiting information. For example, the anti-counterfeiting information of this embodiment can form a corresponding two-dimensional code. By hiding and protecting the anti-counterfeiting information, compared with the existing watermark anti-counterfeiting technology, this solution can hide the anti-counterfeiting information in a preset picture, which is not easy to detect. The ownership of the preset pictures can be protected to the utmost extent and is not easy to be counterfeited. The preset pictures with anti-counterfeiting information and the original preset pictures cannot be distinguished directly from the surface when printed, and the anti-counterfeiting information is not easy to be counterfeited or destroyed. The aforementioned preset pictures include product pictures, data pictures, contract document pictures, etc.
进一步地,预设图片由指定数量碎片拼接形成,将各数字按照预设规则分别依次隐藏于预设图片中的步骤S3,包括:Further, the preset picture is formed by splicing a specified number of fragments, and the step S3 of sequentially hiding each number in the preset picture according to a preset rule includes:
S31:按照预设次序依次判断第一碎片中是否包含预设像素区域,其中,第一碎片包含于指定数量碎片中。S31: Determine in sequence according to a preset order whether the first fragment includes a preset pixel area, wherein the first fragment is included in a specified number of fragments.
本实施例的预设图片通过碎片拼接形成,是指预设图片通过虚拟碎片被划分成多个小分区,上述分区的数量大于或等于数组中对应的数字的总量,以便将数字与碎片一对一的进行匹配,方便在图片中有次序地隐藏数字,方便管理隐藏的数组。本实施例中将数字隐藏于含有预设像素区域的碎片中,不含有预设像素区域的碎片不用于隐藏数字,方便在解析防伪信息时,通过识别预设像素区域获取到对应的隐藏数字,并重新还原为二维码,并通过解析二维码获取到对应的防伪信息。上述预设像素区域包括指定尺寸的像素矩阵,可满足基本每个碎片或大部分的碎片中均含有的像素矩阵,以便满足通过碎片隐藏数字且方便管理隐藏数字的目的。比如3×3像素矩阵、5×5像素矩阵等,预设像素区域可通过预设置的方式实现。The preset picture in this embodiment is formed by splicing fragments, which means that the preset picture is divided into multiple small partitions through virtual fragments. The number of the above-mentioned partitions is greater than or equal to the total number of corresponding numbers in the array, so that the number and the fragments are the same. Matching the one, it is convenient to hide the numbers in the picture orderly, and it is convenient to manage the hidden array. In this embodiment, the numbers are hidden in the fragments containing the preset pixel area, and the fragments that do not contain the preset pixel area are not used to hide the numbers. It is convenient to obtain the corresponding hidden numbers by identifying the preset pixel area when analyzing the anti-counterfeiting information. And restore it to a two-dimensional code, and obtain the corresponding anti-counterfeiting information by analyzing the two-dimensional code. The above-mentioned preset pixel area includes a pixel matrix of a specified size, which can satisfy the pixel matrix contained in basically every fragment or most fragments, so as to meet the purpose of hiding numbers through fragments and facilitating management of hidden numbers. For example, a 3×3 pixel matrix, a 5×5 pixel matrix, etc., the preset pixel area can be implemented in a preset manner.
S32:若第一碎片中包含预设像素区域,则将第一碎片计入排序,并按照各第一碎片位于预设图片中的位置,按照预设次序形成第一排序。S32: If the first fragment includes the preset pixel area, the first fragment is included in the sorting, and the first sorting is formed according to the preset order according to the position of each first fragment in the preset picture.
本实施例按照第一碎片位于预设图片中的位置,通过从左到右、从上到下的预设次序依次判断各碎片中是否存在预设像素区域,若有,则将碎片计入第一排序中,以便按照第一排序依次隐藏数组中的各数字。本实施例的第一排序通过各第一碎片位于预设图片中的坐标数据进行排序,比如位于第一行切片中的第三个碎片,对应于第一排序中的序号3;位于第一行切片中的第五个碎片,对应于第一排序中的序号4等,上述第一行切片中的第三个碎片则为第一碎片位于预设图片中的坐标数据。上述“第一碎片”中的“第一”的作用不同于“第三个碎片”中的“第三”,上述“第一碎片”中的“第一”仅用于区别,不用于限定,其他处的类似用语作用相同,不赘述。In this embodiment, according to the position of the first fragment in the preset picture, the preset sequence from left to right and top to bottom is used to determine whether there is a preset pixel area in each fragment. If so, the fragment is included in the first In a sorting, in order to hide the numbers in the array according to the first sorting order. The first sort in this embodiment is sorted by the coordinate data of each first fragment in the preset picture, for example, the third fragment in the first row of slices corresponds to the sequence number 3 in the first sort; it is located in the first row The fifth fragment in the slice corresponds to the sequence number 4 in the first sort, and the third fragment in the first row of slices is the coordinate data of the first fragment in the preset picture. The function of "first" in the above "first fragment" is different from the "third" in "third fragment", and the "first" in the above "first fragment" is only used for distinction and not for limitation. Similar terms in other places have the same effect, so I won’t repeat them.
S33:获取第一碎片在第一排序中的序号。S33: Obtain the sequence number of the first fragment in the first sort.
S34:根据序号获取数组中对应序号中的第一数字。S34: Obtain the first number in the corresponding sequence number in the array according to the sequence number.
本实施例通过获取碎片在第一排序中的序号,然后根据序号与数字排序的预设对应关系,形成一一对应,以便实现数字的有序隐藏,方便管理和提取,提高防伪信息可靠性、一致性。举例地,预设对应关系为同向顺序一一对应于数组中的数字排序,即均为从小到大的一一对应,碎片序号1至100从小到大形成第一排序;上述数字排序为数组中从左到右形成的数字排布次序,即碎片序号1至100形成第一排序,对应数组中的数字排序1至100,即碎片序号为1的碎片隐藏数组中第1个数字,碎片序号为2的碎片隐藏数组中第2个数字,依次类推,使每个碎片中对应隐藏一个数字。本申请其他实施例中,预设对应关系为逆向顺序一一对应于数组中的数字排序,即碎片的第一排序从小到大的序号,一一对应于数字排序中的从大到小的序号,即数组中的数字逆序隐藏于各碎片中,增加从碎片中获取到防伪信息的难度,提高破坏防伪信息的难度系数。This embodiment obtains the serial numbers of the fragments in the first sorting, and then forms a one-to-one correspondence according to the preset correspondence between the serial numbers and the number sorting, so as to realize the orderly hiding of numbers, facilitate management and extraction, and improve the reliability of anti-counterfeiting information. consistency. For example, the preset correspondence relationship is that the same-direction order corresponds to the numerical order in the array one-to-one, that is, all have one-to-one correspondence from small to large, and the fragment numbers 1 to 100 form the first order from small to large; the above-mentioned numerical order is an array The sequence of numbers formed from left to right in the middle, that is, the fragment numbers 1 to 100 form the first order, and the numbers in the corresponding array are ordered from 1 to 100, that is, the fragment with the fragment number 1 hides the first number in the array, the fragment number The second digit in the array is hidden for the fragments of 2, and so on, so that a corresponding digit is hidden in each fragment. In other embodiments of the present application, the preset correspondence relationship is that the reverse order corresponds to the numerical order in the array one by one, that is, the first order of the fragments is from small to large, and the first order of fragments corresponds to the numerical order from large to small. , That is, the numbers in the array are hidden in each fragment in reverse order, increasing the difficulty of obtaining anti-counterfeiting information from the fragments, and increasing the difficulty coefficient of destroying the anti-counterfeiting information.
S35:将第一数字隐藏于第一碎片中的预设像素区域。S35: Hide the first number in the preset pixel area in the first fragment.
本实施例中通过改变对应的预设像素区域的像素特征值,实现对不同数字的标识,比如选定指定尺寸的全黑色像素矩阵,对应标识数字0,将全黑色像素矩阵中的某些像素点变更为白色,以对应标识数字1,以便通过上述像素特征值的变化规律,将数组对应的所有二进制数字,隐藏于各碎片中。上述碎片中至少包括一个预设像素区域,若包括多个预设像素区域,则按照从左到右、从上到下的顺序,选定排在最先次序的预设像素区域为该碎片的预设像素区域,用于隐藏对应的一个数字。本申请其他实施例也可将数字符号本身影印于预设像素区域实现隐藏。比如,将预设像素区域中的第一宫格对应像素由黑色变为白色,并将防伪信息或加密信息以黑色字体影印于第一宫格,其中,第一宫格为预设像素区域中对应的所有宫格中的任意一个。In this embodiment, by changing the pixel characteristic value of the corresponding preset pixel area, the identification of different numbers is realized, for example, a full black pixel matrix of a specified size is selected, corresponding to the identification number 0, and some pixels in the full black pixel matrix are selected. The dot is changed to white to correspond to the identification number 1, so that all the binary numbers corresponding to the array can be hidden in each fragment through the above-mentioned change law of the pixel characteristic value. The fragments above include at least one preset pixel area. If multiple preset pixel areas are included, the first preset pixel area in the fragment is selected in the order from left to right and top to bottom. The preset pixel area is used to hide a corresponding number. In other embodiments of the present application, the digital symbol itself can also be photoprinted on the preset pixel area to realize hiding. For example, the corresponding pixels of the first grid in the preset pixel area are changed from black to white, and the anti-counterfeiting information or encrypted information is copied in black font on the first grid, where the first grid is in the preset pixel area Any one of all corresponding grids.
进一步地,按照预设次序依次判断第一碎片中是否包含预设像素区域的步骤S31之前,包括:Further, before step S31 of sequentially determining whether the first fragment contains the preset pixel area according to the preset order, the method includes:
S30a:按照第一预设间距将预设图片沿第一方向均匀平行切割,形成多行图片,并根据各行图片处于预设图片中的行数,对各行图片进行第一编码。S30a: Cutting the preset picture uniformly and parallelly along the first direction according to the first preset spacing to form multiple lines of pictures, and performing first encoding on each line of pictures according to the number of lines of each line of pictures in the preset picture.
S30b:按照第二预设间距将各行图片沿第二方向切割,形成碎片,并根据各碎片位于行图片中的排列次序,对各碎片进行第二编码,其中,第一方向与第二方向相互垂直。S30b: Cut each row of pictures in the second direction according to the second preset interval to form fragments, and perform a second encoding on each fragment according to the arrangement order of the fragments in the row picture, wherein the first direction and the second direction are mutually vertical.
S30c:根据第一编码和第二编码形成各碎片分别对应的坐标编码。S30c: According to the first code and the second code, a coordinate code corresponding to each fragment is formed.
本实施例的碎片为预设图片的虚拟分区,即将预设图片按照预设规则通过虚拟切割形成分区。本实施例通过行切和垂直于行方向的纵切,将预设图片分成多个矩形分区,并将碎片处于的行和纵列的排序号,标识为每个碎片的坐标编码,以便通过坐标编码将碎片拼接直接还原为预设图片。上述第一预设间距与第二预设间距之间无直接的大小关系限定,但切割时保持第一预设间距和第二预设间距大小不变,实现对预设图片的有顺序、有规律的分区。The fragments in this embodiment are virtual partitions of a preset picture, that is, the preset picture is formed into a partition through virtual cutting according to a preset rule. In this embodiment, the preset picture is divided into multiple rectangular partitions by row cutting and vertical cutting perpendicular to the row direction, and the row and column sort numbers of the fragments are identified as the coordinate coding of each fragment so as to pass the coordinates Encoding directly restores the splicing of fragments to the preset picture. There is no direct limitation on the size relationship between the first preset distance and the second preset distance, but the first preset distance and the second preset distance are kept unchanged during cutting, so that the preset pictures can be ordered and ordered. Regular partitions.
进一步地,预设图片为文字图片,第一预设间距为文字图片中的行间距,第二预设间距为文字图片中同一行的相邻两个字的字间距,按照第二预设间距将各行图片沿第二方向切割,形成碎片,并根据各碎片位于行图片中的排列次序,对各碎片进行第二编码的步骤S30b,包括:Further, the preset picture is a text picture, the first preset spacing is the line spacing in the text picture, and the second preset spacing is the word spacing of two adjacent characters in the same line in the text picture, according to the second preset spacing The step S30b of cutting each row of pictures along the second direction to form fragments, and performing the second encoding on each fragment according to the arrangement order of each fragment in the row picture, includes:
S301:根据第二预设间距识别相邻两个文字间的第一间隔。S301: Identify the first interval between two adjacent characters according to the second preset interval.
S302:从第一间隔处将两个相邻文字,沿垂直于行的方向进行切割形成碎片,并根据各碎片位于行图片中排序,对各碎片进行第二编码。S302: Cut two adjacent characters from the first interval in a direction perpendicular to the line to form fragments, and sort the fragments according to the position of each fragment in the line picture, and perform the second encoding on each fragment.
本实施例的预设图片为文字图片,即预设图片为文本文件形成的图片,包括大段落的文字文本。本实施例的行切依据的第一预设间距为文字文本的行间距。本实施例的第二预设间距为文字图片中同一行的相邻两个字的字间距,通过行切和纵切将文本中的每个字对应切割成各碎片,实现对预设图片的均匀分区,分区大小相同。The preset picture in this embodiment is a text picture, that is, the preset picture is a picture formed by a text file, including large paragraphs of text text. The first preset spacing on which the line cutting in this embodiment is based is the line spacing of the text. The second preset spacing in this embodiment is the word spacing between two adjacent characters in the same line of the text picture. Each word in the text is correspondingly cut into fragments through line cutting and longitudinal cutting, so as to realize the comparison of the preset picture Evenly partition, the partition size is the same.
进一步地,预设图片为文字图片,第一预设间距为文字图片中的行间距,按照第二预设间距将各行图片沿第二方向切割,形成碎片,并根据各碎片位于行图片中的排列次序,对各碎片进行第二编码的步骤S30b,包括:Further, the preset picture is a text picture, the first preset spacing is the line spacing in the text picture, and each line of the picture is cut in the second direction according to the second preset spacing to form fragments, and each fragment is located in the line picture according to the Arranging the order, the step S30b of performing the second encoding on each fragment includes:
S303:判断相邻两个文字间的第二间隔以及文字内的第三间隔,是否大于第二预设间距;S303: Determine whether the second interval between two adjacent characters and the third interval within the characters are greater than the second preset interval;
S304:若大于,则从第二间隔处将两个相邻文字沿垂直于行的方向进行切割,从第三间隔处对同一个文字沿垂直于行的方向进行切割,形成碎片并根据各碎片位于行图片中排序,对各碎片进行第二编码。S304: If it is greater than, cut two adjacent characters in the direction perpendicular to the line from the second interval, and cut the same character in the direction perpendicular to the line from the third interval to form fragments and according to each fragment Sorting in line pictures, and performing a second encoding on each fragment.
本实施例中,垂直于行的纵向上的第二预设间距,小于文字文本的字符间距。本实施例中大于第二预设间距的要求的间隔处,则会在间隔处进行纵切,即便当同一个字中垂直于行的纵向上存在大于第二预设间距的间隔区,也同样会被纵切,切割规律隐蔽不容易察觉,实现对预设图片的不均匀分区,分区大小不相同,切割规律更隐蔽,比如“圳”纵切后对应三到四个碎片。举例地,行切后某行文本文字为“中心区有限公司”,通过纵切形成碎片为“中”对应的一个碎片、“心”对应的两个碎片、“区”对应的一个碎片、“有”对应的一个碎片、“限”对应的两个碎片、“公”对应的一个碎片、“司”对应的一个碎片。“心”和“限”由于字中包括大于第二预设间距的间隔区,所以被从间隔区纵切为两个碎片。In this embodiment, the second preset spacing perpendicular to the longitudinal direction of the line is smaller than the character spacing of the text. In this embodiment, at intervals greater than the second preset interval, slitting will be performed at the intervals, even if there are intervals greater than the second preset interval in the same word in the longitudinal direction perpendicular to the line. It will be longitudinally cut, and the cutting law is not easy to detect. It realizes uneven partitioning of the preset pictures. The partition size is different, and the cutting law is more hidden. For example, "Zhen" corresponds to three to four fragments after longitudinal cutting. For example, after the line is cut, a line of text is "Central District Co., Ltd.", and the fragments formed by slitting are one fragment corresponding to "中", two fragments corresponding to "Heart", one fragment corresponding to "Zone", " "Yes" corresponds to one fragment, "Limit" corresponds to two fragments, "Gong" corresponds to one fragment, and "Division" corresponds to one fragment. "Heart" and "Limit" are divided into two fragments longitudinally from the space because the characters include a space larger than the second preset distance.
进一步地,按照第一预设间距将预设图片沿第一方向均匀平行切割,形成多行图片,并根据各行图片处于预设图片中的行数,对各行图片进行第一编码的步骤S30a之前,包括:Further, the preset pictures are cut uniformly and parallelly along the first direction according to the first preset interval to form multiple rows of pictures, and according to the number of rows of each row of pictures in the preset picture, before step S30a of first encoding each row of pictures ,include:
S30d:判断待加注防伪信息的文字文本是否为图片格式。S30d: Determine whether the text to be added with the anti-counterfeiting information is in a picture format.
S30e:若待加注防伪信息的文字文本不是图片格式,则根据预设转换方式将待加密文件转换成图片格式,以形成文字图片。S30e: If the text to be added with the anti-counterfeiting information is not in a picture format, the file to be encrypted is converted into a picture format according to a preset conversion method to form a text picture.
本实施例的待加密文件为计划通过防伪加注防伪信息的文件,比如为合同文件等文本资料文件,需要将上述文本资料文件的格式转换为图片格式。若上述文本资料文件为Word或Excel等格式,通过PDF转换方式,转换为图片格式。The document to be encrypted in this embodiment is a document planned to be added with anti-counterfeiting information through anti-counterfeiting, such as a text data file such as a contract document, and the format of the above text data file needs to be converted into a picture format. If the above-mentioned text data file is in Word or Excel format, convert it to picture format through PDF conversion.
进一步地,预设像素区域为预设矩阵尺寸的全黑色像素矩阵,数字包括二进制数字0和/或1,将第一数字隐藏于第一碎片中的预设像素区域的步骤S35,包括:Further, the preset pixel area is an all black pixel matrix with a preset matrix size, and the numbers include binary numbers 0 and/or 1. The step S35 of hiding the first number in the preset pixel area in the first fragment includes:
S351:判断第一数字是否为1。S351: Determine whether the first number is 1.
S352:若第一数字为1,则将全黑色像素矩阵的中心点像素值转成白色像素对应的像素值,以标记1。S352: If the first number is 1, convert the pixel value of the center point of the all-black pixel matrix into the pixel value corresponding to the white pixel, and mark 1.
S353:若第一数字不为1,则判定为0,则将全黑色像素矩阵标记为0。S353: If the first number is not 1, it is determined as 0, and the all black pixel matrix is marked as 0.
本实施例中的预设矩阵尺寸为3×3,预设像素区域为3×3全黑色像素矩阵,包括9宫格分布式的全黑色像素区域,含有上述3×3全黑色像素矩阵的碎片为隐藏数字的碎片。若当前数字排序中对应隐藏的数字为1,则将9宫格中的中心宫格的黑色像素值转变为白色像素值,如将255*255*255转变为0*0*0,实现黑色像素值转变为白色像素值。通过改变对应预设像素区域的像素特征值,实现对数字1和数字0的标识以及隐藏。The preset matrix size in this embodiment is 3×3, and the preset pixel area is a 3×3 all-black pixel matrix, which includes a 9-square-distributed all-black pixel area and contains fragments of the aforementioned 3×3 all-black pixel matrix. Fragments for hidden numbers. If the corresponding hidden number in the current number sorting is 1, then the black pixel value of the center grid in the 9th grid will be converted into a white pixel value, such as converting 255*255*255 to 0*0*0 to achieve black pixels The value is converted to a white pixel value. By changing the pixel feature value corresponding to the preset pixel area, the identification and hiding of the number 1 and the number 0 are realized.
进一步地,将各数字按照预设规则分别依次隐藏于预设图片中的步骤S3之后,包括:Further, after step S3 of sequentially hiding each number in the preset picture according to the preset rule, it includes:
S4:获取加入防伪信息的第一图片。S4: Obtain the first picture added with the anti-counterfeiting information.
S5:将第一图片按照预设切割规则形成碎片。S5: Form the first picture into fragments according to a preset cutting rule.
S6:从碎片中依次提取隐藏数字,形成第一数组。S6: Extract hidden numbers from the fragments in order to form the first array.
S7:将第一数组转换为指定二维码。S7: Convert the first array into a specified QR code.
S8:识别指定二维码对应的防伪信息。S8: Identify the anti-counterfeiting information corresponding to the specified QR code.
本实施例还提供了从加入防伪信息的第一图片中提取防伪信息的过程,与上述隐藏过程互逆,包括相同原理的碎片过程,以及从碎片中获取隐藏数字,并按照提取顺序形成第一数组,并将第一数组转换为指定二维码,并通过解指定二维码获得方位标志。上述从碎片中获取隐藏数字的过程与隐藏数字的过程互逆,比如识别碎片中是否存在3×3的全黑色像素矩阵或3×3中心点为白色像素值的矩阵,若存在则依次记录发现次序作为数组中数字的排布次序,并将3×3的全黑色像素矩阵计为数字1,将3×3中心点为白色像素值的矩阵计为0。本实施例的解指定二维码的过程,可通过AES(Advanced Encryption Standard,高级加密标准)对称加密,提高安全性。本实施例的从指定二维码中获取防伪信息的过程具有容错性,在丢失掉30%以内的数字的情况下,依然能够正确的获取防伪信息。This embodiment also provides the process of extracting the anti-counterfeiting information from the first picture with the anti-counterfeiting information, which is reciprocal to the above hiding process, including the fragmentation process of the same principle, and obtaining the hidden numbers from the fragments, and forming the first image in the order of extraction. Array, and convert the first array into a designated two-dimensional code, and obtain the orientation mark by solving the designated two-dimensional code. The above process of obtaining hidden numbers from fragments is inverse to the process of hidden numbers, such as identifying whether there is a 3×3 all-black pixel matrix or a 3×3 matrix with white pixel values at the center of the fragment, and if so, record the findings in turn The order is used as the arrangement order of the numbers in the array, and the 3×3 all black pixel matrix is counted as number 1, and the 3×3 center point is the white pixel value matrix as 0. The process of decoding the designated two-dimensional code in this embodiment can be symmetrically encrypted by AES (Advanced Encryption Standard, Advanced Encryption Standard) to improve security. The process of obtaining anti-counterfeiting information from the designated two-dimensional code in this embodiment is fault-tolerant, and the anti-counterfeiting information can still be obtained correctly even when the number within 30% is lost.
本实施例通过将防伪信息生成二维码,并将二维码对应的数字按照排列次序依次隐藏于预设图片中,实现对防伪信息的隐藏保护,相比于现有的水印防伪技术,本方案可将防伪信息隐藏于预设图片,不易察觉,可最大限度地保护预设图片的权属,防伪信息不容易被仿冒。本实施例将防伪信息对应的数字分别隐藏于含有预设像素区域的碎片中,不含有预设像素区域的碎片不用于隐藏数字,方便在解析防伪信息时,方便通过识别预设像素区域获取到对应的隐藏数字,并重新还原为二维码,并通过解析二维码获取到对应的防伪信息。本实施例的行切依据的第一预设间距为文字文本的行间距。第二预设间距为垂直于行的纵向上的预设间距距离,小于文字文本的字符间距。本实施例中大于第二预设间距的要求则会在间隔处进行纵切,即便当同一个字中垂直于行的纵向上存在大于第二预设间距的间隔区,也同样会被纵切,切割规律隐蔽不容易察觉,实现对预设图片的不均匀分区,分区大小不相同,切割规律更隐蔽,造假者不容易提取到防伪信息,不容易被仿冒或破坏。In this embodiment, the anti-counterfeiting information is generated by generating a two-dimensional code, and the numbers corresponding to the two-dimensional code are sequentially hidden in the preset picture in the order of arrangement, so as to realize the hiding protection of the anti-counterfeiting information. Compared with the existing watermark anti-counterfeiting technology, this The solution can hide the anti-counterfeiting information in the preset picture, which is not easy to detect, can protect the ownership of the preset picture to the greatest extent, and the anti-counterfeiting information is not easy to be counterfeited. In this embodiment, the numbers corresponding to the anti-counterfeiting information are respectively hidden in the fragments containing the preset pixel area, and the fragments not containing the preset pixel area are not used to hide the numbers, which is convenient for analyzing the anti-counterfeiting information by identifying the preset pixel area. The corresponding hidden number is restored to a two-dimensional code, and the corresponding anti-counterfeiting information is obtained by parsing the two-dimensional code. The first preset spacing on which the line cutting in this embodiment is based is the line spacing of the text. The second preset spacing is a preset spacing distance perpendicular to the longitudinal direction of the line, which is smaller than the character spacing of the text. In this embodiment, the requirement of greater than the second preset pitch will be slit at the interval, even if there is a space greater than the second preset interval in the same word in the longitudinal direction perpendicular to the line, it will also be slit. , The cutting law is not easy to detect, and the uneven partition of the preset picture is realized. The partition size is different, and the cutting law is more concealed. It is not easy for counterfeiters to extract anti-counterfeiting information, and it is not easy to be counterfeited or destroyed.
参照图2,本申请一实施例的加注防伪信息的装置,包括:2, the device for adding anti-counterfeiting information according to an embodiment of the present application includes:
生成模块1,用于将防伪信息根据预设二维码规则生成二维码。The generating module 1 is used to generate a two-dimensional code from the anti-counterfeiting information according to a preset two-dimensional code rule.
本实施例的防伪信息包括文字密码信息、数字密码、logo标志图等任何可生成二维码的信息。上述预设二维码规则根据防伪信息的类型不同而不同,但预设二维码规则中至少包括二维码定位图案、二维码功能数据、二维码数据内容三部分,以便根据预设二维码规则生成对应的二维码。二维码技术与现有二维码的生成过程类同,不赘述。本实施例的二维码可以存储更多的防伪信息,通过将防伪信息转化为二维码,能够保证防伪信息的完整性。二维码存在 40 种尺寸,单位尺寸又被命名为 Version(变体),二维码尺寸与 Version 存在线性关系,如Version1是21×21的矩阵,Version 2是25×25的矩阵,每增加一个 Version,尺寸都会增加 4,Version 的最大值是40,故二维码尺寸最大值是(40-1)*4+21= 177,即177 x 177的矩阵。The anti-counterfeiting information in this embodiment includes text password information, digital passwords, logo images and any other information that can generate a two-dimensional code. The above-mentioned preset QR code rules vary according to the type of anti-counterfeiting information, but the preset QR code rules include at least three parts: the positioning pattern of the QR code, the function data of the QR code, and the content of the QR code data, so as to be based on the preset The QR code rules generate corresponding QR codes. The two-dimensional code technology is similar to the existing two-dimensional code generation process and will not be repeated. The two-dimensional code of this embodiment can store more anti-counterfeiting information, and by converting the anti-counterfeiting information into a two-dimensional code, the integrity of the anti-counterfeiting information can be guaranteed. There are 40 sizes of QR codes, and the unit size is also named Version (variant). Version has a linear relationship. For example, Version 1 is a 21×21 matrix, and Version 2 is a 25×25 matrix. Each time you add a Version, the size will increase by 4. The maximum value of Version is 40, so the maximum size of the QR code is (40 -1)*4+21= 177, which is 177 x 177 matrix.
第一获取模块2,用于获取二维码对应的数组,其中数组由多个数字排列组成。The first obtaining module 2 is used to obtain an array corresponding to the two-dimensional code, where the array is composed of multiple numbers.
本实施例通过将二维码解析成二进制数字0和/或1组成的数组,按照指定的排序规则形成数组排序,比如从左到右,从上到下依次解析二维码,二维码中黑色图案对应为1,白色图案对应为0,以便将二维码解析为二进制数组。In this embodiment, the two-dimensional code is parsed into an array of binary numbers 0 and/or 1, and the array is sorted according to a specified sorting rule, for example, the two-dimensional code is parsed sequentially from left to right and top to bottom. The black pattern corresponds to 1, and the white pattern corresponds to 0, so that the two-dimensional code can be parsed into a binary array.
隐藏模块3,用于将各数字按照预设规则分别依次隐藏于预设图片中,其中,预设图片为需要加注防伪信息的图片。The hiding module 3 is used to hide each number in a preset picture in sequence according to a preset rule, where the preset picture is a picture that needs to be added with anti-counterfeiting information.
显示模块,用于显示携带防伪信息的预设图片。The display module is used to display a preset picture carrying anti-counterfeiting information.
本实施例通过将二维码对应的数字按照排列次序依次隐藏于预设图片中,实现对防伪信息的隐藏保护。举例地,本实施例的防伪信息可形成对应的二维码,通过将防伪信息进行隐藏保护,相比于现有的水印防伪技术,本方案可将防伪信息隐藏于预设图片,不易察觉,可最大限度地保护预设图片的权属,不容易被仿冒,加入防伪信息的预设图片和原始预设图片打印出来无法直接从表面进行区别,防伪信息不容易被仿冒、被破坏。上述预设图片包括产品图片、资料图片、合同文档图片等。In this embodiment, the digits corresponding to the two-dimensional code are sequentially hidden in the preset picture in the order of arrangement, so as to realize the hiding protection of the anti-counterfeiting information. For example, the anti-counterfeiting information of this embodiment can form a corresponding two-dimensional code. By hiding and protecting the anti-counterfeiting information, compared with the existing watermark anti-counterfeiting technology, this solution can hide the anti-counterfeiting information in a preset picture, which is not easy to detect. The ownership of the preset pictures can be protected to the utmost extent and is not easy to be counterfeited. The preset pictures with anti-counterfeiting information and the original preset pictures cannot be distinguished directly from the surface when printed, and the anti-counterfeiting information is not easy to be counterfeited or destroyed. The aforementioned preset pictures include product pictures, data pictures, contract document pictures, etc.
进一步地,隐藏模块3,包括:Further, the hidden module 3 includes:
第一判断单元,用于按照预设次序依次判断第一碎片中是否包含预设像素区域,其中,第一碎片包含于指定数量碎片中。The first judging unit is configured to sequentially judge whether the first fragment contains the preset pixel area according to the preset order, wherein the first fragment is contained in a specified number of fragments.
本实施例的预设图片通过碎片拼接形成,是指预设图片通过虚拟碎片被划分成多个小分区,上述分区的数量大于或等于数组中对应的数字的总量,以便将数字与碎片一对一的进行匹配,方便在图片中有次序地隐藏数字,方便管理隐藏的数组。本实施例中将数字隐藏于含有预设像素区域的碎片中,不含有预设像素区域的碎片不用于隐藏数字,方便在解析防伪信息时,通过识别预设像素区域获取到对应的隐藏数字,并重新还原为二维码,并通过解析二维码获取到对应的防伪信息。上述预设像素区域包括指定尺寸的像素矩阵,可满足基本每个碎片或大部分的碎片中均含有的像素矩阵,以便满足通过碎片隐藏数字且方便管理隐藏数字的目的。比如3×3像素矩阵、5×5像素矩阵等,预设像素区域可通过预设置的方式实现。The preset picture in this embodiment is formed by splicing fragments, which means that the preset picture is divided into multiple small partitions through virtual fragments. The number of the above-mentioned partitions is greater than or equal to the total number of corresponding numbers in the array, so that the number and the fragments are the same. Matching the one, it is convenient to hide the numbers in the picture orderly, and it is convenient to manage the hidden array. In this embodiment, the numbers are hidden in the fragments containing the preset pixel area, and the fragments that do not contain the preset pixel area are not used to hide the numbers. It is convenient to obtain the corresponding hidden numbers by identifying the preset pixel area when analyzing the anti-counterfeiting information. And restore it to a two-dimensional code, and obtain the corresponding anti-counterfeiting information by analyzing the two-dimensional code. The above-mentioned preset pixel area includes a pixel matrix of a specified size, which can satisfy the pixel matrix contained in basically every fragment or most fragments, so as to meet the purpose of hiding numbers through fragments and facilitating management of hidden numbers. For example, a 3×3 pixel matrix, a 5×5 pixel matrix, etc., the preset pixel area can be implemented in a preset manner.
第一形成单元,用于若第一碎片中包含预设像素区域,则将第一碎片计入排序,并按照各第一碎片位于预设图片中的位置,按照预设次序形成第一排序。The first forming unit is configured to, if the first fragments include the preset pixel area, count the first fragments into the sorting, and form the first sorting according to the preset order according to the position of each first fragment in the preset picture.
本实施例按照第一碎片位于预设图片中的位置,通过从左到右、从上到下的预设次序依次判断各碎片中是否存在预设像素区域,若有,则将碎片计入第一排序中,以便按照第一排序依次隐藏数组中的各数字。本实施例的第一排序通过各第一碎片位于预设图片中的坐标数据进行排序,比如位于第一行切片中的第三个碎片,对应于第一排序中的序号3;位于第一行切片中的第五个碎片,对应于第一排序中的序号4等,上述第一行切片中的第三个碎片则为第一碎片位于预设图片中的坐标数据。上述“第一碎片”中的“第一”的作用不同于“第三个碎片”中的“第三”,上述“第一碎片”中的“第一”仅用于区别,不用于限定,其他处的类似用语作用相同,不赘述。In this embodiment, according to the position of the first fragment in the preset picture, the preset sequence from left to right and top to bottom is used to determine whether there is a preset pixel area in each fragment. If so, the fragment is included in the first In a sorting, in order to hide the numbers in the array according to the first sorting order. The first sort in this embodiment is sorted by the coordinate data of each first fragment in the preset picture, for example, the third fragment in the first row of slices corresponds to the sequence number 3 in the first sort; it is located in the first row The fifth fragment in the slice corresponds to the sequence number 4 in the first sort, and the third fragment in the first row of slices is the coordinate data of the first fragment in the preset picture. The function of "first" in the above "first fragment" is different from the "third" in "third fragment", and the "first" in the above "first fragment" is only used for distinction and not for limitation. Similar terms in other places have the same effect, so I won’t repeat them.
第一获取单元,用于获取第一碎片在第一排序中的序号。The first acquiring unit is configured to acquire the serial number of the first fragment in the first sorting.
第二获取单元,用于根据序号获取数组中对应序号中的第一数字。The second acquiring unit is used to acquire the first number in the corresponding serial number in the array according to the serial number.
本实施例通过获取碎片在第一排序中的序号,然后根据序号与数字排序的预设对应关系,形成一一对应,以便实现数字的有序隐藏,方便管理和提取,提高防伪信息可靠性、一致性。举例地,预设对应关系为同向顺序一一对应于数组中的数字排序,即均为从小到大的一一对应,碎片序号1至100从小到大形成第一排序;上述数字排序为数组中从左到右形成的数字排布次序,即碎片序号1至100形成第一排序,对应数组中的数字排序1至100,即碎片序号为1的碎片隐藏数组中第1个数字,碎片序号为2的碎片隐藏数组中第2个数字,依次类推,使每个碎片中对应隐藏一个数字。本申请其他实施例中,预设对应关系为逆向顺序一一对应于数组中的数字排序,即碎片的第一排序从小到大的序号,一一对应于数字排序中的从大到小的序号,即数组中的数字逆序隐藏于各碎片中,增加从碎片中获取到防伪信息的难度,提高破坏防伪信息的难度系数。This embodiment obtains the serial numbers of the fragments in the first sorting, and then forms a one-to-one correspondence according to the preset correspondence between the serial numbers and the number sorting, so as to realize the orderly hiding of numbers, facilitate management and extraction, and improve the reliability of anti-counterfeiting information. consistency. For example, the preset correspondence relationship is that the same-direction order corresponds to the numerical order in the array one-to-one, that is, all have one-to-one correspondence from small to large, and the fragment numbers 1 to 100 form the first order from small to large; the above-mentioned numerical order is an array The sequence of numbers formed from left to right in the middle, that is, the fragment numbers 1 to 100 form the first order, and the numbers in the corresponding array are ordered from 1 to 100, that is, the fragment with the fragment number 1 hides the first number in the array, the fragment number The second digit in the array is hidden for the fragments of 2, and so on, so that a corresponding digit is hidden in each fragment. In other embodiments of the present application, the preset correspondence relationship is that the reverse order corresponds to the numerical order in the array one by one, that is, the first order of the fragments is from small to large, and the first order of fragments corresponds to the numerical order from large to small. , That is, the numbers in the array are hidden in each fragment in reverse order, increasing the difficulty of obtaining anti-counterfeiting information from the fragments, and increasing the difficulty coefficient of destroying the anti-counterfeiting information.
隐藏单元,用于将第一数字隐藏于第一碎片中的预设像素区域。The hiding unit is used to hide the first number in the preset pixel area in the first fragment.
本实施例中通过改变对应的预设像素区域的像素特征值,实现对不同数字的标识,比如选定指定尺寸的全黑色像素矩阵,对应标识数字0,将全黑色像素矩阵中的某些像素点变更为白色,以对应标识数字1,以便通过上述像素特征值的变化规律,将数组对应的所有二进制数字,隐藏于各碎片中。上述碎片中至少包括一个预设像素区域,若包括多个预设像素区域,则按照从左到右、从上到下的顺序,选定排在最先次序的预设像素区域为该碎片的预设像素区域,用于隐藏对应的一个数字。本申请其他实施例也可将数字符号本身影印于预设像素区域实现隐藏。比如,将预设像素区域中的第一宫格对应像素由黑色变为白色,并将防伪信息或加密信息以黑色字体影印于第一宫格,其中,第一宫格为预设像素区域中对应的所有宫格中的任意一个。In this embodiment, by changing the pixel characteristic value of the corresponding preset pixel area, the identification of different numbers is realized, for example, a full black pixel matrix of a specified size is selected, corresponding to the identification number 0, and some pixels in the full black pixel matrix are selected. The dot is changed to white to correspond to the identification number 1, so that all the binary numbers corresponding to the array can be hidden in each fragment through the above-mentioned change law of the pixel characteristic value. The fragments above include at least one preset pixel area. If multiple preset pixel areas are included, the first preset pixel area in the fragment is selected in the order from left to right and top to bottom. The preset pixel area is used to hide a corresponding number. In other embodiments of the present application, the digital symbol itself can also be photoprinted on the preset pixel area to realize hiding. For example, the corresponding pixels of the first grid in the preset pixel area are changed from black to white, and the anti-counterfeiting information or encrypted information is copied in black font on the first grid, where the first grid is in the preset pixel area Any one of all corresponding grids.
进一步地,隐藏模块3,包括:Further, the hidden module 3 includes:
第二形成单元,用于按照第一预设间距将预设图片沿第一方向均匀平行切割,形成多行图片,并根据各行图片处于预设图片中的行数,对各行图片进行第一编码。The second forming unit is configured to cut the preset picture uniformly and parallelly along the first direction according to the first preset pitch to form multiple lines of pictures, and perform first encoding on each line of pictures according to the number of lines of each line of pictures in the preset picture .
第三形成单元,用于按照第二预设间距将各行图片沿第二方向切割,形成碎片,并根据各碎片位于行图片中的排列次序,对各碎片进行第二编码,其中,第一方向与第二方向相互垂直。The third forming unit is used to cut each row of pictures in a second direction according to a second preset interval to form fragments, and perform a second encoding on each fragment according to the arrangement order of each fragment in the row picture, wherein the first direction It is perpendicular to the second direction.
第四形成单元,用于根据第一编码和第二编码形成各碎片分别对应的坐标编码。The fourth forming unit is used to form coordinate codes corresponding to each fragment according to the first code and the second code.
本实施例的碎片为预设图片的虚拟分区,即将预设图片按照预设规则通过虚拟切割形成分区。本实施例通过行切和垂直于行方向的纵切,将预设图片分成多个矩形分区,并将碎片处于的行和纵列的排序号,标识为每个碎片的坐标编码,以便通过坐标编码将碎片拼接直接还原为预设图片。上述第一预设间距与第二预设间距之间无直接的大小关系限定,但切割时保持第一预设间距和第二预设间距大小不变,实现对预设图片的有顺序、有规律的分区。The fragments in this embodiment are virtual partitions of a preset picture, that is, the preset picture is formed into a partition through virtual cutting according to a preset rule. In this embodiment, the preset picture is divided into multiple rectangular partitions by row cutting and vertical cutting perpendicular to the row direction, and the row and column sort numbers of the fragments are identified as the coordinate coding of each fragment so as to pass the coordinates Encoding directly restores the splicing of fragments to the preset picture. There is no direct limitation on the size relationship between the first preset distance and the second preset distance, but the first preset distance and the second preset distance are kept unchanged during cutting, so that the preset pictures can be ordered and ordered. Regular partitions.
进一步地,预设图片为文字图片,第一预设间距为文字图片中的行间距,第二预设间距为文字图片中同一行的相邻两个字的字间距,第三形成单元,包括:Further, the preset picture is a text picture, the first preset spacing is the line spacing in the text picture, the second preset spacing is the word spacing of two adjacent characters in the same line in the text picture, and the third forming unit includes :
识别子单元,用于根据第二预设间距识别相邻两个文字间的第一间隔。The recognition subunit is used to recognize the first interval between two adjacent characters according to the second preset interval.
第一切割子单元,用于从第一间隔处将两个相邻文字,沿垂直于行的方向进行切割形成碎片,并根据各碎片位于行图片中排序,对各碎片进行第二编码。The first cutting subunit is used for cutting two adjacent characters from the first interval in a direction perpendicular to the line to form fragments, and sorting the fragments according to the position of each fragment in the line picture, and performing the second encoding on each fragment.
本实施例的预设图片为文字图片,即预设图片为文本文件形成的图片,包括大段落的文字文本。本实施例的行切依据的第一预设间距为文字文本的行间距。本实施例的第二预设间距为文字图片中同一行的相邻两个字的字间距,通过行切和纵切将文本中的每个字对应切割成各碎片,实现对预设图片的均匀分区,分区大小相同。The preset picture in this embodiment is a text picture, that is, the preset picture is a picture formed by a text file, including large paragraphs of text text. The first preset spacing on which the line cutting in this embodiment is based is the line spacing of the text. The second preset spacing in this embodiment is the word spacing between two adjacent characters in the same line of the text picture. Each word in the text is correspondingly cut into fragments through line cutting and longitudinal cutting, so as to realize the comparison of the preset picture Evenly partition, the partition size is the same.
进一步地,预设图片为文字图片,第一预设间距为文字图片中的行间距,第三形成单元,包括:Further, the preset picture is a text picture, the first preset spacing is the line spacing in the text picture, and the third forming unit includes:
第一判断子单元,用于判断相邻两个文字间的第二间隔以及文字内的第三间隔,是否大于第二预设间距;The first determining subunit is used to determine whether the second interval between two adjacent characters and the third interval within the characters are greater than the second preset interval;
第二切割子单元,用于若相邻两个文字间的第二间隔以及文字内的第三间隔,大于第二预设间距,则从第二间隔处将两个相邻文字沿垂直于行的方向进行切割,从第三间隔处对同一个文字沿垂直于行的方向进行切割,形成碎片并根据各碎片位于行图片中排序,对各碎片进行第二编码。The second cutting subunit is used for if the second interval between two adjacent characters and the third interval within the characters are greater than the second preset interval, then the two adjacent characters are perpendicular to the line from the second interval Cut the same text from the third interval in the direction perpendicular to the line to form fragments and sort the fragments according to their location in the line picture, and perform the second encoding on each fragment.
本实施例中,垂直于行的纵向上的第二预设间距,小于文字文本的字符间距。本实施例中大于第二预设间距的要求的间隔处,则会在间隔处进行纵切,即便当同一个字中垂直于行的纵向上存在大于第二预设间距的间隔区,也同样会被纵切,切割规律隐蔽不容易察觉,实现对预设图片的不均匀分区,分区大小不相同,切割规律更隐蔽,比如“圳”纵切后对应三到四个碎片。举例地,行切后某行文本文字为“中心区有限公司”,通过纵切形成碎片为“中”对应的一个碎片、“心”对应的两个碎片、“区”对应的一个碎片、“有”对应的一个碎片、“限”对应的两个碎片、“公”对应的一个碎片、“司”对应的一个碎片。“心”和“限”由于字中包括大于第二预设间距的间隔区,所以被从间隔区纵切为两个碎片。In this embodiment, the second preset spacing perpendicular to the longitudinal direction of the line is smaller than the character spacing of the text. In this embodiment, at intervals greater than the second preset interval, slitting will be performed at the intervals, even if there are intervals greater than the second preset interval in the same word in the longitudinal direction perpendicular to the line. It will be longitudinally cut, and the cutting law is not easy to detect. It realizes uneven partitioning of the preset pictures. The partition size is different, and the cutting law is more hidden. For example, "Zhen" corresponds to three to four fragments after longitudinal cutting. For example, after the line is cut, a line of text is "Central District Co., Ltd.", and the fragments formed by slitting are one fragment corresponding to "中", two fragments corresponding to "Heart", one fragment corresponding to "Zone", " "Yes" corresponds to one fragment, "Limit" corresponds to two fragments, "Gong" corresponds to one fragment, and "Division" corresponds to one fragment. "Heart" and "Limit" are divided into two fragments longitudinally from the space because the characters include a space larger than the second preset distance.
进一步地,隐藏模块3,包括:Further, the hidden module 3 includes:
第二判断单元,用于判断待加注防伪信息的文字文本是否为图片格式。The second determining unit is used to determine whether the text to be added with the anti-counterfeiting information is in a picture format.
转换单元,用于若待加注防伪信息的文字文本不是图片格式,则根据预设转换方式将待加密文件转换成图片格式,以形成文字图片。The conversion unit is configured to, if the text to be added with the anti-counterfeiting information is not in a picture format, convert the to-be-encrypted file into a picture format according to a preset conversion method to form a text picture.
本实施例的待加密文件为计划通过加注防伪信息的文件,比如为合同文件等文本资料文件,需要将上述文本资料文件的格式转换为图片格式。若上述文本资料文件为Word或Excel等格式,通过PDF转换方式,转换为图片格式。The file to be encrypted in this embodiment is a file planned to be added with anti-counterfeiting information, such as a text data file such as a contract document, and the format of the above text data file needs to be converted into a picture format. If the above-mentioned text data file is in Word or Excel format, convert it to picture format through PDF conversion.
进一步地,预设像素区域为预设矩阵尺寸的全黑色像素矩阵,数字包括二进制数字0和/或1,隐藏单元,包括:Further, the preset pixel area is an all black pixel matrix with a preset matrix size, the numbers include binary numbers 0 and/or 1, and the hidden unit includes:
第二判断子单元,用于判断第一数字是否为1。The second judgment subunit is used to judge whether the first number is 1.
第一标记子单元,用于若第一数字为1,则将全黑色像素矩阵的中心点像素值转成白色像素对应的像素值,以标记1。The first marking subunit is used for converting the pixel value of the center point of the all-black pixel matrix into the pixel value corresponding to the white pixel if the first number is 1, and marking 1.
第二标记子单元,用于若第一数字不为1,则判定为0,则将全黑色像素矩阵标记为0。The second marking subunit is used to mark the all-black pixel matrix as 0 if the first number is not 1, then it is determined as 0.
本实施例中的预设矩阵尺寸为3×3,预设像素区域为3×3全黑色像素矩阵,包括9宫格分布式的全黑色像素区域,含有上述3×3全黑色像素矩阵的碎片为隐藏数字的碎片。若当前数字排序中对应隐藏的数字为1,则将9宫格中的中心宫格的黑色像素值转变为白色像素值,如将255*255*255转变为0*0*0,实现黑色像素值转变为白色像素值。通过改变对应预设像素区域的像素特征值,实现对数字1和数字0的标识以及隐藏。The preset matrix size in this embodiment is 3×3, and the preset pixel area is a 3×3 all-black pixel matrix, which includes a 9-square-distributed all-black pixel area and contains fragments of the aforementioned 3×3 all-black pixel matrix. Fragments for hidden numbers. If the corresponding hidden number in the current number sorting is 1, then the black pixel value of the center grid in the 9th grid will be converted into a white pixel value, such as converting 255*255*255 to 0*0*0 to achieve black pixels The value is converted to a white pixel value. By changing the pixel feature value corresponding to the preset pixel area, the identification and hiding of the number 1 and the number 0 are realized.
进一步地,加注防伪信息的装置,包括:Further, the device for adding anti-counterfeiting information includes:
第二获取模块,用于获取加入防伪信息的第一图片。The second acquiring module is used to acquire the first picture added with the anti-counterfeiting information.
切割模块,用于将第一图片按照预设切割规则形成碎片。The cutting module is used to form the first picture into fragments according to a preset cutting rule.
提取模块,用于从碎片中依次提取隐藏数字,形成第一数组。The extraction module is used to sequentially extract hidden numbers from the fragments to form the first array.
转换模块,用于将第一数组转换为指定二维码。The conversion module is used to convert the first array into a specified two-dimensional code.
识别模块,用于识别指定二维码对应的防伪信息。The identification module is used to identify the anti-counterfeiting information corresponding to the specified QR code.
本实施例还提供了从加入防伪信息的第一图片中提取防伪信息的过程,与上述隐藏过程互逆,包括相同原理的碎片过程,以及从碎片中获取隐藏数字,并按照提取顺序形成第一数组,并将第一数组转换为指定二维码,并通过解指定二维码获得方位标志。上述从碎片中获取隐藏数字的过程与隐藏数字的过程互逆,比如识别碎片中是否存在3×3的全黑色像素矩阵或3×3中心点为白色像素值的矩阵,若存在则依次记录发现次序作为数组中数字的排布次序,并将3×3的全黑色像素矩阵计为数字1,将3×3中心点为白色像素值的矩阵计为0。本实施例的解指定二维码的过程,可通过AES对称加密,提高安全性。本实施例的从指定二维码中获取防伪信息的过程具有容错性,在丢失掉30%以内的数字的情况下,依然能够正确的获取防伪信息。This embodiment also provides the process of extracting the anti-counterfeiting information from the first picture with the anti-counterfeiting information, which is reciprocal to the above hiding process, including the fragmentation process of the same principle, and obtaining the hidden numbers from the fragments, and forming the first image in the order of extraction. Array, and convert the first array into a designated two-dimensional code, and obtain the orientation mark by solving the designated two-dimensional code. The above process of obtaining hidden numbers from fragments is inverse to the process of hidden numbers, such as identifying whether there is a 3×3 all-black pixel matrix or a 3×3 matrix with white pixel values at the center of the fragment, and if so, record the findings in turn The order is used as the arrangement order of the numbers in the array, and the 3×3 all black pixel matrix is counted as number 1, and the 3×3 center point is the white pixel value matrix as 0. The process of de-assigning the two-dimensional code in this embodiment can be symmetrically encrypted by AES to improve security. The process of obtaining anti-counterfeiting information from the designated two-dimensional code in this embodiment is fault-tolerant, and the anti-counterfeiting information can still be obtained correctly even when the number within 30% is lost.
参照图3,本申请实施例中还提供一种计算机设备,该计算机设备可以是服务器,其内部结构可以如图3所示。该计算机设备包括通过系统总线连接的处理器、存储器、网络接口和数据库。其中,该计算机设计的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统、计算机程序和数据库。该内存器为非易失性存储介质中的操作系统和计算机程序的运行提供环境。该计算机设备的数据库用于存储加注防伪信息的过程需要的所有数据。该计算机设备的网络接口用于与外部的端通过网络连接通信。该计算机程序被处理器执行时以实现加注防伪信息的方法。本领域技术人员可以理解,图3中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定。3, an embodiment of the present application also provides a computer device. The computer device may be a server, and its internal structure may be as shown in FIG. 3. The computer equipment includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the computer designed processor is used to provide calculation and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The database of the computer equipment is used to store all the data required for the process of adding anti-counterfeiting information. The network interface of the computer device is used to communicate with an external terminal through a network connection. The computer program is executed by the processor to realize the method of adding anti-counterfeiting information. Those skilled in the art can understand that the structure shown in FIG. 3 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied.
本申请一实施例还提供一种计算机非易失性可读存储介质,其上存储有计算机可读指令,该计算机可读指令在执行时,执行如上述各方法的实施例的流程。以上所述仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。An embodiment of the present application further provides a computer non-volatile readable storage medium, on which computer readable instructions are stored, and when the computer readable instructions are executed, the processes as in the foregoing method embodiments are executed. The above are only the preferred embodiments of this application, and do not limit the scope of this application. Any equivalent structure or equivalent process transformation made using the content of this application description and drawings, or directly or indirectly applied to other related The technical field is equally included in the scope of patent protection of this application.

Claims (20)

  1. 一种加注防伪信息的方法,其特征在于,包括:A method for adding anti-counterfeiting information, characterized in that it comprises:
    将防伪信息根据预设二维码规则生成二维码;Generate a QR code based on the anti-counterfeiting information according to the preset QR code rules;
    获取所述二维码对应的数组,其中,所述数组由多个数字排列组成;Acquiring an array corresponding to the two-dimensional code, where the array is composed of multiple numbers;
    将各所述数字按照预设规则分别依次隐藏于预设图片中,其中,所述预设图片为需要加注所述防伪信息的图片;Hiding each of the numbers in a preset picture in sequence according to a preset rule, where the preset picture is a picture to which the anti-counterfeiting information needs to be added;
    显示携带所述防伪信息的预设图片。Display the preset picture carrying the anti-counterfeiting information.
  2. 根据权利要求1所述的加注防伪信息的方法,其特征在于,所述预设图片由指定数量碎片拼接形成,所述将各所述数字按照预设规则分别依次隐藏于预设图片中的步骤,包括:The method for adding anti-counterfeiting information according to claim 1, wherein the preset picture is formed by splicing a specified number of fragments, and each of the numbers is sequentially hidden in the preset picture according to preset rules. The steps include:
    按照预设次序依次判断第一碎片中是否包含预设像素区域,其中,所述第一碎片包含于所述指定数量碎片中;Sequentially determining whether the first fragment includes a preset pixel area according to a preset order, wherein the first fragment is included in the specified number of fragments;
    若所述第一碎片中包含所述预设像素区域,则将所述第一碎片计入排序,并按照各所述第一碎片位于所述预设图片中的位置,按照预设次序形成第一排序;If the first fragment includes the preset pixel area, then the first fragments are counted in the sorting, and the first fragments are formed according to the position of each first fragment in the preset picture according to the preset order. A sort
    获取所述第一碎片在所述第一排序中的序号;Acquiring the serial number of the first fragment in the first sort;
    根据所述序号获取所述数组中对应序号中的第一数字;Obtaining the first number in the corresponding sequence number in the array according to the sequence number;
    将所述第一数字隐藏于所述第一碎片中的预设像素区域。The first number is hidden in a preset pixel area in the first fragment.
  3. 根据权利要求2所述的加注防伪信息的方法,其特征在于,所述按照预设次序依次判断第一碎片中是否包含预设像素区域的步骤之前,包括:The method for adding anti-counterfeiting information according to claim 2, characterized in that, before the step of sequentially determining whether the first fragment contains a preset pixel area according to a preset order, it comprises:
    按照第一预设间距将所述预设图片沿第一方向均匀平行切割,形成多行图片,并根据各行图片处于所述预设图片中的行数,对各所述行图片进行第一编码;Cut the preset picture uniformly in parallel along the first direction according to the first preset pitch to form multiple rows of pictures, and perform first encoding on each row of pictures according to the number of rows of each row of pictures in the preset picture ;
    按照第二预设间距将各所述行图片沿第二方向切割,形成所述碎片,并根据各所述碎片位于所述行图片中的排列次序,对各所述碎片进行第二编码,其中,所述第一方向与所述第二方向相互垂直;Cut each of the line pictures in a second direction according to a second preset interval to form the fragments, and perform a second encoding on each of the fragments according to the arrangement order of the fragments in the line pictures, wherein , The first direction and the second direction are perpendicular to each other;
    根据所述第一编码和所述第二编码形成各所述碎片分别对应的坐标编码。According to the first code and the second code, a coordinate code corresponding to each of the fragments is formed.
  4. 根据权利要求3所述的加注防伪信息的方法,其特征在于,所述预设图片为文字图片,所述第一预设间距为所述文字图片中的行间距,所述第二预设间距为所述文字图片中同一行的相邻两个字的字间距,所述按照第二预设间距将各所述行图片沿第二方向切割,形成所述碎片,并根据各所述碎片位于所述行图片中的排列次序,对各所述碎片进行第二编码的步骤,包括:The method for adding anti-counterfeiting information according to claim 3, wherein the preset picture is a text picture, the first preset spacing is the line spacing in the text picture, and the second preset The spacing is the character spacing between two adjacent characters in the same line of the text picture, and each line of pictures is cut in a second direction according to a second preset spacing to form the fragments, and according to each fragment The step of performing a second encoding on each of the fragments according to the arrangement order in the line picture includes:
    根据所述第二预设间距识别相邻两个相邻文字间的第一间隔;Identifying the first interval between two adjacent characters according to the second preset distance;
    从所述第一间隔处将两个相邻文字,沿垂直于行的方向进行切割形成所述碎片,并根据各所述碎片位于所述行图片中排序,对各所述碎片进行第二编码。Cut two adjacent characters from the first interval in a direction perpendicular to the line to form the fragments, and sort the fragments according to the position of each fragment in the line picture, and perform a second encoding on each fragment .
  5. 根据权利要求3所述的加注防伪信息的方法,其特征在于,所述预设图片为文字图片,所述第一预设间距为所述文字图片中的行间距,所述按照第二预设间距将各所述行图片沿第二方向切割,形成所述碎片,并根据各所述碎片位于所述行图片中的排列次序,对各所述碎片进行第二编码的步骤,包括:The method for adding anti-counterfeiting information according to claim 3, wherein the preset picture is a text picture, the first preset spacing is the line spacing in the text picture, and the second preset The step of cutting each of the line pictures along the second direction by setting a pitch to form the fragments, and performing a second encoding on each of the fragments according to the arrangement order of the fragments in the line pictures includes:
    判断相邻两个文字间的第二间隔以及文字内的第三间隔,是否大于所述第二预设间距;Determine whether the second interval between two adjacent characters and the third interval within the characters are greater than the second preset interval;
    若大于,则从所述第二间隔处将两个相邻文字沿垂直于行的方向进行切割,从所述第三间隔处对同一个文字沿垂直于行的方向进行切割,形成所述碎片并根据各所述碎片位于所述行图片中排序,对各所述碎片进行第二编码。If it is greater than, cut two adjacent characters in the direction perpendicular to the line from the second interval, and cut the same character in the direction perpendicular to the line from the third interval to form the fragments The second coding is performed on each of the fragments according to the sorting of the fragments located in the line picture.
  6. 根据权利要求5所述的加注防伪信息的方法,其特征在于,所述按照第一预设间距将所述预设图片沿第一方向均匀平行切割,形成多行图片,并根据各行图片处于所述预设图片中的行数,对各所述行图片进行第一编码的步骤之前,包括:The method for adding anti-counterfeiting information according to claim 5, wherein the preset picture is uniformly and parallelly cut along a first direction according to a first preset interval to form a plurality of rows of pictures, and according to the position of each row of pictures The number of lines in the preset picture, before the step of performing the first encoding on each line picture, includes:
    判断待加注防伪信息的文字文本是否为图片格式;Determine whether the text to be added with anti-counterfeiting information is in picture format;
    若否,则根据预设转换方式将所述待加密文件转换成图片格式,以形成所述文字图片。If not, the file to be encrypted is converted into a picture format according to a preset conversion method to form the text picture.
  7. 根据权利要求2所述的加注防伪信息的方法,其特征在于,所述预设像素区域为预设矩阵尺寸的全黑色像素矩阵,所述数字包括二进制数字0和/或1,所述将所述第一数字隐藏于所述第一碎片中的预设像素区域的步骤,包括:The method for adding anti-counterfeiting information according to claim 2, wherein the preset pixel area is an all black pixel matrix with a preset matrix size, and the numbers include binary numbers 0 and/or 1, and the The step of hiding the first number in the preset pixel area in the first fragment includes:
    判断所述第一数字是否为1;Determine whether the first number is 1;
    若所述第一数字为1,则将所述全黑色像素矩阵的中心点像素值转成白色像素对应的像素值,以标记1;If the first number is 1, the pixel value of the center point of the all-black pixel matrix is converted into the pixel value corresponding to the white pixel, which is marked with 1;
    若所述第一数字不为1,则判定为0,则将所述全黑色像素矩阵标记为0。If the first number is not 1, it is determined as 0, and the all black pixel matrix is marked as 0.
  8. 一种加注防伪信息的装置,其特征在于,包括:A device for adding anti-counterfeiting information is characterized in that it comprises:
    生成模块,用于将防伪信息根据预设二维码规则生成二维码;A generating module for generating a QR code from the anti-counterfeiting information according to a preset QR code rule;
    第一获取模块,用于获取所述二维码对应的数组,其中所述数组由多个数字排列组成;The first obtaining module is configured to obtain an array corresponding to the two-dimensional code, wherein the array is composed of multiple numbers;
    隐藏模块,用于将各所述数字按照预设规则分别依次隐藏于预设图片中,其中,所述预设图片为需要加注所述防伪信息的图片;A hiding module, configured to hide each number in a preset picture in sequence according to preset rules, where the preset picture is a picture that needs to be added with the anti-counterfeiting information;
    显示模块,用于显示携带所述防伪信息的预设图片。The display module is used to display a preset picture carrying the anti-counterfeiting information.
  9. 根据权利要求8所述的加注防伪信息的装置,其特征在于,所述隐藏模块,包括:The device for adding anti-counterfeiting information according to claim 8, wherein the hiding module comprises:
    第一判断单元,用于按照预设次序依次判断第一碎片中是否包含预设像素区域,其中,所述第一碎片包含于所述指定数量碎片中;The first determining unit is configured to sequentially determine whether the first fragment includes a preset pixel area according to a preset order, wherein the first fragment is included in the specified number of fragments;
    第一形成单元,用于若所述第一碎片中包含所述预设像素区域,则将所述第一碎片计入排序,并按照各所述第一碎片位于所述预设图片中的位置,按照预设次序形成第一排序;The first forming unit is configured to, if the first fragments include the preset pixel area, count the first fragments in the sorting order, and according to the position of each of the first fragments in the preset picture , Forming the first order according to the preset order;
    第一获取单元,用于获取所述第一碎片在所述第一排序中的序号;The first obtaining unit is configured to obtain the serial number of the first fragment in the first sorting;
    第二获取单元,用于根据所述序号获取所述数组中对应序号中的第一数字;The second acquiring unit is configured to acquire the first number in the corresponding serial number in the array according to the serial number;
    隐藏单元,用于将所述第一数字隐藏于所述第一碎片中的预设像素区域。The hiding unit is used to hide the first number in a preset pixel area in the first fragment.
  10. 根据权利要求9所述的加注防伪信息的装置,其特征在于,所述隐藏模块,包括:The device for adding anti-counterfeiting information according to claim 9, wherein the hiding module comprises:
    第二形成单元,用于按照第一预设间距将所述预设图片沿第一方向均匀平行切割,形成多行图片,并根据各行图片处于所述预设图片中的行数,对各所述行图片进行第一编码;The second forming unit is configured to cut the preset picture uniformly and parallelly along the first direction according to the first preset pitch to form multiple rows of pictures, and perform the calculation of each row of pictures according to the number of rows in the preset picture. Perform first encoding on the walk picture;
    第三形成单元,用于按照第二预设间距将各所述行图片沿第二方向切割,形成所述碎片,并根据各所述碎片位于所述行图片中的排列次序,对各所述碎片进行第二编码,其中,所述第一方向与所述第二方向相互垂直;The third forming unit is configured to cut each of the line pictures in a second direction according to a second preset interval to form the fragments, and according to the arrangement order of the fragments in the line pictures, the The fragments are subjected to a second encoding, wherein the first direction and the second direction are perpendicular to each other;
    第四形成单元,用于根据所述第一编码和所述第二编码形成各所述碎片分别对应的坐标编码。The fourth forming unit is configured to form coordinate codes corresponding to each of the fragments according to the first code and the second code.
  11. 根据权利要求10所述的加注防伪信息的装置,其特征在于,所述预设图片为文字图片,所述第一预设间距为所述文字图片中的行间距,所述第二预设间距为所述文字图片中同一行的相邻两个字的字间距,所述第三形成单元,包括:The device for adding anti-counterfeiting information according to claim 10, wherein the preset picture is a text picture, the first preset spacing is a line spacing in the text picture, and the second preset The spacing is the spacing between two adjacent characters in the same line of the text picture, and the third forming unit includes:
    识别子单元,用于根据所述第二预设间距识别相邻两个相邻文字间的第一间隔;An identifying subunit, configured to identify the first interval between two adjacent characters according to the second preset interval;
    第一切割子单元,用于从所述第一间隔处将两个相邻文字,沿垂直于行的方向进行切割形成所述碎片,并根据各所述碎片位于所述行图片中排序,对各所述碎片进行第二编码。The first cutting subunit is used to cut two adjacent characters from the first interval in a direction perpendicular to the line to form the fragments, and sort the fragments according to where each fragment is located in the line picture, Each of the fragments is subjected to a second encoding.
  12. 根据权利要求10所述的加注防伪信息的方法,其特征在于,所述预设图片为文字图片,所述第一预设间距为所述文字图片中的行间距,所述第三形成单元,包括:The method for adding anti-counterfeiting information according to claim 10, wherein the preset picture is a text picture, the first preset spacing is the line spacing in the text picture, and the third forming unit ,include:
    第一判断子单元,用于判断相邻两个文字间的第二间隔以及文字内的第三间隔,是否大于所述第二预设间距;The first judging subunit is used for judging whether the second interval between two adjacent characters and the third interval within the characters are greater than the second preset interval;
    第二切割子单元,用于若大于,则从所述第二间隔处将两个相邻文字沿垂直于行的方向进行切割,从所述第三间隔处对同一个文字沿垂直于行的方向进行切割,形成所述碎片并根据各所述碎片位于所述行图片中排序,对各所述碎片进行第二编码。The second cutting subunit is used for cutting two adjacent characters along the direction perpendicular to the line from the second interval, if larger than the Cutting in the direction, forming the fragments and sorting according to the position of each fragment in the line picture, and performing a second encoding on each fragment.
  13. 根据权利要求12所述的加注防伪信息的装置,其特征在于,所述隐藏模块,包括:The device for adding anti-counterfeiting information according to claim 12, wherein the hiding module comprises:
    第二判断单元,用于判断待加注防伪信息的文字文本是否为图片格式;The second judgment unit is used to judge whether the text to be added with the anti-counterfeiting information is in a picture format;
    转换单元,用于若否,则根据预设转换方式将所述待加密文件转换成图片格式,以形成所述文字图片。The conversion unit is configured to, if not, convert the file to be encrypted into a picture format according to a preset conversion method to form the text picture.
  14. 根据权利要求9所述的加注防伪信息的装置,其特征在于,所述预设像素区域为预设矩阵尺寸的全黑色像素矩阵,所述数字包括二进制数字0和/或1,所述隐藏单元,包括:The device for adding anti-counterfeiting information according to claim 9, wherein the preset pixel area is an all black pixel matrix with a preset matrix size, the numbers include binary numbers 0 and/or 1, and the hidden Unit includes:
    第二判断子单元,用于判断所述第一数字是否为1;The second judgment subunit is used to judge whether the first number is 1;
    第一标记子单元,用于若所述第一数字为1,则将所述全黑色像素矩阵的中心点像素值转成白色像素对应的像素值,以标记1;The first marking subunit is used to convert the pixel value of the center point of the all black pixel matrix into the pixel value corresponding to the white pixel if the first number is 1, and mark 1;
    第二标记子单元,用于若所述第一数字不为1,则判定为0,则将所述全黑色像素矩阵标记为0。The second marking subunit is used for marking the all-black pixel matrix as 0 if the first number is not 1, then determining as 0.
  15. 一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,其特征在于,所述处理器执行所述计算机程序时实现加注防伪信息的方法,加注防伪信息的方法,包括:A computer device includes a memory and a processor, the memory stores a computer program, and is characterized in that, when the processor executes the computer program, a method for adding anti-counterfeiting information is realized, and the method for adding anti-counterfeiting information includes:
    将防伪信息根据预设二维码规则生成二维码;Generate a QR code based on the anti-counterfeiting information according to the preset QR code rules;
    获取所述二维码对应的数组,其中,所述数组由多个数字排列组成;Acquiring an array corresponding to the two-dimensional code, where the array is composed of multiple numbers;
    将各所述数字按照预设规则分别依次隐藏于预设图片中,其中,所述预设图片为需要加注所述防伪信息的图片;Hiding each of the numbers in a preset picture in sequence according to a preset rule, where the preset picture is a picture to which the anti-counterfeiting information needs to be added;
    显示携带所述防伪信息的预设图片。Display the preset picture carrying the anti-counterfeiting information.
  16. 根据权利要求15所述的计算机设备,其特征在于,所述预设图片由指定数量碎片拼接形成,所述将各所述数字按照预设规则分别依次隐藏于预设图片中的步骤,包括:The computer device according to claim 15, wherein the preset picture is formed by splicing a specified number of fragments, and the step of hiding each of the numbers in the preset picture according to a preset rule, respectively, comprises:
    按照预设次序依次判断第一碎片中是否包含预设像素区域,其中,所述第一碎片包含于所述指定数量碎片中;Sequentially determining whether the first fragment includes a preset pixel area according to a preset order, wherein the first fragment is included in the specified number of fragments;
    若所述第一碎片中包含所述预设像素区域,则将所述第一碎片计入排序,并按照各所述第一碎片位于所述预设图片中的位置,按照预设次序形成第一排序;If the first fragment includes the preset pixel area, then the first fragments are counted in the sorting, and the first fragments are formed according to the position of each first fragment in the preset picture according to the preset order. A sort
    获取所述第一碎片在所述第一排序中的序号;Acquiring the serial number of the first fragment in the first sort;
    根据所述序号获取所述数组中对应序号中的第一数字;Obtaining the first number in the corresponding sequence number in the array according to the sequence number;
    将所述第一数字隐藏于所述第一碎片中的预设像素区域。The first number is hidden in a preset pixel area in the first fragment.
  17. 根据权利要求16所述的计算机设备,其特征在于,所述按照预设次序依次判断第一碎片中是否包含预设像素区域的步骤之前,包括:16. The computer device according to claim 16, wherein before the step of sequentially determining whether the first fragment contains a preset pixel area according to a preset order, it comprises:
    按照第一预设间距将所述预设图片沿第一方向均匀平行切割,形成多行图片,并根据各行图片处于所述预设图片中的行数,对各所述行图片进行第一编码;Cut the preset picture uniformly in parallel along the first direction according to the first preset pitch to form multiple rows of pictures, and perform first encoding on each row of pictures according to the number of rows of each row of pictures in the preset picture ;
    按照第二预设间距将各所述行图片沿第二方向切割,形成所述碎片,并根据各所述碎片位于所述行图片中的排列次序,对各所述碎片进行第二编码,其中,所述第一方向与所述第二方向相互垂直;Cut each of the line pictures in a second direction according to a second preset interval to form the fragments, and perform a second encoding on each of the fragments according to the arrangement order of the fragments in the line pictures, wherein , The first direction and the second direction are perpendicular to each other;
    根据所述第一编码和所述第二编码形成各所述碎片分别对应的坐标编码。According to the first code and the second code, a coordinate code corresponding to each of the fragments is formed.
  18. 一种计算机非易失性可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现加注防伪信息的方法,加注防伪信息的方法,包括:A computer non-volatile readable storage medium, on which a computer program is stored, characterized in that, when the computer program is executed by a processor, a method for adding anti-counterfeiting information is realized, and the method for adding anti-counterfeiting information includes:
    将防伪信息根据预设二维码规则生成二维码;Generate a QR code based on the anti-counterfeiting information according to the preset QR code rules;
    获取所述二维码对应的数组,其中,所述数组由多个数字排列组成;Acquiring an array corresponding to the two-dimensional code, where the array is composed of multiple numbers;
    将各所述数字按照预设规则分别依次隐藏于预设图片中,其中,所述预设图片为需要加注所述防伪信息的图片;Hiding each of the numbers in a preset picture in sequence according to a preset rule, where the preset picture is a picture to which the anti-counterfeiting information needs to be added;
    显示携带所述防伪信息的预设图片。Display the preset picture carrying the anti-counterfeiting information.
  19. 根据权利要求18所述的计算机非易失性可读存储介质,其特征在于,所述预设图片由指定数量碎片拼接形成,所述将各所述数字按照预设规则分别依次隐藏于预设图片中的步骤,包括:The computer non-volatile readable storage medium according to claim 18, wherein the preset picture is formed by splicing a specified number of fragments, and the numbers are hidden in a preset order according to preset rules. The steps in the picture include:
    按照预设次序依次判断第一碎片中是否包含预设像素区域,其中,所述第一碎片包含于所述指定数量碎片中;Sequentially determining whether the first fragment includes a preset pixel area according to a preset order, wherein the first fragment is included in the specified number of fragments;
    若所述第一碎片中包含所述预设像素区域,则将所述第一碎片计入排序,并按照各所述第一碎片位于所述预设图片中的位置,按照预设次序形成第一排序;If the first fragment includes the preset pixel area, then the first fragments are counted in the sorting, and the first fragments are formed according to the position of each first fragment in the preset picture according to the preset order. A sort
    获取所述第一碎片在所述第一排序中的序号;Acquiring the serial number of the first fragment in the first sort;
    根据所述序号获取所述数组中对应序号中的第一数字;Obtaining the first number in the corresponding sequence number in the array according to the sequence number;
    将所述第一数字隐藏于所述第一碎片中的预设像素区域。The first number is hidden in a preset pixel area in the first fragment.
  20. 根据权利要求19所述的计算机非易失性可读存储介质,其特征在于,所述按照预设次序依次判断第一碎片中是否包含预设像素区域的步骤之前,包括:The computer non-volatile readable storage medium according to claim 19, wherein before the step of sequentially determining whether the first fragment contains the preset pixel area according to a preset order, it comprises:
    按照第一预设间距将所述预设图片沿第一方向均匀平行切割,形成多行图片,并根据各行图片处于所述预设图片中的行数,对各所述行图片进行第一编码;Cut the preset picture uniformly in parallel along the first direction according to the first preset pitch to form multiple rows of pictures, and perform first encoding on each row of pictures according to the number of rows of each row of pictures in the preset picture ;
    按照第二预设间距将各所述行图片沿第二方向切割,形成所述碎片,并根据各所述碎片位于所述行图片中的排列次序,对各所述碎片进行第二编码,其中,所述第一方向与所述第二方向相互垂直;Cut each of the line pictures in a second direction according to a second preset interval to form the fragments, and perform a second encoding on each of the fragments according to the arrangement order of the fragments in the line pictures, wherein , The first direction and the second direction are perpendicular to each other;
    根据所述第一编码和所述第二编码形成各所述碎片分别对应的坐标编码。According to the first code and the second code, a coordinate code corresponding to each of the fragments is formed.
PCT/CN2019/103453 2019-05-31 2019-08-29 Method and apparatus for injecting anti-counterfeit information, computer device, and storage medium WO2020237881A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910470652.4A CN110335189B (en) 2019-05-31 2019-05-31 Method, device, computer equipment and storage medium for filling anti-counterfeiting information
CN201910470652.4 2019-05-31

Publications (1)

Publication Number Publication Date
WO2020237881A1 true WO2020237881A1 (en) 2020-12-03

Family

ID=68140706

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/103453 WO2020237881A1 (en) 2019-05-31 2019-08-29 Method and apparatus for injecting anti-counterfeit information, computer device, and storage medium

Country Status (2)

Country Link
CN (1) CN110335189B (en)
WO (1) WO2020237881A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112529757B (en) * 2020-12-04 2024-01-19 平安科技(深圳)有限公司 Screen information protection method, device, computer equipment and readable storage medium
CN113076528A (en) * 2021-03-24 2021-07-06 珠海奔图电子有限公司 Anti-counterfeiting information embedding method, anti-counterfeiting information extracting method, anti-counterfeiting information embedding device, anti-counterfeiting information extracting device and storage medium
WO2024040474A1 (en) * 2022-08-24 2024-02-29 京东方科技集团股份有限公司 Encrypted image watermark processing method and apparatus, and display device

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1013690A (en) * 1996-06-27 1998-01-16 Tec Corp Article image display system
US20070092105A1 (en) * 2005-10-26 2007-04-26 Fujitsu Limited Encoding device, decoding device, and printed matter
EP1840817A1 (en) * 2006-03-29 2007-10-03 Fujitsu Limited Method and apparatus for processing image, and printed material
EP2518685A1 (en) * 2011-04-28 2012-10-31 King Abdulaziz City for Science & Technology (KACST) Method and apparatus for embedding a watermark image in a host image
CN105095936A (en) * 2015-07-22 2015-11-25 黄鹤南 Image two-dimension code based on information hiding, generation method and system thereof
CN107358284A (en) * 2017-07-11 2017-11-17 北京捷润科技有限公司 Generation method, read method, generating means and the reading device of Quick Response Code
CN108549920A (en) * 2018-03-13 2018-09-18 福建新大陆电脑股份有限公司 A kind of two-dimensional code data hidden method, data extraction method and equipment
CN108764422A (en) * 2018-05-15 2018-11-06 普联技术有限公司 Quick Response Code insertion, extracting method and the device of image
CN109359715A (en) * 2018-12-22 2019-02-19 北京印刷学院 Invalid code hides the dimension code anti-counterfeit method of the complementary identification of planar graph segmentation

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101488214B (en) * 2008-01-15 2011-07-27 中国科学院软件研究所 Method for expanding anti-fake digital watermark and electronic seal information content
CN101930587A (en) * 2009-06-19 2010-12-29 株式会社理光 Watermark information extended coding, embedding, evaluating and detection extracting method and device thereof
CN101770589B (en) * 2009-12-31 2012-07-04 华中科技大学 Method for carrying out image-text hiding according to encrypted and converted phase position
CN103559473B (en) * 2013-10-28 2017-08-01 汝思信息技术(上海)有限公司 The false proof method and system of stock is realized using characteristic image
CN106529637B (en) * 2016-10-28 2019-06-25 深圳大学 A kind of the anti-copy implementation method and realization system of two dimensional code
CN109190736B (en) * 2018-08-02 2021-05-28 北京三友恒瑞科技有限公司 Anti-counterfeiting two-dimensional code and generation method and generation application system thereof

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1013690A (en) * 1996-06-27 1998-01-16 Tec Corp Article image display system
US20070092105A1 (en) * 2005-10-26 2007-04-26 Fujitsu Limited Encoding device, decoding device, and printed matter
EP1840817A1 (en) * 2006-03-29 2007-10-03 Fujitsu Limited Method and apparatus for processing image, and printed material
EP2518685A1 (en) * 2011-04-28 2012-10-31 King Abdulaziz City for Science & Technology (KACST) Method and apparatus for embedding a watermark image in a host image
CN105095936A (en) * 2015-07-22 2015-11-25 黄鹤南 Image two-dimension code based on information hiding, generation method and system thereof
CN107358284A (en) * 2017-07-11 2017-11-17 北京捷润科技有限公司 Generation method, read method, generating means and the reading device of Quick Response Code
CN108549920A (en) * 2018-03-13 2018-09-18 福建新大陆电脑股份有限公司 A kind of two-dimensional code data hidden method, data extraction method and equipment
CN108764422A (en) * 2018-05-15 2018-11-06 普联技术有限公司 Quick Response Code insertion, extracting method and the device of image
CN109359715A (en) * 2018-12-22 2019-02-19 北京印刷学院 Invalid code hides the dimension code anti-counterfeit method of the complementary identification of planar graph segmentation

Also Published As

Publication number Publication date
CN110335189B (en) 2024-01-16
CN110335189A (en) 2019-10-15

Similar Documents

Publication Publication Date Title
US7324662B2 (en) Method, software, and device for hiding data in binary image, while preserving image quality
US5765176A (en) Performing document image management tasks using an iconic image having embedded encoded information
US7730037B2 (en) Fragile watermarks
Saha et al. Steganographic techniques of data hiding using digital images
Ahmad et al. Data hiding based on improved exploiting modification direction method and Huffman coding
CN111008923B (en) Watermark embedding method, watermark extracting method, watermark embedding device, watermark extracting device and watermark extracting equipment
US6807634B1 (en) Watermarks for customer identification
WO2020237881A1 (en) Method and apparatus for injecting anti-counterfeit information, computer device, and storage medium
CN105303075B (en) Adaptive Text Watermarking method based on PDF format
Hadmi et al. Perceptual image hashing
CN110796586B (en) Blind watermarking method and system based on digital dot matrix and readable storage medium
Hsu et al. DIGITAL WATERMARKING SCHEME FOR COPYRIGHT PROTECTION AND TAMPERING DETECTION.
Rose et al. A secure verifiable scheme for secret image sharing
CN116451258A (en) Text traceability system based on digital watermark
Alsaadi et al. Text steganography in font color of MS excel sheet
CN105844479A (en) Dot matrix image used in precious metals, generation method and application method thereof
CN114078071A (en) Image tracing method, device and medium
Jaiswal et al. Implementation of a new technique for web document protection using unicode
González-Lee et al. Script format document authentication scheme based on watermarking techniques
CN116089984A (en) Anti-disclosure management method and system for administrative files
Yadav Study of Information Hiding Techniques and their Counterattacks
JP4220661B2 (en) Electronic document falsification detection method and apparatus
KR100988309B1 (en) Inserting method of document identifier and decoding method thereof
CN113988242A (en) Multi-region-based anti-counterfeiting code generation and verification method, system, equipment and medium
CN113076528A (en) Anti-counterfeiting information embedding method, anti-counterfeiting information extracting method, anti-counterfeiting information embedding device, anti-counterfeiting information extracting device and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19931109

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19931109

Country of ref document: EP

Kind code of ref document: A1