CN115688059A - Image data processing method and device, electronic equipment and storage medium - Google Patents

Image data processing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115688059A
CN115688059A CN202110871063.4A CN202110871063A CN115688059A CN 115688059 A CN115688059 A CN 115688059A CN 202110871063 A CN202110871063 A CN 202110871063A CN 115688059 A CN115688059 A CN 115688059A
Authority
CN
China
Prior art keywords
image data
watermark
verified
information
ciphertext
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
CN202110871063.4A
Other languages
Chinese (zh)
Other versions
CN115688059B (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.)
Ruiting Network Technology Shanghai Co ltd
Original Assignee
Ruiting Network Technology Shanghai 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 Ruiting Network Technology Shanghai Co ltd filed Critical Ruiting Network Technology Shanghai Co ltd
Priority to CN202110871063.4A priority Critical patent/CN115688059B/en
Publication of CN115688059A publication Critical patent/CN115688059A/en
Application granted granted Critical
Publication of CN115688059B publication Critical patent/CN115688059B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

A method and a device for processing image data, an electronic device and a computer readable storage medium are provided. The image data processing method comprises the following steps: acquiring a ciphertext, wherein the ciphertext comprises watermark information used for initial image data; analyzing the ciphertext to obtain watermark information; generating image data to be verified based on the watermark information and the initial image data; and sending the image data to be verified to extract the watermark information from the image data to be verified, and verifying the authenticity of the initial image data according to the watermark information and the ciphertext. The method can not only improve the difficulty of counterfeiting the image to be verified, but also improve the accuracy of verifying the authenticity of the image data to be verified.

Description

