CN112750065B - Carrier object processing and watermark embedding method, device and electronic equipment - Google Patents

Carrier object processing and watermark embedding method, device and electronic equipment Download PDF

Info

Publication number
CN112750065B
CN112750065B CN201911049751.1A CN201911049751A CN112750065B CN 112750065 B CN112750065 B CN 112750065B CN 201911049751 A CN201911049751 A CN 201911049751A CN 112750065 B CN112750065 B CN 112750065B
Authority
CN
China
Prior art keywords
watermark
carrier object
feature vector
original
obtaining
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
CN201911049751.1A
Other languages
Chinese (zh)
Other versions
CN112750065A (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.)
Alibaba China Network Technology Co Ltd
Original Assignee
Alibaba China Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alibaba China Network Technology Co Ltd filed Critical Alibaba China Network Technology Co Ltd
Priority to CN201911049751.1A priority Critical patent/CN112750065B/en
Priority to PCT/CN2020/123884 priority patent/WO2021083110A1/en
Publication of CN112750065A publication Critical patent/CN112750065A/en
Application granted granted Critical
Publication of CN112750065B publication Critical patent/CN112750065B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/0021Image watermarking
    • G06T1/0092Payload characteristic determination in a watermarking scheme, e.g. number of bits to be embedded
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)
  • Editing Of Facsimile Originals (AREA)

Abstract

The application discloses a carrier object processing method, a carrier object processing device and electronic equipment, and a watermark embedding method, a watermark embedding device and electronic equipment. The carrier object processing method comprises the following steps: acquiring a carrier object to be processed; extracting the watermark template from the carrier object to be processed; and editing the watermark in the carrier object to be processed according to the watermark template to obtain the target carrier object. According to the carrier object processing method, the specific position of the watermark can be accurately obtained by extracting the watermark template corresponding to the carrier object to be processed; and according to the watermark template, the watermark of the carrier object to be processed can be accurately edited. The carrier object processing method solves the problem that the existing watermark editing method cannot accurately edit the watermark due to the diversity of the watermark patterns.

Description

