CN115688059B - 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
CN115688059B
CN115688059B CN202110871063.4A CN202110871063A CN115688059B CN 115688059 B CN115688059 B CN 115688059B CN 202110871063 A CN202110871063 A CN 202110871063A CN 115688059 B CN115688059 B CN 115688059B
Authority
CN
China
Prior art keywords
image data
watermark
verified
ciphertext
information
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.)
Active
Application number
CN202110871063.4A
Other languages
Chinese (zh)
Other versions
CN115688059A (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

Landscapes

  • Image Processing (AREA)
  • Editing Of Facsimile Originals (AREA)

Abstract

A processing method, apparatus, electronic device and computer readable storage medium for image data. The processing method of the image data comprises the following steps: acquiring a ciphertext, the ciphertext comprising watermark information for the 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, extracting 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 forging 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
Embodiments of the present disclosure relate to a method and apparatus for processing image data, an electronic device, and a storage medium.
Background
With the development of science and technology, image processing techniques are widely used in various fields. The wide application of image processing technology brings great convenience to the life of people. For example, in the field of real estate, a real estate video displayed in a real estate application program can help people know information such as house types, decoration degrees and the like, so that time cost and labor cost for people to know real estate are greatly reduced.
Disclosure of Invention
At least one embodiment of the present disclosure provides a method for processing image data, including: obtaining a ciphertext, wherein the ciphertext comprises watermark information for the 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, extracting 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 a method for processing image data 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 an 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 ciphertext to intermediate image data to obtain image data to be verified includes: and adding the ciphertext to the file header of the image file in which the intermediate image data are located to obtain 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 and initial image data includes: acquiring identification information of initial image data; 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.
For example, in a method for processing image data provided in at least one embodiment of the present disclosure, watermark information includes watermark text, and image data to be verified is generated based on the watermark information and initial image data, including: watermark text is added to the initial image data to generate image data to be verified.
For example, in the image data processing method provided in at least one embodiment of the present disclosure, the watermark information further includes watermark parameters, the watermark parameters indicate position information of watermark text in the initial image data, and adding the watermark text to the initial image data to generate the 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 parameters to generate 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, the initial image data is initial video data, the initial video data includes a plurality of initial image frames, the image data to be verified includes the video data to be verified, and the watermark parameter indicates position information of watermark text in the initial image data, including: the watermark parameter indicates that watermark text is added in at least one first target image frame of the plurality of initial image frames, and the watermark text is added in the initial image data according to the position information indicated by the watermark parameter to generate image data to be verified, including: determining at least one target image frame from the plurality of initial image frames based on the location information indicated by the watermark parameter; and adding the watermark text to at least one target image frame to generate video data to be verified.
For example, in a method for processing image data provided in at least one embodiment of the present disclosure, a watermark parameter includes at least one operation number, the at least one operation number corresponds to at least one target image frame, and determining the at least one target image frame from a plurality of initial image frames based on the location information indicated by the watermark parameter includes: the method comprises the steps of performing mathematical operation on at least one operation number and the number of the plurality of initial image frames to obtain at least one frame number, and obtaining at least one target image frame in the plurality of initial image frames 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, 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 the at least one frame number includes: respectively carrying out a remainder operation on N by using at least one operation number to obtain at least one remainder as at least one frame number; or, performing a remainder operation on at least one operation number by using N, wherein the obtained at least one remainder is used as at least one frame number; n is a positive integer greater than or equal to 2.
For example, in the image data processing method provided in at least one embodiment of the present disclosure, at least one operation number includes at least 2 sets of operation numbers, the watermark text includes at least 2 sets of sub watermark texts, respectively corresponding to at least 2 operation numbers, and at least 2 sets of sub watermark texts include at least two texts different from each other.
For example, in a processing method of image data provided in at least one embodiment of the present disclosure, acquiring ciphertext includes acquiring ciphertext online, and acquiring initial image data is allowed after confirming acquisition of ciphertext, so as to generate image data to be verified based on 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 ciphertext based on the 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 a method for processing image data provided in at least one embodiment of the present disclosure, acquiring ciphertext based on image data to be verified includes: and obtaining ciphertext from an image file in which the image data to be verified are located.
For example, in a method for processing image data provided in at least one embodiment of the present disclosure, acquiring ciphertext based on image data to be verified includes: acquiring identification information of initial image data based on the image data to be verified; 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.
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: obtaining 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, obtaining watermark verification information corresponding to ciphertext includes: decrypting the ciphertext to obtain watermark verification information; or based on the ciphertext and the mapping relation, obtaining watermark verification information corresponding to the ciphertext, 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, watermark verification information includes watermark verification text, watermark information includes watermark text, watermark verification information and watermark information are compared to verify authenticity of the image data to be verified, including: and comparing the watermark text with the watermark verification text to verify the authenticity of the image data to be verified.
For example, in the method for processing image data provided in at least one embodiment of the present disclosure, the watermark verification information further includes watermark verification parameters, where the watermark verification parameters indicate position information of watermark text in the image data to be verified, and extracting watermark information from the image data to be verified includes: and extracting watermark text from the image data to be verified according to the position information indicated by the watermark verification parameter.
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, watermark verification parameters indicate location 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 the image data to be verified according to the position information indicated by the watermark verification parameter, and the watermark verification parameter comprises the following steps: 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 parameter, and extracting watermark text from the at least one target image frame.
For example, in a method for processing image data provided in at least one embodiment of the present disclosure, a watermark verification parameter includes at least one verification number, the at least one verification number corresponds to at least one target image frame, and determining, from a plurality of image frames to be verified, the at least one target image frame according to the location information indicated by the watermark verification parameter 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, the number of a plurality of image frames to be verified is N, and mathematical operations are 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 number, including: respectively carrying out a remainder operation on N by using at least one verification number to obtain at least one remainder as at least one frame number; or, N is a positive integer greater than or equal to 2, and the at least one remainder obtained by the operation of summing up the at least one verification number is taken as at least one frame number.
At least one embodiment of the present disclosure provides an image data processing apparatus, including: an information acquisition unit configured to acquire a ciphertext including watermark information for the initial image data; the analyzing unit is 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 an image data transmitting unit configured to transmit image data to be verified, for extracting watermark information from the image data to be verified, and verifying the authenticity of the initial image data according to the watermark information.
For example, in the processing apparatus for image data provided in at least one embodiment of the present disclosure, the 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 in 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 to obtain the image data to be verified.
For example, in the processing apparatus for image data provided in at least one embodiment of the present disclosure, the image data generating unit includes: an identification acquisition subunit configured to acquire identification information of the initial image data; and a second image data generation subunit 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 the processing apparatus for image data provided in at least one embodiment of the present disclosure, the watermark information includes 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 the image data processing apparatus provided in at least one embodiment of the present disclosure, the watermark information further includes a watermark parameter, 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 image data processing apparatus provided in at least one embodiment of the present disclosure, initial image data is 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, the watermark parameter indicates location information of the watermark text in the initial image data, and the method includes: the watermark parameter indicates that the watermark text is added in at least one first target image frame of the plurality of initial image frames, the first adding subunit comprising: 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 an addition generating subunit configured to add the watermark text to the at least one target image frame, generating the video data to be verified.
For example, in the image data processing apparatus provided in at least one embodiment of the present disclosure, the watermark parameter includes at least one operation number, 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 ordinal number, and obtain the at least one target image frame from the plurality of initial image frames according to the at least one frame ordinal number.
For example, in the image data processing apparatus provided in at least one embodiment of the present disclosure, the number of the plurality of initial image frames is N, and the operator unit includes a first operator unit or a second operator unit. And the first operation subunit is configured to perform a remainder operation on N by using the at least one operation number respectively, so that at least one obtained remainder is used as the at least one frame number. And a second operation subunit configured to perform a remainder operation on the at least one operation number by N, so as to obtain at least one remainder as the at least one frame number. N is a positive integer greater than or equal to 2.
For example, in the processing apparatus for image data provided in at least one embodiment of the present disclosure, at least one operation number includes at least 2 sets of operation numbers, the watermark text includes at least 2 sets of sub watermark texts, respectively corresponding to the at least 2 operation numbers, and the at least 2 sets of sub watermark texts include at least two texts different from each other.
For example, in the processing apparatus for image data provided in at least one embodiment of the present disclosure, acquiring ciphertext includes acquiring ciphertext online, and acquiring the initial image data is allowed after confirming acquisition of the ciphertext, so as to generate 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: an image acquisition unit 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 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 device 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 ciphertext from an image file in which book data to be verified is located.
For example, in the image data processing apparatus provided in at least one embodiment of the present disclosure, the 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 corresponding relationship, where the preset corresponding relationship records a corresponding relationship between the identification information and the ciphertext or a corresponding relationship between the identification information and a storage address of the ciphertext.
For example, in the image data processing apparatus provided in at least one embodiment of the present disclosure, the verification unit includes a watermark verification information obtaining subunit configured to obtain watermark verification information corresponding to the ciphertext; and a comparison subunit configured to compare the watermark verification information with the watermark information to verify the authenticity of the image data to be verified.
For example, in the processing device for image data provided in at least one embodiment of the present disclosure, the 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 acquisition subunit is configured to acquire 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.
For example, in the processing device for image data provided in at least one embodiment of the present disclosure, the watermark verification information includes watermark verification text, the watermark information includes watermark text, and the comparing subunit includes a text comparing subunit configured to compare the watermark text with the watermark verification text to verify authenticity of the image data to be verified.
For example, in the image data processing apparatus provided in at least one embodiment of the present disclosure, the watermark verification information further includes a watermark verification parameter, the watermark verification parameter indicates position information of the watermark text in the image data to be verified, and the image acquisition unit includes an extraction subunit configured to extract the watermark text from the image data to be verified according to the position 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, 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, watermark verification parameters indicate location information of the 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 extracting subunit comprises a determining subunit configured to determine the at least one target image frame from the plurality of image frames to be verified based on the location information indicated by the watermark verification parameter, and a text extracting subunit configured to extract the watermark text from the at least one target image frame.
For example, in the image data processing apparatus provided in at least one embodiment of the present disclosure, the 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 the determining subunit includes a target determining subunit configured to perform a 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 obtain the at least one target image frame from the plurality of image frames to be verified according to the at least one frame number.
For example, in the 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 determining subunit includes: a first target determining subunit configured to perform a remainder operation on N with the at least one verification number, respectively, to obtain at least one remainder as the at least one frame number; or a second target determination subunit configured to perform a remainder operation on the at least one verification number with N, to obtain at least one 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 comprising 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 storing non-transitory computer-readable instructions that, when executed by a computer, implement a method of processing image data provided by any of the embodiments of the present disclosure.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings of the embodiments will be briefly described below, and it is apparent that the drawings in the following description relate only to some embodiments of the present disclosure, not to limit 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 flow chart illustrating a method of processing image data according to at least one embodiment of the present disclosure;
FIG. 3 is a flow chart illustrating a method of step S203 of FIG. 2 provided by at least one embodiment of the present disclosure;
FIG. 4 illustrates another method flow diagram of step S203 of FIG. 2 provided by at least one embodiment of the present disclosure;
FIG. 5 is a flow chart of a method for generating image data to be verified by adding watermark text to initial image data according to location information indicated by watermark parameters provided in at least one embodiment of the present disclosure;
FIG. 6 illustrates a flow chart of another method of processing image data provided by at least one embodiment of the present disclosure;
FIG. 7A is a flow chart illustrating a method of step S602 of FIG. 6 provided by at least one embodiment of the present disclosure;
FIG. 7B illustrates a flow chart of a method of step S603 of FIG. 6 provided by at least one embodiment of the present disclosure;
fig. 8 is a flowchart of a method for extracting watermark text from image data to be verified according to location information indicated by watermark verification parameters according to at least one embodiment of the present disclosure;
FIG. 9A illustrates a flow chart for generating image data to be verified provided by at least one embodiment of the present disclosure;
FIG. 9B illustrates a flow chart for verifying image data to be verified provided in at least one embodiment of the present disclosure;
FIG. 10A illustrates a schematic block diagram of an image data processing apparatus provided in at least one embodiment of the present disclosure;
FIG. 10B illustrates a schematic block diagram of another image data processing apparatus provided in accordance with at least one embodiment of the present disclosure;
FIG. 11A illustrates a schematic block diagram of an electronic device provided in accordance with at least one embodiment of the present disclosure;
FIG. 11B illustrates a schematic block diagram of another electronic device provided in accordance with at least one embodiment of the present disclosure; and
fig. 12 shows a schematic diagram of a computer-readable storage medium provided by at least one embodiment of the present disclosure.
Detailed Description
For the purpose of making 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 clearly and completely described below with reference to the accompanying drawings of the embodiments of the present disclosure. It will be apparent that the described embodiments are some, but not all, of the embodiments of the present disclosure. All other embodiments, which can be made by one of ordinary skill in the art without the need for inventive faculty, are within the scope of the present disclosure, based on the described embodiments of the present disclosure.
Unless defined otherwise, technical or scientific terms used in this disclosure should be given the ordinary meaning as understood by one of ordinary skill in the art to which this disclosure belongs. The terms "first," "second," and the like, as used in this disclosure, do not denote any order, quantity, or importance, but rather are used to distinguish one element from another. Likewise, the terms "a," "an," or "the" and similar terms 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 elements or items preceding the word are included in the element or item listed after the word and equivalents thereof, but does not exclude other elements or items. The terms "connected" or "connected," and the like, are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "upper", "lower", "left", "right", etc. are used merely to indicate relative positional relationships, which may also be changed when the absolute position of the object to be described is changed.
With the widespread use of image processing technology, images become the primary 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 distribution carrier for news, advertisements, and the like. The authenticity of the image is particularly important as it serves as the primary carrier for information dissemination. If a fake image is released into the network, not only will false information be propagated, but also a trust crisis will result. For example, for a house intermediary, house information is often presented in a house source application by an image, and if the image is counterfeit (i.e., the image presents house source information that does not match the actual house source), then incorrect knowledge of the house source by the audience may result, which not only wastes the audience's time and effort, but also loses the audience's trust in the house source application. It is therefore very important to perform anti-counterfeit processing on an image and to verify whether the image is a genuine image. The real image means, for example, that the information presented by the image is consistent with the actual photographed scene of the house source. In the related art, the anti-counterfeit processing performed on the image is easily broken, resulting in easy counterfeiting of the image, and thus, it is difficult to accurately identify whether the image is authentic.
At least one embodiment of the present disclosure provides a method, apparatus, electronic device, and computer-readable storage medium for processing image data. The processing method of the image data comprises the following steps: obtaining a ciphertext, wherein the ciphertext comprises watermark information for the 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, extracting 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 processing method of the image data can obtain watermark information through decrypting ciphertext to perform anti-counterfeiting processing on the initial image data to obtain the image data to be verified, so that the difficulty of anti-counterfeiting processing on the image or the video by cracking is improved, the image or the video can be effectively prevented from being counterfeited, 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 interact with the server 102 via the communication network 103 using the terminal device 101 to receive or send messages. The communication network 103 is a medium used to provide a communication link between the terminal device 101 and the server 102. The communication network 103 may comprise various connection types, such as wired or wireless communication links, in particular, such as WIFI, 3G, 4G, 5G, fiber optic cables, etc.
The terminal device 101 may be a variety of electronic devices with a display screen including, but not limited to, smartphones, tablets, notebooks, etc., the disclosed embodiments are not limited to the product type of the terminal device 101, and for example the terminal device may be based on a variety of available operating systems, such as Windows, android, IOS, etc. The terminal device 101 may have various application programs (APP) installed therein, for example, shopping applications, web browser applications, instant messaging tools, etc., or may download and run applets, express applications, etc. through an application program platform (e.g., weChat, payment device, etc.). For example, the house source application related to the embodiments of the present disclosure may be implemented as a standalone APP, may be implemented as an applet or a quick application, or may be implemented as a plug-in running through a browser, or the like, which embodiments of the present disclosure are not limited.
The server 102 may be a server providing various services, such as a background server providing support for websites, applets, or applications browsed by the user using the terminal device 101. The server 102 may perform processing such as analysis on data such as a received request, and may feed back processing results (e.g., web pages, information, data, etc., acquired or generated according to the request) to the terminal device 101. The server 102 may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server.
An implementation of the image processing method provided by at least one embodiment of the present disclosure is described below by way of fig. 2 to 6, 7A to 7B, 8, 9A, and 9B. For example, the processing methods of image data shown in fig. 2 to 5 below may be performed by an application installed in the terminal device 101 in the system architecture 100 described in fig. 1, and the processing methods of image data shown in fig. 6, 7A, 7B, and 8 may be performed by the server 102 in the system architecture 100 described in fig. 1, for example.
Fig. 2 is a flowchart illustrating a method for processing image data according to at least one embodiment of the present disclosure.
As shown in fig. 2, the processing method of the image data includes steps S201 to S204.
Step S201: a ciphertext is obtained, the ciphertext comprising 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 the image data to be verified, extracting watermark information from the image to be verified, and verifying the authenticity of the initial image according to the watermark information and the ciphertext.
The processing method of the image data in the embodiment can obtain watermark information only by decrypting the ciphertext, reduces the risk of leakage of the watermark information used for anti-counterfeiting processing of the image or the video, thereby improving the difficulty of cracking the anti-counterfeiting processing, effectively preventing the image or the video from being counterfeited, and improving the accuracy of verifying the authenticity of the image to be verified. In this embodiment, the ciphertext may be decrypted to obtain plaintext, but watermark information corresponding to plaintext may be built in an application program that applies the processing method of the image data, for example. For example, decrypting the ciphertext results in plaintext 246854, which plaintext 246854 may be parsed by an application into watermark information for application to the original image data. Therefore, in this embodiment, even if the ciphertext is cracked to obtain plaintext (for example, 246854) corresponding to the ciphertext, the cracker does not know the meanings represented by these plaintext 2, 4, 6, 8, 5, and 4, that is, the cracker cannot determine watermark information for the initial image data from the plaintext 246854, and therefore, the cracker cannot crack the anti-counterfeit processing performed on the image or video, so that this embodiment can increase the difficulty of cracking 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 encrypting watermark information. For example, the remote device or the cloud end 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-counterfeit processing on the original image data.
For example, the watermark information includes watermark text and watermark parameters, and the watermark generated from the watermark text and watermark parameters may be used to tamper-proof the image or video. For example, a watermark is added to an image or video to perform anti-counterfeit 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 indicate a physical position of the watermark text in the target initial image. For example, the physical location may be represented by coordinate information in some predetermined coordinate system, but the physical location in the present disclosure is not limited to being represented by coordinate information. The watermark parameters are further described below and are not further described herein.
In some embodiments of the present disclosure, obtaining ciphertext includes obtaining ciphertext online. For example, a server is accessed over a network to obtain 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 ciphertext to the server 102 through the network 103, and after the server 102 generates ciphertext in response to the acquisition request, the terminal device 101 remotely acquires 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 as to generate the image data to be verified based on the watermark information and the initial image data. For example, a video or a picture taken earlier cannot truly reflect the scene of the current actual shooting scene, and therefore, if the watermark information of the ciphertext is allowed to be used to process the initial image data acquired earlier to obtain an image to be verified, the video or the picture taken earlier can be used to impersonate the scene of the current actual shooting scene, and the image to be verified is a false image that cannot truly reflect the scene of the current actual shooting scene. Therefore, the initial image data is allowed to be acquired only after the ciphertext is confirmed to be acquired, for example, the camera is started to shoot the initial image to acquire the initial image data, so that the possibility that a video or a picture shot earlier is used as a scene of a current actual shooting scene 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 acquired simultaneously, i.e., the ciphertext is acquired and the initial image is captured simultaneously. The real-time performance and timeliness of the acquired ciphertext can be guaranteed when the ciphertext and the initial image are shot simultaneously, so that the situation that initial image data acquired in a long time are used as scenes of a current actual shooting scene can be avoided at least partially, and the authenticity of the image data to be verified is guaranteed. For example, in response to a photographing instruction, a jump is made to a collection page of initial image data, and a request for acquiring ciphertext is sent to a server, after the server generates ciphertext in response to the request for acquiring ciphertext, the ciphertext is remotely acquired from the server, the ciphertext being used to verify the authenticity of the image data to be verified.
For step S202, for example, an algorithm for encrypting watermark information and an algorithm for decrypting ciphertext are mutually corresponding. For example, if the ciphertext is obtained by encrypting the watermark information using an asymmetric encryption algorithm, then in step S202, the ciphertext needs to be decrypted using a private key corresponding to a public key, which is a key used when encrypting the watermark information using the asymmetric encryption algorithm. For example, the ciphertext may be obtained by encrypting the watermark information by using a symmetric encryption algorithm, and then the ciphertext needs to be decrypted by using a secret key used for encryption and an inverse algorithm 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, but may be other encryption and decryption algorithms known to those skilled in the art. The embodiment of the disclosure does not limit the method for encrypting and decrypting the ciphertext.
For example, watermark information obtained by analyzing ciphertext is "ABC123" or "246854" or the like.
For step S203, the initial image data is changed, for example, according to the watermark information to obtain image data to be verified.
For example, the watermark information contains watermark text, i.e. the content of the watermark. The watermark text may be any type of character, such as numbers, punctuation marks, letters, chinese characters, or combinations 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, watermark text is added to the initial image data, generating image data to be verified.
In some embodiments of the present disclosure, 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 as a watermark in the image to be verified, so that the watermark cannot be seen by the human eye from the image to be verified.
In other embodiments of the present disclosure, if the initial image data is video data, the watermark text may be added in the clear to one or more frames of the initial image data to generate the image data to be verified. That is, the watermark text is added as plain text to the image to be verified so that the watermark can be seen by the human eye from the image to be verified. However, since video is played with a frame rate of, for example, 30 frames/second, 60 frames/second, or 90 frames/second, the user does not actually notice in viewing 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 the location information of the watermark text in the initial image data. Step S203 may be to add watermark text to the initial image data according to the position information indicated by the watermark parameter to generate image data to be verified.
For example, according to the ordering of the target initial image in which the watermark text indicated by the watermark parameter is located in the plurality of initial images, adding the watermark text to the target initial image, thereby obtaining the image data to be verified. For another example, according to the physical position of the watermark text in the target initial image indicated by the watermark parameter, adding the watermark to the corresponding position in the target initial image, thereby obtaining the image data to be verified.
In other embodiments of the present disclosure, the watermark information may include not only watermark text and watermark parameters, but also other information such as the number of valid text in the watermark text. That is, watermark text in watermark information is somewhat valid and somewhat invalid, and valid watermark text may be added to the original image data, while invalid watermark text is not added to the original image data as a sort of disturbance information. The present disclosure does not limit the information contained in the watermark information, and those skilled in the art may set the watermark information according to the need.
For step S204, for example, the image data to be verified, which includes watermark information, is sent to a remote verification device, and the verification device may extract watermark information from the image data to be verified and parse the ciphertext to obtain 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 with the watermark information included in the ciphertext.
Fig. 3 is a flowchart illustrating a method according to 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 an image to be verified, which is used for generating and displaying the image to be verified on 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 watermark text may be added to the initial image data according to the watermark parameters to obtain intermediate image data.
Step S302: and adding the ciphertext to an image file in which the intermediate image data is positioned to obtain 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 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.
In this embodiment, the image data to be verified includes not only the intermediate image data corresponding to the image to be verified, which is used to generate the image to be verified displayed on the terminal device, but also the ciphertext itself. For example, the ciphertext is the same ciphertext as the ciphertext of step S201.
In some embodiments of the present disclosure, ciphertext is added to a header of an image file in which the intermediate image data is located to obtain the image data to be verified, i.e., header content of the header of the file includes ciphertext. In this embodiment, for example, the authentication apparatus reads the file header of the image file to acquire the ciphertext, and parses the ciphertext to obtain watermark authentication information for authenticating the image data to be authenticated.
In other embodiments of the present disclosure, ciphertext may also be added to any location of the image file where the intermediate image data is located. For example, ciphertext may be added to the end of the image file, or the like.
According to the image data processing method of the embodiment, ciphertext can be added to the file head of the image file instead of directly adding watermark information to the file head, so that even if the ciphertext is cracked to obtain plaintext (for example, 246854) corresponding to the ciphertext, a cracker does not know meanings represented by the plaintext 2, 4, 6, 8, 5 and 4, namely, the cracker cannot determine watermark information for initial image data according to the plaintext 246854, so that the cracker cannot crack anti-counterfeiting processing performed on an image or video, and the embodiment can improve difficulty of cracking the anti-counterfeiting processing.
Fig. 4 illustrates another method flow diagram of step S203 of fig. 2 provided by 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, the server may generate identification information of the initial image data in addition to the watermark information and ciphertext of the watermark information in response to an acquisition request to acquire the watermark information, and transmit the identification information to the terminal device such that the image data to be authenticated generated by the terminal device includes the identification information.
Step S402: 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.
For example, the initial image data is changed according to the watermark information, and the identification information is added to the changed initial image data to obtain the image data to be verified. For example, identification information is added to the file of the changed initial image data to obtain image data to be verified. Alternatively, identification information is added to the initial image data, and the initial image data containing the identification information is changed according to watermark information to obtain 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. For example, the server stores therein an identification information-ciphertext relationship table between the identification information and ciphertext. In the case that the server receives the image data to be verified from the terminal device, the server acquires identification information in the image data to be verified from the image data to be verified (for example, analyzes a file of the image data to be verified to obtain the identification information), and searches an identification information-ciphertext relationship table according to the identification information to obtain 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 watermark information and identification information in a one-to-one correspondence. For example, the server stores therein an identification information-watermark information relationship table between identification information and watermark information. Under the condition that the server receives the image data to be verified from the terminal equipment, the server acquires the identification information in the image data to be verified from the image data to be verified, and searches the 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 true.
The processing method of the image data of the embodiment can locally store the ciphertext or watermark verification information in the server without storing the ciphertext in the file head of the image file, thereby improving the safety.
In some embodiments of the present disclosure, the initial image data is initial video data, the initial video data comprising a plurality of initial image frames, and the image data to be verified comprises 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 is a flowchart of a method for generating image data to be verified by adding watermark text to initial image data according to location information indicated by watermark parameters 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 location information indicated by the watermark parameter.
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 a plurality of initial image frames according to the frame number.
Step S502: and adding the watermark text to 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 succession, and the watermark parameter indicates the position information of 103, 205, 407, then the initial image frames arranged in 103 th, 205 th, and 407 th frames among the 1000 initial image frames are taken as target image frames.
In at least some embodiments of the present disclosure, 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, 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 number, and obtaining the at least one target image frame from the plurality of initial image frames according to the at least one frame 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. The mathematical operation is performed on the at least one operation number and the number of the plurality of initial image frames, for example, the remainder of X/N or the remainder of N/X is calculated, where the remainder is the 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 succession, with the operation numbers 251, 300, 11. The remainder is 247, 100 and 10 after the remainder operation N/X. The initial image frames arranged in the 247 th, 100 th and 10 th frames among the 1000 initial image frames are taken as target image frames.
For step S502, watermark text is added to at least one target image frame, e.g., according to frame number, to generate video data to be verified.
In some embodiments of the present disclosure, the at least one operation number includes at least 2 sets of operation numbers, the watermark text includes at least 2 sets of sub watermark text, respectively corresponding to the at least 2 sets of operation numbers, and the at least 2 sets of sub watermark text include at least two texts different from each other.
For example, the at least 2 sets of operation numbers include a first set of operation numbers and a second set of operation numbers. The first set of operation numbers is, for example, 3 and 7, and the second set of operation 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'. The mathematical operations (e.g., N/X) described above are performed with a first set of operating numbers 3, 7 and N (e.g., 20) to obtain the frame numbers (i.e., 2 and 6) of the target image frame. Next, watermark text "ab" is added to these target image frames (i.e., the 2 nd and 6 th frames in the initial image frames). Similarly, the mathematical operations N/X described above are performed with the second set of operation numbers 4, 8 and N to obtain the frame numbers of the target image frames to which the watermark text "AB" is added.
In some embodiments of the present disclosure, different groups of watermark text may have different text types, e.g., one group is english watermark text and another group is chinese watermark text ("ABC" and "fueling"). For another example, one group is uppercase english watermark text, and the other group is lowercase english watermark text ("AB" and "AB"). Or the text types of different sets of watermark text are the same, but the text content is different. For example, both sets of watermark text are uppercase english watermark text ("AB" and "CDF").
In the above embodiment, the operation numbers of different groups correspond to different texts, so that the cracking difficulty is further improved.
In other embodiments of the present disclosure, each of the operation numbers may correspond to the same watermark text such that the same watermark is added to each of the target image frames.
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, so that watermarks are only added to a plurality of initial image frames, but not to 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 authentication device may be the same device as the remote electronic device that generated the watermark information. Alternatively, the remote authentication device may be a device capable of communicating with the remote electronic device that generates the watermark information, so as to obtain corresponding information for authenticating the image data to be authenticated from the remote electronic device that generates the watermark information.
Fig. 6 illustrates a flow chart of another method of processing image data provided in 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 the image data to be verified, and extracting watermark information from the image data to be verified.
Step S602: and acquiring 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.
The processing method of the image data of the embodiment utilizes the ciphertext to verify watermark information in the image data to be verified, can improve the difficulty of cracking anti-counterfeiting processing, can effectively prevent images or videos from being counterfeited, and can also improve the accuracy of verifying the authenticity of the image to be verified.
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 device 101 transmits image data to be authenticated to the server 102, and the server 102 performs step S601 to receive the image data to be authenticated from the terminal device 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.
For step S602, in some embodiments of the present disclosure, obtaining ciphertext based on image data to be verified includes: and obtaining ciphertext from an image file in which the image data to be verified are located. The ciphertext is obtained, for example, from a file header of an image file.
Fig. 7A is a flowchart illustrating 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: based on the image data to be verified, the identification information of the initial image data is obtained.
S612: based on the identification information and a preset corresponding relation, acquiring a ciphertext, 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 a storage address of the ciphertext.
For step S611, for example, image data to be verified is generated according to step S401 and step S402 described above with reference to fig. 4, so that identification information of the initial image data can be acquired from the image data to be verified.
For step S612, for example, a storage address of the ciphertext is acquired. If the storage address of the ciphertext is obtained, the ciphertext needs to be obtained 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, thereby obtaining the ciphertext from the storage address.
Fig. 7B is a flowchart illustrating a method according to 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 obtaining 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 watermark verification information, or watermark verification information corresponding to the ciphertext may be obtained according to a mapping relationship between the ciphertext and the watermark verification information.
For example, the mapping relationship is constructed as a mapping relationship table, and the mapping relationship table is a watermark verification information-ciphertext mapping relationship table, so that the verification device queries 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 watermark verification text to verify the authenticity of the image data to be verified. If the watermark text is the same as the watermark verification text, the original image data is authentic. If the watermark text is inconsistent with the watermark verification text, the initial image data is spurious.
For another example, the degree of correspondence of the watermark text with the watermark verification text is compared. If the consistency degree of the watermark text and the watermark verification text is larger than or equal to a preset value, the initial image data is true. If the consistency degree of the watermark text and the watermark verification text is smaller than the preset value, the initial image data is false.
The watermark verification information may include watermark verification parameters in addition to the watermark verification text. The watermark verification parameter indicates 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 parameter. The method not only verifies the watermark text, but also can verify the image data to be verified according to the watermark verification parameters, thereby improving the verification accuracy. In addition, since the watermark verification parameters indicate which image data to be verified have watermark text, verification efficiency is improved, and 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 that watermark text is extracted 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 location information indicated by the watermark verification parameter. The method not only can verify the watermark text in the video data to be verified, but also can verify the video data to be verified according to the watermark verification parameters, thereby improving the verification accuracy. In addition, since the watermark verification parameters indicate which video data to be verified have watermark text, verification efficiency is improved, and verification time is saved.
Fig. 8 is a flowchart of a method for extracting watermark text from image data to be verified according to location information indicated by watermark verification parameters 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 parameter.
Step S702: watermark text is extracted from at least one target image frame.
For step S701, for example, the watermark verification parameter indicates which image frame of the image to be verified the watermark is on, so that the frame number of at least one target image frame containing the watermark is determined according to the watermark verification parameter, and at least one target image frame corresponding to the frame number is found according to the frame number. In some embodiments of the present disclosure, the watermark verification parameter includes at least one verification number, the at least one verification number corresponding to the at least one target image frame, respectively, and determining the at least one target image frame from the plurality of image frames to be verified based on the location information indicated by the watermark verification parameter 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 carrying out mathematical operation on the at least one verification number and the number of the plurality of image frames to be verified to calculate the remainder of X/N or the 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, so that 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 succession, and the verification numbers are 251, 300, 11. The remainder is 247, 100 and 10 after the remainder operation N/X. Then the image frames to be verified, which are arranged in the 247 th, 100 th and 10 th frames, of the 1000 image frames to be verified are taken as target image frames.
Fig. 9A illustrates a flow chart of generating image data to be verified provided by at least one embodiment of the present disclosure.
In this embodiment, taking initial image data as initial video data and taking to-be-verified image data as to-be-verified video as an example, an embodiment of generating to-be-verified image data is described.
As shown in fig. 9A, the server 800 issues a ciphertext 801 in response to a ciphertext acquisition request from a terminal apparatus, the ciphertext 801 containing watermark information to be applied to the initial video data. The terminal device sends a ciphertext acquisition request to the server 800 in response to the start camera shooting instruction, and jumps to the shooting interface. The terminal equipment receives the ciphertext 801, and then decrypts the ciphertext 801 by using a decryption algorithm to obtain watermark text waterMarkTxt1, waterMarkTxt2, waterMarkTxt3 and watermark parameters 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 including n initial image frames, and watermark parameters number1, number2, and number3 are respectively used to obtain remainders for the total frame number n, where the obtained 3 remainders are the frame numbers of the target image frames in the initial image frames, and 3 target image frames are extracted according to the frame numbers. Watermark text waterMarkTxt1, waterMarkTxt2 and waterMarkTxt3 are respectively added to target image frames indicated by watermark parameters number1, nunber2 and number3, namely, watermarks such as dark watermarks are added to 3 target image frames to obtain to-be-verified video data 802, and ciphertext 801 is added to the file header of an image file in which the to-be-verified video data 802 is located, namely, the header file of fig. 9A.
Fig. 9B illustrates a flow chart of a method of verifying authenticity of image data to be verified provided by at least one embodiment of the present disclosure.
As shown in fig. 9B, the server receives video data 900 to be authenticated from the terminal device. Ciphertext 903 is extracted from the header of the image file in which the video data 900 to be authenticated is located, i.e., the header file of fig. 9B, and watermark authentication information 902 is obtained by decrypting ciphertext 903. 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 frame number n. The watermark parameters number1, number2, number3 respectively leave n to obtain 3 remainders (number 1% n, number2% n, number3% n), which indicate the 3 frame 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 3 frame numbers, and then extracts watermark texts txt1, txt2, 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 watermark text txt1, txt2, txt3 and watermark verification text (waterMarkTxt 1, waterMarkTxt2, waterMarkTxt 3) are the same, the video data to be verified received by the server is video data which is photographed by the terminal device 101 in real time and is not tampered or not counterfeited, the verification passes, and if watermark text txt1, txt2, txt3 and watermark verification text (waterMarkTxt 1, waterMarkTxt2, waterMarkTxt 3) are inconsistent, the video data to be verified received by the server is tampered or counterfeited, the verification does not pass.
Fig. 10A shows a schematic block diagram of an image data processing apparatus 1000 provided by at least one embodiment of the present disclosure.
As shown in fig. 10A, the processing apparatus 1000 of image data 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 perform step S202 described in fig. 2, for example.
The image data generating unit 1030 is configured to generate image data to be verified based on the watermark information and the initial image data.
The image data generating unit 1030 may perform step S203 described in fig. 2, for example.
The image data transmitting unit 1040 is configured to transmit image data to be authenticated for extracting watermark information from the image data to be authenticated, and to authenticate the authenticity of the original image data according to the watermark information.
The image data transmission unit 1040 may perform step S204 described in fig. 2, for example.
For example, in the processing apparatus for image data provided in at least one embodiment of the present disclosure, the 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 in 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 to obtain the image data to be verified.
For example, in the processing apparatus for image data provided in at least one embodiment of the present disclosure, the image data generating unit includes: an identification acquisition subunit configured to acquire identification information of the initial image data; and a second image data generation subunit 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 the processing apparatus for image data provided in at least one embodiment of the present disclosure, the watermark information includes 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 the image data processing apparatus provided in at least one embodiment of the present disclosure, the watermark information further includes a watermark parameter, 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 image data processing apparatus provided in at least one embodiment of the present disclosure, initial image data is 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, the watermark parameter indicates location information of the watermark text in the initial image data, and the method includes: the watermark parameter indicates that the watermark text is added in at least one first target image frame of the plurality of initial image frames, the first adding subunit comprising: 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 an addition generating subunit configured to add the watermark text to the at least one target image frame, generating the video data to be verified.
For example, in the image data processing apparatus provided in at least one embodiment of the present disclosure, the watermark parameter includes at least one operation number, 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 ordinal number, and obtain the at least one target image frame from the plurality of initial image frames according to the at least one frame ordinal number.
For example, in the image data processing apparatus provided in at least one embodiment of the present disclosure, the number of the plurality of initial image frames is N, and the operator unit includes a first operator unit or a second operator unit. And the first operation subunit is configured to perform a remainder operation on N by using the at least one operation number respectively, so that at least one obtained remainder is used as the at least one frame number. And a second operation subunit configured to perform a remainder operation on the at least one operation number by N, so as to obtain at least one remainder as the at least one frame number. N is a positive integer greater than or equal to 2.
For example, in the processing apparatus for image data provided in at least one embodiment of the present disclosure, at least one operation number includes at least 2 sets of operation numbers, the watermark text includes at least 2 sets of sub watermark texts, respectively corresponding to the at least 2 operation numbers, and the at least 2 sets of sub watermark texts include at least two texts different from each other.
For example, in the processing apparatus for image data provided in at least one embodiment of the present disclosure, acquiring ciphertext includes acquiring ciphertext online, and acquiring the initial image data is allowed after confirming acquisition of the ciphertext, 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 acquisition unit 1010, the analysis unit 1020, the image data generation unit 1030, and the image data transmission unit 1040 may be dedicated or general-purpose circuits, chips, devices, or the like, or may be a combination of a processor and a memory. With respect to the specific implementation forms of the respective units described above, the embodiments of the present disclosure are not limited thereto.
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 the specific function of the image data processing apparatus 1000 may refer to the related description of the image data processing method, which is not repeated herein. The components and structures of the image data processing apparatus 1000 shown in fig. 10A are merely exemplary and not limiting, and the image data processing apparatus 1000 may further include other components and structures as needed.
Fig. 10B illustrates a schematic block diagram of another image data processing apparatus 1100 provided by at least one embodiment of the present disclosure.
For example, as shown in fig. 10B, the processing apparatus 1100 of image data 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 authenticated, and extract watermark information from the image data to be authenticated.
The image acquisition unit 1110 may perform step S601 described in fig. 6, for example.
The ciphertext acquisition unit 1120 is configured to acquire ciphertext based on the image data to be verified.
The ciphertext obtaining unit 1120 may, for example, perform step S602 described in fig. 6.
The verification unit 1130 is configured to verify the authenticity of the image data to be verified based on the watermark information and the ciphertext.
The verification unit 1130 may perform step S603 described in fig. 6, for example.
For example, in the processing device 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 ciphertext from an image file in which book data to be verified is located.
For example, in the image data processing apparatus provided in at least one embodiment of the present disclosure, the 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 corresponding relationship, where the preset corresponding relationship records a corresponding relationship between the identification information and the ciphertext or a corresponding relationship between the identification information and a storage address of the ciphertext.
For example, in the image data processing apparatus provided in at least one embodiment of the present disclosure, the verification unit includes a watermark verification information obtaining subunit configured to obtain watermark verification information corresponding to the ciphertext; and a comparison subunit configured to compare the watermark verification information with the watermark information to verify the authenticity of the image data to be verified.
For example, in the processing device for image data provided in at least one embodiment of the present disclosure, the 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 acquisition subunit is configured to acquire 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.
For example, in the processing device for image data provided in at least one embodiment of the present disclosure, the watermark verification information includes watermark verification text, the watermark information includes watermark text, and the comparing subunit includes a text comparing subunit configured to compare the watermark text with the watermark verification text to verify authenticity of the image data to be verified.
For example, in the image data processing apparatus provided in at least one embodiment of the present disclosure, the watermark verification information further includes a watermark verification parameter, the watermark verification parameter indicates position information of the watermark text in the image data to be verified, and the image acquisition unit includes an extraction subunit configured to extract the watermark text from the image data to be verified according to the position 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, 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, watermark verification parameters indicate location information of the 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 extracting subunit comprises a determining subunit configured to determine the at least one target image frame from the plurality of image frames to be verified based on the location information indicated by the watermark verification parameter, and a text extracting subunit configured to extract the watermark text from the at least one target image frame.
For example, in the image data processing apparatus provided in at least one embodiment of the present disclosure, the 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 the determining subunit includes a target determining subunit configured to perform a 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 obtain the at least one target image frame from the plurality of image frames to be verified according to the at least one frame number.
For example, in the 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 determining subunit includes: a first target determining subunit configured to perform a remainder operation on N with the at least one verification number, respectively, to obtain at least one remainder as the at least one frame number; or a second target determination subunit configured to perform a remainder operation on the at least one verification number with N, to obtain at least one 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 the specific function of the image data processing apparatus 1100 may refer to the related description of the image data processing method, which is not repeated herein. The components and structures of the image data processing apparatus 1100 shown in fig. 10B are merely exemplary and not limiting, and the image data processing apparatus 1100 may also include other components and structures as desired.
At least one embodiment of the present disclosure also provides an electronic device comprising a processor and a 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 methods described above. The electronic equipment reduces the risk of leakage of watermark information used for anti-counterfeiting processing of the image or video, thereby improving the difficulty of cracking the anti-counterfeiting processing, effectively preventing the image or video from being counterfeited, 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 by some embodiments of the present disclosure. As shown in fig. 11A, the electronic device 1200 includes a processor 1210 and a memory 1220. Memory 1220 is used to store non-transitory computer-readable instructions (e.g., one or more computer program modules). Processor 1210 is configured to execute non-transitory computer readable instructions that when executed by processor 1210 may perform one or more steps of the image data processing method described above. The memory 1220 and 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. Processor 1210 may be a general-purpose processor or a special-purpose processor that may control other components in electronic device 1200 to perform desired functions.
For example, memory 1220 may include any combination of one or more computer program products, which 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) and/or cache memory (cache) and the like. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, erasable programmable read-only memory (EPROM), 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 the processor 1210 to implement various functions of the electronic device 1200. Various applications and various data, as well as various data used and/or generated by the applications, etc., may also be stored in the computer readable storage medium.
It should be noted that, in the embodiments of the present disclosure, specific functions and technical effects of the electronic device 1200 may refer to the above description about the processing method of the image data, which is not repeated herein.
Fig. 11B is a schematic block diagram of another electronic device provided by some embodiments of the present disclosure. The electronic device 1300 is suitable for implementing, for example, a processing method of image data provided by an embodiment 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 illustrated in fig. 11B is merely an example, and does not impose any limitation on the functionality and scope of use of the embodiments of the present disclosure.
As shown in fig. 11B, the electronic device 1300 may include a processing means (e.g., a central processor, a graphics processor, etc.) 1310, which may perform various suitable actions and processes in accordance with a program stored in a Read Only Memory (ROM) 1320 or a program loaded from a storage 1380 into a Random Access Memory (RAM) 1330. In the RAM 1330, various programs and data required for the operation of the electronic device 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.
In general, the following devices may be connected to the I/O interface 1350: input devices 1360 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, and the like; an output device 1370 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; a storage 1380 including, for example, magnetic tape, hard disk, etc.; and a communication device 1390. The communication device 1390 may allow the electronic apparatus 1300 to communicate wirelessly or by wire with other electronic apparatuses to exchange data. While fig. 11B shows the electronic device 1300 with various means, it is to be understood that not all of the illustrated means are required to be implemented or provided, and that the electronic device 1300 may alternatively be implemented or provided with more or fewer means.
For example, according to an embodiment of the present disclosure, the above-described image data processing method 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 image data processing method. In such an embodiment, the computer program may be downloaded and installed from a network via communications device 1390, or from storage 1380, or from ROM 1320. The functions defined in the image data processing method provided by the embodiments of the present disclosure may be implemented when the computer program is executed by the processing apparatus 1310.
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 above-described image data processing method. By using the computer readable storage medium, the risk of leakage of watermark information used for anti-counterfeiting processing of images or videos is reduced, so that the difficulty of cracking the anti-counterfeiting processing is improved, the images or videos can be effectively prevented from being counterfeited, and the accuracy of verifying the authenticity of the images 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, a 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 of a method of processing image data according to the 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 relevant description of the storage medium 1400 may refer to the corresponding description of the memory 1220 in the electronic device 1200 shown in fig. 11A, which is not repeated herein.
The following points need to be described:
(1) The drawings of the embodiments of the present disclosure relate only to the structures to which the embodiments of the present disclosure relate, and reference may be made to the general design for other structures.
(2) The embodiments of the present disclosure and features in the embodiments may be combined with each other to arrive at a new embodiment without conflict.
The foregoing is merely specific embodiments of the disclosure, but the scope of the disclosure is not limited thereto, and the scope of the disclosure should be determined by the claims.

Claims (16)

1. A processing method of image data, applied to a terminal device, the method comprising:
obtaining a ciphertext from a remote device, wherein the ciphertext comprises watermark information for the initial image data;
analyzing the ciphertext to obtain a plaintext, and analyzing the plaintext to obtain the watermark information;
generating image data to be verified based on the watermark information and the initial image data; and
the image data to be verified is sent to be used for extracting the watermark information from the image data to be verified, the authenticity of the initial image data is verified according to the watermark information and the ciphertext,
wherein the watermark information comprises watermark text and watermark parameters, the initial image data is initial video data, the initial video data comprises a plurality of initial image frames, the image data to be verified comprises the video data to be verified, the watermark parameters comprise at least one operation number, the at least one operation number corresponds to at least one target image frame respectively,
Generating image data to be verified based on the watermark information and the initial image data, including:
performing mathematical operations 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 from the plurality of initial image frames according to the at least one frame number;
and adding the watermark text to the at least one target image frame to generate the video data to be verified.
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
and adding the ciphertext to an image file in which the intermediate image data is positioned 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 header of the image file in which the intermediate image data are 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
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 number of the plurality of initial image frames is N,
mathematically operating the at least one operand and the number of the plurality of initial image frames to obtain the at least one frame number comprises:
Respectively carrying out a remainder operation on N by using the at least one operation number to obtain at least one remainder as the at least one frame number; or alternatively, the process may be performed,
operating the operation number by using N to obtain at least one remainder as the at least one frame number;
n is a positive integer greater than or equal to 2.
6. The method of claim 1, wherein the at least one operation number comprises at least 2 sets of operation numbers,
the watermark text includes at least 2 sets of sub watermark text corresponding to the at least 2 operation numbers, respectively, and the at least 2 sets of sub watermark text include at least two texts different from each other.
7. The method of claim 1, wherein the acquiring ciphertext comprises acquiring ciphertext online and allowing acquisition of the initial image data after confirming acquisition of the ciphertext to generate image data to be verified based on the watermark information and the initial image data.
8. A method of processing image data, comprising:
obtaining image data to be verified from terminal equipment, and extracting watermark information from the image data to be verified;
acquiring ciphertext generated by remote equipment based on the image data to be verified, wherein the ciphertext is used for acquiring plaintext corresponding to the ciphertext by the terminal equipment, and the plaintext is used for carrying out anti-counterfeiting processing on initial image data acquired by the terminal equipment; and
Verifying the authenticity of the image data to be verified according to the watermark information and the ciphertext,
wherein verifying the authenticity of the image data to be verified according to the watermark information and the ciphertext comprises:
obtaining 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,
wherein the watermark verification information further comprises watermark verification parameters and watermark verification text, the watermark information comprises watermark text, the image data to be verified comprises video data to be verified, the video data to be verified comprises a plurality of image frames to be verified, the watermark verification parameters comprise at least one verification number, the at least one verification number corresponds to at least one target image frame respectively,
extracting the watermark information from the image data to be verified comprises the following steps:
performing mathematical operation according to the at least one verification number and the plurality of image frames to be verified to obtain at least one frame number;
determining the at least one target image frame from the plurality of image frames to be verified according to the at least one frame number; and
Extracting the watermark text from the at least one target image frame,
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.
9. The method of claim 8, wherein obtaining the ciphertext based on the image data to be verified comprises:
and acquiring the ciphertext from an image file in which the image data to be verified are located.
10. The method of claim 8, 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 a storage address of the ciphertext.
11. The method of claim 8, wherein obtaining watermark verification information corresponding to the ciphertext comprises:
Decrypting the ciphertext to obtain the watermark verification information; or alternatively
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.
12. The method of claim 8, wherein the number of the plurality of image frames to be verified is N,
performing a 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, comprising:
respectively carrying out a remainder operation on N by using the at least one verification number to obtain at least one remainder as the at least one frame number; or alternatively
Performing a remainder operation on the at least one verification number by N to obtain at least one remainder as the at least one frame number;
n is a positive integer greater than or equal to 2.
13. An image data processing apparatus applied to a terminal device, the apparatus comprising:
an information acquisition unit configured to acquire a ciphertext from a remote device, wherein the ciphertext includes watermark information for initial image data;
the analyzing unit is configured to analyze the ciphertext to obtain a plaintext and analyze the plaintext to obtain the 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
an image data transmitting unit configured to transmit the image data to be authenticated, to extract the watermark information from the image data to be authenticated, and to authenticate the authenticity of the initial image data based on the watermark information,
wherein the watermark information comprises watermark text and watermark parameters, the initial image data is initial video data, the initial video data comprises a plurality of initial image frames, the image data to be verified comprises the video data to be verified, the watermark parameters comprise at least one operation number, the at least one operation number corresponds to at least one target image frame respectively,
the image data generation unit is configured to:
performing mathematical operations 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 from the plurality of initial image frames according to the at least one frame number;
and adding the watermark text to the at least one target image frame to generate the video data to be verified.
14. An image data processing apparatus comprising:
an image acquisition unit configured to acquire image data to be verified from a terminal device, and extract watermark information from the image data to be verified;
the ciphertext acquisition unit is configured to acquire ciphertext generated by remote equipment based on the image data to be verified, wherein the ciphertext is used for the terminal equipment to acquire plaintext corresponding to the ciphertext, and the plaintext is used for performing anti-counterfeiting processing on initial image data acquired by the terminal equipment; and
a verification unit configured to verify the authenticity of the image data to be verified based on the watermark information and the ciphertext,
wherein the verification unit is configured to:
obtaining 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,
wherein the watermark verification information further comprises watermark verification parameters and watermark verification text, the watermark information comprises watermark text, the image data to be verified comprises video data to be verified, the video data to be verified comprises a plurality of image frames to be verified, the watermark verification parameters comprise at least one verification number, the at least one verification number corresponds to at least one target image frame respectively,
The image acquisition unit is configured to:
performing mathematical operation according to the at least one verification number and the plurality of image frames to be verified to obtain at least one frame number;
determining the at least one target image frame from the plurality of image frames to be verified according to the at least one frame number; and
extracting the watermark text from the at least one target image frame,
the verification unit is configured to:
and comparing the watermark text with the watermark verification text to verify the authenticity of the image data to be verified.
15. 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 instructions of the method of processing image data of any of claims 1-12.
16. A computer readable storage medium having computer readable instructions stored non-transitory, wherein the computer readable instructions, when executed by a processor, implement the method of processing image data of any of claims 1-12.
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 CN115688059A (en) 2023-02-03
CN115688059B true 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)

Families Citing this family (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 (4)

* 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
CN115688059A (en) * 2021-07-30 2023-02-03 瑞庭网络技术(上海)有限公司 Image data processing method and device, electronic equipment and storage medium

Patent Citations (4)

* 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
CN115688059A (en) * 2021-07-30 2023-02-03 瑞庭网络技术(上海)有限公司 Image data processing method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN115688059A (en) 2023-02-03

Similar Documents

Publication Publication Date Title
US10218506B1 (en) Cross-device authentication
US20190312720A1 (en) Method for remotely acquiring secret key, pos terminal and storage medium
CN106209886B (en) Web interface data encryption is endorsed method, apparatus and server
US10045210B2 (en) Method, server and system for authentication of a person
CN104980278B (en) The method and apparatus for verifying the availability of biometric image
CN109829269A (en) Method, apparatus and system based on E-seal authenticating electronic documents
CN106709963B (en) The method and apparatus of the authentication image true and false
CN108038388B (en) Method for realizing Web page seal, client and server
KR101688182B1 (en) Anti-counterfeiting verification method, device and system, program and recording medium
CN116662941B (en) Information encryption method, device, computer equipment and storage medium
CN105337940B (en) A kind of page verification method, client, server and system
CN106503527A (en) A kind of method and apparatus of electronic document fingerprint signature
US9787476B2 (en) Image verification by an electronic device
CN115688059B (en) Image data processing method and device, electronic equipment and storage medium
CN108900472B (en) Information transmission method and device
CN110753257A (en) Data display method, display terminal, server, display system, and storage medium
CN112732140A (en) Resource processing method and device, electronic equipment and storage medium
CN116361833A (en) Verification method and device and terminal equipment
CN110740112B (en) Authentication method, apparatus and computer readable storage medium
CN112380577A (en) Multiparty-supported electronic contract repeated signing method and device and computer equipment
Fang et al. Securing interactive sessions using mobile device through visual channel and visual inspection
JP2020027267A (en) Device for checking electronic signature, method and program therefor
CN111031356B (en) Multimedia information processing method and device, server and storage medium
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
CN114022259B (en) Bidding method and device based on public key assignment and identity verification

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