Image data processing method and device, electronic equipment and storage medium
Technical Field
The embodiment of the disclosure relates to a method and a device for processing image data, an electronic device and a storage medium.
Background
With the development of scientific technology, image processing technology is widely applied to various fields. The wide application of the image processing technology brings great convenience to the life of people. For example, in the housing field, the housing video displayed in the housing application program can help people to know the house type, the decoration degree and other information of the housing, which greatly reduces the time cost and the labor cost for people to understand the housing.
Disclosure of Invention
At least one embodiment of the present disclosure provides a method for processing image data, including: acquiring a ciphertext, wherein the ciphertext comprises watermark information used for initial image data; analyzing the ciphertext to obtain watermark information; generating image data to be verified based on the watermark information and the initial image data; and sending the image data to be verified to extract the watermark information from the image data to be verified, and verifying the authenticity of the initial image data according to the watermark information and the ciphertext.
For example, in an image data processing method provided in an embodiment of the present disclosure, generating image data to be verified based on watermark information and initial image data includes: generating intermediate image data based on the watermark information and the initial image data; and adding the ciphertext to the image file in which the intermediate image data is located to obtain image data to be verified, so as to obtain the ciphertext from the image data to be verified, obtain watermark verification information according to the ciphertext, and verify the authenticity of the initial image data based on the watermark verification information and the watermark information in the image data to be verified.
For example, in a method for processing image data provided in at least one embodiment of the present disclosure, adding a ciphertext to intermediate image data to obtain image data to be verified includes: and adding the ciphertext to the file head of the image file in which the intermediate image data is positioned to obtain the image data to be verified.
For example, in an image data processing method provided in at least one embodiment of the present disclosure, generating image data to be verified based on watermark information and initial image data includes: acquiring identification information of initial image data; and generating image data to be verified based on the watermark information, the initial image data and the identification information so as to obtain watermark verification information corresponding to the ciphertext according to the identification information in the image data to be verified, and verifying the authenticity of the initial image data based on the watermark verification information and the watermark information in the image data to be verified.
For example, in a method for processing image data provided in at least one embodiment of the present disclosure, generating image data to be verified based on watermark information including watermark text and initial image data includes: and adding the watermark text into the initial image data to generate image data to be verified.
For example, in a processing method of image data provided in at least one embodiment of the present disclosure, the watermark information further includes a watermark parameter, where the watermark parameter indicates position information of a watermark text in the initial image data, and adding the watermark text to the initial image data to generate image data to be verified includes: and adding the watermark text into the initial image data according to the position information indicated by the watermark parameter to generate the image data to be verified.
For example, in an image data processing method provided by at least one embodiment of the present disclosure, an initial image data is an initial video data, the initial video data includes a plurality of initial image frames, an image data to be verified includes a video data to be verified, a watermark parameter indicates position information of a watermark text in the initial image data, and the method includes: the watermark parameter indicates that watermark text is added in at least one first target image frame of a plurality of initial image frames, and the watermark text is added into the initial image data according to the position information indicated by the watermark parameter so as to generate the image data to be verified, and the method comprises the following steps: determining at least one target image frame from a plurality of initial image frames based on the position information indicated by the watermark parameter; and adding the watermark text into at least one target image frame to generate video data to be verified.
For example, in a method for processing image data provided by at least one embodiment of the present disclosure, the watermark parameters include at least one operation number, the at least one operation number corresponds to at least one target image frame, and the determining, based on the position information indicated by the watermark parameters, at least one target image frame from a plurality of initial image frames includes: and performing mathematical operation on the at least one operation number and the number of the plurality of initial image frames to obtain at least one frame ordinal number, and obtaining at least one target image frame in the plurality of initial image frames according to the at least one frame ordinal number.
For example, in an image data processing method provided by at least one embodiment of the present disclosure, the number of the plurality of initial image frames is N, and performing a mathematical operation on the at least one operation number and the number of the plurality of initial image frames to obtain at least one frame sequence number includes: performing complementation operation on the N by using at least one operation number to obtain at least one remainder as at least one frame ordinal number; or, the remainder operation is carried out on at least one operation number by N, and at least one obtained remainder is used as at least one frame ordinal number; n is a positive integer greater than or equal to 2.
For example, in the image data processing method provided by at least one embodiment of the present disclosure, the at least one operation number includes at least 2 groups of operation numbers, the watermark text includes at least 2 groups of sub-watermark texts, which correspond to the at least 2 operation numbers respectively, and the at least 2 groups of sub-watermark texts include at least two texts different from each other.
For example, in the image data processing method provided by at least one embodiment of the present disclosure, obtaining the ciphertext includes obtaining the ciphertext online, and allowing to obtain the initial image data only after confirming the obtained ciphertext, so as to generate the image data to be verified based on the watermark information and the initial image data.
At least one embodiment of the present disclosure provides a method for processing image data, including: acquiring image data to be verified, and extracting watermark information from the image data to be verified; acquiring a ciphertext based on image data to be verified; and verifying the authenticity of the image data to be verified according to the watermark information and the ciphertext.
For example, in an image data processing method provided in at least one embodiment of the present disclosure, obtaining a ciphertext based on image data to be verified includes: and acquiring a ciphertext from the image file in which the image data to be verified is located.
For example, in an image data processing method provided in at least one embodiment of the present disclosure, obtaining a ciphertext based on image data to be verified includes: acquiring identification information of initial image data based on image data to be verified; and acquiring a ciphertext based on the identification information and a preset corresponding relation, wherein the preset corresponding relation records the corresponding relation between the identification information and the ciphertext or the corresponding relation between the identification information and the storage address of the ciphertext.
For example, in a method for processing image data provided in at least one embodiment of the present disclosure, verifying authenticity of image data to be verified according to watermark information and ciphertext includes: acquiring watermark verification information corresponding to the ciphertext; and comparing the watermark verification information with the watermark information to verify the authenticity of the image data to be verified.
For example, in a method for processing image data provided in at least one embodiment of the present disclosure, acquiring watermark verification information corresponding to a ciphertext includes: decrypting the ciphertext to obtain watermark verification information; or acquiring the watermark verification information corresponding to the ciphertext based on the ciphertext and the mapping relation, wherein the mapping relation is the mapping relation between the ciphertext and the watermark verification information.
For example, in a method for processing image data provided in at least one embodiment of the present disclosure, the watermark verification information includes a watermark verification text, and the watermark information includes a watermark text, and comparing the watermark verification information with the watermark information to verify the authenticity of the image data to be verified includes: and comparing the watermark text with the watermark verification text to verify the authenticity of the image data to be verified.
For example, in a processing method of image data provided in at least one embodiment of the present disclosure, the watermark verification information further includes a watermark verification parameter, where the watermark verification parameter indicates position information of a watermark text in the image data to be verified, and the extracting watermark information from the image data to be verified includes: and extracting the watermark text from the image data to be verified according to the position information indicated by the watermark verification parameters.
For example, in a method for processing image data provided in at least one embodiment of the present disclosure, the image data to be verified includes video data to be verified, the video data to be verified includes a plurality of image frames to be verified, and the watermark verification parameter indicates position information of the watermark text in the image data to be verified, including: the watermark verification parameter indicates that watermark text is extracted from at least one first target image frame of a plurality of initial image frames, and the watermark text is extracted from image data to be verified according to the position information indicated by the watermark verification parameter, and the method comprises the following steps: and determining at least one target image frame from the plurality of image frames to be verified according to the position information indicated by the watermark verification parameters, and extracting the watermark text from the at least one target image frame.
For example, in a processing method of image data provided by at least one embodiment of the present disclosure, the watermark verification parameters include at least one verification number, the at least one verification number corresponds to at least one target image frame, and the determining, according to the position information indicated by the watermark verification parameters, at least one target image frame from among a plurality of image frames to be verified includes: and performing mathematical operation on the at least one verification number and the number of the plurality of image frames to be verified to obtain at least one frame number, and obtaining at least one target image frame in the plurality of image frames to be verified according to the at least one frame number.
For example, in a method for processing image data provided in at least one embodiment of the present disclosure, where the number of a plurality of image frames to be verified is N, and a mathematical operation is performed on at least one verification number and the number of the plurality of image frames to be verified to obtain at least one frame ordinal number, the method includes: performing complementation operation on the N by using at least one verification number respectively to obtain at least one remainder as at least one frame ordinal number; or the at least one verification number is subjected to complementation operation by N, at least one remainder obtained is taken as at least one frame ordinal number, and N is a positive integer which is greater than or equal to 2.
At least one embodiment of the present disclosure provides an apparatus for processing image data, including: an information acquisition unit configured to acquire a ciphertext, the ciphertext including watermark information for the initial image data; an analysis unit configured to analyze the ciphertext to obtain watermark information; an image data generation unit configured to generate image data to be verified based on the watermark information and the initial image data; and the image data sending unit is configured to send the image data to be verified so as to extract the watermark information from the image data to be verified and verify the authenticity of the initial image data according to the watermark information.
For example, in an image data processing apparatus provided in at least one embodiment of the present disclosure, an image data generation unit includes: an intermediate image data generation subunit configured to generate intermediate image data based on the watermark information and the initial image data; and a first image data generation subunit configured to add the ciphertext to an image file in which the intermediate image data is located to obtain the image data to be verified, so as to acquire the ciphertext from the image data to be verified and obtain watermark verification information according to the ciphertext, and verify the authenticity of the initial image data based on the watermark verification information and the watermark information in the image data to be verified.
For example, in the apparatus for processing image data provided by at least one embodiment of the present disclosure, the first image data generating subunit includes a ciphertext adding subunit, configured to add the ciphertext to a file header of an image file in which the intermediate image data is located, so as to obtain the image data to be verified.
For example, in an image data processing apparatus provided in at least one embodiment of the present disclosure, an image data generating unit includes: an identification acquisition subunit configured to acquire identification information of the initial image data; and the second image data generation subunit is configured to generate the image data to be verified based on the watermark information, the initial image data and the identification information, so as to obtain watermark verification information corresponding to the ciphertext according to the identification information in the image data to be verified, and verify the authenticity of the initial image data based on the watermark verification information and the watermark information in the image data to be verified.
For example, in a processing apparatus for image data provided in at least one embodiment of the present disclosure, watermark information includes a watermark text, and the image data generating unit includes: a text adding subunit configured to add the watermark text to the initial image data to generate the image data to be verified.
For example, in a processing apparatus for image data provided in at least one embodiment of the present disclosure, the watermark information further includes a watermark parameter, where the watermark parameter indicates position information of the watermark text in the initial image data, and the text adding subunit includes: and the first adding subunit is configured to add the watermark text to the initial image data according to the position information indicated by the watermark parameter, so as to generate the image data to be verified.
For example, in an apparatus for processing image data provided by at least one embodiment of the present disclosure, an initial image data is an initial video data, the initial video data includes a plurality of initial image frames, the image data to be verified includes video data to be verified, and the watermark parameter indicates position information of the watermark text in the initial image data, including: the watermark parameter indicating addition of the watermark text in at least one first target image frame of the plurality of initial image frames, the first addition subunit including: an image frame determination subunit configured to determine the at least one target image frame from the plurality of initial image frames based on the position information indicated by the watermark parameter; and the adding and generating subunit is configured to add the watermark text into the at least one target image frame and generate the video data to be verified.
For example, in an apparatus for processing image data provided in at least one embodiment of the present disclosure, the watermark parameter includes at least one operation number, where the at least one operation number corresponds to the at least one target image frame, and the image frame determining subunit includes an operation subunit configured to perform a mathematical operation on the at least one operation number and the number of the plurality of initial image frames to obtain at least one frame number, and obtain the at least one target image frame in the plurality of initial image frames according to the at least one frame number.
For example, in an apparatus for processing image data provided by at least one embodiment of the present disclosure, the number of the plurality of initial image frames is N, and the operation subunit includes a first operation subunit or a second operation subunit. The first operation subunit is configured to perform a remainder operation on N by using the at least one operation number, respectively, so as to obtain at least one remainder as the at least one frame number. And the second operation subunit is configured to perform a remainder operation on the at least one operation number by using N, and using the obtained at least one remainder as the at least one frame ordinal number. N is a positive integer greater than or equal to 2.
For example, in an image data processing apparatus provided in at least one embodiment of the present disclosure, the at least one operation number includes at least 2 groups of operation numbers, the watermark text includes at least 2 groups of sub-watermark texts, which respectively correspond to the at least 2 operation numbers, and the at least 2 groups of sub-watermark texts include at least two texts different from each other.
For example, in the image data processing apparatus provided in at least one embodiment of the present disclosure, obtaining the ciphertext includes obtaining the ciphertext online, and allowing to obtain the initial image data only after confirming obtaining the ciphertext, so as to generate the image data to be verified based on the watermark information and the initial image data. At least one embodiment of the present disclosure provides an image data processing apparatus, including: the image acquisition unit is configured to acquire image data to be verified and extract watermark information from the image data to be verified; the ciphertext acquisition unit is configured to acquire a ciphertext based on the image data to be verified; and the verification unit is configured to verify the authenticity of the image data to be verified according to the watermark information and the ciphertext.
For example, in the processing apparatus for image data provided in at least one embodiment of the present disclosure, the ciphertext obtaining unit includes a first obtaining subunit configured to obtain a ciphertext from an image file in which the book data to be verified is located.
For example, in a processing apparatus for image data provided in at least one embodiment of the present disclosure, a ciphertext obtaining unit includes an information obtaining subunit, configured to obtain, based on the image data to be verified, identification information of the initial image data; and a second obtaining subunit configured to obtain the ciphertext based on the identification information and a preset correspondence, where the preset correspondence records a correspondence between the identification information and the ciphertext, or a correspondence between the identification information and a storage address of the ciphertext.
For example, in a processing apparatus for image data provided in at least one embodiment of the present disclosure, a verification unit includes a watermark verification information obtaining subunit configured to obtain watermark verification information corresponding to the ciphertext; and the comparison subunit is configured to compare the watermark verification information with the watermark information so as to verify the authenticity of the image data to be verified.
For example, in a processing apparatus for image data provided in at least one embodiment of the present disclosure, a watermark verification information obtaining subunit includes a first watermark verification information obtaining subunit configured to decrypt the ciphertext to obtain the watermark verification information; or the second watermark verification information obtaining subunit is configured to obtain, based on the ciphertext and a mapping relationship, watermark verification information corresponding to the ciphertext, where the mapping relationship is a mapping relationship between the ciphertext and the watermark verification information.
For example, in an apparatus for processing image data provided by at least one embodiment of the present disclosure, the watermark verification information includes a watermark verification text, and the comparison subunit includes a text comparison subunit configured to compare the watermark text with the watermark verification text to verify the authenticity of the image data to be verified.
For example, in an apparatus for processing image data provided in at least one embodiment of the present disclosure, watermark verification information further includes a watermark verification parameter, where the watermark verification parameter indicates location information of the watermark text in image data to be verified, and an image obtaining unit includes an extracting subunit configured to extract the watermark text from the image data to be verified according to the location information indicated by the watermark verification parameter.
For example, in an image data processing apparatus provided in at least one embodiment of the present disclosure, an image data to be verified includes a video data to be verified, the video data to be verified includes a plurality of image frames to be verified, and a watermark verification parameter indicates position information of a watermark text in the image data to be verified, including: the watermark verification parameter indicates that the watermark text is extracted in at least one first target image frame of the plurality of initial image frames, the extraction sub-unit comprises a determination sub-unit configured to determine the at least one target image frame from the plurality of image frames to be verified according to the position information indicated by the watermark verification parameter, and a text extraction sub-unit configured to extract the watermark text from the at least one target image frame.
For example, in an apparatus for processing image data provided in at least one embodiment of the present disclosure, a watermark verification parameter includes at least one verification number, where the at least one verification number corresponds to the at least one target image frame, and a determining subunit includes a target determining subunit, configured to perform mathematical operations on the at least one verification number and the number of the plurality of image frames to be verified to obtain at least one frame number, and obtain the at least one target image frame in the plurality of image frames to be verified according to the at least one frame number.
For example, in an image data processing apparatus provided in at least one embodiment of the present disclosure, the number of the plurality of image frames to be verified is N, and the target determination subunit includes: the first target determining subunit is configured to perform a complementation operation on the N by using the at least one verification number, and obtain at least one remainder as the at least one frame number; or a second target determination subunit, configured to perform a complementation operation on the at least one verification number by N, and use at least one obtained remainder as the at least one frame number; n is a positive integer greater than or equal to 2.
At least one embodiment of the present disclosure provides an electronic device, including a processor; a memory including one or more computer program modules; wherein one or more computer program modules are stored in the memory and configured to be executed by the processor, the one or more computer program modules comprising instructions for implementing the method of processing image data provided by any of the embodiments of the present disclosure.
At least one embodiment of the present disclosure provides a computer-readable storage medium for storing non-transitory computer-readable instructions, which when executed by a computer, can implement a method for processing image data provided by any one of the embodiments of the present disclosure.
Drawings
To more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings of the embodiments will be briefly introduced below, and it is apparent that the drawings in the following description relate only to some embodiments of the present disclosure and are not limiting to the present disclosure.
Fig. 1 illustrates a system architecture of a processing method applied to image data according to at least one embodiment of the present disclosure;
fig. 2 is a flowchart illustrating a method for processing image data according to at least one embodiment of the disclosure;
fig. 3 illustrates a flowchart of a method of step S203 in fig. 2 according to at least one embodiment of the present disclosure;
fig. 4 illustrates another method flowchart of step S203 in fig. 2 provided by at least one embodiment of the present disclosure;
fig. 5 is a schematic flowchart illustrating a method for generating image data to be verified by adding a watermark text to initial image data according to location information indicated by a watermark parameter according to at least one embodiment of the present disclosure;
fig. 6 is a flowchart illustrating another image data processing method provided by at least one embodiment of the present disclosure;
fig. 7A illustrates a flowchart of a method of step S602 in fig. 6 according to at least one embodiment of the present disclosure;
fig. 7B illustrates a flowchart of a method of step S603 in fig. 6 according to at least one embodiment of the present disclosure;
fig. 8 is a schematic flowchart illustrating a method for extracting a watermark text from image data to be verified according to location information indicated by a watermark verification parameter according to at least one embodiment of the present disclosure;
fig. 9A illustrates a flowchart of generating image data to be verified according to at least one embodiment of the present disclosure;
fig. 9B illustrates a flowchart of verifying image data to be verified according to at least one embodiment of the disclosure;
fig. 10A illustrates a schematic block diagram of an apparatus for processing image data according to at least one embodiment of the disclosure;
fig. 10B illustrates a schematic block diagram of another image data processing apparatus provided in at least one embodiment of the present disclosure;
fig. 11A illustrates a schematic block diagram of an electronic device provided by at least one embodiment of the present disclosure;
fig. 11B illustrates a schematic block diagram of another electronic device provided by at least one embodiment of the present disclosure; and
fig. 12 illustrates a schematic diagram of a computer-readable storage medium provided by at least one embodiment of the present disclosure.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present disclosure more apparent, the technical solutions of the embodiments of the present disclosure will be described clearly and completely with reference to the drawings of the embodiments of the present disclosure. It is to be understood that the described embodiments are only a few embodiments of the present disclosure, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the described embodiments of the disclosure without any inventive step, are within the scope of protection of the disclosure.
Unless defined otherwise, technical or scientific terms used herein shall have the ordinary meaning as understood by one of ordinary skill in the art to which this disclosure belongs. The use of "first," "second," and the like in this disclosure is not intended to indicate any order, quantity, or importance, but rather is used to distinguish one element from another. Also, the use of the terms "a," "an," or "the" and similar referents do not denote a limitation of quantity, but rather denote the presence of at least one. The word "comprising" or "comprises", and the like, means that the element or item preceding the word comprises the element or item listed after the word and its equivalent, but does not exclude other elements or items. The terms "connected" or "coupled" and the like are not restricted to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "upper", "lower", "left", "right", and the like are used only to indicate relative positional relationships, and when the absolute position of the object being described is changed, the relative positional relationships may also be changed accordingly.
With the widespread use of image processing technology, images become the main carrier of information dissemination. It should be noted that in the present disclosure, an image includes at least one image such as a picture or a video formed by a plurality of image frames. For example, video may serve as a carrier for dissemination of news, advertisements, and the like. The authenticity of the image is particularly important since it serves as the primary carrier of information dissemination. If the forged image is released into the network, not only can the propagation of false information be caused, but also the trust crisis can be caused. For example, for a house broker, house source information is often displayed in a house source application program through an image, and if the image is forged (i.e., the house source information displayed by the image is not consistent with the actual house source), the image may cause the wrong understanding of the house source by the audience, which not only wastes the time and energy of the audience, but also loses the trust of the audience on the house source application program. Therefore, it is very important to perform anti-counterfeit processing on the image and to verify whether the image is a real image. The real image means that the information displayed by the image is consistent with the actual shooting scene of the house source. In the related art, the anti-counterfeiting processing performed on the image is easy to crack, so that the image is easy to forge, and further, whether the image is real or not is difficult to accurately identify.
At least one embodiment of the present disclosure provides a method, an apparatus, an electronic device, and a computer-readable storage medium for processing image data. The image data processing method comprises the following steps: acquiring a ciphertext, wherein the ciphertext comprises watermark information used for initial image data; analyzing the ciphertext to obtain watermark information; generating image data to be verified based on the watermark information and the initial image data; and sending the image data to be verified to extract the watermark information from the image data to be verified, and verifying the authenticity of the initial image data according to the watermark information and the ciphertext.
According to the image data processing method, the original image data can be subjected to anti-counterfeiting processing through the watermark information obtained by decrypting the ciphertext to obtain the image data to be verified, so that the difficulty of cracking the anti-counterfeiting processing on the image or the video is improved, the image or the video can be effectively prevented from being forged, and the accuracy of verifying the authenticity of the image to be verified is improved.
Fig. 1 illustrates a system architecture 100 applied to an image processing method according to at least one embodiment of the present disclosure.
As shown in fig. 1, the system architecture 100 may include a terminal device 101, a server 102, and a communication network 103.
A user may use terminal device 101 to interact with server 102 over communication network 103 to receive or send messages. The communication network 103 is a medium used to provide a communication link between the terminal apparatus 101 and the server 102. The communication network 103 may include various connection types, such as wired or wireless communication links, specifically, such as WIFI, 3G, 4G, 5G, and fiber optic cables, among others.
The terminal device 101 may be various electronic devices with a display screen, including but not limited to a smartphone, a tablet computer, a notebook computer, and the like, the product type of the terminal device 101 is not limited in the embodiments of the present disclosure, and for example, the terminal device may be based on various available operating systems, such as Windows, android, IOS, and the like. Various application programs (APP) such as shopping applications, web browser applications, instant messenger applications, etc. may be installed in the terminal device 101, or applets, quick applications, etc. may be downloaded and run through an application platform (e.g., wechat, pay, etc.). For example, the house source application related to the embodiment of the present disclosure may be implemented as an independent APP, an applet, a fast application, or the like, and may also be implemented as a plug-in running through a browser, and the embodiment of the present disclosure is not limited to this.
The server 102 may be a server that provides various services, such as a backend server that provides support for websites, applets, or applications that are browsed by the user using the terminal device 101. The server 102 may, for example, analyze and/or otherwise process data such as the received request, and feed back a processing result (e.g., a web page, information, or data obtained or generated in accordance with the request) to the terminal apparatus 101. The server 102 may be an independent physical server, a server cluster or a distributed system configured by a plurality of physical servers, a cloud server, or the like.
An implementation of an image processing method provided by at least one embodiment of the present disclosure is explained below with reference to fig. 2 to 6, 7A to 7B, 8, 9A, and 9B. For example, the processing method of image data shown in fig. 2 to 5 hereinafter may be performed by, for example, an application installed in the terminal device 101 in the system architecture 100 described in fig. 1, and the processing method of image data shown in fig. 6, 7A, 7B, and 8 may be performed by, for example, the server 102 in the system architecture 100 described in fig. 1.
Fig. 2 illustrates a flowchart of a method for processing image data according to at least one embodiment of the present disclosure.
As shown in fig. 2, the image data processing method includes steps S201 to S204.
Step S201: and acquiring a ciphertext, wherein the ciphertext comprises watermark information for the initial image data.
Step S202: and analyzing the ciphertext to obtain watermark information.
Step S203: and generating image data to be verified based on the watermark information and the initial image data.
Step S204: and sending image data to be verified to extract watermark information from the image to be verified, and verifying the authenticity of the initial image according to the watermark information and the ciphertext.
According to the image data processing method, the watermark information can be obtained only by decrypting the ciphertext, the risk that the watermark information used for performing anti-counterfeiting processing on the image or the video is leaked is reduced, the difficulty of cracking the anti-counterfeiting processing is improved, the image or the video can be effectively prevented from being forged, and the accuracy of verifying the authenticity of the image to be verified can be improved. In this embodiment, the plaintext may be obtained by decrypting the ciphertext, but the watermark information corresponding to the plaintext may be, for example, built in an application program to which the processing method of the image data is applied. For example, decrypting the ciphertext results in plaintext 246854, which plaintext 246854 can be parsed by the application into watermark information for application to the initial image data. Therefore, in this embodiment, even if the ciphertext is decrypted to obtain a plaintext (e.g., 246854) corresponding to the ciphertext, the decryptor does not know the meanings represented by the plaintext 2, 4, 6, 8, 5, and 4, that is, the decryptor cannot determine the watermark information for the initial image data according to the plaintext 246854, and therefore, the decryptor cannot decrypt the anti-counterfeit processing performed on the image or the video, so that the embodiment can improve the difficulty in decrypting the anti-counterfeit processing.
For step S201, the initial image data may be picture data of one or more initial pictures, or video data of one or more pieces of initial video.
For step S201, for example, the ciphertext may be obtained by performing an encryption process on the watermark information. For example, the remote device or the cloud encrypts the watermark information by using an encryption algorithm to obtain a ciphertext of the watermark information.
For example, the watermark information is used to perform anti-counterfeiting processing on the original image data.
For example, the watermark information includes watermark text and watermark parameters, and the watermark generated according to the watermark text and the watermark parameters can be used for anti-counterfeiting processing of the image or video. For example, a watermark is added to an image or video to perform anti-counterfeiting processing on the image or video.
For example, the initial image data is image data of a plurality of initial images, and the watermark parameter may indicate an ordering of a target initial image in which the watermark text is located in the plurality of initial images or a physical location of the watermark text in the target initial image. For example, the physical location may be represented by coordinate information in a certain predetermined coordinate system, but the physical location in the present disclosure is not limited to being represented by the coordinate information. Further description is given below with respect to the watermark parameters, and will not be described in detail here.
In some embodiments of the present disclosure, obtaining the ciphertext comprises obtaining the ciphertext online. For example, a server is accessed via a network to obtain the ciphertext from the server. For example, in the system architecture shown in fig. 1, the terminal device 101 may transmit an acquisition request for acquiring a ciphertext to the server 102 through the network 103, and after the server 102 generates a ciphertext in response to the acquisition request, the terminal device 101 remotely acquires the ciphertext from the server 102.
In some embodiments of the present disclosure, for example, the acquisition of the initial image data is allowed after confirming the acquisition of the ciphertext, so that the image data to be verified is generated based on the watermark information and the initial image data. For example, the video or picture shot earlier cannot truly reflect the scene of the current actual shooting scene, and therefore, if the original image data obtained earlier is allowed to be processed by using the watermark information of the ciphertext to obtain the image to be verified, the video or picture shot earlier can be used to masquerade as the scene of the current actual shooting scene, and the image to be verified is a false image which cannot truly reflect the scene of the current actual shooting scene. Therefore, after confirming that the ciphertext is obtained, the initial image data is allowed to be obtained, for example, a camera is started to shoot an initial image so as to obtain the initial image data, so that the possibility that the scene of the current actual shooting scene is faked by using the video or the picture shot earlier can be reduced, and the authenticity of the image data to be verified is ensured.
In other embodiments of the present disclosure, for example, the ciphertext and the initial image data are obtained simultaneously, i.e., obtaining the ciphertext and taking the initial image are performed simultaneously. The cryptograph and the shooting initial image are carried out simultaneously, so that the real-time performance and the timeliness of the obtained cryptograph can be guaranteed, and the situation that the initial image data obtained long before serves as the scene of the current actual shooting scene can be at least partially avoided, so that the authenticity of the image data to be verified is guaranteed. For example, in response to a shooting instruction, jumping to a collection page of initial image data, sending a request for obtaining a ciphertext to a server, and after the server generates the ciphertext in response to the request for obtaining the ciphertext, remotely obtaining the ciphertext from the server, wherein the ciphertext is used for verifying the authenticity of image data to be verified.
For step S202, for example, an algorithm for encrypting watermark information and an algorithm for decrypting ciphertext correspond to each other. For example, if the watermark information is encrypted by using an asymmetric encryption algorithm, the ciphertext needs to be decrypted by using a private key corresponding to a public key in step S202, where the public key is a key used when the watermark information is encrypted by using the asymmetric encryption algorithm. For example, the ciphertext may be obtained by encrypting the watermark information by using a symmetric encryption algorithm, and the ciphertext needs to be decrypted by using a key used for encryption and an algorithm that is an inverse of the symmetric encryption algorithm.
It should be noted that the encryption and decryption algorithm is not limited to the asymmetric encryption and decryption algorithm and the symmetric encryption and decryption algorithm, and may be other encryption and decryption algorithms known to those skilled in the art. The embodiments of the present disclosure do not limit the method for encrypting and decrypting the ciphertext.
For example, watermark information obtained by analyzing the ciphertext is "ABC123" or "246854".
For step S203, for example, the initial image data is changed according to the watermark information to obtain the image data to be verified.
For example, the watermark information contains watermark text, i.e., the content of the watermark. The watermark text can be any type of characters such as numbers, punctuation marks, letters, chinese characters, etc., or a combination of different types of characters such as numbers, punctuation marks, letters, chinese characters, japanese, korean, etc. For example, the watermark text is the characters "246", "123ABC", etc. In step S203, the watermark text is added to the initial image data, and image data to be verified is generated.
In some embodiments of the present disclosure, the watermark text may be added to the initial image data in a hidden manner, generating the image data to be verified. That is, the watermark text is hidden in the image to be verified as a watermark, so that the watermark cannot be seen from the image to be verified by human eyes.
In other embodiments of the present disclosure, if the initial image data is video data, the watermark text may be added to one or more frames of the initial image data in a plaintext manner, so as to generate image data to be verified. That is, the watermark text is added as plaintext to the image to be verified, so that the human eye can see the watermark from the image to be verified. However, since the video is played at a frame rate of, for example, 30 frames/second, 60 frames/second, or 90 frames/second, the user may not actually notice in view even if a visually visible watermark is included in one or more of the frames.
In another embodiment of the present disclosure, the watermark information may include watermark parameters in addition to the watermark text. The watermark parameter indicates location information of the watermark text in the original image data. Step S203 may be to add the watermark text to the initial image data according to the position information indicated by the watermark parameter, so as to generate image data to be verified.
For example, according to the ordering of the target initial image in which the watermark text is located in the plurality of initial images indicated by the watermark parameter, the watermark text is added to the target initial image, so as to obtain the image data to be verified. For another example, according to the physical position of the watermark text indicated by the watermark parameter in the target initial image, the watermark is added to the corresponding position in the target initial image, so as to obtain the image data to be verified.
In other embodiments of the present disclosure, the watermark information may include not only the watermark text and the watermark parameters, but also other information such as the number of valid text in the watermark text. That is, some of the watermark texts in the watermark information are valid and some are invalid, the valid watermark texts can be added to the original image data, and the invalid watermark texts are not added to the original image data as a kind of interference information. The information contained in the watermark information is not limited in the present disclosure, and those skilled in the art can set the watermark information as needed.
For step S204, for example, the image data to be verified is sent to the remote verification device, where the image data to be verified includes the watermark information, and the verification device may extract the watermark information from the image data to be verified, and parse the ciphertext to obtain the watermark information included in the ciphertext, so as to verify the authenticity of the initial image by comparing the watermark information extracted from the image data to be verified and the watermark information included in the ciphertext.
Fig. 3 illustrates a flowchart of a method of step S203 in fig. 2 according to at least one embodiment of the present disclosure.
As shown in fig. 3, the method may include steps S301 to S302.
Step S301: intermediate image data is generated based on the watermark information and the initial image data.
For example, the intermediate image data is data corresponding to the image to be verified, which is used for generating the image to be verified shown in the terminal device, in the image data to be verified.
For example, the intermediate image data is generated by changing the initial image data based on the watermark information. For example, the intermediate image data may be obtained by adding watermark text to the original image data according to the watermark parameters.
Step S302: and adding the ciphertext to the image file in which the intermediate image data is located to obtain image data to be verified, so as to obtain the ciphertext from the image data to be verified, obtain watermark verification information according to the ciphertext, and verify the authenticity of the initial image data based on the watermark verification information and the watermark information in the image data to be verified.
In this embodiment, the image data to be verified not only includes intermediate image data corresponding to the image to be verified for generating presentation on the terminal device, but also includes the ciphertext itself. For example, the ciphertext is the same as the ciphertext of step S201.
In some embodiments of the present disclosure, the image data to be verified is obtained by adding the ciphertext to the file header of the image file in which the intermediate image data is located, that is, the header content of the file header includes the ciphertext. In this embodiment, for example, the authentication apparatus reads a file header of an image file to acquire a ciphertext, and parses the ciphertext to obtain watermark authentication information for authenticating image data to be authenticated.
In other embodiments of the present disclosure, the ciphertext may also be added to any location of the image file in which the intermediate image data is located. For example, the ciphertext may be added to a file trailer of the image file, or the like.
According to the image data processing method, the ciphertext can be added to the file head of the image file instead of directly adding the watermark information to the file head, so that even if the ciphertext is cracked to obtain the plaintext (e.g. 246854) corresponding to the ciphertext, a cracker cannot know the meanings represented by the plaintexts 2, 4, 6, 8, 5 and 4, namely the cracker cannot determine the watermark information for the initial image data according to the plaintext 246854, and therefore the cracker cannot crack the anti-counterfeiting processing performed on the image or the video, and therefore the difficulty of cracking the anti-counterfeiting processing can be improved.
Fig. 4 illustrates another method flowchart of step S203 in fig. 2 according to at least one embodiment of the present disclosure.
As shown in fig. 4, the method may include steps S401 to S402.
Step S401: identification information of the initial image data is acquired.
For example, the identification information is an initial image data number for uniquely identifying the initial image data.
For example, identification information of the initial image data is acquired from the server. For example, in response to an acquisition request for acquiring watermark information, the server may generate identification information of the initial image data in addition to the watermark information and the ciphertext of the watermark information, and send the identification information to the terminal device, so that the image data to be verified generated by the terminal device includes the identification information.
Step S402: and generating image data to be verified based on the watermark information, the initial image data and the identification information so as to acquire watermark verification information corresponding to the ciphertext according to the identification information in the image data to be verified, and verifying the authenticity of the initial image data based on the watermark verification information and the watermark information in the image data to be verified.
For example, the original image data is changed in accordance with the watermark information, and the identification information is added to the changed original image data to obtain the image data to be verified. For example, the identification information is added to the changed file of the initial image data to obtain the image data to be verified. Or adding the identification information to the initial image data, and changing the initial image data containing the identification information according to the watermark information to obtain the image data to be verified.
For example, after the server generates the ciphertext and the identification information of the initial image data in response to the acquisition request, the ciphertext and the identification information are stored in a one-to-one correspondence manner. For example, the server stores therein an identification information-ciphertext relationship table between the identification information and the ciphertext. Under the condition that the server receives image data to be verified from the terminal device, the server obtains identification information in the image data to be verified from the image data to be verified (for example, a file of the image data to be verified is analyzed to obtain the identification information), and searches an identification information-ciphertext relation table according to the identification information to obtain a ciphertext corresponding to the identification information, so that the server can analyze the ciphertext to obtain watermark verification information.
For another example, the server may store the watermark information and the identification information in a one-to-one correspondence. For example, the server stores therein an identification information-watermark information relationship table between the identification information and the watermark information. Under the condition that the server receives image data to be verified from the terminal equipment, the server acquires identification information in the image data to be verified from the image data to be verified, and searches an identification information-watermark information relation table according to the identification information to obtain watermark verification information corresponding to the identification information.
For example, if the watermark information in the image data to be verified is consistent with the watermark verification information, or the similarity between the watermark information in the image data to be verified and the watermark verification information is greater than a preset value, the image data to be verified is real.
The image data processing method of the embodiment can locally store the ciphertext or the watermark verification information in the server, and the ciphertext does not need to be stored in the file head of the image file, so that the safety is improved.
In some embodiments of the present disclosure, the initial image data is initial video data, the initial video data includes a plurality of initial image frames, and the image data to be verified includes video data to be verified. In this case, the watermark parameter indicates that watermark text is added in at least one first target image frame of the plurality of initial image frames.
Fig. 5 shows a flowchart of a method for generating image data to be verified by adding a watermark text to initial image data according to location information indicated by a watermark parameter according to at least one embodiment of the present disclosure.
As shown in fig. 5, the method may include steps S501 to S502.
Step S501: at least one target image frame is determined from the plurality of initial image frames based on the position information indicated by the watermark parameters.
For example, the position information indicated by the watermark parameter is a frame number of the target image frame, and the target image frame is determined from the plurality of initial image frames according to the frame number.
Step S502: and adding the watermark text into at least one target image frame to generate video data to be verified.
For step S501, for example, the initial image data includes 1000 initial image frames arranged in series, and the position information indicated by the watermark parameter is 103, 205, 407, then the initial image frame arranged at the 103 th frame, the 205 th frame and the 407 th frame of the 1000 initial image frames is taken as the target image frame.
In at least some embodiments of the present disclosure, the watermark parameter includes at least one operation number, the at least one operation number corresponds to at least one target image frame, respectively, and step S501 in fig. 5 includes performing a mathematical operation on the at least one operation number and the number of the plurality of initial image frames to obtain at least one frame ordinal number, and obtaining at least one target image frame in the plurality of initial image frames according to the at least one frame ordinal number.
For example, the operation number is X, the number of initial image frames is N, and N is a positive integer greater than or equal to 2. And performing mathematical operation on the at least one operation number and the number of the plurality of initial image frames, for example, calculating a remainder of X/N or a remainder of N/X, wherein the remainder is a frame number of the target image frame in the plurality of initial image frames.
For example, the initial image data includes 1000 initial image frames arranged in series, and the operation numbers are 251, 300, and 11. The remainder is 247, 100 and 10 by taking the remainder operation N/X. The initial image frame ranked at the 247 th frame, the 100 th frame and the 10 th frame among the 1000 initial image frames is taken as the target image frame.
For step S502, for example, watermark text is added to at least one target image frame according to the number of frames to generate video data to be verified.
In some embodiments of the present disclosure, the at least one operation number includes at least 2 groups of operation numbers, the watermark text includes at least 2 groups of sub-watermark texts respectively corresponding to the at least 2 groups of operation numbers, and the at least 2 groups of sub-watermark texts include at least two texts different from each other.
For example, the at least 2 sets of operating numbers include a first set of operating numbers and a second set of operating numbers. The first set of operating numbers is for example 3 and 7 and the second set of operating numbers is for example 4 and 8. The sub-watermark text corresponding to the first group of operation numbers is 'AB', and the sub-watermark text corresponding to the second group of operation numbers is 'AB'. Performing the above mathematical operation (e.g., N/X) with a first set of operation numbers 3, 7 and N (e.g., 20) results in the frame order numbers (i.e., 2 and 6) of the target image frames. Next, watermark text "ab" is added to these target image frames (i.e., the 2 nd and 6 th frames in the initial image frame). Similarly, the above mathematical operation N/X is performed using the second set of operation numbers 4, 8 and N to obtain the frame number of the target image frames, and the watermark text "AB" is added to these target image frames.
In some embodiments of the present disclosure, different sets of watermark text may have different text types, e.g., one set is english watermark text and another set is chinese watermark text ("ABC" and "fueling"). As another example, one group is upper case english watermark text, and the other group is lower case english watermark text ("AB" and "AB"). Or different groups of watermark texts have the same text type but different text contents. For example, both sets of watermark text are upper case english watermark text ("AB" and "CDF").
In the embodiment, different groups of operation numbers correspond to different texts, so that the cracking difficulty is further improved.
In other embodiments of the present disclosure, each operational number may correspond to the same watermark text, such that the same watermark is added to each target image frame.
According to the method, part of initial image frames are selected from a plurality of initial image frames to serve as at least one target image frame, therefore, watermarks are only added in a plurality of initial image frames instead of being added in each initial image frame, the difficulty of cracking anti-counterfeiting processing and counterfeiting image data to be verified is further improved, and the accuracy of verifying the image data to be verified is further improved.
It will be appreciated that in the above, the remote verification device and the remote electronic device that generated the watermark information may be the same device. Alternatively, the remote verification device may be a device capable of communicating with the remote electronic device generating the watermark information, so as to obtain corresponding information for verifying the image data to be verified from the remote electronic device generating the watermark information.
Fig. 6 shows a flowchart of another image data processing method provided by at least one embodiment of the present disclosure.
As shown in fig. 6, the method may include steps S601 to S603.
Step S601: and acquiring image data to be verified, and extracting watermark information from the image data to be verified.
Step S602: and acquiring a ciphertext based on the image data to be verified.
Step S603: and verifying the authenticity of the image data to be verified according to the watermark information and the ciphertext.
According to the image data processing method, the watermark information in the image data to be verified is verified by using the ciphertext, the difficulty of cracking the anti-counterfeiting processing can be improved, the image or the video can be effectively prevented from being forged, and the accuracy of verifying the authenticity of the image to be verified can be improved.
As for step S601, for example, in the system architecture shown in fig. 1, steps S601 to S603 may be performed by the server 102.
For example, in the system architecture shown in fig. 1, the terminal apparatus 101 transmits image data to be authenticated to the server 102, and the server 102 executes step S601 to receive the image data to be authenticated from the terminal apparatus 101.
In some embodiments of the present disclosure, for example, the image data to be verified may be parsed to obtain watermark information in the image data to be verified. For example, the watermark information may include watermark text and watermark parameters.
With respect to step S602, in some embodiments of the present disclosure, obtaining the ciphertext based on the image data to be verified includes: and acquiring a ciphertext from the image file in which the image data to be verified is located. The ciphertext is obtained, for example, from a file header of the image file.
Fig. 7A illustrates a flowchart of a method of step S602 in fig. 6 according to at least one embodiment of the present disclosure.
As shown in fig. 7A, the method may include steps S611 to S612.
S611: and acquiring identification information of the initial image data based on the image data to be verified.
S612: and acquiring the ciphertext based on the identification information and a preset corresponding relation, wherein the preset corresponding relation records the corresponding relation between the identification information and the ciphertext or the corresponding relation between the identification information and the storage address of the ciphertext.
As for step S611, for example, the image data to be verified is generated according to step S401 and step S402 described above in fig. 4, so that the identification information of the initial image data can be acquired from the image data to be verified.
For step S612, for example, the storage address of the ciphertext is acquired. If the storage address of the ciphertext is acquired, the ciphertext needs to be acquired from the storage address. For example, the preset corresponding relationship may be the identification information-ciphertext relationship table in step S402, and the ciphertext corresponding to the identification information is obtained by querying the identification information-ciphertext relationship table. For another example, the preset correspondence may be an identification information-ciphertext storage address correspondence table, so as to query the identification information-ciphertext storage address correspondence table to obtain a storage address of the ciphertext, and thus obtain the ciphertext from the storage address.
Fig. 7B illustrates a flowchart of a method of step S603 in fig. 6 according to at least one embodiment of the present disclosure.
As shown in fig. 7B, the method may include steps S621 to S622.
Step S621: and acquiring watermark verification information corresponding to the ciphertext.
Step S622: and comparing the watermark verification information with the watermark information to verify the authenticity of the image data to be verified.
In some embodiments of the present disclosure, the ciphertext may be decrypted to obtain the watermark verification information, or the watermark verification information corresponding to the ciphertext may also be obtained according to the ciphertext and a mapping relationship, where the mapping relationship is a mapping relationship between the ciphertext and the watermark verification information.
For example, the mapping relationship is constructed as a mapping relationship table, which is a mapping relationship table between watermark verification information and ciphertext, so that the verification device queries the watermark verification information corresponding to the ciphertext according to the mapping relationship table.
In some embodiments of the present disclosure, the watermark verification information includes watermark verification text, and the watermark information includes watermark text. For example, the watermark text is compared with the watermark verification text to verify the authenticity of the image data to be verified. And if the watermark text is the same as the watermark verification text, the initial image data is real. If the watermark text is not consistent with the watermark verification text, the initial image data is false.
As another example, the degree of conformity of the watermark text and the watermark verification text is compared. And if the consistency degree of the watermark text and the watermark verification text is greater than or equal to the preset value, the initial image data is real. And if the consistency degree of the watermark text and the watermark verification text is less than the preset value, the initial image data is false.
Besides the watermark verification text, the watermark verification information may also include watermark verification parameters. The watermark verification parameters indicate the position information of the watermark text in the image data to be verified, so that the watermark text is extracted from the image data to be verified according to the watermark verification parameters. The method not only verifies the watermark text, but also verifies the image data to be verified according to the watermark verification parameters, thereby improving the verification accuracy. In addition, the watermark verification parameters indicate which image data to be verified have watermark texts, so that the verification efficiency is improved, and the verification time is saved.
In some embodiments of the present disclosure, the image data to be verified includes video data to be verified, the video data to be verified includes a plurality of image frames to be verified, the watermark verification parameter indicates to extract a watermark text in at least one first target image frame of the plurality of initial image frames, and the watermark text is extracted from the image data to be verified according to the position information indicated by the watermark verification parameter. The method not only verifies the watermark text in the video data to be verified, but also verifies the video data to be verified according to the watermark verification parameters, thereby improving the verification accuracy. In addition, the watermark verification parameters indicate which video data to be verified have watermark texts, so that the verification efficiency is improved, and the verification time is saved.
Fig. 8 is a flowchart illustrating a method for extracting a watermark text from image data to be verified according to location information indicated by a watermark verification parameter according to at least one embodiment of the present disclosure.
As shown in fig. 8, the method may include steps S701 to S702.
Step S701: and determining at least one target image frame from the plurality of image frames to be verified according to the position information indicated by the watermark verification parameters.
Step S702: watermark text is extracted from at least one target image frame.
For step S701, for example, the watermark verification parameter indicates on which image frame of the image to be verified the watermark is, so as to determine the frame sequence number of at least one target image frame containing the watermark according to the watermark verification parameter, and find out at least one target image frame corresponding to the frame sequence number according to the frame sequence number. In some embodiments of the present disclosure, the watermark verification parameters include at least one verification number, the at least one verification number corresponds to at least one target image frame, respectively, and determining at least one target image frame from the plurality of image frames to be verified according to the position information indicated by the watermark verification parameters includes: and performing mathematical operation on the at least one verification number and the number of the plurality of image frames to be verified to obtain at least one frame number, and obtaining at least one target image frame in the plurality of image frames to be verified according to the at least one frame number.
For example, the verification number is X, the number of image frames to be verified is N, and N is a positive integer greater than or equal to 2. And performing mathematical operation on at least one verification number and the number of the plurality of image frames to be verified to calculate a remainder of X/N or a remainder of N/X, wherein the remainder is at least one frame number of the target image frame in the plurality of image frames to be verified, and thus at least one target image frame is obtained in the plurality of image frames to be verified according to the at least one frame number.
For example, the image data to be verified includes 1000 image frames to be verified arranged in series, and the verification numbers are 251, 300, and 11. The remainder is 247, 100 and 10 through remainder operation N/X. Then the image frame to be verified, which is ranked at the 247 th frame, the 100 th frame and the 10 th frame among the 1000 image frames to be verified, is taken as the target image frame.
Fig. 9A illustrates a flowchart for generating image data to be verified according to at least one embodiment of the present disclosure.
In this embodiment, an implementation of generating image data to be verified is described by taking initial image data as initial video data and image data to be verified as a video to be verified as an example.
As shown in fig. 9A, the server 800 issues a ciphertext 801 in response to a ciphertext acquisition request from a terminal device, the ciphertext 801 including watermark information to be applied to initial video data. The terminal device sends a ciphertext acquisition request to the server 800 in response to the camera shooting start instruction, and jumps to a shooting interface. The terminal equipment receives the ciphertext 801, and then decrypts the ciphertext 801 by using a decryption algorithm to obtain watermark texts, namely watermark text waterMarkTxt1, watermark text waterMarkTxt2, watermark text waterMarkTxt3, watermark parameter number1, number2 and number3, wherein the watermark text waterMarkTxt1 corresponds to the watermark parameter number1, the watermark text waterMarkTxt2 corresponds to the watermark parameter number2, and the watermark text waterMarkTxt3 corresponds to the watermark parameter number3. The watermark parameter indicates to which target image frame of the original video data the watermark text is added. For example, there is an original video, which includes n initial image frames, and the watermark parameters number1, number2, and number3 are respectively used to take remainders for the total frame number n, the obtained 3 remainders are the frame sequence number of the target image frame in the initial image frame, and 3 target image frames are extracted according to the frame sequence number. Watermark texts waterMarkTxt1, waterMarkTxt2 and waterMarkTxt3 are respectively added to target image frames indicated by watermark parameters number1, number2 and number3, namely watermarks such as dark watermarks are added to the 3 target image frames to obtain video data 802 to be verified, and a ciphertext 801 is added to the head of an image file where the video data 802 to be verified is located, namely the head file of fig. 9A.
Fig. 9B illustrates a flowchart of a method for verifying authenticity of image data to be verified according to at least one embodiment of the disclosure.
As shown in fig. 9B, the server receives the video data to be authenticated 900 from the terminal device. Ciphertext 903 is extracted from the header of the image file where the video data 900 to be verified is located, that is, the header file in fig. 9B, and the ciphertext 903 is decrypted to obtain watermark verification information 902. The watermark verification information 902 includes watermark verification text (waterMarkTxt 1, waterMarkTxt2, waterMarkTxt 3) and watermark verification parameters (number 1, number2, number 3). For example, the video data to be verified has a total number of frames n. The watermark parameters number1, number2 and number3 respectively take the residue of n to obtain 3 residues (number 1% n, number2% n and number3% n), and the residues indicate the 3 frame ordinal numbers of the target image frame in the plurality of image frames to be verified. The server extracts 3 target image frames 901 from the video data 900 to be verified according to the 3 frame ordinals, and then extracts watermark texts txt1, txt2 and txt3 from the target image frames 901. The watermark text extracted from the target image frame 901 is then compared with the watermark verification text to verify the authenticity of the video data to be verified. If the watermark texts txt1, txt2, txt3 and the watermark verification texts (watermark text 1, watermark text 2, watermark text 3) are the same, the video data to be verified received by the server is the video data which is shot in real time by the terminal equipment 101 and is not tampered or not forged, the verification is passed, and if the watermark texts txt1, txt2, txt3 and the watermark verification texts (watermark text 1, watermark text 2, watermark text 3) are inconsistent, the video data to be verified received by the server is tampered or forged, and the verification is not passed.
Fig. 10A illustrates a schematic block diagram of an apparatus 1000 for processing image data according to at least one embodiment of the present disclosure.
As shown in fig. 10A, the image data processing apparatus 1000 includes an information acquisition unit 1010, an analysis unit 1020, an image data generation unit 1030, and an image data transmission unit 1040.
The information acquisition unit 1010 is configured to acquire a ciphertext including watermark information for the initial image data.
The information acquisition unit 1010 may perform, for example, step S201 described in fig. 2.
The parsing unit 1020 is configured to parse the ciphertext to obtain watermark information.
The parsing unit 1020 may, for example, perform step S202 described in fig. 2.
The image data generation unit 1030 is configured to generate image data to be verified based on the watermark information and the initial image data.
The image data generation unit 1030 may perform step S203 described in fig. 2, for example.
The image data sending unit 1040 is configured to send image data to be verified, so as to extract watermark information from the image data to be verified, and verify authenticity of the original image data according to the watermark information.
The image data transmitting unit 1040 may perform step S204 described in fig. 2, for example.
For example, in an image data processing apparatus provided in at least one embodiment of the present disclosure, an image data generating unit includes: an intermediate image data generation subunit configured to generate intermediate image data based on the watermark information and the initial image data; and a first image data generation subunit configured to add the ciphertext to an image file in which the intermediate image data is located to obtain the image data to be verified, so as to obtain the ciphertext from the image data to be verified and obtain watermark verification information according to the ciphertext, and verify the authenticity of the initial image data based on the watermark verification information and the watermark information in the image data to be verified.
For example, in the image data processing apparatus provided by at least one embodiment of the present disclosure, the first image data generating subunit includes a ciphertext adding subunit, and is configured to add the ciphertext to a file header of an image file in which the intermediate image data is located to obtain the image data to be verified.
For example, in an image data processing apparatus provided in at least one embodiment of the present disclosure, an image data generating unit includes: an identification acquisition subunit configured to acquire identification information of the initial image data; and the second image data generation subunit is configured to generate the image data to be verified based on the watermark information, the initial image data and the identification information, so as to obtain watermark verification information corresponding to the ciphertext according to the identification information in the image data to be verified, and verify the authenticity of the initial image data based on the watermark verification information and the watermark information in the image data to be verified.
For example, in a processing apparatus for image data provided in at least one embodiment of the present disclosure, watermark information includes a watermark text, and the image data generating unit includes: a text adding subunit configured to add the watermark text to the initial image data to generate the image data to be verified.
For example, in a processing apparatus for image data provided in at least one embodiment of the present disclosure, the watermark information further includes a watermark parameter, where the watermark parameter indicates position information of the watermark text in the initial image data, and the text adding subunit includes: and the first adding subunit is configured to add the watermark text to the initial image data according to the position information indicated by the watermark parameter, so as to generate the image data to be verified.
For example, in an apparatus for processing image data provided by at least one embodiment of the present disclosure, an initial image data is an initial video data, the initial video data includes a plurality of initial image frames, the image data to be verified includes video data to be verified, and the watermark parameter indicates position information of the watermark text in the initial image data, including: the watermark parameter indicating addition of the watermark text in at least one first target image frame of the plurality of initial image frames, the first addition subunit including: an image frame determination subunit configured to determine the at least one target image frame from the plurality of initial image frames based on the position information indicated by the watermark parameter; and the adding and generating subunit is configured to add the watermark text into the at least one target image frame and generate the video data to be verified.
For example, in an apparatus for processing image data provided in at least one embodiment of the present disclosure, the watermark parameter includes at least one operation number, where the at least one operation number corresponds to the at least one target image frame, and the image frame determining subunit includes an operation subunit configured to perform a mathematical operation on the at least one operation number and the number of the plurality of initial image frames to obtain at least one frame number, and obtain the at least one target image frame in the plurality of initial image frames according to the at least one frame number.
For example, in an apparatus for processing image data provided by at least one embodiment of the present disclosure, the number of the plurality of initial image frames is N, and the operation subunit includes a first operation subunit or a second operation subunit. The first operation subunit is configured to perform a remainder operation on N by using the at least one operation number, respectively, so as to obtain at least one remainder as the at least one frame number. And the second operation subunit is configured to perform a remainder operation on the at least one operation number by using N, and using the obtained at least one remainder as the at least one frame ordinal number. N is a positive integer greater than or equal to 2.
For example, in an image data processing apparatus provided in at least one embodiment of the present disclosure, the at least one operation number includes at least 2 groups of operation numbers, the watermark text includes at least 2 groups of sub-watermark texts, which respectively correspond to the at least 2 operation numbers, and the at least 2 groups of sub-watermark texts include at least two texts different from each other.
For example, in the image data processing apparatus provided in at least one embodiment of the present disclosure, acquiring a ciphertext includes acquiring the ciphertext online, and allowing to acquire the initial image data only after confirming that the ciphertext is acquired, so as to generate image data to be verified based on the watermark information and the initial image data.
For example, the information acquisition unit 1010, the parsing unit 1020, the image data generation unit 1030, and the image data transmission unit 1040 may be implemented as hardware, software, firmware, and any feasible combination thereof. For example, the information acquiring unit 1010, the analyzing unit 1020, the image data generating unit 1030, and the image data transmitting unit 1040 may be dedicated or general circuits, chips, devices, or the like, or may be a combination of a processor and a memory. The embodiments of the present disclosure are not limited in this regard to the specific implementation forms of the above units.
It should be noted that, in the embodiment of the present disclosure, each unit of the image data processing apparatus 1000 corresponds to each step of the foregoing image data processing method, and specific functions of the image data processing apparatus 1000 may refer to the description related to the image data processing method, which is not described herein again. The components and configuration of the image data processing apparatus 1000 shown in fig. 10A are merely exemplary and not restrictive, and the image data processing apparatus 1000 may further include other components and configurations as necessary.
Fig. 10B illustrates a schematic block diagram of another image data processing apparatus 1100 provided in at least one embodiment of the present disclosure.
For example, as shown in fig. 10B, the image data processing apparatus 1100 includes an image acquisition unit 1110, a ciphertext acquisition unit 1120, and a verification unit 1130.
The image acquisition unit 1110 is configured to acquire image data to be verified and extract watermark information from the image data to be verified.
The image acquisition unit 1110 may execute, for example, step S601 described in fig. 6.
The ciphertext obtaining unit 1120 is configured to obtain a ciphertext based on the image data to be verified.
The ciphertext acquisition unit 1120 may perform, for example, step S602 described in fig. 6.
The verification unit 1130 is configured to verify the authenticity of the image data to be verified according to the watermark information and the ciphertext.
The verification unit 1130 may perform, for example, step S603 described in fig. 6.
For example, in the processing apparatus for image data provided in at least one embodiment of the present disclosure, the ciphertext obtaining unit includes a first obtaining subunit configured to obtain a ciphertext from an image file in which the book data to be verified is located.
For example, in a processing apparatus for image data provided in at least one embodiment of the present disclosure, a ciphertext obtaining unit includes an information obtaining subunit, configured to obtain, based on the image data to be verified, identification information of the initial image data; and a second obtaining subunit configured to obtain the ciphertext based on the identification information and a preset correspondence, where the preset correspondence records a correspondence between the identification information and the ciphertext or a correspondence between the identification information and a storage address of the ciphertext.
For example, in a processing apparatus for image data provided in at least one embodiment of the present disclosure, a verification unit includes a watermark verification information obtaining subunit configured to obtain watermark verification information corresponding to the ciphertext; and the comparison subunit is configured to compare the watermark verification information with the watermark information so as to verify the authenticity of the image data to be verified.
For example, in a processing apparatus for image data provided in at least one embodiment of the present disclosure, a watermark verification information obtaining subunit includes a first watermark verification information obtaining subunit configured to decrypt the ciphertext to obtain the watermark verification information; or the second watermark verification information obtaining subunit is configured to obtain, based on the ciphertext and a mapping relationship, watermark verification information corresponding to the ciphertext, where the mapping relationship is a mapping relationship between the ciphertext and the watermark verification information.
For example, in an apparatus for processing image data provided by at least one embodiment of the present disclosure, the watermark verification information includes a watermark verification text, and the comparison subunit includes a text comparison subunit configured to compare the watermark text with the watermark verification text to verify the authenticity of the image data to be verified.
For example, in an apparatus for processing image data provided in at least one embodiment of the present disclosure, watermark verification information further includes a watermark verification parameter, where the watermark verification parameter indicates location information of the watermark text in image data to be verified, and an image obtaining unit includes an extracting subunit configured to extract the watermark text from the image data to be verified according to the location information indicated by the watermark verification parameter.
For example, in an image data processing apparatus provided in at least one embodiment of the present disclosure, an image data to be verified includes a video data to be verified, the video data to be verified includes a plurality of image frames to be verified, and a watermark verification parameter indicates position information of a watermark text in the image data to be verified, including: the watermark verification parameter indicates that the watermark text is extracted in at least one first target image frame of the plurality of initial image frames, the extraction sub-unit comprises a determination sub-unit configured to determine the at least one target image frame from the plurality of image frames to be verified according to the position information indicated by the watermark verification parameter, and a text extraction sub-unit configured to extract the watermark text from the at least one target image frame.
For example, in the apparatus for processing image data provided in at least one embodiment of the present disclosure, the watermark verification parameters include at least one verification number, where the at least one verification number corresponds to the at least one target image frame, and the determining subunit includes a target determining subunit configured to perform mathematical operations on the at least one verification number and the number of the plurality of image frames to be verified to obtain at least one frame number, and obtain the at least one target image frame in the plurality of image frames to be verified according to the at least one frame number.
For example, in an image data processing apparatus provided in at least one embodiment of the present disclosure, the number of the plurality of image frames to be verified is N, and the target determination subunit includes: the first target determining subunit is configured to perform a complementation operation on the N by using the at least one verification number, and obtain at least one remainder as the at least one frame number; or a second target determination subunit, configured to perform a complementation operation on the at least one verification number by N, and use at least one obtained remainder as the at least one frame number; n is a positive integer greater than or equal to 2.
It should be noted that, in the embodiment of the present disclosure, each unit of the image data processing apparatus 1100 corresponds to each step of the foregoing image data processing method, and specific functions of the image data processing apparatus 1100 may refer to the related description of the image data processing method, which is not described herein again. The components and structure of the image data processing apparatus 1100 shown in fig. 10B are only exemplary and not restrictive, and the image data processing apparatus 1100 may further include other components and structures as necessary.
At least one embodiment of the present disclosure also provides an electronic device that includes a processor and memory, the memory including one or more computer program modules. One or more computer program modules are stored in the memory and configured to be executed by the processor, the one or more computer program modules comprising instructions for implementing the image processing method described above. The electronic equipment reduces the risk that the watermark information used for anti-counterfeiting processing of the image or the video is leaked, thereby improving the difficulty of cracking the anti-counterfeiting processing, effectively preventing the image or the video from being forged, and improving the accuracy of verifying the authenticity of the image to be verified.
Fig. 11A is a schematic block diagram of an electronic device provided in some embodiments of the present disclosure. As shown in fig. 11A, the electronic device 1200 includes a processor 1210 and a memory 1220. The memory 1220 is used to store non-transitory computer-readable instructions (e.g., one or more computer program modules). The processor 1210 is configured to execute non-transitory computer readable instructions, which when executed by the processor 1210 may perform one or more steps of the image data processing method described above. The memory 1220 and the processor 1210 may be interconnected by a bus system and/or other form of connection mechanism (not shown).
For example, processor 1210 may be a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), or other form of processing unit having data processing capabilities and/or program execution capabilities. For example, the Central Processing Unit (CPU) may be an X86 or ARM architecture or the like. The processor 1210 may be a general-purpose processor or a special-purpose processor that may control other components in the electronic device 1200 to perform desired functions.
For example, memory 1220 may include any combination of one or more computer program products that may include various forms of computer-readable storage media, such as volatile memory and/or non-volatile memory. Volatile memory can include, for example, random Access Memory (RAM), cache memory (or the like). The non-volatile memory may include, for example, read Only Memory (ROM), a hard disk, an Erasable Programmable Read Only Memory (EPROM), a portable compact disc read only memory (CD-ROM), USB memory, flash memory, and the like. One or more computer program modules may be stored on the computer-readable storage medium and executed by processor 1210 to implement various functions of electronic device 1200. Various applications and various data, as well as various data used and/or generated by the applications, and the like, may also be stored in the computer-readable storage medium.
It should be noted that, in the embodiment of the present disclosure, reference may be made to the above description on the image data processing method for specific functions and technical effects of the electronic device 1200, and details are not described here again.
Fig. 11B is a schematic block diagram of another electronic device provided by some embodiments of the present disclosure. The electronic device 1300 is, for example, suitable for implementing the image data processing method provided by the embodiments of the present disclosure. The electronic device 1300 may be a terminal device or the like. It should be noted that the electronic device 1300 shown in fig. 11B is only one example, and does not bring any limitation to the functions and the scope of the application of the embodiments of the present disclosure.
As shown in fig. 11B, the electronic device 1300 may include a processing device (e.g., central processing unit, graphics processor, etc.) 1310 that may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 1320 or a program loaded from a storage device 1380 into a Random Access Memory (RAM) 1330. In the RAM 1330, various programs and data necessary for the operation of the electronic apparatus 1300 are also stored. The processing device 1310, ROM 1320, and RAM 1330 are connected to each other by a bus 1340. An input/output (I/O) interface 1350 is also connected to bus 1340.
Generally, the following devices may be connected to I/O interface 1350: input devices 1360 including, for example, touch screens, touch pads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, and so forth; an output device 1370 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, etc.; a storage 1380 including, for example, magnetic tape, hard disk, etc.; and a communication device 1390. The communication means 1390 may allow the electronic device 1300 to communicate wirelessly or by wire with other electronic devices to exchange data. While fig. 11B illustrates an electronic device 1300 having various means, it is to be understood that not all illustrated means are required to be implemented or provided, and that the electronic device 1300 may alternatively be implemented or provided with more or less means.
For example, according to an embodiment of the present disclosure, the processing method of the image data described above may be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program comprising program code for performing the above-described method of processing image data. In such an embodiment, the computer program may be downloaded and installed from a network via the communication device 1390, or installed from the storage device 1380, or installed from the ROM 1320. When the computer program is executed by the processing apparatus 1310, the functions defined in the processing method of image data provided by the embodiment of the present disclosure can be implemented.
At least one embodiment of the present disclosure also provides a computer-readable storage medium for storing non-transitory computer-readable instructions that, when executed by a computer, can implement the image data processing method described above. By using the computer readable storage medium, the risk of leakage of watermark information used for anti-counterfeiting processing of the image or the video is reduced, so that the difficulty of cracking the anti-counterfeiting processing is improved, the image or the video can be effectively prevented from being forged, and the accuracy of verifying the authenticity of the image to be verified can be improved.
Fig. 12 is a schematic diagram of a storage medium according to some embodiments of the present disclosure. As shown in fig. 12, storage medium 1400 is used to store non-transitory computer readable instructions 1410. For example, non-transitory computer readable instructions 1410, when executed by a computer, may perform one or more steps in a method of processing image data according to the description above.
For example, the storage medium 1400 may be applied to the electronic device 1200 described above. For example, the storage medium 1400 may be the memory 1220 in the electronic device 1200 shown in fig. 11A. For example, the related description about the storage medium 1400 can refer to the corresponding description of the memory 1220 in the electronic device 1200 shown in fig. 11A, and is not repeated here.
The following points need to be explained:
(1) The drawings of the embodiments of the disclosure only relate to the structures related to the embodiments of the disclosure, and other structures can refer to common designs.
(2) Without conflict, embodiments of the present disclosure and features of the embodiments may be combined with each other to arrive at new embodiments.
The above description is only a specific embodiment of the present disclosure, but the scope of the present disclosure is not limited thereto, and the scope of the present disclosure should be subject to the scope of the claims.