Carrier object processing and watermark embedding method, device and electronic equipment
Technical Field
The present application relates to the field of computer technologies, and in particular, to a carrier object processing method, an apparatus, and an electronic device, and a watermark embedding method, an apparatus, and an electronic device.
Background
In recent years, with the rapid development of information technology and digital technology, more and more digital media, including sound, characters, images, videos, and the like, are widely spread. The digital media have the characteristics of easy storage, copy and transmission, and are easy to operate and modify in various forms, so that the digital media are easy to be utilized by lawbreakers in the transmission process. As a result, more and more businesses and individuals add watermarks to these digital media to protect intellectual property.
In some application scenarios, the watermark carried by the digital media needs to be edited, which involves a watermark editing technology. The existing watermark editing technology mainly obtains a large number of carrier objects containing the same or similar watermarks, further estimates the watermark positions of the carrier objects, and then edits the watermarks according to the estimated watermark positions. However, this technique can only process a batch of carrier objects, and cannot process a single carrier object, which brings trouble to processing a single carrier object. In addition, the above method for editing watermarks can only edit a certain watermark type, that is, only a single type of watermark can be edited. However, the types of watermarks in the existing carrier objects with watermarks are different, and therefore, the existing watermark editing methods cannot accurately edit the watermarks in the carrier objects with watermarks having diverse patterns.
Disclosure of Invention
The application provides a carrier object processing method, which aims to solve the problem that the existing watermark editing method can not accurately edit watermarks due to the diversity of watermark patterns; the application also provides a carrier object processing device and an electronic device. The application also provides a watermark embedding method, a watermark embedding device and electronic equipment.
The application provides a carrier object processing method, which comprises the following steps:
acquiring a carrier object to be processed;
extracting a watermark template from the carrier object to be processed;
and editing the watermark in the carrier object to be processed according to the watermark template to obtain a target carrier object.
Optionally, the extracting the watermark template from the carrier object to be processed includes:
inputting the carrier object to be processed into a network model for extracting a watermark template to obtain a feature vector of the carrier object to be processed;
and acquiring a watermark template corresponding to the feature vector according to the feature vector of the carrier object to be processed.
Optionally, the obtaining, according to the feature vector of the carrier object to be processed, a watermark template corresponding to the feature vector includes:
and carrying out convolution operation on the characteristic vector to obtain a watermark template corresponding to the characteristic vector.
Optionally, the watermark template is a template used when adding watermark information to the original carrier object; and the original carrier object is the carrier object before the watermark information is added to the carrier object to be processed.
Optionally, the method further includes:
setting the color of the watermark to be a preset color in the carrier object to be processed according to the watermark template;
the editing the watermark in the carrier object to be processed according to the watermark template to obtain a target carrier object, including: and editing the watermark in the carrier object to be processed according to the preset color of the watermark and the watermark template to obtain a target carrier object.
Optionally, the setting, according to the watermark template, the color of the watermark in the carrier object to be processed to be a predetermined color includes:
and inputting the carrier object to be processed and the watermark template into a network model for setting the color of the watermark to be a preset color so as to set the color of the watermark in the carrier object to be processed to be the preset color.
Optionally, the inputting the carrier object to be processed and the watermark template into a network model for setting the watermark color as a predetermined color, so as to set the color of the watermark in the carrier object to be processed as a predetermined color, includes:
according to the watermark template, obtaining the position information and the shape information of the watermark in the carrier object to be processed;
and setting the color of the watermark in the carrier object to be processed to be a preset color according to the position information and the shape information of the watermark in the carrier object to be processed.
Optionally, the method further includes:
obtaining the carrier object with the color of the watermark in the carrier object to be processed set as the preset color;
the editing the watermark in the carrier object to be processed according to the preset color of the watermark and the watermark template to obtain a target carrier object, including:
and inputting the carrier object to be processed, the watermark template and the carrier object set to be the preset color into a network model for editing the watermark to obtain a target carrier object.
Optionally, the inputting the to-be-processed carrier object, the watermark template, and the carrier object set to the predetermined color into a network model for editing a watermark to obtain a target carrier object includes:
inputting the carrier object to be processed, the watermark template and the carrier object set to be in the preset color into the network model for editing the watermark to obtain an editing feature vector corresponding to the carrier object to be processed, the watermark template and the carrier object set to be in the preset color;
and editing the watermark of the carrier object to be processed according to the carrier object to be processed, the watermark template and the editing feature vector corresponding to the carrier object set to be in the preset color to obtain a target carrier object.
Optionally, the setting of the color of the watermark in the to-be-processed carrier object to be a predetermined color means that a pixel value of the watermark in the to-be-processed carrier object at a position in the to-be-processed carrier object is set to be a predetermined pixel value.
Optionally, obtaining the network model for extracting the watermark template;
the obtaining of the network model for extracting the watermark template comprises:
obtaining sample data for extracting the watermark template;
obtaining a primary feature vector of the sample data;
performing convolution operation on the primary feature vector to obtain a primary watermark template corresponding to the primary feature vector;
obtaining a secondary feature vector according to the primary feature vector;
performing convolution operation on the secondary feature vector to obtain a secondary watermark template corresponding to the secondary feature vector;
obtaining a third-level feature vector according to the second-level feature vector;
performing convolution operation on the three-level feature vectors to obtain three-level watermark templates corresponding to the three-level feature vectors;
taking the primary watermark template, the secondary watermark template and the tertiary watermark template as watermark templates corresponding to the sample data;
and acquiring the corresponding relation between the sample data and the watermark template corresponding to the sample data, and taking the corresponding relation as a network model for extracting the watermark template.
Optionally, the obtaining a secondary feature vector according to the primary feature vector includes:
obtaining a feature vector of a first shrinkage scale corresponding to the primary feature vector according to the primary feature vector;
obtaining a feature vector of a first shrinkage scale corresponding to the secondary feature vector according to the feature vector of the first shrinkage scale corresponding to the primary feature vector;
and obtaining a secondary characteristic vector according to the characteristic vector of the first shrinkage scale corresponding to the secondary characteristic vector.
Optionally, the obtaining, according to the feature vector of the first shrinkage scale corresponding to the primary feature vector, the feature vector of the first shrinkage scale corresponding to the secondary feature vector includes:
obtaining a feature vector of a second shrinkage scale corresponding to the primary feature vector according to the feature vector of the first shrinkage scale corresponding to the primary feature vector;
obtaining a feature vector of a second shrinkage scale corresponding to the secondary feature vector according to the feature vector of the second shrinkage scale corresponding to the primary feature vector;
and obtaining the feature vector of the first shrinkage scale corresponding to the secondary feature vector according to the feature vector of the second shrinkage scale corresponding to the secondary feature vector.
Optionally, the obtaining a tertiary feature vector according to the secondary feature vector includes:
obtaining a feature vector of a first shrinkage scale corresponding to the secondary feature vector according to the secondary feature vector;
obtaining a feature vector of a first shrinkage scale corresponding to the feature vector of the third level according to the feature vector of the first shrinkage scale corresponding to the feature vector of the second level;
and obtaining a tertiary characteristic vector according to the characteristic vector of the first shrinkage scale corresponding to the tertiary characteristic vector.
Optionally, the obtaining, according to the feature vector of the first shrinkage scale corresponding to the secondary feature vector, the feature vector of the first shrinkage scale corresponding to the tertiary feature vector includes:
obtaining a feature vector of a second shrinkage scale corresponding to the secondary feature vector according to the feature vector of the first shrinkage scale corresponding to the secondary feature vector;
obtaining a feature vector of a second shrinkage scale corresponding to the third-level feature vector according to a feature vector of a second shrinkage scale corresponding to the second-level feature vector;
and obtaining the feature vector of the first shrinkage scale corresponding to the feature vector of the third level according to the feature vector of the second shrinkage scale corresponding to the feature vector of the third level.
Optionally, obtaining a network model for setting the watermark color to a predetermined color;
the obtaining a network model for setting a watermark color to a predetermined color includes:
setting the color of the watermark in the sample data as a preset color according to the primary feature vector and the primary watermark template, and obtaining a first sample of the sample data after the preset color is set;
setting the color of the watermark in the sample data as a preset color according to the secondary feature vector and the secondary watermark template; obtaining a second sample of the sample data which is set to be a preset color;
setting the color of the watermark to be a preset color in the sample data according to the three-level feature vector and the three-level watermark template; obtaining a third sample of the sample data after the sample data is set to be a preset color;
taking the first sample, the second sample and the third sample as sample data in which a color of a watermark is set to a predetermined color in the sample data;
and obtaining the corresponding relation between the sample data and the sample data of the preset color, and taking the corresponding relation as a network model for setting the watermark color as the preset color.
Optionally, the method further includes: correcting the network model for extracting the watermark template according to the sample data of the preset color;
the correcting the network model for extracting the watermark template according to the sample data of the preset color comprises the following steps:
judging whether the sample data of the preset color and the sample data of the expected preset color are in a specified threshold range or not; if yes, directly taking the sample data of the preset color as an output result of the network model for setting the watermark color as the preset color;
if not, re-acquiring the correction characteristic vector of the carrier object to be processed according to the sample data of the preset color and the sample data for extracting the watermark template; and obtaining a correction watermark template corresponding to the correction feature vector according to the correction feature vector.
Optionally, obtaining a network model for editing the watermark;
the obtaining of the network model for editing the watermark includes:
according to the sample data, the watermark template corresponding to the sample data and the sample data of the preset color, obtaining an editing feature vector in the sample data;
according to the editing feature vector, editing the watermark corresponding to the sample data to obtain target sample data;
and acquiring the corresponding relation between the sample data and the target sample data, and taking the corresponding relation as a network model for editing the watermark.
Optionally, the extracting the watermark template from the carrier object to be processed includes:
automatically acquiring at least one set of watermark templates corresponding to the carrier object to be processed according to the carrier object to be processed;
and taking one or all of the at least one set of watermark templates corresponding to the to-be-processed carrier object as the watermark template of the to-be-processed carrier.
Correspondingly, the present application provides a carrier object processing apparatus comprising:
a carrier object processing unit for acquiring a carrier object to be processed;
a watermark template extraction unit for extracting a watermark template from the carrier object to be processed;
and the target carrier object obtaining unit is used for editing the watermark in the carrier object to be processed according to the watermark template to obtain the target carrier object.
The application also provides a watermark embedding method, which comprises the following steps:
obtaining an original carrier object and obtaining an original watermark;
obtaining the position information of the original watermark embedded in the original carrier object;
and in the original carrier object, randomly embedding the original watermark to the specified position of the original carrier object according to the attribute information and the position information of the original watermark.
Optionally, the obtaining the original watermark includes:
randomly combining at least one of the numeric symbols, the English symbols and the special symbols to form a character sequence;
and taking the character sequence as the original watermark.
Optionally, the obtaining the location information of the original watermark embedded in the original carrier object includes:
acquiring the size information of the original carrier object and the size information of the original watermark;
determining an embedding area of the original watermark on the original carrier object according to the size information of the original carrier object;
and in the embedding area, acquiring the position information of the original watermark embedded in the original carrier object according to the size information of the original watermark.
Optionally, the determining, according to the size information of the original carrier object, an embedding area of the original watermark on the original carrier object includes:
according to the size information of the original carrier object, obtaining the length size information of the original carrier object;
determining first reserved size information in the length direction on the original carrier object according to the length size information;
obtaining width size information of the original carrier object according to the size information of the original carrier object;
determining second reserved size information in the width direction on the original carrier object according to the width size information;
and determining an embedded area of the original watermark on the original carrier object according to the size information of the original carrier object, the first reserved size information and the second reserved size information.
Optionally, the obtaining, in the embedding area, the position information of the original watermark embedded in the original carrier object according to the size information of the original watermark includes:
acquiring edge position information of the original watermark according to the size information of the original watermark;
and acquiring the position information of the original watermark embedded in the original carrier object according to the edge position information of the original watermark and the position information of the embedded area.
Optionally, the attribute information of the original watermark includes: at least one of a color of the original watermark, a font of the original watermark, and font information of the original watermark.
Correspondingly, the application also provides a watermark embedding device, which comprises:
an original carrier object obtaining unit for obtaining an original carrier object;
an original watermark obtaining unit, configured to obtain an original watermark;
a position information obtaining unit, configured to obtain position information of embedding the original watermark on the original carrier object;
and the embedding unit is used for randomly embedding the original watermark into the specified position of the original carrier object according to the attribute information and the position information of the original watermark in the original carrier object.
The application provides an electronic device, including:
a processor;
a memory for storing a program of the carrier object processing method and performing the steps of:
acquiring a carrier object to be processed;
extracting a watermark template from the carrier object to be processed;
and editing the watermark in the carrier object to be processed according to the watermark template to obtain a target carrier object.
The application provides an electronic device, including:
a processor;
a memory for storing a program of the watermark embedding method and performing the following steps:
obtaining an original carrier object and obtaining an original watermark;
obtaining the position information of the original watermark embedded in the original carrier object;
and in the original carrier object, randomly embedding the original watermark into the specified position of the original carrier object according to the attribute information and the position information of the original watermark.
The present application provides a computer storage medium storing a program of a carrier object processing method, which is executed by a processor, and executes the steps of:
acquiring a carrier object to be processed;
extracting a watermark template from the carrier object to be processed;
and editing the watermark in the carrier object to be processed according to the watermark template to obtain a target carrier object.
The present application provides a computer storage medium storing a program of a watermark embedding method, the program being executed by a processor and performing the steps of:
obtaining an original carrier object and obtaining an original watermark;
obtaining the position information of the original watermark embedded in the original carrier object;
and in the original carrier object, randomly embedding the original watermark to the specified position of the original carrier object according to the attribute information and the position information of the original watermark.
Compared with the prior art, the method has the following advantages:
the application discloses a carrier object processing method, which comprises the following steps: acquiring a carrier object to be processed; extracting a watermark template from the carrier object to be processed; and editing the watermark in the carrier object to be processed according to the watermark template to obtain a target carrier object. According to the carrier object processing method, the specific position of the watermark can be accurately obtained by extracting the watermark template corresponding to the carrier object to be processed; and according to the watermark template, the watermark of the carrier object to be processed can be accurately edited. The carrier object processing method solves the problem that the existing watermark editing method can not accurately edit the watermark due to the diversity of the watermark patterns by obtaining the watermark template corresponding to the carrier object to be processed.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the description below are only some embodiments described in the present application, and other drawings can be obtained by those skilled in the art according to these drawings.
Fig. 1 is a schematic diagram of an application scenario embodiment of a carrier object processing method provided in the present application.
Fig. 1-a is a schematic diagram of another embodiment of an application scenario of a carrier object processing method provided in the present application.
Fig. 2 is a flowchart of a carrier object processing method according to an embodiment of the present application.
Fig. 3 is a schematic diagram of a second application scenario embodiment of the carrier object processing method provided in the present application.
Fig. 4 is a schematic diagram of a GridNet network structure provided in an embodiment of the present application.
Fig. 5 is a schematic diagram of a carrier object processing apparatus according to a second embodiment of the present application.
Fig. 6 is a flowchart of a watermark embedding method according to a third embodiment of the present application.
Fig. 7 is a schematic diagram of a watermark embedding apparatus according to a fourth embodiment of the present application.
Fig. 8 is a schematic view of carrier object processing electronic equipment provided in the fifth embodiment of the present application.
Detailed Description
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present invention. This invention may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein, but rather construed as limited to the embodiments set forth herein.
The application provides a carrier object processing method and device, electronic equipment and a computer storage medium.
Some embodiments provided herein may process scenes of watermarks in carrier objects. Fig. 1 is a schematic diagram of an application scenario embodiment of a carrier object processing method provided in the present application. Firstly, the server side obtains a carrier object to be processed from the terminal, wherein the carrier object to be processed can be an image with a watermark and can be a video frame image. And extracting the watermark template according to the current image. After obtaining the watermark template, setting the color of the watermark in the image with the watermark as a preset color, then editing the watermark in the image with the watermark according to the preset color of the watermark and the watermark template, and returning the image after editing the watermark to the terminal. And editing the watermark at least comprises one of detecting the watermark, deleting the watermark, adding the watermark and modifying the watermark. For example, fig. 1-a is a schematic diagram of another embodiment of an application scenario of the carrier object processing method provided by the present application, in fig. 1-a, a watermark "B61& pmFhJlw2HV" in an image is removed to obtain an image without a watermark, and then a new watermark "@ blue #" is added to the image without the watermark. It should be noted that the application scenario is only one embodiment of the application scenario, and this embodiment of the application scenario is provided to facilitate understanding of the carrier object processing method of the present application, and is not used to limit the carrier object processing method of the present application.
Fig. 2 is a flowchart of a carrier object processing method according to an embodiment of the present application. The method comprises the following steps.
Step S201: and acquiring a carrier object to be processed.
In this application, the carrier object to be processed refers to the carrier object containing the watermark. Wherein the carrier object may be at least one of an image or a text file. For example, the carrier object containing the watermark can be an image containing the watermark, a Word text document containing the watermark, or a PDF text document containing the watermark. In the present embodiment, the carrier object processing method is mainly described in terms of processing a watermarked image. Of course, it is understood that the carrier object to be processed may also be other carrier media containing watermarks besides images containing watermarks, text documents containing watermarks, and is not limited herein.
Step S202: the watermark template is extracted from the carrier object to be processed.
After acquiring the to-be-processed carrier object in step S201, in order to detect the precise location of the watermark in the to-be-processed carrier object, the watermark template needs to be extracted from the to-be-processed carrier object. The watermark template is a template adopted when watermark information is added to the original carrier object; and the original carrier object is the carrier object before the watermark information is added to the carrier object to be processed.
In particular, the extraction of the watermark template from the carrier object to be processed may be in the manner described below.
Firstly, inputting the carrier object to be processed into a network model for extracting a watermark template, and obtaining a feature vector of the carrier object to be processed.
The network model for extracting the watermark template is mainly used for detecting the watermark in the carrier object to be processed, and the watermark detection is mainly used for extracting watermark binary template information, namely the watermark template, from the carrier object (namely an image) containing the watermark. In order to extract the watermark template more accurately, the embodiment designs a network model for extracting the watermark template, and in the proposed network model for extracting the watermark template, a multi-cascade network structure is adopted. In the proposed multi-cascaded network, each stage outputs a feature vector F i Where i represents the number of stages of the network, and then the feature vector will be the input feature vector for the next stage (i + 1) of the network. In this embodiment, the number of stages of the network is three. The networks of each stage are respectively used for feature extraction (first stage network), feature enhancement (second stage network) and feature refinement (third stage network).
And after the characteristic vector is obtained, obtaining a watermark template corresponding to the characteristic vector according to the characteristic vector of the carrier object to be processed.
Specifically, the obtaining of the watermark template corresponding to the feature vector according to the feature vector of the to-be-processed carrier object may be performing convolution operation on the feature vector to obtain the watermark template corresponding to the feature vector. Feature vector F output at each stage i Using convolution operations (C) i ) Outputting a watermark template S i . Since the number of stages of the network is three in this embodiment, the watermark is outputTemplate S i There are also three.
In order to more accurately obtain the extracted watermark template from the carrier object to be processed, each level of the network model for extracting the watermark template in this embodiment is of a GridNet structure, as shown in fig. 4 below, which is a schematic diagram of the GridNet network structure. In the three network models in this embodiment, each network model adopts a 3-cascade network, that is: and L =3, respectively completing feature extraction, feature enhancement and feature refinement in sequence by using a three-level networking network, wherein each network structure adopts a GridNet structure. Specifically, in GridNet, the convolution kernels of all convolution layers are 3 × 3, and the number of convolution kernels in the intermediate layers is 32, that is, 32 feature maps are generated for each layer. Downsampling (downward arrow in fig. 4) is achieved using convolution with a step size set to 2; the upsampling (upward arrow in fig. 4) utilizes a deconvolution operation. In the structure in fig. 4, the lateral arrows indicate that there are 3 convolutional layers, 3 active layers, and 3 batch normalization layers; downsampled arrows represent 3 convolutional layers, 3 active layers, with the last convolutional layer step size of 2; the up-sampling arrows represent 2 convolutional layers, 1 deconvolution layer, and 3 active layers.
The GridNet network structure mainly utilizes the multi-scale information of the images, and the accuracy of extracting the watermark template from the carrier object to be processed can be enhanced to a certain degree by adopting the multi-scale information of the images, and meanwhile, the learning capability of the network can be enhanced to a certain degree. If the ith grade GridNet is expressed as
Figure BDA0002255030570000111
Wherein
Figure BDA0002255030570000112
To represent
Figure BDA0002255030570000113
The whole network model for extracting the watermark template can be expressed as:
Figure BDA0002255030570000114
S i =C i (F i )。
before extracting a template from a carrier object to be processed using a network model for extracting a watermark template, the network model for extracting the watermark template needs to be obtained.
As one of the ways to obtain the network model for extracting the watermark template, sample data for extracting the watermark template may be first used. And then, obtaining a primary feature vector of the sample data.
After the primary feature vector of the sample data is obtained, performing convolution operation on the primary feature vector to obtain a primary watermark template corresponding to the primary feature vector.
Meanwhile, after the primary characteristic vector of the sample data is obtained, a secondary characteristic vector is obtained according to the primary characteristic vector. And performing convolution operation on the secondary characteristic vector in a manner similar to the manner of obtaining the primary watermark template corresponding to the primary characteristic vector to obtain a secondary watermark template corresponding to the secondary characteristic vector.
Similarly, after the secondary feature vector of the sample data is obtained, a tertiary feature vector is obtained according to the secondary feature vector. And performing convolution operation on the three-level characteristic vectors in a manner similar to the manner of obtaining the two-level watermark templates corresponding to the two-level characteristic vectors to obtain three-level watermark templates corresponding to the three-level characteristic vectors.
And after a primary watermark template, a secondary watermark template and a tertiary watermark template are respectively obtained, taking the primary watermark template, the secondary watermark template and the tertiary watermark template as watermark templates corresponding to the sample data.
And finally, obtaining the corresponding relation between the sample data and the watermark template corresponding to the sample data, and taking the corresponding relation as a network model for extracting the watermark template.
The GridNet structure adopted by each level of network of the network model for extracting the watermark template can be embodied in a mode of obtaining a secondary characteristic vector according to the primary characteristic vector. Specifically, the manner of obtaining the secondary feature vector from the primary feature vector is as described below.
Firstly, according to the primary feature vector, obtaining a feature vector of a first shrinkage scale corresponding to the primary feature vector. And then, obtaining the feature vector of the first shrinkage scale corresponding to the secondary feature vector according to the feature vector of the first shrinkage scale corresponding to the primary feature vector. And finally, obtaining a secondary feature vector according to the feature vector of the first shrinkage scale corresponding to the secondary feature vector.
More specifically, the feature vector of the first shrinkage scale corresponding to the secondary feature vector is obtained according to the feature vector of the first shrinkage scale corresponding to the primary feature vector, in a manner described below.
Firstly, according to the feature vector of the first shrinkage scale corresponding to the first-level feature vector, obtaining the feature vector of the second shrinkage scale corresponding to the first-level feature vector. And then, obtaining the feature vector of the second shrinkage scale corresponding to the secondary feature vector according to the feature vector of the second shrinkage scale corresponding to the primary feature vector. And finally, obtaining the feature vector of the first shrinkage scale corresponding to the secondary feature vector according to the feature vector of the second shrinkage scale corresponding to the secondary feature vector.
Similarly, the GridNet structure adopted by each level of network of the network model for extracting the watermark template may be embodied in a manner of obtaining a third level of feature vectors according to the second level of feature vectors.
Firstly, according to the secondary feature vector, obtaining a feature vector of a first shrinkage scale corresponding to the secondary feature vector. And then, obtaining the feature vector of the first shrinkage scale corresponding to the feature vector of the third level according to the feature vector of the first shrinkage scale corresponding to the feature vector of the second level. And finally, obtaining the third-level feature vector according to the feature vector of the first shrinkage scale corresponding to the third-level feature vector.
More specifically, the feature vector of the first shrinkage scale corresponding to the feature vector of the third level is obtained according to the feature vector of the first shrinkage scale corresponding to the feature vector of the second level, in a manner described below.
Firstly, according to the feature vector of the first shrinkage scale corresponding to the secondary feature vector, obtaining the feature vector of the second shrinkage scale corresponding to the secondary feature vector. And then, obtaining the feature vector of the second shrinkage scale corresponding to the feature vector of the third level according to the feature vector of the second shrinkage scale corresponding to the feature vector of the second level. And finally, obtaining the feature vector of the first shrinkage scale corresponding to the feature vector of the third level according to the feature vector of the second shrinkage scale corresponding to the feature vector of the third level.
Meanwhile, after the watermark template is obtained, in order to overcome the problem of the existing watermark color diversity, the color of the watermark is set to be a preset color in the carrier object to be processed according to the watermark template.
After the watermark template is obtained in step S202, the color of the watermark is set to a predetermined color in the to-be-processed carrier object according to the watermark template. Wherein the setting of the color of the watermark in the to-be-processed carrier object to be a predetermined color means that the pixel value of the watermark in the to-be-processed carrier object at the position in the to-be-processed carrier object is set to be a predetermined pixel value. In this embodiment, the pixel value of the watermark in the to-be-processed carrier object at the position in the to-be-processed carrier object is set to zero.
Specifically, the setting of the color of the watermark in the to-be-processed carrier object to be a predetermined color according to the watermark template may be that the to-be-processed carrier object and the watermark template are input into a network model for setting the color of the watermark to be a predetermined color, so as to set the color of the watermark in the to-be-processed carrier object to be a predetermined color.
More specifically, the carrier object to be processed and the watermark template are input into a network model for setting the watermark color to a predetermined color, so as to set the color of the watermark in the carrier object to be processed to a predetermined color, in a manner described below. Firstly, according to the watermark template, the position information and the shape information of the watermark in the carrier object to be processed are obtained. Then, according to the position information and the shape information of the watermark in the carrier object to be processed, the color of the watermark in the carrier object to be processed is set to be a preset color.
In the above, inputting the carrier object to be processed and the watermark template into the network model for setting the watermark color as the predetermined color, so as to set the color of the watermark in the carrier object to be processed as the predetermined color, the network model for setting the watermark color as the predetermined color needs to be adopted. Therefore, in the present embodiment, training is also required to obtain a network model for setting the watermark color to a predetermined color. Wherein the network model for setting the watermark color to a predetermined color and the network model for extracting the watermark template belong to mutually corresponding network models.
The network model for setting the watermark color as the preset color is obtained and is trained according to the sample data during the training of the network model for extracting the watermark template and the watermark template generated in the training process. A specific procedure for training a network model for setting the watermark color to a predetermined color is described below.
Firstly, according to the primary feature vector and the primary watermark template, setting the color of the watermark in the sample data as a preset color, and obtaining a first sample of the sample data after the preset color is set. Meanwhile, according to the secondary feature vector and the secondary watermark template, setting the color of the watermark in the sample data as a preset color; and obtaining a second sample of the sample data set to be a preset color. Setting the color of the watermark in the sample data as a preset color according to the three-level feature vector and the three-level watermark template; and obtaining a third sample of the sample data set to be a preset color.
Then, the first sample, the second sample, and the third sample are used as sample data in which a color of a watermark is set to a predetermined color in the sample data.
And finally, obtaining the corresponding relation between the sample data and the sample data of the preset color, and taking the corresponding relation as a network model for setting the watermark color as the preset color.
Setting the watermark color to a predetermined color is primarily intended to unify colors in the watermarked image. In practice, the watermark has various colors, and the watermark color diversification can cause the watermark edited in the watermark editing process to be inaccurate, so that the watermark color in the image containing the watermark is set to be a preset color, the pixel value of the watermark position is set to be zero, and the pixel values of other positions are unchanged. The structure of the network model for setting the watermark color to a predetermined color is similar to that of the network model for extracting the watermark template, and the only difference is that in the structure of the network model for setting the watermark color to a predetermined color, the result of the output sample data set to a predetermined color is three-channel data, and the watermark template output by the network model for extracting the watermark template is data of a two-dimensional single channel. With regard to the structure of the network model for setting the watermark color to the predetermined color, reference is made to the related description of the network model for extracting the watermark template, which is not described in detail herein.
Setting the pixel of the location of the watermark to zero can be achieved by using the following formula: y = S ^ X, where X is the watermarked image, S ^ is the result after inverting by the watermark position of the watermark template, so that since the watermark positions in S ^ are all zeros and the other positions are all ones, the result is exactly the result after setting to the predetermined color.
In this embodiment, in order to train a more accurate network model for setting a watermark color to a predetermined color and a network model for extracting a watermark template, the network model for extracting the watermark template is corrected according to sample data of the predetermined color; the details may be as described below.
Judging whether the sample data of the preset color and the sample data of the expected preset color are in a specified threshold range or not; if yes, directly taking the sample data of the preset color as an output result of the network model for setting the watermark color as the preset color.
If not, re-acquiring the correction characteristic vector of the carrier object to be processed according to the sample data of the preset color and the sample data for extracting the watermark template; and obtaining a correction watermark template corresponding to the correction feature vector according to the correction feature vector.
The above correction process may specifically be as follows: in the network model for extracting the watermark template, the characteristic vector generated by each level of network is represented as T i The generated sample data of the predetermined color is denoted as M i In the framework of the correction network,
Figure BDA0002255030570000141
wherein the content of the first and second substances,
Figure BDA0002255030570000142
denotes the ith cascade network, (F) i -1) — 1) simulates a bitwise inversion operation of the watermark template, and the sample data result for a predetermined color at each level can be expressed as: m i =C i (T i ) In which C is i Representing a convolutional layer.
Through the above correction, two network structures of a network model for setting the watermark color as a predetermined color and a network model for extracting the watermark template can be jointly trained, and the following advantages are provided: firstly, the watermark template information of the network model for extracting the watermark template can provide guidance for the network model for setting the watermark color as the preset color, and the more accurate the watermark template is learned, the more accurate the result of setting the watermark color as the preset color is; secondly, the result of setting the watermark color to a predetermined color can be effectively fed back to the network model used to extract the watermark template, thereby indicating to some extent the generation of the watermark template.
Step S203: and editing the watermark in the carrier object to be processed according to the watermark template to obtain the target carrier object.
After step S202, a watermark template is obtained, and a carrier object with a predetermined color set as the color of the watermark in the carrier object to be processed is obtained. And then inputting the carrier object to be processed, the watermark template and the carrier object set to be the preset color into a network model for editing the watermark to obtain a target carrier object.
Specifically, the to-be-processed carrier object, the watermark template, and the carrier object set to the predetermined color are input into a network model for editing a watermark to obtain a target carrier object, as follows.
Firstly, the carrier object to be processed, the watermark template and the carrier object set to the preset color are input into the network model for editing the watermark to obtain the editing feature vectors corresponding to the carrier object to be processed, the watermark template and the carrier object set to the preset color.
And then, according to the carrier object to be processed, the watermark template and the editing feature vector corresponding to the carrier object set to be in the preset color, editing the watermark of the carrier object to be processed to obtain a target carrier object.
Before the watermark of the carrier object to be processed is edited to obtain the target carrier object, a network model for editing the watermark needs to be obtained. Wherein, obtaining the network model for editing the watermark may be: firstly, according to the sample data, the watermark template corresponding to the sample data and the sample data of the preset color, an editing feature vector in the sample data is obtained. Then, according to the editing characteristic vector, editing the watermark corresponding to the sample data to obtain target sample data; and finally, obtaining the corresponding relation between the sample data and the target sample data, and taking the corresponding relation as a network model for the target watermark. In this embodiment, it should be noted that, editing a watermark may refer to deleting an original watermark, or adding a watermark after deleting the original watermark. Correspondingly, the target sample data refers to original sample data in the network model for generating and editing the watermark or sample data of the newly added watermark. Of course, in other embodiments of the present application, the edited watermark may be other ways of editing the watermark besides detecting the watermark, deleting the original watermark and adding the new watermark, for example, modifying the watermark. Which still fall within the scope of protection of the present application.
The main task of editing the watermark is to accurately restore the carrier object with the watermark to the original carrier object without the watermark, or to add the watermark or modify the watermark after restoring the original carrier object without the watermark. In order to better edit the watermark, the specific location of the watermark in the carrier object has to be estimated accurately. Taking editing the image with the watermark as an example, since the color of the watermark in the image with the watermark is uncertain, this presents a great challenge to the editing of the watermark. In the configuration of the network model for editing a watermark, a watermark image is not input singly, and the result obtained by inputting an image into the network model for extracting a watermark template and the network model for setting the watermark color to a predetermined color is also input into the network model for editing a watermark. For one image, because the network model for extracting the watermark template is designed into a multi-cascade network structure, a plurality of generated watermark templates can be obtained through output, and the main function of inputting the plurality of watermark templates into the network model for editing the watermark is to provide position information and shape information of the watermark for a watermark editing task; in a network model for setting the watermark color to a predetermined color, obtaining a plurality of images with the watermark set to the predetermined color, wherein the images are input into the network model for editing the watermark to mainly eliminate the influence of the diversification of the watermark color; in addition, the method can also have a certain guiding function on the position and the shape of the watermark. Therefore, in the network model for editing watermarks, a plurality of images including a plurality of watermark templates are input, and a plurality of watermarks are set as an image of a predetermined color and one image to be processed containing a watermark. The plurality of watermark modules and the plurality of watermarks are set to be images with preset colors, so that more information can be provided for watermark editing to a certain extent, and the watermark editing effect is improved. The network model for editing the watermark is the same as the two structures, namely the multi-cascade network structure is sampled, and particularly, the characteristic vector output by the ith-level network is assumed to be represented as V i Then:
Figure BDA0002255030570000161
wherein
Figure BDA0002255030570000162
A level i repair network is shown,
Figure BDA0002255030570000163
are parameters to be learned.
In addition, since the structure of the network model for editing the watermark is similar to the structure of the network model for extracting the watermark template, the training mode of the network refers to the training mode of the network model for extracting the watermark template, and the details are not repeated here. For the method portion of adding a new watermark to the carrier after deleting the original watermark, please refer to the related description portion of the third embodiment, which is not described herein again.
In the present embodiment, a total of three network models are included. Since the network model for setting the watermark color to a predetermined color and the network model for extracting the watermark template are jointly trained, the loss function involved in the network model learning (training) process is mainly divided into two parts. The loss function of the network model for setting the watermark color to a predetermined color and the network model for extracting the watermark template can be expressed as:
Figure BDA0002255030570000164
wherein, the first and the second end of the pipe are connected with each other,
Figure BDA0002255030570000165
representing a loss function of the network model used to extract the watermark templates,
Figure BDA0002255030570000166
representing a loss function of a network model for setting the watermark color to a predetermined color, θ S Representing a parameter, θ, learnable in a network model used to extract a watermark template T Representation for setting watermark colors to pre-Learnable parameters in the colored network model. λ represents a hyper-parameter that balances the two.
In particular, in a network model for extracting a watermark template, given a watermarked image x, it is expected that different multi-cascaded sub-networks may output a watermark template S, whose loss function may be expressed as:
Figure BDA0002255030570000171
wherein L is the number of multiple cascades in the network model for extracting the watermark template, C i Representing a convolutional layer, a feature vector F is output in the i-th network of the network model for extracting the watermark template i The feature vector provides guidance for a network model for setting the watermark color to a predetermined color, and its loss function can be expressed as:
Figure BDA0002255030570000172
where T is the true result after setting the watermark color to a predetermined color, I (F) i )=(F i -1) × (-1) representing operations simulating bitwise negation.
In the network model for editing the watermark, the network structure thereof also adopts a multi-cascade network structure, and assuming that the real image without the watermark is represented as y, the loss function of the network model for editing the watermark can be represented as:
Figure BDA0002255030570000173
wherein the content of the first and second substances,
Figure BDA0002255030570000174
representing a collection comprising watermarked images, and a plurality of watermark templates obtained from a network model for extracting the watermark templates and a network model for setting the watermark colors to predetermined colorsThe obtained plurality of watermarks are set as images of predetermined colors.
Please refer to fig. 3, which shows a schematic diagram of a second application scenario embodiment of the carrier object processing method provided in the present application. The user inputs the image with the watermark "2018" and the editing requirement "to modify the watermark 2018 of the image into 2019" into the computing device 300, the computing device 300 obtains the specific position of the watermark "2008" in the image by extracting the watermark template of the image, then sets the watermark "2018" as the preset color according to the specific position of the watermark, sets the watermark as the specific color, can overcome the inaccuracy of the watermark edited in the watermark editing process caused by the diversification of the watermark color, and finally modifies the watermark "2018" set as the specific color into the watermark "2019" in the image. Of course, the image with the watermark "2018" may also be input alone or together with other batches of images, and the method may automatically recognize the image with the watermark "2018", automatically detect the watermark "2018" according to the actual time, and automatically modify the watermark time "2018" in the image according to the current time. In the specific process of detecting and modifying the watermark, a plurality of sets of watermark modifying schemes can be automatically recommended according to the result of detecting and identifying the watermark, and when the watermark is modified, one of the recommended plurality of sets of watermark modifying schemes can be selected for modification, or the plurality of sets of watermark modifying schemes can be modified. For example, the watermark in the image with the watermark "2018" may be modified to "2019" or "two-zero-one-nine" at the same time. Of course, it is also possible to identify only the watermark in the image and store the identified watermark result for subsequent modification. The image containing the watermark "2018" may be automatically modified according to the current time after the modification. For example, the watermark "2018" of the image may be modified to "2019" in 2019, and may be automatically modified to "2020" in 2020. Of course, the purpose of the above application scenario embodiments is to facilitate understanding of the carrier object processing method of the present application, and is not used to limit the carrier object processing method of the present application.
In the carrier object processing method of this embodiment, the specific position of the watermark can be accurately obtained by extracting the watermark template corresponding to the carrier object to be processed; and the watermark of the carrier object to be processed can be accurately edited according to the watermark template. The carrier object processing method solves the problem that the existing watermark editing method can not accurately edit the watermark due to the diversity of the watermark patterns by obtaining the watermark template corresponding to the carrier object to be processed.
In the first embodiment, a carrier object processing method is provided, and correspondingly, the present application further provides a carrier object processing apparatus. Fig. 5 is a schematic diagram of a carrier object processing apparatus according to a second embodiment of the present application. Since the apparatus embodiments are substantially similar to the method embodiments, they are described in a relatively simple manner, and reference may be made to some of the description of the method embodiments for relevant points. The device embodiments described below are merely illustrative.
A carrier object processing apparatus of the present embodiment includes:
a carrier object processing unit 501, configured to acquire a carrier object to be processed;
a watermark template extraction unit 502 for extracting a watermark template from the to-be-processed carrier object;
an object carrier object obtaining unit 503, configured to edit the watermark in the to-be-processed carrier object according to the watermark template, so as to obtain an object carrier object.
Optionally, the watermark template extracting unit is specifically configured to:
inputting the carrier object to be processed into a network model for extracting a watermark template to obtain a feature vector of the carrier object to be processed;
and acquiring a watermark template corresponding to the feature vector according to the feature vector of the carrier object to be processed.
Optionally, the watermark template extracting unit is specifically configured to:
and carrying out convolution operation on the characteristic vector to obtain a watermark template corresponding to the characteristic vector.
Optionally, the watermark template is a template used when adding watermark information to the original carrier object; and the original carrier object is the carrier object before the watermark information is added to the carrier object to be processed.
Optionally, the method further includes: a color setting unit;
the color setting unit is specifically configured to: setting the color of the watermark to be a preset color in the carrier object to be processed according to the watermark template;
the target carrier object obtaining unit is specifically configured to:
and editing the watermark in the carrier object to be processed according to the preset color of the watermark and the watermark template to obtain a target carrier object.
Optionally, the color setting unit is specifically configured to:
and inputting the carrier object to be processed and the watermark template into a network model for setting the color of the watermark to be a preset color so as to set the color of the watermark in the carrier object to be processed to be the preset color.
Optionally, the color setting unit is specifically configured to:
according to the watermark template, obtaining position information and shape information of the watermark in the carrier object to be processed;
and setting the color of the watermark in the carrier object to be processed as a preset color according to the position information and the shape information of the watermark in the carrier object to be processed.
Optionally, the method further includes: a second carrier object obtaining unit;
the second carrier object obtaining unit is specifically configured to:
obtaining the carrier object with the color of the watermark in the carrier object to be processed set as the preset color;
the target carrier object obtaining unit is specifically configured to:
and inputting the carrier object to be processed, the watermark template and the carrier object set to be in the preset color into a network model for editing the watermark to obtain a target carrier object.
Optionally, the target carrier object obtaining unit is specifically configured to:
inputting the carrier object to be processed, the watermark template and the carrier object set to be in the preset color into the network model for editing the watermark to obtain an editing feature vector corresponding to the carrier object to be processed, the watermark template and the carrier object set to be in the preset color;
and editing the watermark of the carrier object to be processed according to the carrier object to be processed, the watermark template and the editing feature vector corresponding to the carrier object set to be in the preset color to obtain a target carrier object.
Optionally, the setting of the color of the watermark in the to-be-processed carrier object to be a predetermined color means that a pixel value of the watermark in the to-be-processed carrier object at a position in the to-be-processed carrier object is set to be a predetermined pixel value.
Optionally, the method further includes a first network model obtaining unit;
the first network model obtaining unit is used for obtaining the network model for extracting the watermark template;
the first network model obtaining unit is specifically configured to:
obtaining sample data for extracting the watermark template;
obtaining a first-level feature vector of the sample data;
performing convolution operation on the primary feature vector to obtain a primary watermark template corresponding to the primary feature vector;
obtaining a secondary feature vector according to the primary feature vector;
performing convolution operation on the secondary feature vector to obtain a secondary watermark template corresponding to the secondary feature vector;
obtaining a tertiary characteristic vector according to the secondary characteristic vector;
performing convolution operation on the three-level feature vectors to obtain three-level watermark templates corresponding to the three-level feature vectors;
taking the primary watermark template, the secondary watermark template and the tertiary watermark template as watermark templates corresponding to the sample data;
and obtaining the corresponding relation between the sample data and the watermark template corresponding to the sample data, and taking the corresponding relation as a network model for extracting the watermark template.
Optionally, the first network model obtaining unit is specifically configured to:
obtaining a first shrinkage scale feature vector corresponding to the first-level feature vector according to the first-level feature vector;
obtaining a feature vector of a first shrinkage scale corresponding to the secondary feature vector according to the feature vector of the first shrinkage scale corresponding to the primary feature vector;
and obtaining a secondary characteristic vector according to the characteristic vector of the first shrinkage scale corresponding to the secondary characteristic vector.
Optionally, the first network model obtaining unit is specifically configured to:
obtaining a feature vector of a second shrinkage scale corresponding to the primary feature vector according to the feature vector of the first shrinkage scale corresponding to the primary feature vector;
obtaining a feature vector of a second shrinkage scale corresponding to the secondary feature vector according to a feature vector of the second shrinkage scale corresponding to the primary feature vector;
and obtaining the feature vector of the first shrinkage scale corresponding to the secondary feature vector according to the feature vector of the second shrinkage scale corresponding to the secondary feature vector.
Optionally, the first network model obtaining unit is specifically configured to:
obtaining a feature vector of a first shrinkage scale corresponding to the secondary feature vector according to the secondary feature vector;
obtaining a feature vector of a first shrinkage scale corresponding to the third-level feature vector according to a feature vector of the first shrinkage scale corresponding to the second-level feature vector;
and obtaining a third-level feature vector according to the feature vector of the first shrinkage scale corresponding to the third-level feature vector.
Optionally, the first network model obtaining unit is specifically configured to:
obtaining a feature vector of a second shrinkage scale corresponding to the secondary feature vector according to the feature vector of the first shrinkage scale corresponding to the secondary feature vector;
obtaining a feature vector of a second shrinkage scale corresponding to the third-level feature vector according to a feature vector of a second shrinkage scale corresponding to the second-level feature vector;
and obtaining the feature vector of the first shrinkage scale corresponding to the feature vector of the third level according to the feature vector of the second shrinkage scale corresponding to the feature vector of the third level.
Optionally, the system further includes a second network model obtaining unit;
the second network model obtaining unit is used for obtaining a network model for setting the watermark color to be a preset color;
the second network model obtaining unit is specifically configured to:
setting the color of the watermark in the sample data as a preset color according to the primary feature vector and the primary watermark template, and obtaining a first sample of the sample data after the preset color is set;
setting the color of the watermark to be a preset color in the sample data according to the secondary feature vector and the secondary watermark template; obtaining a second sample of the sample data set to be a preset color;
setting the color of the watermark in the sample data as a preset color according to the three-level feature vector and the three-level watermark template; obtaining a third sample of the sample data after the sample data is set to be a preset color;
taking the first sample, the second sample and the third sample as sample data in which a color of a watermark is set to a predetermined color in the sample data;
and obtaining the corresponding relation between the sample data and the sample data of the preset color, and taking the corresponding relation as a network model for setting the watermark color as the preset color.
Optionally, the device further comprises a correction unit;
the correction unit is used for correcting the network model for extracting the watermark template according to the sample data of the preset color;
the correction unit is specifically configured to:
judging whether the sample data of the preset color and the sample data of the expected preset color are in a specified threshold range or not; if yes, directly taking the sample data of the preset color as an output result of the network model for setting the watermark color as the preset color;
if not, re-acquiring the correction characteristic vector of the carrier object to be processed according to the sample data of the preset color and the sample data for extracting the watermark template; and obtaining a correction watermark template corresponding to the correction feature vector according to the correction feature vector.
Optionally, the system further includes a third network model obtaining unit;
the third network model obtaining unit is used for obtaining a network model for editing the watermark;
the third network model obtaining unit is specifically configured to:
according to the sample data, the watermark template corresponding to the sample data and the sample data of the preset color, obtaining an editing feature vector in the sample data;
according to the editing feature vector, the watermark corresponding to the sample data is edited to obtain target sample data;
and acquiring the corresponding relation between the sample data and the target sample data, and taking the corresponding relation as a network model for editing the watermark.
Optionally, the watermark template extracting unit is specifically configured to:
automatically acquiring at least one set of watermark templates corresponding to the carrier object to be processed according to the carrier object to be processed;
and taking one set of watermark templates or all the watermark templates in the at least one set of watermark templates corresponding to the carrier object to be processed as the watermark templates of the carrier to be processed.
The present application further provides a watermark embedding method, as shown in fig. 6, which is a flowchart of an embodiment of a watermark embedding method according to a third embodiment of the present application. The method comprises the following steps. The method comprises the following steps:
step S601: an original carrier object is obtained and an original watermark is obtained.
The watermark embedding method of this embodiment may be used to generate a carrier object containing a watermark, to train the network model for extracting the watermark template of embodiment one, the network model for setting the watermark color to a predetermined color, and the network model for editing the watermark.
Specifically, the original watermark is obtained, which may be in the manner described below.
Firstly, at least one of numeric symbols, english symbols and special symbols is randomly combined to form a character sequence. And then, taking the character sequence as the original watermark.
For example, a sequence containing a + B + C characters may be randomly composed by pre-selecting a number of digital symbols, B number of english symbols, and C number of special symbols, and the character sequence may be used as the original watermark.
Step S602: obtaining the position information of the original watermark embedded in the original carrier object.
After the original carrier object is acquired and the original watermark is acquired in step S601, the position information of the original watermark embedded in the original carrier object is obtained.
There are various ways to obtain the location information of the original watermark embedded in the original carrier object, and one way to obtain the location information may be: first, size information of the original carrier object and size information of the original watermark are obtained. And then, determining an embedding area of the original watermark on the original carrier object according to the size information of the original carrier object. And finally, in the embedding area, acquiring the position information of the original watermark embedded in the original carrier object according to the size information of the original watermark.
Further, the determining of the embedded area of the original watermark on the original carrier object according to the size information of the original carrier object may be as follows. Firstly, according to the size information of the original carrier object, the length size information of the original carrier object is obtained. Then, according to the length size information, determining first reserved size information in the length direction on the original carrier object; meanwhile, according to the size information of the original carrier object, the width size information of the original carrier object is obtained; and determining second reserved size information in the width direction on the original carrier object according to the width size information. And finally, determining an embedding area of the original watermark on the original carrier object according to the size information of the original carrier object, the first reserved size information and the second reserved size information.
More specifically, in the embedding area, the position information of the original watermark embedded in the original carrier object is obtained according to the size information of the original watermark, and first, the edge position information of the original watermark is obtained according to the size information of the original watermark. And then, acquiring the position information of the original watermark embedded in the original carrier object according to the edge position information of the original watermark and the position information of the embedded area.
Step S603: and in the original carrier object, randomly embedding the original watermark into the specified position of the original carrier object according to the attribute information and the position information of the original watermark.
In step S601, an original carrier object is obtained, and an original watermark is obtained; and step S602, after obtaining the location information of the original watermark embedded in the original carrier object, randomly embedding the original watermark in the original carrier object at the specified location of the original carrier object according to the attribute information of the original watermark and the location information.
Wherein the attribute information of the original watermark includes: at least one of a color of the original watermark, a font of the original watermark, and font information of the original watermark.
By obtaining the position information of the original watermark embedded in the original carrier object, in order to prevent the watermark from being on the edge of the original carrier object, a random position generation rule can be adopted: x = random (W/10, W-W/10), Y = random (H/10, H-H/10) generates position information of the original watermark, where X, Y are coordinate positions of the watermark on the original carrier object, respectively, and W, H are width and height of the size of the original carrier object.
The watermark embedding method of the embodiment obtains the original carrier object and the original watermark. On the basis, the position information of the original watermark embedded in the original carrier object is obtained, so that the original watermark is randomly embedded in the designated position of the original carrier object according to the attribute information of the original watermark and the position information in the original carrier object. The watermark embedded by the method ensures that the watermark is not positioned on the edge of the original carrier object so as to ensure that the watermark can be accurately detected.
In the third embodiment, a watermark embedding method is provided, and correspondingly, the present application further provides a watermark embedding apparatus. Fig. 7 is a schematic diagram of a watermark embedding apparatus according to a fourth embodiment of the present application. Since the apparatus embodiments are substantially similar to the method embodiments, they are described in a relatively simple manner, and reference may be made to some of the descriptions of the method embodiments for relevant points. The device embodiments described below are merely illustrative.
A watermark embedding apparatus of this embodiment includes:
an original carrier object obtaining unit 701 for obtaining an original carrier object;
an original watermark obtaining unit 702, configured to obtain an original watermark;
a position information obtaining unit 703, configured to obtain position information of embedding the original watermark on the original carrier object;
an embedding unit 704, configured to randomly embed, in the original carrier object, the original watermark into a specified position of the original carrier object according to the attribute information of the original watermark and the position information.
Optionally, the original watermark obtaining unit is specifically configured to:
randomly combining at least one of the numeric symbols, the English symbols and the special symbols to form a character sequence;
and taking the character sequence as the original watermark.
Optionally, the location information obtaining unit is specifically configured to:
acquiring size information of the original carrier object and size information of the original watermark;
determining an embedding area of the original watermark on the original carrier object according to the size information of the original carrier object;
and in the embedding area, acquiring the position information of the original watermark embedded in the original carrier object according to the size information of the original watermark.
Optionally, the location information obtaining unit is specifically configured to:
according to the size information of the original carrier object, obtaining the length size information of the original carrier object;
determining first reserved size information in the length direction on the original carrier object according to the length size information;
obtaining width size information of the original carrier object according to the size information of the original carrier object;
determining second reserved size information in the width direction on the original carrier object according to the width size information;
and determining an embedding area of the original watermark on the original carrier object according to the size information of the original carrier object, the first reserved size information and the second reserved size information.
Optionally, the location information obtaining unit is specifically configured to:
acquiring edge position information of the original watermark according to the size information of the original watermark;
and acquiring the position information of the original watermark embedded in the original carrier object according to the edge position information of the original watermark and the position information of the embedded area.
Optionally, the attribute information of the original watermark includes: at least one of a color of the original watermark, a font of the original watermark, and font information of the original watermark.
The first embodiment of the present application provides a carrier object processing method, and the fifth embodiment of the present application provides an electronic device corresponding to the carrier object processing method.
As shown in fig. 8, a schematic diagram of an electronic device of a carrier object processing method provided in embodiment five of the present application is shown.
An electronic device of the embodiment includes:
a processor 801;
the memory 802 is used for storing the program of the carrier object processing method and executing the following steps:
acquiring a carrier object to be processed;
extracting a watermark template from the carrier object to be processed;
and editing the watermark in the carrier object to be processed according to the watermark template to obtain a target carrier object.
The third embodiment of the application provides a watermark embedding method, and the sixth embodiment of the application provides electronic equipment corresponding to the watermark embedding method. Since the schematic diagram of the electronic device is the same as that of fig. 8, please refer to fig. 8 for a specific illustration.
The application provides an electronic device, including:
a processor;
a memory for storing a program of the watermark embedding method and performing the following steps:
obtaining an original carrier object and obtaining an original watermark;
obtaining the position information of the original watermark embedded in the original carrier object;
and in the original carrier object, randomly embedding the original watermark into the specified position of the original carrier object according to the attribute information and the position information of the original watermark.
The first embodiment of the present application provides a carrier object processing method, and the seventh embodiment of the present application provides a computer storage medium corresponding to the carrier object processing method.
A computer storage medium of the present embodiment stores a program of a carrier object processing method, which is executed by a processor, and executes the steps of:
acquiring a carrier object to be processed;
extracting a watermark template from the carrier object to be processed;
and editing the watermark in the carrier object to be processed according to the watermark template to obtain a target carrier object.
The third embodiment of the present application provides a watermark embedding method, and the eighth embodiment of the present application provides a computer storage medium corresponding to the watermark embedding method.
A computer storage medium of the present embodiment stores a program of a watermark embedding method, which is executed by a processor, and executes the steps of:
obtaining an original carrier object and obtaining an original watermark;
obtaining the position information of the original watermark embedded in the original carrier object;
and in the original carrier object, randomly embedding the original watermark into the specified position of the original carrier object according to the attribute information and the position information of the original watermark.
Although the present application has been described with reference to the preferred embodiments, it is not intended to limit the present application, and those skilled in the art can make variations and modifications without departing from the spirit and scope of the present application, therefore, the scope of the present application should be determined by the claims that follow.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both permanent and non-permanent, removable and non-removable media, may implement the information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Disks (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include non-transitory computer readable media (transient media), such as modulated data signals and carrier waves.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and so forth) having computer-usable program code embodied therein.

