CN113722680A - Picture copyright protection method, device and equipment and readable storage medium - Google Patents

Picture copyright protection method, device and equipment and readable storage medium Download PDF

Info

Publication number
CN113722680A
CN113722680A CN202110996273.6A CN202110996273A CN113722680A CN 113722680 A CN113722680 A CN 113722680A CN 202110996273 A CN202110996273 A CN 202110996273A CN 113722680 A CN113722680 A CN 113722680A
Authority
CN
China
Prior art keywords
picture
information
bit
target
bits
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.)
Granted
Application number
CN202110996273.6A
Other languages
Chinese (zh)
Other versions
CN113722680B (en
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.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology 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 Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202110996273.6A priority Critical patent/CN113722680B/en
Publication of CN113722680A publication Critical patent/CN113722680A/en
Application granted granted Critical
Publication of CN113722680B publication Critical patent/CN113722680B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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]
    • 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/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Technology Law (AREA)
  • Multimedia (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Editing Of Facsimile Originals (AREA)

Abstract

The application discloses a picture copyright protection method, a device, equipment and a readable storage medium, wherein the method comprises the following steps: acquiring an original picture and copyright information corresponding to the original picture; converting the copyright information into information bits; selecting target pixel bits from an original picture; replacing the target pixel bit element with an information bit element to obtain a target picture and replacement position information; storing the target picture and the replacement position information into the block chain. According to the method and the device, the related bits in the picture are replaced by the bits corresponding to the copyright information, the copyright information can be directly stored in the picture, the copyright information can be conveniently read under the condition that the original picture is ensured to be changed as little as possible, the picture can be effectively prevented from being tampered, and the picture copyright can be effectively protected.

Description

Picture copyright protection method, device and equipment and readable storage medium
Technical Field
The present application relates to the field of image processing technologies, and in particular, to a method, an apparatus, a device, and a readable storage medium for protecting image copyright.
Background
With the development of network-related applications, various image-text images can be rapidly acquired and transmitted through the network, thereby easily causing infringement problems. For example, people may pass others without the original author's consent to copy the authored file, or distribute the authored content as modified, resulting in copyright infringement and difficult to trace back for confirmation. The block chain decentralized operation mode is to calculate the unique hash value of the important information, and then achieve multi-party authentication and storage through a distributed book accounting mechanism, wherein the important information is open, traceable and not falsifiable. Therefore, the picture copyright information can be protected by the characteristics of the block chain.
In the related picture copyright protection scheme, important copyright information is transmitted to a block chain, ciphertext information is stored in an original picture to generate a target picture, and the block chain is utilized to save the copyright information but not the original picture. If the target picture is further modified with non-security information, it is not possible to verify whether the modified target picture is authentic. And two modes are adopted from hiding the hash value into the picture, the size of the original picture can be changed by inserting the character, and the character replacement is carried out by utilizing the redundant pixel points, so that the adoption is limited by the imaging quality. The redundancy can be the imaging noise or the error of format compression, and the redundant points that can be collected on a distortion-free or noise-free picture will be very limited.
In summary, how to effectively solve the problems of picture copyright protection and the like is a technical problem which needs to be solved urgently by technical personnel in the field at present.
Disclosure of Invention
The invention aims to provide a picture copyright protection method, a device, equipment and a readable storage medium, which can directly store copyright information in a picture by replacing relevant bits in the picture with bits corresponding to the copyright information, can conveniently read the copyright information under the condition of ensuring that the original picture has the smallest change as possible, can effectively prevent the picture from being tampered, and can realize effective protection of picture copyright.
In order to solve the technical problem, the application provides the following technical scheme:
a picture copyright protection method comprises the following steps:
acquiring an original picture and copyright information corresponding to the original picture;
converting the copyright information into information bits;
selecting target pixel bits from the original picture;
replacing the target pixel bit element with the information bit element to obtain a target picture and replacement position information;
and storing the target picture and the replacement position information into a block chain.
Preferably, selecting the target pixel bit from the original picture comprises:
traversing pixel bits of the original picture to find out the parity bit with the same value as the information bit;
determining the parity bit as the target pixel bit.
Preferably, replacing the target pixel bit by the information bit to obtain a target picture and replacement position information, includes:
and replacing the information bits with the values of the target pixel bits and the like to obtain the target picture and the replacement position information.
Preferably, selecting the target pixel bit from the original picture comprises:
selecting the least significant bit of a specified color pixel from the original picture;
determining the least significant bit as the target pixel bit.
Preferably, replacing the target pixel bit by the information bit to obtain a target picture and replacement position information, includes:
and modifying the value of the information bit into the value of the target pixel bit to obtain the target picture and the replacement position information.
Preferably, storing the target picture and the replacement location information into a block chain includes:
performing hash calculation on the target picture to obtain a hash value of the target picture;
and transmitting the replacement position information, the target picture hash value and the target picture into the block chain for storage.
Preferably, the method further comprises the following steps:
acquiring the target picture and the replacement position information;
calculating the hash value of the target picture, and judging whether the hash value is consistent with the hash value of the target picture stored in the block chain;
if not, determining that the target picture is tampered;
if so, extracting the information bit from the target picture by using the replacement position information, and converting the information bit into the copyright information.
A picture copyright protection apparatus comprising:
the image acquisition module is used for acquiring an original image and copyright information corresponding to the original image;
the information conversion module is used for converting the copyright information into information bits;
the bit selection module is used for selecting target pixel bits from the original picture;
the bit replacement module is used for replacing the target pixel bit with the information bit to obtain a target picture and replacement position information;
and the picture storage module is used for storing the target picture and the replacement position information into a block chain.
An electronic device, comprising:
a memory for storing a computer program;
and the processor is used for realizing the steps of the picture copyright protection method when executing the computer program.
A readable storage medium, on which a computer program is stored, which, when executed by a processor, implements the steps of the above-mentioned picture copyright protection method.
The method provided by the embodiment of the application is applied to obtain the original picture and the copyright information corresponding to the original picture; converting the copyright information into information bits; selecting target pixel bits from an original picture; replacing the target pixel bit element with an information bit element to obtain a target picture and replacement position information; storing the target picture and the replacement position information into the block chain.
And acquiring an original picture and copyright information corresponding to the original picture. In order to enable a picture user to know the copyright information of the picture at the first time on the premise of not changing the size of the picture and achieving the minimum change of pixels, after the copyright information is obtained, the copyright information is converted into information bits, and the information bits are stored in an original picture in a bit replacement mode, so that a target picture and replacement position information are obtained. Copyright information can be extracted from the target picture based on the replacement position information. In addition, the target picture and the replacement position information are stored in the block chain, and the target picture and the copyright information in the target picture can be effectively protected by means of the non-tampering characteristic of the block chain, so that tampering is avoided. That is to say, according to the method and the device, the related bits in the picture are replaced by the bits corresponding to the copyright information, the copyright information can be directly stored in the picture, the copyright information can be conveniently read under the condition that the change of the original picture is ensured to be as small as possible, the picture can be effectively prevented from being tampered, and the effective protection of the picture copyright can be realized.
Accordingly, embodiments of the present application further provide an image copyright protection device, an apparatus, and a readable storage medium corresponding to the image copyright protection method, which have the above technical effects and are not described herein again.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments or related technologies of the present application, the drawings needed to be used in the description of the embodiments or related technologies are briefly introduced below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a flowchart illustrating an implementation of a picture copyright protection method in an embodiment of the present application;
fig. 2 is a schematic diagram illustrating an implementation of a picture copyright protection method in an embodiment of the present application;
FIG. 3 is a schematic diagram of a pixel replacement location coordinate according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of a picture copyright protection apparatus in an embodiment of the present application;
fig. 5 is a schematic structural diagram of an electronic device in an embodiment of the present application;
fig. 6 is a schematic structural diagram of an electronic device in an embodiment of the present application.
Detailed Description
In order that those skilled in the art will better understand the disclosure, the following detailed description will be given with reference to the accompanying drawings. It is to be understood that the embodiments described are only a few embodiments of the present application and not all embodiments. 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 application.
The following explains the related terms referred to herein:
block chain (Block chain): by cryptographically concatenating blocks, each block contains the hash value of the previous block, a corresponding timestamp, and transaction data, so that the contents of the block are hard to tamper.
Block (Block) one concatenated literal record.
Distributed Ledger (Distributed Ledger): the database is distributed over nodes (devices) of the peer-to-peer network, each node replicating and storing copies identical to the ledger, and there is no centralized data storage among them.
Hash Function (Hash Function): a method for processing data calculates data fingerprint by a specific algorithm.
Hash Value (Hash Value): the value calculated via the hash function, which has an irreversible property, is often used to identify whether a file has been tampered with.
RGB, a color standard, is a color standard that obtains various colors by changing three color channels of red (R), green (G), and blue (B) and superimposing them on each other, and is a color representing three channels of red, green, and blue.
Referring to fig. 1 and fig. 2, fig. 1 is a flowchart of a picture copyright protection method in an embodiment of the present application, and fig. 2 is a schematic diagram of an implementation of the picture copyright protection method in the embodiment of the present application, where the method includes the following steps:
s101, acquiring an original picture and copyright information corresponding to the original picture.
In order to distinguish whether the copyright information is loaded in the picture, in this embodiment, the picture in which the copyright information is not loaded is referred to as an original picture, and the picture in which the copyright information is loaded is referred to as a target picture. It should be noted that, in view of different loading manners of copyright information, in this embodiment, the pixels of the target picture and the original picture may or may not be consistent.
The copyright information can be customized by the author, and includes the author and the relevant important information of the picture, such as the author name, the identification card number, the creation date, the picture theme, the copyright registration number and other information.
Specifically, the original picture can be directly obtained through the image acquisition device, and the copyright information can be obtained by means of obtaining the mode input by the user through application software; of course, the original picture and the copyright information can be obtained in a direct receiving mode; the original picture and copyright information can also be obtained in a mode of directly reading from the storage medium.
S102, copyright information is converted into information bits.
Putting copyright information into the original picture must take into account both the information length and the picture size. Because the information hiding mode is to replace the pixels in the picture, the undersized picture has insufficient bits to be replaced, or the original picture color is obviously changed after the replacement, so that the information hiding is incomplete. In general, it is easier to hide information with larger pictures and more pixels. Copyright information is stored in a picture in a plaintext manner so as to be directly read, the information content should be simplified and brief, the shorter the stored information is, the fewer pixels need to be replaced, and the less the original picture is changed. Other secondary information associated with the creation may be stored in the blockchain as supplemental information. The supplemental information may include author and picture related secondary information such as geographic information, picture content description, authoring context description, and the like.
In order to enable a picture user to know the copyright information of the picture at the first time on the premise of not changing the size of the picture and achieving the minimum change of pixels, after the copyright information is obtained, the copyright information is converted into information bits so as to store the copyright information into an original picture in a bit replacement mode.
S103, selecting target pixel bits from the original picture.
The bit substitution does not change the size of the original picture, and is not obvious in intuition, but has influence on the picture color, so that the pixel to be substituted must be selected, and the color which is less sensitive to human eyes or the complex picture area can be selected for substitution.
To realize the parity replacement, step S103 selects a target pixel bit from the original picture, which specifically includes:
step one, traversing pixel bits of an original picture to find a parity bit with the same value as the information bit;
step two, determining the parity as the target pixel bit.
Taking the RGB picture with 24-bits as an example, assuming that the consecutive bits of the information bits corresponding to the copyright information are 1111 bits, a certain blue pixel (e.g., R0 x0, G0 x0, B0 xFF) may be selected for replacement, and since 0xF matches the information bits, the bit corresponding to 0xF in the blue element 0xFF in the blue pixel may be the target pixel bit.
It should be noted that, since the information bit usually consists of bits with a value of 0 or 1, when selecting the target pixel bit, only 2 bits with a value of 1 and a value of 0 can be selected as the target pixel bit, and the value of the information bit can be recorded by recording the multiplexing order of the two bits. Of course, in practical applications, to reduce the recording of replacement location information, longer target pixel bits of the same sequential bits may be used. For example, when the picture is large enough, a continuous target pixel bit with the same value as the information bit can be found, so that only 1 bit of replacement information can be recorded.
To realize the replacement of the least significant bit, step S103 selects a target pixel bit from the original picture, which specifically includes:
step one, selecting the least significant bit of a specified color pixel from an original picture;
and step two, determining the least significant bit as the target pixel bit.
If a black pixel (R0 x0, G0 x0, B0 x0) is selected to replace the information bit, the lowest bit of the blue element is determined as the target pixel bit.
And S104, replacing the target pixel bit by the information bit to obtain a target picture and replacement position information.
Assuming that the value of the target pixel bit is 1 and the value of the information bit is 0, bit replacement is performed, i.e. the value of the target pixel bit is changed to 0, and the modified position is recorded. The number of the information bits is not only one, and if continuous bit replacement is not adopted, the sequence of the modification positions is also required to be recorded, namely, the replacement position information not only comprises the replacement positions but also comprises the replacement sequence; if continuous bit replacement is used, the bit replacement length is recorded, i.e. the replacement position information includes not only the replacement position and the replacement length (if multiple continuous bit replacement is used, the replacement order of each segment is further recorded). That is, the replacement position information is information that can locate and read the information bits in the target picture by using the information.
In practical applications, at least one of the parity bit replacement and the least significant bit replacement can be used for replacement.
For the same-bit replacement, S104, replacing the target pixel bit with the information bit to obtain the target picture and the replacement position information, specifically including: and replacing the information bits with the values such as the target pixel bits to obtain a target picture and replacement position information.
Taking the RGB picture of 24-bit as an example, assuming that the information bits are 1111 bits, if a certain blue pixel (R ═ 0x0, G ═ 0x0, B ═ 0xFF) is selected for replacement, since 0xF matches the information, 0xF is recorded as the pixel replacement position, which is a parity replacement, and no change is made to the pixel bits of the original picture.
For the least significant bit, S104, replacing the target pixel bit with an information bit to obtain a target picture and replacement position information, specifically including: and modifying the value of the information bit into the value of the target pixel bit to obtain the target picture and the replacement position information.
Taking a 24-bit RGB picture as an example, assuming that the information continuous bit is 1111, if a certain black pixel (R ═ 0x0, G ═ 0x0, B ═ 0xFF) is selected for replacement, the lowest bit of the blue element is replaced with 1 and the replacement position is recorded, at this time, the components of the black pixel (R ═ 0x0, G ═ 0x0, B ═ 0x1) change, which is the replacement of the least significant bit, and thus it is known that four pixels are needed to complete the replacement of the information 1111.
Generally, the best target picture means that the copyright information can be completely hidden and the color change compared with the original picture is minimal. When the record of the replacement position preserves the sequence of the copyright information, 100% parity replacement becomes possible, so that the original picture is completely consistent with the target picture. Parity substitution is one of the possible solutions to ensure the integrity of the creative work.
And S105, storing the target picture and the replacement position information into the block chain.
Copyright information is loaded into an original picture in a bit replacement mode, after a target picture is obtained, the target picture and replacement position information can be stored into a block chain, and therefore the target picture can be further guaranteed not to be tampered by means of the non-tampering characteristic of the block chain.
Specifically, the step S105 stores the target picture and the replacement position information into the block chain, including:
performing Hash calculation on a target picture to obtain a Hash value of the target picture;
and step two, transmitting the replacement position information, the hash value of the target picture and the target picture into a block chain for storage.
After the generation of the target picture is completed, the hash value of the target picture can be calculated by using a hash function. The selected Hash function will produce a fixed length Hash, for example, MD5(Message-Digest Algorithm 5, a Message Digest Algorithm) will produce a 128-bit Hash, and SHA-1(Secure Hash Algorithm 1) will produce a 160-bit Hash. The hash value is irreversible, unique and similar to a fingerprint, and can be used for judging whether the target picture is modified.
Preferably, after step S105 is completed, the copyright information can be directly extracted from the target picture, and whether the target picture is tampered can also be determined. The specific implementation process comprises the following steps:
step one, acquiring a target picture and replacing position information;
calculating a hash value of the target picture, and judging whether the hash value is consistent with the hash value of the target picture stored in the block chain;
step three, if not, determining that the target picture is tampered;
and step four, if so, extracting the information bit from the target picture by using the replacement position information, and converting the information bit into copyright information.
In practical application, the replacement position information, the hash value of the target picture and the supplementary information can be transmitted to the block chain through the computer network for operation, the block chain calculates a group of block hash values from the input information according to the specification and the formulated algorithm program, and the block chain network synchronizes the information to other nodes. Each block in the chain of blocks computes a block hash value via a complex algorithm that is unique within the chain, and the detailed operation of the chain of blocks is not discussed in detail herein.
The hash value of the target picture is stored in the block chain, and the target picture is protected by the characteristic that the block chain can not be tampered, so that the copyright information hidden in the picture is indirectly protected. When the target picture is obtained by other people, the obtaining person can obtain the copyright information by replacing the position information, and whether the obtained target picture is modified can be confirmed by comparing the hash value of the target picture. If the hash value calculated by the target picture is inconsistent with the information on the block chain, the work of the non-original author of the picture can be judged.
The method provided by the embodiment of the application is applied to obtain the original picture and the copyright information corresponding to the original picture; converting the copyright information into information bits; selecting target pixel bits from an original picture; replacing the target pixel bit element with an information bit element to obtain a target picture and replacement position information; storing the target picture and the replacement position information into the block chain.
And acquiring an original picture and copyright information corresponding to the original picture. In order to enable a picture user to know the copyright information of the picture at the first time on the premise of not changing the size of the picture and achieving the minimum change of pixels, after the copyright information is obtained, the copyright information is converted into information bits, and the information bits are stored in an original picture in a bit replacement mode, so that a target picture and replacement position information are obtained. Copyright information can be extracted from the target picture based on the replacement position information.
In addition, the target picture and the replacement position information are stored in the block chain, and the target picture and the copyright information in the target picture can be effectively protected by means of the non-tampering characteristic of the block chain, so that tampering is avoided.
That is to say, according to the method and the device, the related bits in the picture are replaced by the bits corresponding to the copyright information, the copyright information can be directly stored in the picture, the copyright information can be conveniently read under the condition that the change of the original picture is ensured to be as small as possible, the picture can be effectively prevented from being tampered, and the effective protection of the picture copyright can be realized.
To facilitate better understanding of the parity replacement method proposed in the embodiments of the present application for loading copyright information into pictures, the following describes the parity replacement and least significant bit replacement in detail with reference to specific examples.
The words of the copyright information are edited and converted into binary bits, for example, the hexadecimal value of "last name" is 0xE5A793, the conversion binary value is 111001011010011110010011, and the rest of the words are similar.
The pixels of the original picture are expanded, for example, for a 24-bit color picture, each pixel is composed of three elements of red, green and blue, each element is 8-bit, and the storage space size of a 640x480 24-bit color picture is 921600 bytes.
Selecting the pixels in the picture to replace the information bits, sequentially replacing the information bits by using the parity bit replacement method and the least significant bit replacement method in the embodiment, and recording the pixel replacement position.
For example, the following steps are carried out: to hide the first byte 11100101 of copyright information into a 24-bit picture pixel, the expansion bits are as shown in table 1 (information and pixel bits), and the pixel replacement position coordinates are as shown in fig. 3.
TABLE 1
Figure BDA0003233902940000101
If the parity substitution method is used, the first bit 1 of the copyright information is the same as the first bit of the picture pixel, and the first stroke of the pixel substitution position is recorded as (0,0) in a coordinate mode. The second bit 1 of the information is the same as the second bit of the picture pixel, and the second time of recording the pixel replacement position is (1,0), so that the 11100101 replacement is completed as shown in table 2, and the pixel replacement position is obtained as shown in table 3 (pixel replacement position recording table).
TABLE 2
Figure BDA0003233902940000102
TABLE 3
Sequential effect Pixel position replacement
0 (0,0)
1 (1,0)
2 (11,0)
3 (12,0)
4 (13,0)
5 (24,0)
6 (26,0)
7 (30,0)
If the least significant bit replacement method is adopted, the first bit 1 of the copyright information directly replaces the lowest bit of the first pixel of the picture, the first stroke of the pixel replacement position is recorded as (7, 0) in a coordinate mode, the second bit of the copyright information replaces the lowest bit of the second pixel of the picture, the second stroke of the pixel replacement position is recorded as (15, 0), and so on, 11100101 completes the replacement as shown in table 4, and the pixel replacement position as shown in table 5 (the pixel replacement position recording table) is obtained.
TABLE 4
Figure BDA0003233902940000111
TABLE 5
Sequential effect Pixel position replacement
0 (7,0)
1 (15,0)
2 (23,0)
3 (31,0)
4 (39,0)
5 (47,0)
6 (55,0)
7 (63,0)
It should be noted that the use of same-bit replacement is not limited to the first pixel in the picture, and is not limited to the use of one bit, and can be continuous bit replacement, such as 4-bit replacement as shown in table 6 below.
TABLE 6
Figure BDA0003233902940000121
The size of the pixel replacement position record table can be effectively reduced by replacing the long bit, and if the number of different long bits is counted by preprocessing the picture pixels, whether the copyright information can be completely replaced into the picture can be quickly confirmed.
Likewise, the use of least significant bits for replacement is not limited to starting with the first pixel, nor is it limited to having to replace consecutive pixels. Even if the parity bit replacement and the least significant bit replacement are used in a mixed manner, the purpose is to completely hide the copyright information into the picture pixel, and the pixel replacement position saves the coordinate and the sequence of the capture bit, so that the byte combination of the copyright information can be correctly restored. The pixel replacement position record table can further record the bit length, so that the parity bit replacement method can perform bit replacement with different lengths in a segmented manner, and is more flexible in use. The 24-bit picture is taken as an example for the purpose of illustration, and the picture format is not particularly limited in practical applications.
In addition, SHA-1 can be selected to calculate the hash value of the target picture to generate a 160-bit hash value of the target picture, such as 0x40BD001563085FC35165329EA1FF5C5 ECBDBBEEF.
Supplemental information for the picture may also be made, such as creative content descriptions, story backgrounds, character descriptions, and the like.
The pixel replacement position record, the target picture hash value and the supplementary information are transmitted to a block chain through a computer network to obtain a group of block hash values, and the block hash values are stored for later inquiry.
Corresponding to the above method embodiments, the embodiments of the present application further provide a picture copyright protection device, and the picture copyright protection device described below and the picture copyright protection method described above may be referred to in correspondence with each other.
Referring to fig. 4, the apparatus includes the following modules:
the image acquisition module 101 is configured to acquire an original image and copyright information corresponding to the original image;
an information conversion module 102, configured to convert the copyright information into information bits;
a bit selection module 103, configured to select a target pixel bit from the original picture;
a bit replacement module 104, configured to replace a target pixel bit with an information bit to obtain a target picture and replacement position information;
and the picture storage module 105 is used for storing the target picture and the replacement position information into the block chain.
The method comprises the steps of obtaining an original picture and copyright information corresponding to the original picture by applying the device provided by the embodiment of the application; converting the copyright information into information bits; selecting target pixel bits from an original picture; replacing the target pixel bit element with an information bit element to obtain a target picture and replacement position information; storing the target picture and the replacement position information into the block chain.
And acquiring an original picture and copyright information corresponding to the original picture. In order to enable a picture user to know the copyright information of the picture at the first time on the premise of not changing the size of the picture and achieving the minimum change of pixels, after the copyright information is obtained, the copyright information is converted into information bits, and the information bits are stored in an original picture in a bit replacement mode, so that a target picture and replacement position information are obtained. Copyright information can be extracted from the target picture based on the replacement position information. In addition, the target picture and the replacement position information are stored in the block chain, and the target picture and the copyright information in the target picture can be effectively protected by means of the non-tampering characteristic of the block chain, so that tampering is avoided. That is to say, according to the method and the device, the related bits in the picture are replaced by the bits corresponding to the copyright information, the copyright information can be directly stored in the picture, the copyright information can be conveniently read under the condition that the change of the original picture is ensured to be as small as possible, the picture can be effectively prevented from being tampered, and the effective protection of the picture copyright can be realized.
In an embodiment of the present application, the bit selection module 103 is specifically configured to traverse pixel bits of an original picture to find a parity having the same value as the information bit; the parity bit is determined as the target pixel bit.
In an embodiment of the present application, the bit replacement module 104 is specifically configured to replace the information bits with the values such as the target pixel bits, so as to obtain the target picture and the replacement position information.
In an embodiment of the present application, the bit selection module 103 is specifically configured to select a least significant bit of a specified color pixel from an original picture; the least significant bit is determined as the target pixel bit.
In an embodiment of the present application, the bit replacement module 104 is specifically configured to modify a value of the information bit to a value of the target pixel bit, so as to obtain the target picture and the replacement position information.
In a specific embodiment of the present application, the picture storage module 105 is specifically configured to perform hash calculation on a target picture to obtain a hash value of the target picture; and transmitting the replacement position information, the target picture hash value and the target picture into a block chain for storage.
In one embodiment of the present application, the method further includes:
the copyright determining module is used for acquiring the target picture and the replacement position information; calculating the hash value of the target picture, and judging whether the hash value is consistent with the hash value of the target picture stored in the block chain; if not, determining that the target picture is tampered; if so, extracting the information bits from the target picture by using the replacement position information, and converting the information bits into copyright information.
Corresponding to the above method embodiment, an embodiment of the present application further provides an electronic device, and a piece of electronic device described below and a piece of picture copyright protection method described above may be referred to in correspondence.
Referring to fig. 5, the electronic device includes:
a memory 332 for storing a computer program;
the processor 322 is configured to implement the steps of the picture copyright protection method of the above-mentioned method embodiment when executing the computer program.
Specifically, referring to fig. 6, fig. 6 is a schematic structural diagram of an electronic device provided in this embodiment, which may generate relatively large differences due to different configurations or performances, and may include one or more processors (CPUs) 322 (e.g., one or more processors) and a memory 332, where the memory 332 stores one or more computer applications 342 or data 344. Memory 332 may be, among other things, transient or persistent storage. The program stored in memory 332 may include one or more modules (not shown), each of which may include a sequence of instructions operating on a data processing device. Still further, the central processor 322 may be configured to communicate with the memory 332 to execute a series of instruction operations in the memory 332 on the electronic device 301.
The electronic device 301 may also include one or more power sources 326, one or more wired or wireless network interfaces 350, one or more input-output interfaces 358, and/or one or more operating systems 341.
The steps in the picture copyright protection method described above may be implemented by the structure of the electronic device.
Corresponding to the above method embodiment, the present application embodiment further provides a readable storage medium, and a readable storage medium described below and a picture copyright protection method described above may be referred to correspondingly.
A readable storage medium, on which a computer program is stored, which, when executed by a processor, implements the steps of the picture copyright protection method of the above-mentioned method embodiment.
The readable storage medium may be a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and various other readable storage media capable of storing program codes.
Those of skill would further appreciate that the various illustrative components and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.

Claims (10)

1. A picture copyright protection method is characterized by comprising the following steps:
acquiring an original picture and copyright information corresponding to the original picture;
converting the copyright information into information bits;
selecting target pixel bits from the original picture;
replacing the target pixel bit element with the information bit element to obtain a target picture and replacement position information;
and storing the target picture and the replacement position information into a block chain.
2. The method of claim 1, wherein selecting the target pixel bit from the original picture comprises:
traversing pixel bits of the original picture to find out the parity bit with the same value as the information bit;
determining the parity bit as the target pixel bit.
3. The method of claim 2, wherein replacing the target pixel bits with the information bits to obtain a target picture and replacement position information comprises:
and replacing the information bits with the values of the target pixel bits and the like to obtain the target picture and the replacement position information.
4. The method of claim 1, wherein selecting the target pixel bit from the original picture comprises:
selecting the least significant bit of a specified color pixel from the original picture;
determining the least significant bit as the target pixel bit.
5. The method of claim 4, wherein replacing the target pixel bits with the information bits to obtain a target picture and replacement position information comprises:
and modifying the value of the information bit into the value of the target pixel bit to obtain the target picture and the replacement position information.
6. The picture copyright protection method according to any one of claims 1 to 5, wherein storing the target picture and the replacement position information into a blockchain comprises:
performing hash calculation on the target picture to obtain a hash value of the target picture;
and transmitting the replacement position information, the target picture hash value and the target picture into the block chain for storage.
7. The picture copyright protection method according to claim 6, further comprising:
acquiring the target picture and the replacement position information;
calculating the hash value of the target picture, and judging whether the hash value is consistent with the hash value of the target picture stored in the block chain;
if not, determining that the target picture is tampered;
if so, extracting the information bit from the target picture by using the replacement position information, and converting the information bit into the copyright information.
8. A picture copyright protection device, comprising:
the image acquisition module is used for acquiring an original image and copyright information corresponding to the original image;
the information conversion module is used for converting the copyright information into information bits;
the bit selection module is used for selecting target pixel bits from the original picture;
the bit replacement module is used for replacing the target pixel bit with the information bit to obtain a target picture and replacement position information;
and the picture storage module is used for storing the target picture and the replacement position information into a block chain.
9. An electronic device, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the picture copyright protection method according to any one of claims 1 to 7 when executing the computer program.
10. A readable storage medium, characterized in that the readable storage medium has stored thereon a computer program which, when being executed by a processor, implements the steps of the picture copyright protection method according to any one of claims 1 to 7.
CN202110996273.6A 2021-08-27 2021-08-27 Picture copyright protection method, device, equipment and readable storage medium Active CN113722680B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110996273.6A CN113722680B (en) 2021-08-27 2021-08-27 Picture copyright protection method, device, equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110996273.6A CN113722680B (en) 2021-08-27 2021-08-27 Picture copyright protection method, device, equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN113722680A true CN113722680A (en) 2021-11-30
CN113722680B CN113722680B (en) 2023-07-25

Family

ID=78678573

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110996273.6A Active CN113722680B (en) 2021-08-27 2021-08-27 Picture copyright protection method, device, equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN113722680B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109671011A (en) * 2018-11-29 2019-04-23 深圳企业云科技股份有限公司 Embedding grammar, extracting method and the electronic equipment of copyright information
CN111311474A (en) * 2020-02-04 2020-06-19 太原科技大学 Large-capacity image encryption domain information hiding method
CN111881425A (en) * 2020-07-28 2020-11-03 平安科技(深圳)有限公司 Picture copyright authentication method and device and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109671011A (en) * 2018-11-29 2019-04-23 深圳企业云科技股份有限公司 Embedding grammar, extracting method and the electronic equipment of copyright information
CN111311474A (en) * 2020-02-04 2020-06-19 太原科技大学 Large-capacity image encryption domain information hiding method
CN111881425A (en) * 2020-07-28 2020-11-03 平安科技(深圳)有限公司 Picture copyright authentication method and device and storage medium

Also Published As

Publication number Publication date
CN113722680B (en) 2023-07-25

Similar Documents

Publication Publication Date Title
US8836817B2 (en) Data processing apparatus, imaging apparatus, and medium storing data processing program
US6523114B1 (en) Method and apparatus for embedding authentication information within digital data
CN1316426C (en) Method and a system for reducing update frequency of image processing device
CN109543065B (en) Video active identification method combined with block chain
JP4447219B2 (en) Authentication apparatus and method specific to sensor recording apparatus and information acquisition apparatus
CN100547608C (en) The method of digital figure watermark and related device and the digital camera that can add watermark
US11368289B1 (en) Video registration and authentication using blockchain
WO1995020291A1 (en) Method of and apparatus for manipulating digital data works
KR20060064034A (en) Apparatus and method for generating data for detecting false alteration of encrypted data during processing
EP3543891B1 (en) A computer implemented method and a system for tracking of certified documents lifecycle and computer programs thereof
US20210099772A1 (en) System and method for verification of video integrity based on blockchain
CN113722680A (en) Picture copyright protection method, device and equipment and readable storage medium
US20020166050A1 (en) Image signal processing apparatus
US6862556B2 (en) System and method for associating historical information with sensory data and distribution thereof
CN109657487A (en) Image processing method, image authentication method and its device
JP2003524932A (en) System and method for digitally marking files with removable marks
JP2001078141A (en) Digital camera and image falsification detection system
JP3995153B2 (en) Digital watermark embedding method, verification method, embedding device, verification device, and electronic image
CN105760913A (en) Information recording method and information extracting method
JP2007013882A (en) Storage medium, and apparatus and method for digital data processing
US20040034667A1 (en) Incorporating data into files
JP7299662B1 (en) Information processing device, method, and program
JP3943931B2 (en) Image processing method and apparatus, program and storage medium
KR20190051430A (en) Apparatus and Method for Falsification Protection of Video Data
US11816756B1 (en) Anti-leak digital document marking system and method using distributed ledger

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
GR01 Patent grant
GR01 Patent grant