Claims (25)

1. A method of processing image data, comprising:
acquiring a ciphertext, wherein the ciphertext comprises watermark information for the initial image data;
analyzing the ciphertext to obtain the watermark information;
generating image data to be verified based on the watermark information and the initial image data; and
and sending the image data to be verified to extract the watermark information from the image data to be verified, and verifying the authenticity of the initial image data according to the watermark information and the ciphertext.
2. The method of claim 1, wherein generating image data to be verified based on the watermark information and the initial image data comprises:
generating intermediate image data based on the watermark information and the initial image data; and
adding the ciphertext to an image file in which the intermediate image data is located to obtain the image data to be verified, so as to obtain the ciphertext from the image data to be verified, obtain watermark verification information according to the ciphertext, and verify the authenticity of the initial image data based on the watermark verification information and the watermark information in the image data to be verified.
3. The method of claim 2, wherein adding the ciphertext to the intermediate image data to obtain the image data to be verified comprises:
and adding the ciphertext to the file head of the image file in which the intermediate image data is located to obtain the image data to be verified.
4. The method of claim 1, wherein generating the image data to be verified based on the watermark information and the initial image data comprises:
acquiring identification information of the initial image data; and
and generating the image data to be verified based on the watermark information, the initial image data and the identification information so as to obtain watermark verification information corresponding to the ciphertext according to the identification information in the image data to be verified, and verifying the authenticity of the initial image data based on the watermark verification information and the watermark information in the image data to be verified.
5. The method of claim 1, wherein the watermark information includes watermark text,
generating the image data to be verified based on the watermark information and the initial image data, including:
and adding the watermark text into the initial image data to generate the image data to be verified.
6. The method of claim 5, wherein the watermark information further includes a watermark parameter indicating location information of the watermark text in the initial image data,
adding the watermark text to the initial image data to generate the image data to be verified comprises:
and adding the watermark text into the initial image data according to the position information indicated by the watermark parameter to generate the image data to be verified.
7. The method of claim 6, wherein the initial image data is initial video data, the initial video data comprising a plurality of initial image frames, the image data to be verified comprising video data to be verified,
the watermark parameter indicates position information of the watermark text in the initial image data, and comprises:
the watermark parameter indicating addition of the watermark text in at least one first target image frame of the plurality of initial image frames,
adding the watermark text to the initial image data according to the position information indicated by the watermark parameter to generate the image data to be verified, including:
determining the at least one target image frame from the plurality of initial image frames based on the location information indicated by the watermark parameters; and
and adding the watermark text into the at least one target image frame to generate the video data to be verified.
8. The method of claim 7, wherein the watermark parameters include at least one operation number, the at least one operation number corresponding to the at least one target image frame, respectively,
determining the at least one target image frame from a plurality of initial image frames based on the location information indicated by the watermark parameters, including:
and performing mathematical operation on the at least one operation number and the number of the plurality of initial image frames to obtain at least one frame number, and obtaining the at least one target image frame in the plurality of initial image frames according to the at least one frame number.
9. The method of claim 8, wherein the number of the plurality of initial image frames is N,
performing a mathematical operation on the at least one operation number and the number of the plurality of initial image frames to obtain the at least one frame sequence number comprises:
performing a complementation operation on the N by using the at least one operation number respectively to obtain at least one remainder as the at least one frame ordinal number; alternatively, the first and second liquid crystal display panels may be,
performing a complementation operation on the at least one operation number by N to obtain at least one remainder as the at least one frame ordinal number;
n is a positive integer greater than or equal to 2.
10. The method of claim 8, wherein the at least one operation number comprises at least 2 sets of operation numbers,
the watermark text comprises at least 2 groups of sub-watermark texts, which respectively correspond to the at least 2 operation numbers, and the at least 2 groups of sub-watermark texts comprise at least two texts different from each other.
11. The method of claim 1, wherein the obtaining the ciphertext comprises obtaining the ciphertext online, and the obtaining the initial image data is allowed after confirming obtaining the ciphertext to generate image data to be verified based on the watermark information and the initial image data.
12. A method of processing image data, comprising:
acquiring image data to be verified, and extracting watermark information from the image data to be verified;
acquiring a ciphertext based on the image data to be verified; and
and verifying the authenticity of the image data to be verified according to the watermark information and the ciphertext.
13. The method of claim 12, wherein obtaining the ciphertext based on the image data to be verified comprises:
and acquiring the ciphertext from the image file in which the image data to be verified is located.
14. The method of claim 12, wherein obtaining the ciphertext based on the image data to be verified comprises:
acquiring identification information of the initial image data based on the image data to be verified; and
and acquiring the ciphertext based on the identification information and a preset corresponding relation, wherein the preset corresponding relation records the corresponding relation between the identification information and the ciphertext or the corresponding relation between the identification information and the storage address of the ciphertext.
15. The method of claim 12, wherein the verifying the authenticity of the image data to be verified according to the watermark information and the ciphertext comprises:
acquiring watermark verification information corresponding to the ciphertext; and
and comparing the watermark verification information with the watermark information to verify the authenticity of the image data to be verified.
16. The method of claim 15, wherein obtaining watermark verification information corresponding to the ciphertext comprises:
decrypting the ciphertext to obtain the watermark verification information; or
And acquiring watermark verification information corresponding to the ciphertext based on the ciphertext and a mapping relation, wherein the mapping relation is the mapping relation between the ciphertext and the watermark verification information.
17. The method of claim 15, wherein the watermark verification information includes watermark verification text, the watermark information includes watermark text,
comparing the watermark verification information with the watermark information to verify the authenticity of the image data to be verified, comprising:
and comparing the watermark text with the watermark verification text to verify the authenticity of the image data to be verified.
18. The method of claim 17, wherein the watermark verification information further includes a watermark verification parameter indicating location information of the watermark text in the image data to be verified,
extracting watermark information from the image data to be verified, including:
and extracting the watermark text from the image data to be verified according to the position information indicated by the watermark verification parameters.
19. The method of claim 18, wherein the image data to be verified comprises video data to be verified, the video data to be verified comprising a plurality of image frames to be verified,
the watermark verification parameter indicates the position information of the watermark text in the image data to be verified, and the method comprises the following steps:
the watermark verification parameter indicates that the watermark text is extracted in at least one first target image frame of the plurality of initial image frames,
extracting the watermark text from the image data to be verified according to the position information indicated by the watermark verification parameters, wherein the watermark text extraction method comprises the following steps:
determining the at least one target image frame from the plurality of image frames to be verified according to the position information indicated by the watermark verification parameters, and
extracting the watermark text from the at least one target image frame.
20. The method of claim 19, wherein the watermark verification parameters include at least one verification number, the at least one verification number corresponding to the at least one target image frame, respectively,
determining the at least one target image frame from the plurality of image frames to be verified according to the position information indicated by the watermark verification parameters, including:
and performing mathematical operation on the at least one verification number and the number of the plurality of image frames to be verified to obtain at least one frame number, and obtaining the at least one target image frame in the plurality of image frames to be verified according to the at least one frame number.
21. The method of claim 20, wherein the plurality of image frames to be authenticated is N in number,
performing mathematical operation on the at least one verification number and the number of the plurality of image frames to be verified to obtain the at least one frame number, including:
performing complementation operation on N by using the at least one verification number respectively to obtain at least one remainder as the at least one frame ordinal number; or
Performing a complementation operation on the at least one verification digit by N to obtain at least one remainder as the at least one frame ordinal number;
n is a positive integer greater than or equal to 2.
22. An apparatus for processing image data, comprising:
an information acquisition unit configured to acquire a ciphertext, wherein the ciphertext includes watermark information for initial image data;
an analysis unit configured to analyze the ciphertext to obtain the watermark information;
an image data generating unit configured to generate image data to be verified based on the watermark information and the initial image data; and
and the image data sending unit is configured to send the image data to be verified so as to extract the watermark information from the image data to be verified, and verify the authenticity of the initial image data according to the watermark information.
23. An apparatus for processing image data, comprising:
the image acquisition unit is configured to acquire image data to be verified and extract watermark information from the image data to be verified;
the ciphertext acquisition unit is configured to acquire a ciphertext based on the image data to be verified; and
and the verification unit is configured to verify the authenticity of the image data to be verified according to the watermark information and the ciphertext.
24. An electronic device, comprising:
a processor;
a memory comprising one or more computer program instructions;
wherein the one or more computer program instructions are stored in the memory and when executed by the processor implement the method of processing image data of any of claims 1-21.
25. A computer readable storage medium, non-transitory storing computer readable instructions, wherein the computer readable instructions, when executed by a processor, implement the method of processing image data according to any one of claims 1-21.
CN202110871063.4A 2021-07-30 2021-07-30 Image data processing method and device, electronic equipment and storage medium Active CN115688059B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110871063.4A CN115688059B (en) 2021-07-30 2021-07-30 Image data processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110871063.4A CN115688059B (en) 2021-07-30 2021-07-30 Image data processing method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN115688059A true CN115688059A (en) 2023-02-03
CN115688059B CN115688059B (en) 2023-09-29

Family

ID=85058885

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110871063.4A Active CN115688059B (en) 2021-07-30 2021-07-30 Image data processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115688059B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115688059B (en) * 2021-07-30 2023-09-29 瑞庭网络技术(上海)有限公司 Image data processing method and device, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104143054A (en) * 2013-05-10 2014-11-12 韩光明 Picture generation method and picture verification method
CN111177666A (en) * 2019-12-30 2020-05-19 北京天威诚信电子商务服务有限公司 Forensic document anti-counterfeiting and anti-tampering method and system based on fragile watermark
CN112101962A (en) * 2020-09-17 2020-12-18 广州皓品科技有限公司 Data security anti-counterfeiting control method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115688059B (en) * 2021-07-30 2023-09-29 瑞庭网络技术(上海)有限公司 Image data processing method and device, electronic equipment and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104143054A (en) * 2013-05-10 2014-11-12 韩光明 Picture generation method and picture verification method
CN111177666A (en) * 2019-12-30 2020-05-19 北京天威诚信电子商务服务有限公司 Forensic document anti-counterfeiting and anti-tampering method and system based on fragile watermark
CN112101962A (en) * 2020-09-17 2020-12-18 广州皓品科技有限公司 Data security anti-counterfeiting control method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115688059B (en) * 2021-07-30 2023-09-29 瑞庭网络技术(上海)有限公司 Image data processing method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN115688059B (en) 2023-09-29

Similar Documents

Publication Publication Date Title
US11050555B2 (en) Method for remotely acquiring secret key, POS terminal and storage medium
JP6814147B2 (en) Terminals, methods, non-volatile storage media
US10045210B2 (en) Method, server and system for authentication of a person
CN111177801B (en) Signature method and device of electronic document, storage medium and electronic equipment
CN110690956B (en) Bidirectional authentication method and system, server and terminal
CN108959990B (en) Two-dimensional code verification method and device
CN108038388B (en) Method for realizing Web page seal, client and server
US20180167674A1 (en) System and method for trusted presentation of information on untrusted user devices
CN116662941B (en) Information encryption method, device, computer equipment and storage medium
JP2023139259A (en) Image collection apparatus, server, encryption method, and decryption method
CN110232021A (en) The method and device of page test
CN112565922A (en) Advertisement monitoring method, advertisement monitoring device and computer readable storage medium
WO2023142957A1 (en) Method and apparatus for verifying display terminal, storage medium, and electronic device
US9787476B2 (en) Image verification by an electronic device
CN108900472B (en) Information transmission method and device
CN110753257A (en) Data display method, display terminal, server, display system, and storage medium
CN115688059B (en) Image data processing method and device, electronic equipment and storage medium
CN113162770A (en) Online signature method and system
CN110414269B (en) Processing method, related device, storage medium and system of application installation package
CN116361833A (en) Verification method and device and terminal equipment
CN112583602B (en) Information code data transmission method, device, system, computer device and medium
CN113946862A (en) Data processing method, device and equipment and readable storage medium
CN112380577A (en) Multiparty-supported electronic contract repeated signing method and device and computer equipment
US11502850B2 (en) Server apparatus, client terminal, information processing system and information processing method
KR102602174B1 (en) Seal image verification server that can verify whether the seal image inserted as an object in an electronic document is abnormal and operating method thereof

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