Claims (28)

1. A carrier object processing method, comprising:
acquiring a carrier object to be processed;
extracting a watermark template from the carrier object to be processed through a network model for extracting watermark templates;
setting the color of the watermark to be a preset color through a network model of the preset color according to the watermark template to obtain a carrier object set to be the preset color;
editing the watermark in the carrier object to be processed according to the watermark template and the carrier object set to be in the preset color to obtain a target carrier object;
wherein the network model for extracting the watermark template and the network model of the predetermined color are obtained by joint training;
the network model for extracting the watermark template is obtained by the following method:
obtaining sample data for extracting the watermark template;
obtaining a primary feature vector of the sample data;
performing convolution operation on the primary feature vector to obtain a primary watermark template corresponding to the primary feature vector;
obtaining a secondary feature vector according to the primary feature vector;
performing convolution operation on the secondary feature vector to obtain a secondary watermark template corresponding to the secondary feature vector;
obtaining a third-level feature vector according to the second-level feature vector;
performing convolution operation on the three-level feature vectors to obtain three-level watermark templates corresponding to the three-level feature vectors;
taking the primary watermark template, the secondary watermark template and the tertiary watermark template as watermark templates corresponding to the sample data;
and acquiring the corresponding relation between the sample data and the watermark template corresponding to the sample data, and taking the corresponding relation as the network model for extracting the watermark template.
2. The method according to claim 1, wherein said extracting of watermark templates from said carrier objects to be processed comprises:
inputting the carrier object to be processed into the network model for extracting the watermark template to obtain a feature vector of the carrier object to be processed;
and acquiring a watermark template corresponding to the feature vector according to the feature vector of the carrier object to be processed.
3. The method according to claim 2, wherein the obtaining the watermark template corresponding to the feature vector according to the feature vector of the carrier object to be processed comprises:
and carrying out convolution operation on the characteristic vector to obtain a watermark template corresponding to the characteristic vector.
4. The method according to claim 1, wherein the watermark template is a template employed when adding watermark information to the original carrier object; and the original carrier object is the carrier object before the watermark information is added to the carrier object to be processed.
5. The method according to claim 1, wherein the setting the color of the watermark to a predetermined color through a network model of the predetermined color according to the watermark template comprises:
according to the watermark template, obtaining position information and shape information of the watermark in the carrier object to be processed;
and setting the color of the watermark in the carrier object to be processed to be a preset color through a network model of the preset color according to the position information and the shape information of the watermark in the carrier object to be processed.
6. The method of claim 1,
editing the watermark in the to-be-processed carrier object according to the watermark template and the carrier object set to be in the preset color to obtain a target carrier object, wherein the method comprises the following steps:
and inputting the carrier object to be processed, the watermark template and the carrier object set to be the preset color into a network model for editing the watermark to obtain a target carrier object.
7. The method according to claim 6, wherein the inputting the carrier object to be processed, the watermark template and the carrier object set to the predetermined color into a network model for editing a watermark to obtain a target carrier object comprises:
inputting the carrier object to be processed, the watermark template and the carrier object set to be in the preset color into the network model for editing the watermark to obtain an editing feature vector corresponding to the carrier object to be processed, the watermark template and the carrier object set to be in the preset color;
and editing the watermark of the carrier object to be processed according to the carrier object to be processed, the watermark template and the editing feature vector corresponding to the carrier object set to be in the preset color to obtain a target carrier object.
8. The method according to claim 1, wherein the setting of the color of the watermark to a predetermined color is setting of a pixel value of the watermark in the to-be-processed carrier object at a position in the to-be-processed carrier object to a predetermined pixel value.
9. The method of claim 1, wherein obtaining a secondary feature vector from the primary feature vector comprises:
obtaining a first shrinkage scale feature vector corresponding to the first-level feature vector according to the first-level feature vector;
obtaining a feature vector of a first shrinkage scale corresponding to the secondary feature vector according to the feature vector of the first shrinkage scale corresponding to the primary feature vector;
and obtaining a secondary feature vector according to the feature vector of the first shrinkage scale corresponding to the secondary feature vector.
10. The method according to claim 9, wherein obtaining the feature vector of the first shrinkage scale corresponding to the secondary feature vector according to the feature vector of the first shrinkage scale corresponding to the primary feature vector comprises:
obtaining a feature vector of a second shrinkage scale corresponding to the primary feature vector according to the feature vector of the first shrinkage scale corresponding to the primary feature vector;
obtaining a feature vector of a second shrinkage scale corresponding to the secondary feature vector according to the feature vector of the second shrinkage scale corresponding to the primary feature vector;
and obtaining the feature vector of the first shrinkage scale corresponding to the secondary feature vector according to the feature vector of the second shrinkage scale corresponding to the secondary feature vector.
11. The method according to claim 1, wherein obtaining a tertiary feature vector from the secondary feature vector comprises:
obtaining a feature vector of a first shrinkage scale corresponding to the secondary feature vector according to the secondary feature vector;
obtaining a feature vector of a first shrinkage scale corresponding to the feature vector of the third level according to the feature vector of the first shrinkage scale corresponding to the feature vector of the second level;
and obtaining a tertiary characteristic vector according to the characteristic vector of the first shrinkage scale corresponding to the tertiary characteristic vector.
12. The method according to claim 11, wherein obtaining the first shrunk-scale feature vector corresponding to the tertiary feature vector according to the first shrunk-scale feature vector corresponding to the secondary feature vector comprises:
obtaining a feature vector of a second shrinkage scale corresponding to the secondary feature vector according to the feature vector of the first shrinkage scale corresponding to the secondary feature vector;
obtaining a feature vector of a second shrinkage scale corresponding to the third-level feature vector according to a feature vector of a second shrinkage scale corresponding to the second-level feature vector;
and obtaining the feature vector of the first shrinkage scale corresponding to the feature vector of the third level according to the feature vector of the second shrinkage scale corresponding to the feature vector of the third level.
13. The method of claim 1, further comprising obtaining a network model for setting a watermark color to a predetermined color;
the obtaining a network model for setting the watermark color to a predetermined color includes:
setting the color of the watermark in the sample data as a preset color according to the primary feature vector and the primary watermark template, and obtaining a first sample of the sample data after the preset color is set;
setting the color of the watermark in the sample data as a preset color according to the secondary feature vector and the secondary watermark template; obtaining a second sample of the sample data set to be a preset color;
setting the color of the watermark to be a preset color in the sample data according to the three-level feature vector and the three-level watermark template; obtaining a third sample of the sample data after the sample data is set to be a preset color;
setting the first sample, the second sample, and the third sample as sample data in which a color of a watermark is set to a predetermined color in the sample data;
and obtaining the corresponding relation between the sample data and the sample data of the preset color, and taking the corresponding relation as a network model for setting the watermark color as the preset color.
14. The method of claim 13, further comprising: correcting the network model for extracting the watermark template according to the sample data of the preset color;
the correcting the network model for extracting the watermark template according to the sample data of the preset color comprises the following steps:
judging whether the sample data of the preset color and the sample data of the expected preset color are in a specified threshold range or not; if yes, directly taking the sample data of the preset color as an output result of the network model for setting the watermark color as the preset color;
if not, acquiring the correction characteristic vector of the carrier object to be processed again according to the sample data of the preset color and the sample data for extracting the watermark template; and obtaining a correction watermark template corresponding to the correction feature vector according to the correction feature vector.
15. The method of claim 13, further comprising obtaining a network model for editing the watermark;
the obtaining of the network model for editing the watermark includes:
according to the sample data, the watermark template corresponding to the sample data and the sample data of the preset color, obtaining an editing feature vector in the sample data;
according to the editing feature vector, editing the watermark corresponding to the sample data to obtain target sample data;
and obtaining the corresponding relation between the sample data and the target sample data, and taking the corresponding relation as a network model for editing the watermark.
16. The method according to claim 1, wherein said extracting of watermark templates from said carrier objects to be processed comprises:
automatically acquiring at least one set of watermark templates corresponding to the carrier object to be processed according to the carrier object to be processed;
and taking one or all of the at least one set of watermark templates corresponding to the to-be-processed carrier object as the watermark template of the to-be-processed carrier.
17. A carrier object handling device, comprising:
a carrier object processing unit for acquiring a carrier object to be processed;
a watermark template extraction unit for extracting a watermark template from the to-be-processed carrier object through a network model for extracting the watermark template;
the color setting unit is used for setting the color of the watermark to be a preset color through a network model of the preset color according to the watermark template;
a second carrier object obtaining unit for obtaining the carrier object set to the predetermined color;
a target carrier object obtaining unit, configured to edit the watermark in the to-be-processed carrier object according to the watermark template and the carrier object set to a predetermined color, so as to obtain a target carrier object;
wherein the network model for extracting the watermark template and the network model of the predetermined color are obtained by joint training;
the network model for extracting the watermark template is obtained by the following method:
obtaining sample data for extracting the watermark template;
obtaining a primary feature vector of the sample data;
performing convolution operation on the primary characteristic vector to obtain a primary watermark template corresponding to the primary characteristic vector;
obtaining a secondary feature vector according to the primary feature vector;
performing convolution operation on the secondary feature vector to obtain a secondary watermark template corresponding to the secondary feature vector;
obtaining a third-level feature vector according to the second-level feature vector;
performing convolution operation on the three-level feature vectors to obtain three-level watermark templates corresponding to the three-level feature vectors;
taking the primary watermark template, the secondary watermark template and the tertiary watermark template as watermark templates corresponding to the sample data;
and acquiring the corresponding relation between the sample data and the watermark template corresponding to the sample data, and taking the corresponding relation as the network model for extracting the watermark template.
18. A watermark embedding method, comprising:
obtaining an original carrier object and obtaining an original watermark;
obtaining the position information of the original watermark embedded in the original carrier object;
in the original carrier object, randomly embedding the original watermark into the specified position of the original carrier object according to the attribute information and the position information of the original watermark; when the original watermark is embedded into the specified position of the original carrier object, the edge of the original watermark and the edge of the original carrier object have a reserved size; the reserved size is determined based on size information of the original carrier object;
the watermark embedding method is used for generating a carrier object containing a watermark to train a network model for extracting a watermark template as claimed in any one of claims 1 to 16.
19. The method of claim 18, wherein obtaining the original watermark comprises:
randomly combining at least one of the numeric symbols, the English symbols and the special symbols to form a character sequence;
and taking the character sequence as the original watermark.
20. The method according to claim 18, wherein said obtaining the location information of the original watermark embedded in the original carrier object comprises:
acquiring size information of the original carrier object and size information of the original watermark;
determining an embedding area of the original watermark on the original carrier object according to the size information of the original carrier object;
and in the embedding area, acquiring the position information of the original watermark embedded in the original carrier object according to the size information of the original watermark.
21. The method according to claim 20, wherein said determining an embedded area of the original watermark on the original carrier object according to the size information of the original carrier object comprises:
according to the size information of the original carrier object, obtaining the length size information of the original carrier object;
determining first reserved size information in the length direction on the original carrier object according to the length size information;
obtaining width size information of the original carrier object according to the size information of the original carrier object;
determining second reserved size information in the width direction on the original carrier object according to the width size information;
and determining an embedded area of the original watermark on the original carrier object according to the size information of the original carrier object, the first reserved size information and the second reserved size information.
22. The method according to claim 21, wherein obtaining the position information of the original watermark embedded in the original carrier object according to the size information of the original watermark in the embedding area comprises:
obtaining edge position information of the original watermark according to the size information of the original watermark;
and acquiring the position information of the original watermark embedded in the original carrier object according to the edge position information of the original watermark and the position information of the embedded area.
23. The method of claim 19, wherein the attribute information of the original watermark comprises: at least one of a color of the original watermark, a font of the original watermark, and font information of the original watermark.
24. A watermark embedding apparatus, comprising:
an original carrier object obtaining unit for obtaining an original carrier object;
an original watermark obtaining unit for obtaining an original watermark;
a position information obtaining unit, configured to obtain position information of embedding the original watermark on the original carrier object;
an embedding unit, configured to randomly embed the original watermark into a specified position of the original carrier object according to the attribute information of the original watermark and the position information in the original carrier object; when the original watermark is embedded into the specified position of the original carrier object, the edge of the original watermark and the edge of the original carrier object have a reserved size; the reserved size is determined based on size information of the original carrier object;
the watermark embedding device is used for generating a carrier object containing a watermark to train a network model for extracting a watermark template as claimed in any one of claims 1 to 16.
25. An electronic device, comprising:
a processor;
a memory for storing a program of the carrier object processing method and performing the steps of:
acquiring a carrier object to be processed;
extracting a watermark template from the carrier object to be processed through a network model for extracting watermark templates;
setting the color of the watermark to be a preset color through a network model of the preset color according to the watermark template to obtain a carrier object set to be the preset color;
editing the watermark in the carrier object to be processed according to the watermark template and the carrier object set to be in the preset color to obtain a target carrier object;
wherein the network model for extracting the watermark template and the network model of the predetermined color are obtained by joint training;
the network model for extracting the watermark template is obtained by the following method:
obtaining sample data for extracting the watermark template;
obtaining a first-level feature vector of the sample data;
performing convolution operation on the primary feature vector to obtain a primary watermark template corresponding to the primary feature vector;
obtaining a secondary characteristic vector according to the primary characteristic vector;
performing convolution operation on the secondary feature vector to obtain a secondary watermark template corresponding to the secondary feature vector;
obtaining a tertiary characteristic vector according to the secondary characteristic vector;
performing convolution operation on the three-level feature vectors to obtain three-level watermark templates corresponding to the three-level feature vectors;
taking the primary watermark template, the secondary watermark template and the tertiary watermark template as watermark templates corresponding to the sample data;
and acquiring the corresponding relation between the sample data and the watermark template corresponding to the sample data, and taking the corresponding relation as the network model for extracting the watermark template.
26. An electronic device, comprising:
a processor;
a memory for storing a program of the watermark embedding method and performing the following steps:
obtaining an original carrier object and obtaining an original watermark;
obtaining the position information of the original watermark embedded in the original carrier object;
in the original carrier object, randomly embedding the original watermark to the specified position of the original carrier object according to the attribute information and the position information of the original watermark; when the original watermark is embedded into the specified position of the original carrier object, the edge of the original watermark and the edge of the original carrier object have a reserved size; the reserved size is determined based on size information of the original carrier object;
the watermark embedding method is used for generating a carrier object containing a watermark to train a network model for extracting a watermark template as claimed in any one of claims 1 to 16.
27. A computer storage medium storing a program of a carrier object processing method, the program being executed by a processor to perform the steps of:
acquiring a carrier object to be processed;
extracting a watermark template from the carrier object to be processed through a network model for extracting watermark templates;
setting the color of the watermark to be a preset color through a network model of the preset color according to the watermark template to obtain a carrier object set to be the preset color;
editing the watermark in the carrier object to be processed according to the watermark template and the carrier object set to be in the preset color to obtain a target carrier object;
wherein the network model for extracting the watermark template and the network model of the predetermined color are obtained by joint training;
the network model for extracting the watermark template is obtained by the following method:
obtaining sample data for extracting the watermark template;
obtaining a first-level feature vector of the sample data;
performing convolution operation on the primary feature vector to obtain a primary watermark template corresponding to the primary feature vector;
obtaining a secondary characteristic vector according to the primary characteristic vector;
performing convolution operation on the secondary characteristic vector to obtain a secondary watermark template corresponding to the secondary characteristic vector;
obtaining a tertiary characteristic vector according to the secondary characteristic vector;
performing convolution operation on the three-level feature vectors to obtain three-level watermark templates corresponding to the three-level feature vectors;
taking the primary watermark template, the secondary watermark template and the tertiary watermark template as watermark templates corresponding to the sample data;
and obtaining the corresponding relation between the sample data and the watermark template corresponding to the sample data, and taking the corresponding relation as the network model for extracting the watermark template.
28. A computer storage medium storing a program of a watermark embedding method, the program being executed by a processor to perform the steps of:
obtaining an original carrier object and obtaining an original watermark;
obtaining the position information of the original watermark embedded in the original carrier object;
in the original carrier object, randomly embedding the original watermark into the specified position of the original carrier object according to the attribute information and the position information of the original watermark; when the original watermark is embedded into the specified position of the original carrier object, the edge of the original watermark and the edge of the original carrier object have a reserved size; the reserved size is determined based on size information of the original carrier object;
the watermark embedding method is used for generating a carrier object containing a watermark to train a network model for extracting a watermark template as claimed in any one of claims 1 to 16.
CN201911049751.1A 2019-10-31 2019-10-31 Carrier object processing and watermark embedding method, device and electronic equipment Active CN112750065B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201911049751.1A CN112750065B (en) 2019-10-31 2019-10-31 Carrier object processing and watermark embedding method, device and electronic equipment
PCT/CN2020/123884 WO2021083110A1 (en) 2019-10-31 2020-10-27 Carrier object processing and watermark embedding methods and apparatuses, and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911049751.1A CN112750065B (en) 2019-10-31 2019-10-31 Carrier object processing and watermark embedding method, device and electronic equipment

Publications (2)

Publication Number Publication Date
CN112750065A CN112750065A (en) 2021-05-04
CN112750065B true CN112750065B (en) 2022-12-09

Family

ID=75641424

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911049751.1A Active CN112750065B (en) 2019-10-31 2019-10-31 Carrier object processing and watermark embedding method, device and electronic equipment

Country Status (2)

Country Link
CN (1) CN112750065B (en)
WO (1) WO2021083110A1 (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080292129A1 (en) * 2007-05-22 2008-11-27 Xerox Corporation Embedding information in document blank space
CN102968758A (en) * 2012-12-14 2013-03-13 福建伊时代信息科技股份有限公司 Method and system for processing digital watermarking
CN106454182A (en) * 2016-10-26 2017-02-22 维沃移动通信有限公司 Video generation method and mobile terminal
CN107240061A (en) * 2017-06-09 2017-10-10 河南师范大学 A kind of watermark insertion, extracting method and device based on Dynamic BP neural
CN108055493A (en) * 2017-12-13 2018-05-18 苏州科达科技股份有限公司 The method and device of embedded watermark in video image
CN109118420A (en) * 2018-08-21 2019-01-01 杭州朗和科技有限公司 Watermark identification model is established and recognition methods, device, medium and electronic equipment
US20190236747A1 (en) * 2017-03-29 2019-08-01 Tencent Technology (Shenzhen) Company Limited Digital watermark embedding method and extraction method, digital watermark embedding apparatus and extraction apparatus, and digital watermark system
CN110322385A (en) * 2018-03-28 2019-10-11 浙江大学 Watermark insertion and extracting method, device and electronic equipment
CN110378829A (en) * 2018-04-13 2019-10-25 浙江大学 Information provides and the method, device and equipment of watermark extracting

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101901470A (en) * 2010-02-10 2010-12-01 桂林电子科技大学 Image-tampering detection and recovery method based on energy-domain semi-fragile watermarking
CN102903072B (en) * 2011-07-29 2015-07-08 天柏宽带网络科技(北京)有限公司 Blind digital watermark detection method and system
CN106485645A (en) * 2016-10-31 2017-03-08 珠海赛纳打印科技股份有限公司 A kind of method and device of watermark adjustment
CN110211015B (en) * 2018-02-28 2022-12-20 佛山科学技术学院 Watermark method based on characteristic object protection

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080292129A1 (en) * 2007-05-22 2008-11-27 Xerox Corporation Embedding information in document blank space
CN102968758A (en) * 2012-12-14 2013-03-13 福建伊时代信息科技股份有限公司 Method and system for processing digital watermarking
CN106454182A (en) * 2016-10-26 2017-02-22 维沃移动通信有限公司 Video generation method and mobile terminal
US20190236747A1 (en) * 2017-03-29 2019-08-01 Tencent Technology (Shenzhen) Company Limited Digital watermark embedding method and extraction method, digital watermark embedding apparatus and extraction apparatus, and digital watermark system
CN107240061A (en) * 2017-06-09 2017-10-10 河南师范大学 A kind of watermark insertion, extracting method and device based on Dynamic BP neural
CN108055493A (en) * 2017-12-13 2018-05-18 苏州科达科技股份有限公司 The method and device of embedded watermark in video image
CN110322385A (en) * 2018-03-28 2019-10-11 浙江大学 Watermark insertion and extracting method, device and electronic equipment
CN110378829A (en) * 2018-04-13 2019-10-25 浙江大学 Information provides and the method, device and equipment of watermark extracting
CN109118420A (en) * 2018-08-21 2019-01-01 杭州朗和科技有限公司 Watermark identification model is established and recognition methods, device, medium and electronic equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Residual Conv-Deconv Grid Network for Semantic Segmentation;Damien Fourure;《https://arxiv.org/abs/1707.07958》;20170726;全文 *

Also Published As

Publication number Publication date
WO2021083110A1 (en) 2021-05-06
CN112750065A (en) 2021-05-04

Similar Documents

Publication Publication Date Title
US20170330076A1 (en) Neural network structure and a method thereto
CN111144215B (en) Image processing method, device, electronic equipment and storage medium
JP6612486B1 (en) Learning device, classification device, learning method, classification method, learning program, and classification program
CN111027412B (en) Human body key point identification method and device and electronic equipment
CN112419132B (en) Video watermark detection method, device, electronic equipment and storage medium
EP3620988A1 (en) Method, device for optimizing simulation data, and computer-readable storage medium
US20140177965A1 (en) Image processing device, image processing method, and program
CN110969100A (en) Human body key point identification method and device and electronic equipment
CN111563505A (en) Character detection method and device based on pixel segmentation and merging
JP7124957B2 (en) Image processing system, estimation device, processing method and program
CN109492697B (en) Picture detection network training method and picture detection network training device
CN111753729B (en) False face detection method and device, electronic equipment and storage medium
CN112750065B (en) Carrier object processing and watermark embedding method, device and electronic equipment
CN116580407A (en) Training method of text detection model, text detection method and device
JP2007199865A (en) Image processing algorithm evaluation apparatus, image processing algorithm creation apparatus, image inspection apparatus, method for evaluating image processing algorithm, method for creating image processing algorithm, and method for inspecting image
CN115374517A (en) Testing method and device for wiring software, electronic equipment and storage medium
CN114708582A (en) AI and RPA-based intelligent electric power data inspection method and device
CN114266901A (en) Document contour extraction model construction method, device, equipment and readable storage medium
CN114648751A (en) Method, device, terminal and storage medium for processing video subtitles
CN110751197A (en) Picture classification method, picture model training method and equipment
CN113836863B (en) Method and system for checking weight of Logisim circuit diagram
JP7266075B2 (en) Data selection support device, data selection support method, and data selection support program
CN112669204B (en) Image processing method, training method and device of image processing model
KR102239771B1 (en) Apparatus and method for executing deep learning based watermark in various kinds of content environment
US12014258B2 (en) Method and device for optimizing simulation data, and computer-readable storage medium

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
TA01 Transfer of patent application right

Effective date of registration: 20221116

Address after: No. 699, Wangshang Road, Binjiang District, Hangzhou, Zhejiang

Applicant after: Alibaba (China) Network Technology Co.,Ltd.

Address before: Box 847, four, Grand Cayman capital, Cayman Islands, UK

Applicant before: ALIBABA GROUP HOLDING Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant