CN113222801A - Anti-grabbing method and device for answer picture and computer readable storage medium - Google Patents

Anti-grabbing method and device for answer picture and computer readable storage medium Download PDF

Info

Publication number
CN113222801A
CN113222801A CN202110476830.1A CN202110476830A CN113222801A CN 113222801 A CN113222801 A CN 113222801A CN 202110476830 A CN202110476830 A CN 202110476830A CN 113222801 A CN113222801 A CN 113222801A
Authority
CN
China
Prior art keywords
picture
answer
content
encrypted
answer content
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202110476830.1A
Other languages
Chinese (zh)
Inventor
郑晓旭
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zuoyebang Education Technology Beijing Co Ltd
Original Assignee
Zuoyebang Education Technology Beijing Co Ltd
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 Zuoyebang Education Technology Beijing Co Ltd filed Critical Zuoyebang Education Technology Beijing Co Ltd
Priority to CN202110476830.1A priority Critical patent/CN113222801A/en
Publication of CN113222801A publication Critical patent/CN113222801A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/0021Image watermarking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/10Protecting distributed programs or content, e.g. vending or licensing of copyrighted material ; Digital rights management [DRM]
    • G06F21/12Protecting executable software
    • G06F21/121Restricting unauthorised execution of programs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/10Protecting distributed programs or content, e.g. vending or licensing of copyrighted material ; Digital rights management [DRM]
    • G06F21/16Program or content traceability, e.g. by watermarking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T9/00Image coding
    • G06T9/001Model-based coding, e.g. wire frame

Abstract

The invention relates to the technical field of digital encryption, and discloses an anti-grabbing method and device for an answer picture and a computer readable storage medium, wherein the anti-grabbing method for the answer picture comprises the following steps: acquiring an answer picture, and extracting answer contents in the answer picture; encrypting the answering content; and steganographically encrypting the encrypted answer content to a preset template picture. According to the anti-grabbing method for the answer picture, the answer content in the answer picture is extracted and encrypted, and the encrypted answer content is encrypted to the preset template picture in a hidden writing mode, so that the processed preset template picture is not changed and is directly stored in the cloud. At this time, if the picture downloaded by the unauthorized party through the picture cloud storage address is a preset template picture without any answering content, the problem that the answering content is leaked after the picture resource is grabbed is effectively solved.

Description

Anti-grabbing method and device for answer picture and computer readable storage medium
Technical Field
The invention relates to the technical field of digital encryption, in particular to a method and a device for preventing grabbing of answer pictures and a computer readable storage medium.
Background
With the rapid development of the internet industry, education has gone from off-line to on-line, and the protection of intellectual property rights in the field of on-line education is also particularly important. Most of questioning and answering data of existing online education are presented on line in a picture form, so that the problem that pictures are captured exists, namely, pictures for answering are automatically derived from a picture data interface end in a large batch in a script mode and the like, and accordingly, picture resources for answering are leaked and are illegally used or profitable. At present, most of the means for anti-capturing pictures or maintaining intellectual property rights in the industry are to add digital watermarks into the pictures.
Digital watermarking, a technique for embedding a particular digital signal into a digital product to protect the copyright or integrity of the digital product, is commonly used for copyright protection of digitized images, video, audio or electronic documents. The method is characterized in that specific information representing the identity of a copyright owner, such as a section of characters, identification, a serial number and the like, is embedded into a digital product in a certain mode, and when copyright disputes occur, a digital watermark is extracted through a corresponding algorithm, so that the attribution of copyright is verified, the legal benefit of the copyright owner is ensured, and the threat of illegal piracy is avoided.
The mode of adding the digital watermark is low in cost, but the technology for removing the watermark aiming at the picture is mature, an illegal user can decrypt the answer picture by simply removing the watermark aiming at the captured answer picture resource, and the privacy of the answer picture cannot be completely guaranteed.
Therefore, the invention relates to the intellectual property maintenance direction in the field of online education, protects the intellectual property, and prevents the problem that the answer result picture is captured by an unauthorized party.
In view of the above, the present invention is particularly proposed.
Disclosure of Invention
In order to solve the above problems, the present invention provides an anti-grabbing method for an answer picture, comprising:
acquiring an answer picture, and extracting answer contents in the answer picture;
encrypting the answering content;
and steganographically encrypting the encrypted answer content to a preset template picture.
As an optional implementation manner of the present invention, the steganographically encrypting the encrypted answer content to a preset template picture includes:
and creating a template picture copy based on the preset template picture, performing steganography encryption on the encrypted answer content to the template picture copy, and creating a new picture.
As an optional embodiment of the present invention, the creating a template picture copy based on the preset template picture includes:
acquiring all pixel values of a preset template picture;
and creating a template picture copy based on the preset template picture, and writing all pixel values of the preset template picture into the template picture copy.
As an optional implementation manner of the present invention, after all pixel values of the preset template picture are obtained, image normalization processing is performed on all pixel values of the preset template picture, and all pixel values of the preset template picture after normalization processing are written into a template picture copy;
optionally, the image normalization processing for all pixel values of the preset template picture is implemented by performing translation transformation for all pixel values of the preset template picture;
further optionally, the image normalization processing for all pixel values of the preset template picture is implemented by shifting all pixel values of the preset template picture into even numbers.
As an optional embodiment of the present invention, the steganographically encrypting the encrypted answer content to the template picture copy includes:
converting the encrypted answering content into a binary format;
coding the encrypted answer content in the binary format into a template picture copy;
optionally, encoding the encrypted answer content in binary format to the least significant bit of the pixel of the template picture copy;
further optionally, the creating a new picture includes writing the encoded pixel values into the new picture.
As an optional embodiment of the present invention, an anti-grabbing method of an answer sheet according to the present invention includes:
and (3) an answer picture decryption process: decrypting the downloaded answer picture according to a preset answer picture decryption strategy to obtain encrypted answer content;
and (3) an answer content decryption process: decrypting the encrypted answer content according to a preset answer content decryption strategy to obtain answer content;
and rendering the acquired answer content to a blank answer picture to generate a display picture.
As an optional implementation manner of the present invention, the answer picture decryption process includes:
downloading an answer picture;
extracting data in all least significant bits in the picture;
addressing the index of the data interception position, and acquiring encrypted answer content through the index position;
converting the answer content into an answer content text format which can be identified and analyzed by an answer content decryption strategy;
optionally, the binary data of the encrypted answer content is obtained through the index position, and the binary data of the encrypted answer content is converted into text data of UTF-8.
As an optional implementation manner of the present invention, the encrypting the answer content includes encrypting the answer content by using an RSA private key encryption method;
the decrypting the encrypted answer content according to the preset answer content decryption strategy comprises decrypting the encrypted answer content by adopting an RSA public key decryption mode.
The invention also provides an anti-grabbing device for the answer pictures, which comprises:
the answer content encryption module is used for acquiring an answer picture, extracting answer content in the answer picture and encrypting the answer content;
and the answer picture encryption module is used for encrypting the encrypted answer content to a preset template picture in a hidden writing mode.
The invention also provides a computer readable storage medium, which stores a computer executable program, and when the computer executable program is executed, the anti-grabbing method of the answer picture is realized.
Compared with the prior art, the invention has the beneficial effects that:
according to the anti-grabbing method for the answer picture, the answer content in the answer picture is extracted and encrypted, and the encrypted answer content is encrypted to the preset template picture in a hidden writing mode, so that the processed preset template picture is not changed and is directly stored in the cloud. At this time, if the picture downloaded by the unauthorized party through the picture cloud storage address is a preset template picture without any answering content, the problem that the answering content is leaked after the picture resource is grabbed is effectively solved.
Therefore, the anti-grabbing method for the answer picture has the following advantages aiming at the encryption mode of the answer picture:
1. the encrypted information has high hiding performance and is not easy to be found
The encrypted answering content is encrypted to the preset template picture in a hidden writing mode, the preset template picture can be set according to actual requirements, such as a blank answering template or a disguised answering picture, and the like, so that the encrypted information in the answering picture is not easy to find on the premise that an unauthorized party does not know the encryption mode of the answering picture in the embodiment when the unauthorized party illegally obtains the answering picture.
2. The encryption strategy is not easy to crack, and the encryption robustness is high
The method and the device encrypt the answer content in the answer picture, and then encrypt the encrypted answer content to the preset template picture in a hidden writing mode, and a double encryption mode is adopted, so that an unauthorized party cannot decrypt the encrypted answer picture even if knowing that the illegally obtained answer picture is encrypted.
The invention discloses an anti-grabbing method of answer pictures, which comprises the following steps: and (3) an answer picture decryption process: decrypting the downloaded answer picture according to a preset answer picture decryption strategy to obtain encrypted answer content; and (3) an answer content decryption process: decrypting the encrypted answer content according to a preset answer content decryption strategy to obtain answer content; and rendering the acquired answer content to a blank answer picture to generate a display picture. The anti-grabbing method for the answer pictures provides a decryption strategy, and the downloaded answer pictures are decrypted and displayed to the user through the decryption strategy preset by the client according to the request of the normal user, so that the operation request of the normal user is ensured, and the illegal grabbing operation of an unauthorized party is avoided.
The invention relates to an anti-grabbing method of an answer picture, which mainly comprises the steps of extracting contents in the answer picture, encrypting the contents into a blank answer paper picture after an RSA key is encrypted, wherein the answer paper picture is a png picture (text is encrypted into the picture) with an alpha channel opened, and the processed blank answer paper picture has no change and is directly stored into a cloud for storage.
At this time, if the picture downloaded by the unauthorized party through the picture cloud storage address is a blank answer paper picture without any answer content, the problem of intellectual property leakage after being grabbed is effectively solved.
When a client adopting the anti-grabbing method for the answer picture needs to display the answer picture, the picture needs to be downloaded to the local from the cloud storage and then decrypted twice, the first decryption is to analyze the answer content (in this case, the answer content is also the sample after the RSA encryption) from the picture, the second decryption is to decrypt and restore the answer content through the RSA public key, and then the client renders the answer content to a blank answer paper, so that the user sees the complete answer picture.
Description of the drawings:
fig. 1 is an encryption flow chart of an anti-grabbing method for an answer picture according to the present invention;
fig. 2 is a decryption flowchart of an anti-grabbing method for answering pictures according to the present invention;
fig. 3 is an encryption flowchart of an embodiment of the anti-grabbing method for answering pictures according to the present invention;
fig. 4 is a decryption flowchart of an embodiment of the anti-grabbing method for answering pictures according to the present invention;
FIG. 5 is a pictorial style sheet of an answer sheet of the present invention;
FIG. 6 is a diagram of blank answer template picture patterns according to the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be described clearly and completely with reference to the accompanying drawings. It is to be understood that the embodiments described are only a few embodiments of the present invention, and not all embodiments.
Thus, the following detailed description of the embodiments of the invention is not intended to limit the scope of the invention as claimed, but is merely representative of some embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the embodiments of the present invention and the features and technical solutions thereof may be combined with each other without conflict.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
In the description of the present invention, it should be noted that the terms "upper", "lower", and the like refer to orientations or positional relationships based on those shown in the drawings, or orientations or positional relationships that are conventionally arranged when the products of the present invention are used, or orientations or positional relationships that are conventionally understood by those skilled in the art, and such terms are used for convenience of description and simplification of the description, and do not refer to or imply that the devices or elements referred to must have a specific orientation, be constructed and operated in a specific orientation, and thus, should not be construed as limiting the present invention. Furthermore, the terms "first," "second," and the like are used merely to distinguish one description from another, and are not to be construed as indicating or implying relative importance.
Referring to fig. 1, the present embodiment provides an anti-grabbing method for an answer picture, including:
acquiring an answer picture, and extracting answer contents in the answer picture;
encrypting the answering content;
and steganographically encrypting the encrypted answer content to a preset template picture.
The anti-grabbing method for the answer picture extracts the answer content in the answer picture for encryption, and the encrypted answer content is encrypted to the preset template picture in a hidden writing mode, so that the processed preset template picture has no change and is directly stored in the cloud. At this time, if the picture downloaded by the unauthorized party through the picture cloud storage address is a preset template picture without any answering content, the problem that the answering content is leaked after the picture resource is grabbed is effectively solved.
Therefore, the anti-grabbing method for the answer picture in the embodiment has the following advantages for the encryption mode of the answer picture:
1. the encrypted information has high hiding performance and is not easy to be found
In this embodiment, the encrypted answer content is encrypted to the preset template picture in a hidden-writing manner, and the preset template picture may be set according to actual requirements, for example, set as a blank answer template or a disguised answer picture, so that the encrypted information in the answer picture in this embodiment is not easily found on the premise that the unauthorized party does not know the encryption manner of the answer picture in this embodiment when illegally obtaining the answer picture.
2. The encryption strategy is not easy to crack, and the encryption robustness is high
The embodiment encrypts the answer content in the answer picture, and then steganographically encrypts the encrypted answer content into the preset template picture, and in a double encryption mode, even if an unauthorized party knows that the illegally obtained answer picture is encrypted, the unauthorized party cannot decrypt the answer picture, and the embodiment has high encryption robustness for the answer picture.
As an optional implementation manner of this embodiment, in this embodiment, the steganographically encrypting the encrypted answer content to the preset template picture includes: and creating a template picture copy based on the preset template picture, performing steganography encryption on the encrypted answer content to the template picture copy, and creating a new picture.
In the anti-grabbing method for the answer picture in the embodiment, when the picture is encrypted, the template picture copy is created on the basis of the same preset template, so that the template picture copy is consistent with the preset template picture, and then the steganography encryption of the encrypted answer content is performed on the basis of the template picture copy. Therefore, the synchronous encryption processing of the multiple answer pictures can be realized, the mutual independence and the mutual noninterference can be realized, and the efficiency of the encryption processing of the answer pictures can be ensured.
As an optional implementation manner of this embodiment, the creating a template picture copy based on the preset template picture in this embodiment includes:
acquiring all pixel values of a preset template picture;
and creating a template picture copy based on the preset template picture, and writing all pixel values of the preset template picture into the template picture copy.
Further, in this embodiment, after all the pixel values of the preset template picture are obtained, the image normalization processing is performed on all the pixel values of the preset template picture, and all the pixel values of the preset template picture after the normalization processing are written into the template picture copy.
The basic principle of image normalization is to eliminate the influence of geometric transformation on a picture according to a moment which has invariance to the geometric transformation in the image, and in the field of digital watermarking, the image normalization method is generally used for a watermarking algorithm related to geometric sum resistance, so that the geometric attack resistance of the encrypted picture can be increased by performing image normalization processing on all pixel values of a preset template picture. The image normalization processing mode mainly comprises the following steps: translation normalization, scaling normalization and rotation normalization. Optionally, in this embodiment, the image normalization processing performed on all pixel values of the preset template picture is implemented by performing translation transformation on all pixel values of the preset template picture.
Further optionally, in this embodiment, the performing of the image normalization processing on all the pixel values of the preset template picture is implemented in a manner of shifting all the pixel values of the preset template picture into even numbers.
As an optional implementation manner of this embodiment, in the present embodiment, the steganographically encrypting the encrypted answer content to the template picture copy includes:
converting the encrypted answering content into a binary format;
and encoding the encrypted answer content in the binary format into the template picture copy.
Since each pixel in the picture is binary, the embodiment converts the encrypted answer content into a binary format, and completes the encryption of the answer picture in the way of encoding the answer content into the template picture copy.
In the embodiment, the encrypted answer content is written into the template picture copy in a picture steganography mode, so that the information of the encrypted answer content is hidden and is not easy to find while the display of the template picture copy is not influenced.
Classification of steganography
Additional steganography of pictures
In the additional type image steganography, usually, a target to be steganographically is directly attached to a carrier file by a certain program or a certain method, then the carrier file is directly transmitted to a receiver or is published to a website, then the receiver extracts a steganographically-written message according to the method, and the process is the additional type image steganography.
There are probably two classical ways for such a picture steganography, namely, directly attaching a character string, and appearing in a picture type.
A. Additional character string
In this way, after the hidden information is directly written into the picture end character by using a tool, since the picture processing program in the computer recognizes the picture end character and does not continue to recognize downwards, the following information is hidden.
B. Picture frame
A graph is a file that combines a picture file (e.g., in jpg format) with a rar file in a special way. The file is generally stored in a jpg format, the picture can be normally displayed, when someone obtains the picture, the suffix name of the file can be modified, the picture is changed into a rar compressed file, and then the data in the file can be obtained. Just as we said, since the picture processing program in the computer recognizes the picture by reading the data stream in the encoding format defined by the format stated in the picture header from the picture header to the end of the picture, and when the picture processing program recognizes the end of the picture, it does not continue to recognize downwards, so we can only see that it is only one picture in the normal case.
Steganography of pictures based on file structure
The file structure herein specifically refers to a file structure of a picture file. We mainly speak here of the file structure of PNG pictures. For a normal PNG picture, its header is always represented by fixed bytes, its 16-ary representation is 89504E 470D 0 A1 A0A, this part is called the PNG header.
The standard PNG file structure should include:
PNG File identification
PNG data block PNG pictures have two kinds of data blocks, one is a key data block and the other is an auxiliary data block. The normal key data block defines 4 standard data blocks, respectively length, data block type code, data block data, cyclic redundancy check or CRC, which each PNG file must contain.
PNG picture file header data block
I.e. IHDR (image heider), which is the first data block of a PNG picture, a PNG picture has only one IHDR data block, which contains information of the width, height, image depth, color type, compression method, etc. of the picture (i.e. the read rule defining the picture data stream).
PNG picture IDAT (image DATa) data block
It stores the actual data and may contain a plurality of consecutive sequential blocks of image data in a data stream. This is a data block where multiple data block types may exist. Its function is to store the real data of the image. Because there can be more than one, even if we write a redundant IDAT, it will not significantly affect the visual observation of the picture.
Steganography caused by height modification
The height and width of the picture are defined in IHDR, and part of the information can be hidden by modifying the height value or the width value.
If the picture is originally 800 (wide) × 600 (high), then the height of the picture is changed from 600 to 500, so that the information of the lower 800 × 100 area cannot be displayed in the picture, and only the upper 800 × 500 area can be seen, thus achieving the aim of steganography of the picture. Similarly, the width of the picture can be modified similarly to hide the information.
Adding IDAT block in picture to realize steganography
A plurality of IDAT blocks of one picture can exist, and the information can be steganographically realized by adding the IDAT blocks.
The integrity of the PNG file can be verified by using PNGcheck software, and the file structure of the picture can be detected by using PNGcheck-v a.
There may be IDAT blocks with size 0 in the file structure, which indicates that the corresponding block is invisible to the naked eye, i.e. hidden. The hidden content may be extracted by a script.
Picture steganography based on LSB principle
LSB, Least Significant Bit, English is the Least Significant Bit. It is known that image pixels are generally composed of three primary colors of RGB (i.e., red, green and blue), each of which occupies 8 bits, 0x 00-0 xFF, i.e., a total of 256 colors, which together comprise 256 to the power of 3, and are too many in color, and only a small portion of which can be distinguished by the human eye, which results in that the human eye cannot distinguish when we modify the lowest binary bits in the RGB color components.
DCT domain based steganography of JPG picture
The JPEG image format uses a Discrete Cosine Transform (DCT) function to compress an image, and the core of this image compression method is: the number of bits required to display an image is reduced by identifying the repeat pixels of adjacent pixels in each 8 x 8 block of pixels and using an approximation estimation algorithm to reduce its redundancy. Therefore, we can consider DCT as an approximate calculation method for performing compression. Because part of the data is lost, DCT is a lossy Compression (Loss Compression) technique, but generally does not affect the visual effect of the image.
Optionally, the embodiment encodes the encrypted answer content in the binary format to the least significant bit of the pixel of the template picture copy; and the picture steganography based on the LSB principle is adopted.
Further optionally, the creating a new picture includes writing the encoded pixel values into the new picture.
Referring to fig. 2, the anti-grabbing method for an answer picture in this embodiment includes:
and (3) an answer picture decryption process: decrypting the downloaded answer picture according to a preset answer picture decryption strategy to obtain encrypted answer content;
and (3) an answer content decryption process: decrypting the encrypted answer content according to a preset answer content decryption strategy to obtain answer content;
and rendering the acquired answer content to a blank answer picture to generate a display picture.
The anti-grabbing method for the answer pictures provides a decryption strategy, and the downloaded answer pictures are decrypted and displayed to the user through the decryption strategy preset by the client according to the request of the normal user, so that the operation request of the normal user is ensured, and the illegal grabbing operation of an unauthorized party is avoided.
As an optional implementation manner of this embodiment, the answer picture decryption process in this embodiment includes:
downloading an answer picture;
extracting data in all least significant bits in the picture;
addressing the index of the data interception position, and acquiring encrypted answer content through the index position;
and converting the answer content into an answer content text format which can be identified and analyzed by an answer content decryption strategy.
The index of the embodiment is used for determining the length of the encrypted content, so that the encrypted data of the answer content is extracted for targeted decryption.
Optionally, the binary data of the encrypted answer content is obtained through the index position, and the binary data of the encrypted answer content is converted into text data of UTF-8.
As an optional implementation manner of this embodiment, the encrypting the answer content includes encrypting the answer content by using an RSA private key encryption method; the decrypting the encrypted answer content according to the preset answer content decryption strategy comprises decrypting the encrypted answer content by adopting an RSA public key decryption mode. The encryption by using the RSA algorithm generally needs to generate a public key and a private key, and when the public key is adopted for encryption, the private key is used for decryption; when the private key is adopted for encryption, the public key is used for decryption. The RSA algorithm is the first algorithm that can be used for both encryption and digital signing, and is also easy to understand and operate. RSA is the most widely studied public key algorithm, has experienced various attacks, is gradually accepted by people, and is generally considered to be one of the most excellent public key schemes at present.
The embodiment ensures the reliability of the encryption of the answering content by the encryption of the RSA algorithm and protects the answering content from being cracked.
Therefore, when the client adopting the anti-grabbing method for the answer picture needs to display the answer picture, the picture needs to be downloaded to the local from the cloud storage and then decrypted twice, the answer content (in this case, the answer picture is still the same as the answer picture encrypted by the RSA) is analyzed from the picture by the first decryption, the answer content is restored by the second decryption through the RSA public key decryption, and then the client renders the answer content onto the blank answer paper, so that the user sees the complete answer picture.
As an optional implementation manner of this embodiment, in the anti-grabbing method for an answer picture of this embodiment, the obtaining of the answer picture, and the extracting of the answer content in the answer picture includes identifying and extracting the answer content in the answer picture by using an OCR recognition technology.
Referring to fig. 3, an encryption process of the anti-grabbing method for an answer picture in this embodiment includes:
extracting the content of the answer picture (the obtained answer picture is shown in figure 5);
preparing an answer sheet module picture for opening an alpha channel (the answer sheet module picture is shown in figure 6);
encrypting the answering content (which can be encrypted by adopting an RSA private key);
hiding the encrypted content in the template picture to create a new picture;
and (4) unloading the new picture into cloud storage and outputting the new picture to an application layer.
In this embodiment, hiding the encrypted content in the template picture includes:
acquiring all pixels of a template picture;
all pixel values are shifted to even numbers;
creating a picture copy based on the template picture;
pixel write to picture copy (least significant bit 0);
converting the encrypted answer content into a binary system;
encoding the binary content into picture copy pixels;
creating a new picture;
and writing the encoded pixels into a new picture.
The anti-grabbing method for the answer picture is mainly implemented by extracting the content in the answer picture, encrypting the content with the RSA key, and then encrypting the content into a blank answer paper picture, wherein the answer paper picture is a png picture (text is encrypted into the picture) with an alpha channel opened, and the processed blank answer paper picture has no change and is directly stored into a cloud for storage.
At this time, if the picture downloaded by the unauthorized party through the picture cloud storage address is a blank answer paper picture without any answer content, the problem of intellectual property leakage after being grabbed is effectively solved.
Referring to fig. 4, a decryption process of the anti-grabbing method for an answer picture in this embodiment includes:
the client service downloads the pictures;
decrypting the picture content;
decrypting the answer text analyzed from the picture (obtaining the answer content by adopting RSA public key decryption);
and rendering the answer content to a blank answer paper picture by the client.
The decrypting the picture content includes:
acquiring all pixels of a picture;
extracting data in all least significant bits in the picture;
find the index "0000000000000000" where the data truncates;
finding the encrypted binary data by the index position;
the binary is converted to text for UTF-8.
When the client wants to display the answer picture, the picture needs to be downloaded to the local from the cloud storage and then decrypted twice, the answer content (the sample after the RSA encryption is still obtained in the process) is analyzed from the picture in the first decryption, the answer content is decrypted and restored through the RSA public key in the second decryption, and then the answer content is rendered on blank answer paper by the client, so that the user sees the complete answer picture.
This embodiment provides a device is grabbed in preventing of answer picture simultaneously, includes:
the answer content encryption module is used for acquiring an answer picture, extracting answer content in the answer picture and encrypting the answer content;
and the answer picture encryption module is used for encrypting the encrypted answer content to a preset template picture in a hidden writing mode.
The anti-grabbing device for the answer picture extracts the answer content in the answer picture for encryption, and the encrypted answer content is encrypted to the preset template picture in a hidden writing mode, so that the processed preset template picture has no change and is directly stored in the cloud. At this time, if the picture downloaded by the unauthorized party through the picture cloud storage address is a preset template picture without any answering content, the problem that the answering content is leaked after the picture resource is grabbed is effectively solved.
Therefore, the anti-grabbing method and device for the answer picture in the embodiment have the following advantages for the encryption mode of the answer picture:
1. the encrypted information has high hiding performance and is not easy to be found
In this embodiment, the encrypted answer content is encrypted to the preset template picture in a hidden-writing manner, and the preset template picture may be set according to actual requirements, for example, set as a blank answer template or a disguised answer picture, so that the encrypted information in the answer picture in this embodiment is not easily found on the premise that the unauthorized party does not know the encryption manner of the answer picture in this embodiment when illegally obtaining the answer picture.
2. The encryption strategy is not easy to crack, and the encryption robustness is high
The embodiment encrypts the answer content in the answer picture, and then steganographically encrypts the encrypted answer content into the preset template picture, and in a double encryption mode, even if an unauthorized party knows that the illegally obtained answer picture is encrypted, the unauthorized party cannot decrypt the answer picture, and the embodiment has high encryption robustness for the answer picture.
As an optional implementation manner of this embodiment, the answer content encryption module of this embodiment includes: and the picture creating unit is used for creating a template picture copy based on the preset template picture, encrypting the encrypted answering content to the template picture copy in a hidden writing mode and creating a new picture.
When the answer content encryption module of this embodiment encrypts the picture, the picture creating unit creates the template picture copy based on the same preset template, so as to keep consistent with the preset template picture, and then performs steganography encryption of the encrypted answer content based on the template picture copy. Therefore, the synchronous encryption processing of the multiple answer pictures can be realized, the mutual independence and the mutual noninterference can be realized, and the efficiency of the encryption processing of the answer pictures can be ensured.
As an optional implementation manner of this embodiment, the creating, by the picture copy creating unit according to this embodiment, a template picture copy based on the preset template picture includes:
acquiring all pixel values of a preset template picture;
and creating a template picture copy based on the preset template picture, and writing all pixel values of the preset template picture into the template picture copy.
Further, in this embodiment, after all the pixel values of the preset template picture are obtained, the image normalization processing is performed on all the pixel values of the preset template picture, and all the pixel values of the preset template picture after the normalization processing are written into the template picture copy.
The basic principle of image normalization is to eliminate the influence of geometric transformation on a picture according to a moment which has invariance to the geometric transformation in the image, and in the field of digital watermarking, the image normalization method is generally used for a watermarking algorithm related to geometric sum resistance, so that the geometric attack resistance of the encrypted picture can be increased by performing image normalization processing on all pixel values of a preset template picture. The image normalization processing mode mainly comprises the following steps: translation normalization, scaling normalization and rotation normalization. Optionally, in this embodiment, the image normalization processing performed on all pixel values of the preset template picture is implemented by performing translation transformation on all pixel values of the preset template picture.
Further optionally, in this embodiment, the performing of the image normalization processing on all the pixel values of the preset template picture is implemented in a manner of shifting all the pixel values of the preset template picture into even numbers.
As an optional implementation manner of this embodiment, the answer picture encryption module in this embodiment includes:
the format conversion unit is used for converting the encrypted answer content into a binary format;
and the coding unit codes the encrypted answer content in the binary format into the template picture copy.
Since each pixel in the picture is binary, the embodiment converts the encrypted answer content into a binary format, and completes the encryption of the answer picture in the way of encoding the answer content into the template picture copy.
In the embodiment, the encrypted answer content is written into the template picture copy in a picture steganography mode, so that the information of the encrypted answer content is hidden and is not easy to find while the display of the template picture copy is not influenced.
Optionally, the embodiment encodes the encrypted answer content in the binary format to the least significant bit of the pixel of the template picture copy; and the picture steganography based on the LSB principle is adopted.
Further optionally, the picture creating unit creating the new picture comprises writing the encoded pixel values into the new picture.
The anti-grabbing device for the answer pictures of the embodiment comprises:
the answer picture decryption module: decrypting the downloaded answer picture according to a preset answer picture decryption strategy to obtain encrypted answer content;
the answer content decryption module: decrypting the encrypted answer content according to a preset answer content decryption strategy to obtain answer content;
and the rendering module renders the acquired answer content to a blank answer picture to generate a display picture.
The anti-grabbing device for the answer pictures provides the decryption strategy, and the downloaded answer pictures are decrypted and displayed to the user through the decryption strategy preset by the client according to the request of the normal user, so that the operation request of the normal user is ensured, and the illegal grabbing operation of an unauthorized party is avoided.
As an optional implementation manner of this embodiment, a decryption process of the answer picture decryption module in this embodiment includes:
downloading an answer picture;
extracting data in all least significant bits in the picture;
addressing the index of the data interception position, and acquiring encrypted answer content through the index position;
and converting the answer content into an answer content text format which can be identified and analyzed by an answer content decryption strategy.
The index of the embodiment is used for determining the length of the encrypted content, so that the encrypted data of the answer content is extracted for targeted decryption.
Optionally, the binary data of the encrypted answer content is obtained through the index position, and the binary data of the encrypted answer content is converted into text data of UTF-8.
As an optional implementation manner of this embodiment, the encrypting the answer content includes encrypting the answer content by using an RSA private key encryption method; the decrypting the encrypted answer content according to the preset answer content decryption strategy comprises decrypting the encrypted answer content by adopting an RSA public key decryption mode. The encryption by using the RSA algorithm generally needs to generate a public key and a private key, and when the public key is adopted for encryption, the private key is used for decryption; when the private key is adopted for encryption, the public key is used for decryption. The RSA algorithm is the first algorithm that can be used for both encryption and digital signing, and is also easy to understand and operate. RSA is the most widely studied public key algorithm, has experienced various attacks, is gradually accepted by people, and is generally considered to be one of the most excellent public key schemes at present.
The embodiment ensures the reliability of the encryption of the answering content by the encryption of the RSA algorithm and protects the answering content from being cracked.
Therefore, when the client adopting the anti-grabbing method for the answer picture needs to display the answer picture, the picture needs to be downloaded to the local from the cloud storage and then decrypted twice, the answer content (in this case, the answer picture is still the same as the answer picture encrypted by the RSA) is analyzed from the picture by the first decryption, the answer content is restored by the second decryption through the RSA public key decryption, and then the client renders the answer content onto the blank answer paper, so that the user sees the complete answer picture.
As an optional implementation manner of this embodiment, the anti-grabbing device for an answer picture in this embodiment includes an ORC recognition module, where the ORC recognition module recognizes and extracts answer contents in the answer picture.
A computer-readable storage medium storing a computer-executable program which, when executed, implements the anti-grabbing method for an answer picture.
The embodiment also provides an electronic device, which comprises a processor and a memory, wherein the memory is used for storing a computer executable program, and when the computer program is executed by the processor, the processor executes the anti-grabbing method for the answer picture.
The embodiment also provides a computer-readable storage medium, which stores a computer-executable program, and when the computer-executable program is executed, the anti-grabbing method for the answer picture is realized.
From the above description of the embodiments, those skilled in the art will readily appreciate that the present invention can be implemented by hardware capable of executing a specific computer program, such as the system of the present invention, and electronic processing units, servers, clients, mobile phones, control units, processors, etc. included in the system. The invention may also be implemented by computer software for performing the method of the invention, e.g. control software executed by a microprocessor, an electronic control unit, a client, a server, etc. It should be noted that the computer software for executing the method of the present invention is not limited to be executed by one or a specific hardware entity, and can also be realized in a distributed manner by non-specific hardware. For computer software, the software product may be stored in a computer readable storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or may be distributed over a network, as long as it enables the electronic device to perform the method according to the present invention.
The above embodiments are only used for illustrating the invention and not for limiting the technical solutions described in the invention, and although the present invention has been described in detail in the present specification with reference to the above embodiments, the present invention is not limited to the above embodiments, and therefore, any modification or equivalent replacement of the present invention is made; all such modifications and variations are intended to be included herein within the scope of this disclosure and the appended claims.

Claims (10)

1. An anti-grabbing method of answer pictures is characterized by comprising the following steps:
acquiring an answer picture, and extracting answer contents in the answer picture;
encrypting the answering content;
and steganographically encrypting the encrypted answer content to a preset template picture.
2. The anti-grabbing method for answering pictures according to claim 1, wherein said steganographically encrypting the encrypted answering contents to a preset template picture comprises:
and creating a template picture copy based on the preset template picture, performing steganography encryption on the encrypted answer content to the template picture copy, and creating a new picture.
3. The anti-grabbing method for answer pictures according to claim 2, wherein said creating a template picture copy based on said preset template picture comprises:
acquiring all pixel values of a preset template picture;
and creating a template picture copy based on the preset template picture, and writing all pixel values of the preset template picture into the template picture copy.
4. The anti-grabbing method for an answer picture according to claim 3, wherein after all pixel values of the preset template picture are obtained, image normalization processing is performed on all pixel values of the preset template picture, and all pixel values of the preset template picture after normalization processing are written into the template picture copy;
optionally, the image normalization processing for all pixel values of the preset template picture is implemented by performing translation transformation for all pixel values of the preset template picture;
further optionally, the image normalization processing for all pixel values of the preset template picture is implemented by shifting all pixel values of the preset template picture into even numbers.
5. The method for preventing grabbing of an answer picture according to claim 2, wherein said steganographically encrypting the encrypted answer content to the template picture copy comprises:
converting the encrypted answering content into a binary format;
coding the encrypted answer content in the binary format into a template picture copy;
optionally, encoding the encrypted answer content in binary format to the least significant bit of the pixel of the template picture copy;
further optionally, the creating a new picture includes writing the encoded pixel values into the new picture.
6. The anti-grabbing method of an answer picture according to any one of claims 1-5, comprising:
and (3) an answer picture decryption process: decrypting the downloaded answer picture according to a preset answer picture decryption strategy to obtain encrypted answer content;
and (3) an answer content decryption process: decrypting the encrypted answer content according to a preset answer content decryption strategy to obtain answer content;
and rendering the acquired answer content to a blank answer picture to generate a display picture.
7. The anti-grabbing method for the answer picture according to claim 6, wherein said answer picture decryption process comprises:
downloading an answer picture;
extracting data in all least significant bits in the picture;
addressing the index of the data interception position, and acquiring encrypted answer content through the index position;
converting the answer content into an answer content text format which can be identified and analyzed by an answer content decryption strategy;
optionally, the binary data of the encrypted answer content is obtained through the index position, and the binary data of the encrypted answer content is converted into text data of UTF-8.
8. The anti-grabbing method for the answer picture according to claim 6, wherein said encrypting the answer content includes encrypting the answer content by using an RSA private key encryption method;
the decrypting the encrypted answer content according to the preset answer content decryption strategy comprises decrypting the encrypted answer content by adopting an RSA public key decryption mode.
9. The utility model provides a device is got in preventing grabbing of answer picture which characterized in that includes:
the answer content encryption module is used for acquiring an answer picture, extracting answer content in the answer picture and encrypting the answer content;
and the answer picture encryption module is used for encrypting the encrypted answer content to a preset template picture in a hidden writing mode.
10. A computer-readable storage medium, in which a computer-executable program is stored, which, when executed, implements an anti-grabbing method of an answer sheet according to any one of claims 1 to 8.
CN202110476830.1A 2021-04-30 2021-04-30 Anti-grabbing method and device for answer picture and computer readable storage medium Pending CN113222801A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110476830.1A CN113222801A (en) 2021-04-30 2021-04-30 Anti-grabbing method and device for answer picture and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110476830.1A CN113222801A (en) 2021-04-30 2021-04-30 Anti-grabbing method and device for answer picture and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN113222801A true CN113222801A (en) 2021-08-06

Family

ID=77090088

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110476830.1A Pending CN113222801A (en) 2021-04-30 2021-04-30 Anti-grabbing method and device for answer picture and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN113222801A (en)

Similar Documents

Publication Publication Date Title
Holliman et al. Counterfeiting attacks on oblivious block-wise independent invisible watermarking schemes
Poornima et al. An overview of digital image steganography
Lenti Steganographic methods
Moon et al. Data security using data hiding
Chang et al. Robust authentication scheme for protecting copyrights of images and graphics
KR101962275B1 (en) Encryption and decryption method for steganography data based on moving picture
Bhautmage et al. Advanced video steganography algorithm
Gaikwad et al. Hiding the Text and Image Message of Variable Size Using Encryption and Compression Algorithms in Video Steganography
Swetha et al. Data hiding using video steganography-a survey
Srinivas et al. Web image authentication using embedding invisible watermarking
Muyco et al. Least significant bit hash algorithm for digital image watermarking authentication
Boucherkha et al. A Lossless Watermarking Based Authentication System For Medical Images.
Şahin et al. Review of the Literature on the Steganography Concept
Caldelli et al. Joint near-lossless compression and watermarking of still images for authentication and tamper localization
Benrhouma Cryptanalysis and improvement of a semi-fragile watermarking technique for tamper detection and recovery
Ahmed A systematic overview of secure image steganography
Wang et al. Detecting and restoring the tampered images based on iteration-free fractal compression
Sharma et al. A study of steganography based data hiding techniques
CN113222801A (en) Anti-grabbing method and device for answer picture and computer readable storage medium
Rao et al. A novel information security scheme using cryptic steganography
Bhattacharyya et al. Watermarking Using Multiresolution Cosine Transformation: A Review
CN113177876A (en) Picture processing method and device and electronic equipment
Raj et al. A survey on reversible data hiding in encrypted image
Thepade et al. Appraise of multifarious image steganography techniques
Gupta et al. Video Steganography Using Discrete Wavelet Transform and Artificial Intelligence

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination