Digital watermark processing method and device for semantic sketch images

By generating and utilizing semantic sketches, watermark information is retained in semantic communication transmission, which solves the problem of watermark information loss in the existing technology and ensures the legitimate rights and interests of digital image holders.

CN118333831BActive Publication Date: 2024-09-24TSINGHUA UNIVERSITY +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410773874.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-17
Publication Date
2024-09-24
Estimated Expiration
2044-06-17

AI Technical Summary

Technical Problem

Existing digital watermarking technology cannot effectively retain watermark information during the semantic communication transmission process, making it difficult to protect the legitimate rights and interests of digital image holders.

Method used

By obtaining the sketch point coordinates and connection relationships of the target image, sorting and encoding are performed, and a target semantic sketch carrying watermark information is generated. The semantic sketch is used to retain the watermark information in semantic communication transmission.

Benefits of technology

It achieves the retention of watermark information during the semantic communication transmission process, solves the problem of loss of watermark information embedded in the color space of digital images, and ensures the legitimate rights and interests of digital image holders.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118333831B
    Figure CN118333831B
Patent Text Reader

Abstract

The present disclosure provides a digital watermark processing method and device for a semantic sketch, which relates to the technical field of watermark processing and is intended to add a watermark to a semantic sketch. The method comprises: obtaining the connection relationship and coordinates of each sketch point of a target image; sorting the coordinates of each sketch point to obtain a position vector matrix; encoding the watermark information to obtain a binary watermark information sequence; transforming the position vector matrix according to the parity of each sequence element of the binary watermark information sequence and the parity of each matrix element of the position vector matrix to obtain a target matrix carrying the watermark information; obtaining a target semantic sketch carrying the watermark information according to the connection relationship between the target matrix and each sketch point; the transformed coordinates of each sketch point in the target semantic sketch are disordered; the target semantic sketch is used to provide a semantic sketch for reconstructing the target image, and retain the watermark information during the semantic communication transmission process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of watermark processing, and in particular to a digital watermark processing method and device for a semantic sketch. Background Art

[0002] With the development of communication technology, the Shannon channel capacity is approaching its limit, and it is becoming increasingly difficult to increase the channel transmission symbol rate. The development and application of artificial intelligence has led to a gradual increase in machine type communication (MTC). Unlike human type communication (HTC), which needs to meet human perception of details and aesthetics, MTC pays more attention to the semantic content of images and low transmission delay. Therefore, semantic communication transmission technology that can achieve low-bit communication will have an increasingly broad application prospect.

[0003] With the popularization and development of Internet communication technology, the amount of mobile data has increased, and the application scenarios of digital image services have become more and more extensive. As a digital asset, the value of digital images is also increasing. At the same time, the risk of digital images being illegally copied, leaked, and tampered with poses a severe challenge to protecting the legitimate rights and interests of digital image holders. The digital watermarking technology of related technologies is based on the spatial domain or frequency domain to embed watermark information into the color space of digital images. However, semantic communication transmission has a high distortion rate and loses all background information. The watermark information embedded in the color space cannot be retained and will be completely lost during semantic communication transmission, which cannot protect the legitimate rights and interests of digital image holders. Summary of the invention

[0004] In view of the above problems, the embodiments of the present disclosure provide a method and device for digital watermark processing of a semantic sketch image, so as to overcome the above problems or at least partially solve the above problems.

[0005] A first aspect of the embodiments of the present disclosure provides a method for processing digital watermarks of a semantic sketch image, the method comprising:

[0006] Obtaining coordinates of each sketch point of the target image, and obtaining a connection relationship between the sketch points;

[0007] The coordinates of the sketch points are sorted to obtain a position vector matrix; each matrix element of the position vector matrix is ​​the coordinate of each sketch point;

[0008] Encode the watermark information to obtain a binary watermark information sequence;

[0009] According to the parity of each sequence element of the binary watermark information sequence and the parity of each matrix element of the position vector matrix, the position vector matrix is ​​transformed to obtain a target matrix carrying the watermark information; each matrix element of the target matrix is ​​the transformed coordinate of each sketch point;

[0010] According to the connection relationship between the target matrix and the sketch points, a target semantic sketch map carrying the watermark information is obtained; the transformed coordinates of the sketch points in the target semantic sketch map are disordered; the target semantic sketch map is used to provide a semantic sketch map for reconstructing the target image, and to retain the watermark information during the semantic communication transmission process.

[0011] Optionally, after obtaining the target semantic sketch image carrying the watermark information, the method further includes:

[0012] Sorting the transformed coordinates of each sketch point in the target semantic sketch map according to a sorting rule for sorting the coordinates of each sketch point to obtain a sequential position vector matrix;

[0013] extracting the binary watermark information sequence from the sequential position vector matrix according to the parity of each matrix element in the sequential position vector matrix;

[0014] Decoding the binary watermark information sequence to obtain the watermark information;

[0015] The target semantic sketch image carrying the watermark information is input into a cyclic generative adversarial network to obtain a reconstructed image.

[0016] Optionally, transforming the position vector matrix according to the parity of each sequence element of the binary watermark information sequence and the parity of each matrix element of the position vector matrix to obtain a target matrix carrying the watermark information includes:

[0017] Determine a one-to-one correspondence between each sequence element of the binary watermark information sequence and each matrix element in the position vector matrix;

[0018] When the parity of the sequence elements of the binary watermark information sequence is different from the parity of the matrix elements in the corresponding position vector matrix, transform the parity of the matrix elements in the position vector matrix to obtain a first matrix element;

[0019] When the parity of the sequence elements of the binary watermark information sequence is the same as the parity of the matrix elements in the corresponding position vector matrix, the parity of the matrix elements in the position vector matrix is ​​maintained to obtain a second matrix element;

[0020] Obtaining a target matrix carrying the watermark information according to the first matrix elements and the second matrix elements;

[0021] The step of extracting the binary watermark information sequence from the sequential position vector matrix according to the parity of each matrix element in the sequential position vector matrix comprises:

[0022] When the matrix element of the sequential position vector matrix is ​​an odd number, determining the sequence element of the corresponding position of the binary watermark information sequence to be 1;

[0023] In the case where the matrix element of the sequential position vector matrix is ​​an even number, the sequence element of the corresponding position of the binary watermark information sequence is determined to be 0.

[0024] Optionally, transforming the position vector matrix according to the parity of each sequence element of the binary watermark information sequence and the parity of each matrix element of the position vector matrix to obtain a target matrix carrying the watermark information includes:

[0025] Determine a one-to-one correspondence between each sequence element of the binary watermark information sequence and each matrix element in the position vector matrix;

[0026] When the parity of the sequence elements of the binary watermark information sequence is different from the parity of the matrix elements in the corresponding position vector matrix, the parity of the matrix elements in the position vector matrix is ​​maintained to obtain a third matrix element;

[0027] When the parity of the sequence elements of the binary watermark information sequence is the same as the parity of the matrix elements in the corresponding position vector matrix, transform the parity of the matrix elements in the position vector matrix to obtain a fourth matrix element;

[0028] Obtaining a target matrix carrying the watermark information according to the third matrix element and the fourth matrix element;

[0029] The step of extracting the binary watermark information sequence from the sequential position vector matrix according to the parity of each matrix element in the sequential position vector matrix comprises:

[0030] When the matrix element of the sequential position vector matrix is ​​an odd number, determining the sequence element of the corresponding position of the binary watermark information sequence to be 0;

[0031] When the matrix element of the sequential position vector matrix is ​​an even number, the sequence element of the corresponding position of the binary watermark information sequence is determined to be 1.

[0032] Optionally, encoding the watermark information to obtain a binary watermark information sequence includes:

[0033] Performing source encoding on the watermark information to obtain the binary watermark information sequence;

[0034] or

[0035] Performing source encoding on the watermark information to obtain a binary sequence;

[0036] Grouping the binary sequence to obtain multiple binary subsequences;

[0037] Inserting a group header into each of the binary subsequences to obtain a plurality of target binary subsequences, wherein the group header represents a grouping number;

[0038] The binary watermark information sequence is generated according to the multiple target binary subsequences.

[0039] Optionally, decoding the binary watermark information sequence to obtain the watermark information includes:

[0040] Performing source decoding on the binary watermark information sequence to obtain the watermark information;

[0041] or

[0042] Detecting a group header included in the binary watermark information sequence;

[0043] Determining a plurality of target binary subsequences according to the group header;

[0044] Determining the order of each of the plurality of target binary subsequences according to the group code represented by the group header;

[0045] Removing the group headers of the plurality of target binary subsequences to obtain a plurality of binary subsequences;

[0046] splicing the multiple binary subsequences according to the respective orders of the multiple target binary subsequences to obtain a binary sequence;

[0047] The binary sequence is source decoded to obtain the watermark information.

[0048] A second aspect of the embodiments of the present disclosure provides a digital watermark processing device for a semantic sketch image, the device comprising:

[0049] An acquisition module, used to acquire the coordinates of each sketch point of the target image, and to acquire the connection relationship between the sketch points;

[0050] A sorting module, used for sorting the coordinates of each sketch point to obtain a position vector matrix; each matrix element of the position vector matrix is ​​the coordinate of each sketch point;

[0051] An encoding module, used for encoding the watermark information to obtain a binary watermark information sequence;

[0052] A transformation module, used for transforming the position vector matrix according to the parity of each sequence element of the binary watermark information sequence and the parity of each matrix element of the position vector matrix, to obtain a target matrix carrying the watermark information; each matrix element of the target matrix is ​​the transformed coordinate of each sketch point;

[0053] An obtaining module is used to obtain a target semantic sketch map carrying the watermark information according to the connection relationship between the target matrix and the sketch points; the transformed coordinates of the sketch points in the target semantic sketch map are disordered; the target semantic sketch map is used to provide a semantic sketch map for reconstructing the target image, and to retain the watermark information during the semantic communication transmission process.

[0054] According to a third aspect of an embodiment of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to execute instructions to implement a digital watermark processing method for a semantic sketch image as in the first aspect.

[0055] A fourth aspect of the embodiments of the present disclosure provides a computer-readable storage medium. When instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device can perform the digital watermark processing method for a semantic sketch as described in the first aspect.

[0056] The embodiments of the present disclosure include the following advantages:

[0057] In the disclosed embodiment, the coordinates of each sketch point of the target image can be obtained, and by sorting the coordinates of the sketch points, a position vector matrix is ​​obtained, and the problem that the points in the sketch have no fixed positions is solved by the position vector matrix; the watermark information is encoded into a binary watermark information sequence, and the position vector matrix is ​​transformed according to the binary watermark information sequence to obtain a target matrix carrying the watermark information; according to the connection relationship between the target matrix and each sketch point, a target semantic sketch map carrying the watermark information can be obtained, wherein the target semantic sketch map is used to provide a semantic sketch map for reconstructing the target image, and to retain the watermark information during the semantic communication transmission process. In this way, when transmitting the target semantic sketch map carrying the watermark information, the watermark information can be retained, achieving the technical effect of adding a watermark to the target image, and solving the problem of the loss of watermark information embedded in the color space of the digital image due to the loss of background information during the semantic communication transmission process. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings required for use in the description of the embodiments of the present disclosure will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0059] Figure 1 is a flowchart of the steps of a digital watermark processing method for a semantic sketch image in an embodiment of the present disclosure;

[0060] Figure 2 is a visualized image of a target image and a semantic sketch of the target image in an embodiment of the present disclosure;

[0061] Figure 3 is a flow chart of a method for detecting a group head and a group tail in an embodiment of the present disclosure;

[0062] Figure 4 It is a structural schematic diagram of a digital watermark processing device for a semantic sketch image in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0063] In order to make the above-mentioned objects, features and advantages of the present disclosure more obvious and understandable, the present disclosure is further described in detail below with reference to the accompanying drawings and specific implementation methods.

[0064] The digital watermarking method of the related art uses the digital image color space and brightness space as the digital watermark information embedding domain. By hiding the digital watermark information in the LSB (Least Significant Bit), DFT (Discrete Fourier Transform) domain, DCT (Discrete Cosine Transform) domain or DWT (Discrete Wavelet Transform) domain, the digital watermark is not perceived by humans and can only be detected by the digital image holder. However, once the digital image color space and brightness space information are lost, this method cannot retain the digital watermark information.

[0065] Semantic communication transmission is a communication method that takes into account both human perception tasks and machine type tasks. The core of semantic communication is to extract semantic information from the pixel information of digital images. When receiving digital image information, humans and intelligent machines often do not pay attention to the specific value of a pixel, but pay more attention to the semantic level content. In addition, semantic communication transmission can greatly save communication resources. Therefore, the application of semantic communication transmission is becoming more and more extensive. However, the extraction of semantic information of digital images often ignores the background information of digital images, and loses the digital watermark embedded in the background information. Therefore, the digital watermark method that uses the color space and brightness space of digital images as the digital watermark information embedding domain cannot be applied.

[0066] How to embed a digital watermark into a digital image under the premise that all background information of the digital image is lost is a difficult problem in the digital watermark method. Different from the digital watermark method of the related art that uses LSB, DCT, DFT or DWT as the embedding domain, the digital watermark processing method of the semantic sketch proposed in the embodiment of the present disclosure adopts a new embedding domain: the position of the point in the semantic sketch extracted from the digital image is used as the embedding domain of the digital watermark. The position of the point in the semantic sketch is a kind of semantic information, which will not be lost during the semantic communication transmission process.

[0067] Using the position of points in a semantic sketch as the embedding domain of a digital watermark faces new difficulties: the points in a semantic sketch do not have a constant number like pixels in a digital image; the points in a semantic sketch do not have a fixed position that can be described by row and column coordinates like pixels in a digital image. In order to solve the problem of the non-constant number of points in a sketch, the embodiment of the present disclosure performs binary encoding on the watermark information; in order to solve the problem of the non-fixed position of points in a sketch, the embodiment of the present disclosure sorts the coordinates of the sketch points of the sketch before embedding the watermark.

[0068] Reference Figure 1As shown, a flowchart of a digital watermark processing method for a semantic sketch image in an embodiment of the present disclosure is shown. Figure 1 As shown, the digital watermark processing method of the semantic sketch image may specifically include steps S11 to S15.

[0069] Step S11: obtaining the coordinates of each sketch point of the target image, and obtaining the connection relationship between the sketch points.

[0070] The target image can be any image. A semantic sketch of the target image can be extracted from the target image. The semantic sketch is composed of a series of points and the connection relationships between these points. Figure 2 It is a visualized image of a target image and a semantic sketch of the target image in an embodiment of the present disclosure.

[0071] There are two key differences between the data structures of the target image and the semantic sketch: the target image has a fixed size, which is a matrix of length × width × number of channels of the target image; while the semantic sketch does not have a fixed size, which is a matrix of x rows and 2 columns (one column of characteristic horizontal coordinates, one column of characteristic vertical coordinates) recording the positions of the points in the semantic sketch and a matrix of x rows and x columns recording the connection relationships of the points in the semantic sketch; the pixels of the target image have a fixed order and can be uniquely represented by row and column coordinates, while the points in the semantic sketch have no fixed order, only a topological structure.

[0072] Each point in the visualized image of the semantic sketch is the sketch point of the target image. The sketch points of the target image include various feature points such as spots, endpoints, edges, ridges, multiple ridges, corners, T-junctions and crosses in the target image. The sketch points of the target image are used for the objects in the target image, while the background information such as the color, texture and brightness of the object will not be recorded by the semantic sketch.

[0073] An edge detection algorithm can be used to extract each sketch point in the target image. Optionally, the pixel points of the contour of each object in the target image can be roughly detected first, and then the pixel points describing the contour can be connected through some connection rules, and then some previously unrecognized boundary points can be detected and connected, and the detected false pixel points and boundary points can be removed to form an overall edge, and finally the sketch points can be determined by non-maximum suppression. After determining each sketch point, the coordinates of each sketch point in the target image can be obtained, and the connection relationship between the sketch points can be determined.

[0074] Step S12: sorting the coordinates of the sketch points to obtain a position vector matrix, wherein each matrix element of the position vector matrix is ​​the coordinate of each sketch point.

[0075] The coordinates of the sketch points obtained in step S11 are actually unordered. After obtaining the coordinates of the sketch points, the order relationship between the sketch points can be determined according to the positions of the sketch points in the target image. The order relationship between the sketch points can be determined according to the order of the sketch points from left to right and from top to bottom in the target image. When the coordinate system is determined, the size relationship between the horizontal coordinate and the vertical coordinate can represent the left-right relationship and the up-down relationship respectively. Therefore, the sketch points can be sorted according to the size relationship of the horizontal coordinates first; for sketch points with the same horizontal coordinates, the sketch points with the same horizontal coordinates can be sorted according to the size relationship of the vertical coordinates.

[0076] According to the order relationship between the sketch points, the coordinates of each sketch point are sorted to obtain the position vector matrix. For example, taking the lower left point of the target image as the origin, the horizontal right is the positive direction of the horizontal axis, and the vertical upward is the positive direction of the vertical axis. The coordinates of the four sketch points are (1,4) (4,2) (2,4) (2,3), then in the order from left to right and then from top to bottom, the position vector matrix can be obtained as follows:

[0077] ;

[0078] The element in the nth row and first column of the matrix represents the horizontal coordinate of the nth sketch point, and the element in the nth row and second column of the matrix represents the vertical coordinate of the nth sketch point. It can be understood that the position vector matrix here is just an example. In actual situations, the number of sketch points is usually far more than 4, so the number of matrix elements in the position vector matrix is ​​also far more than 4 groups.

[0079] Step S13: Encode the watermark information to obtain a binary watermark information sequence.

[0080] The watermark information can be any information, such as information identifying the holder of the target image or information identifying authenticity. By encoding the watermark information, a binary watermark information sequence can be obtained.

[0081] Optionally, the watermark information may be directly source encoded to obtain a binary sequence, and the obtained binary sequence is used as a binary watermark information sequence. The embodiment of the present disclosure does not limit the source encoding method, which may be Shannon encoding, Finoi encoding, Huffman encoding, etc.

[0082] Optionally, encoding the watermark information may be performed by performing source coding and channel coding. Specifically, the watermark information may be first source-coded to obtain a binary sequence; then the binary sequence may be grouped to obtain multiple binary subsequences; a group header representing the group number is inserted before each binary subsequence, and a group tail carrying an end symbol is inserted after the last binary subsequence. Each group header is a binary sequence and will not appear in the available field of the source coding; the group tail is a binary sequence and will not appear in the available field of the source coding. The group number represented by the group header inserted before each binary subsequence is determined by the position of the binary subsequence in the binary sequence. Each binary subsequence carrying a group header is determined as a target binary subsequence. Multiple target binary subsequences are arranged in order to obtain a binary watermark information sequence.

[0083] For example, the watermark information is [1, 2, ...]; source encoding the watermark information can obtain a binary sequence [0000001, 0000010, ...]; grouping the binary sequence to obtain multiple binary subsequences [0000001], [0000010], ...; inserting a group header into each binary subsequence can obtain multiple target binary subsequences: [H10000001], [H20000010], ..., where H1 and H2 are also binary; inserting a group tail after the last target binary subsequence to obtain a binary watermark information sequence.

[0084] Step S14: transforming the position vector matrix according to the parity of each sequence element of the binary watermark information sequence and the parity of each matrix element of the position vector matrix to obtain a target matrix carrying the watermark information.

[0085] No matter the watermark information is source encoded or source encoded and channel encoded, each sequence element of the obtained binary watermark information sequence is 1 or 0.

[0086] The one-to-one correspondence between each sequence element of the binary watermark information sequence and each matrix element in the position vector matrix can be determined. Wherein, when the number of sequence elements of the binary watermark information sequence is greater than the number of matrix elements in the position vector matrix, some sequence elements of the binary watermark information sequence can be discarded, and the one-to-one correspondence between each sequence element of the remaining binary watermark information sequence and each matrix element in the position vector matrix can be determined. When the number of sequence elements of the binary watermark information sequence is less than the number of matrix elements in the position vector matrix, 0 can be added after the sequence elements of the binary watermark information sequence so that each matrix element of the position vector matrix corresponds to a sequence element of the binary watermark information sequence.

[0087] According to the parity of each sequence element of the binary watermark information sequence and the parity of each matrix element of the position vector matrix, the position vector matrix is ​​transformed, including: according to whether the parity of each sequence element of the binary watermark information sequence is consistent with the parity of the matrix element corresponding to the sequence element in the position vector matrix, determining whether to transform the parity of the corresponding matrix element in the position vector matrix. Among them, transforming the parity of the matrix element can be to subtract 1 from the matrix element or to add 1 to the matrix element. Specifically, it can be to transform the parity of the matrix element in the position vector matrix when the parity of the two is consistent, or to transform the parity of the matrix element in the position vector matrix when the parity of the two is inconsistent. Specifically, whether to transform the parity of the matrix elements in the position vector matrix, and whether to add 1 or subtract 1 when transforming the parity, can be set according to actual needs, and it only needs to ensure that whether to transform and the transformation rules are compatible with the subsequent rules for extracting the binary watermark information sequence according to the sequential position vector matrix.

[0088] According to each matrix element of the transformed position vector matrix, a target matrix carrying watermark information can be generated. Each matrix element of the target matrix is ​​the transformed coordinate of each sketch point.

[0089] Optionally, when the number of sequence elements in the binary watermark information sequence is greater than the number of matrix elements in the position vector matrix, it may be indicated that the transformation has failed.

[0090] Step S15: obtaining a target semantic sketch image carrying the watermark information according to the connection relationship between the target matrix and each sketch point.

[0091] The transformed coordinates of the sketch points in the target semantic sketch are out of order; the target semantic sketch is used to provide a semantic sketch for reconstructing the target image and to retain the watermark information during the semantic communication transmission process.

[0092] The semantic sketch of the target image includes: the coordinates of the sketch points of the target image, the position vector matrix formed by the coordinates of the sketch points of the target image, and the connection relationship between the coordinates of the sketch points of the target image. The target matrix is ​​obtained by transforming the position vector matrix according to the binary watermark information sequence. Therefore, according to the connection relationship between the target matrix and the sketch points, a semantic sketch carrying watermark information can be obtained. The binary watermark information contained in the semantic sketch carrying watermark information will not be lost during the semantic communication transmission process. According to the semantic sketch carrying watermark information, the target image can be reconstructed.

[0093] By adopting the technical solution of the embodiment of the present disclosure, the coordinates of each sketch point of the target image can be obtained, and by sorting the coordinates of the sketch points, a position vector matrix can be obtained. The problem that the points in the sketch have no fixed position is solved by the position vector matrix; the watermark information is encoded into a binary watermark information sequence, and the position vector matrix is ​​transformed according to the binary watermark information sequence to obtain a target matrix carrying the watermark information; according to the connection relationship between the target matrix and each sketch point, a target semantic sketch map carrying the watermark information can be obtained, wherein the target semantic sketch map is used to provide a semantic sketch map for reconstructing the target image, and to retain the watermark information during the semantic communication transmission process. In this way, when transmitting the target semantic sketch map carrying the watermark information, the watermark information can be retained, achieving the technical effect of adding a watermark to the target image, and solving the problem of the loss of watermark information embedded in the color space of the digital image due to the loss of background information during the semantic communication transmission process.

[0094] Optionally, as an embodiment, after obtaining the target semantic sketch image carrying the watermark information, the digital watermark processing method of the semantic sketch image may further include steps S16 to S19.

[0095] The technical solution of the embodiment of the present disclosure can be applied to a semantic transmission system, which includes a sending end and a receiving end, wherein the sending end is used to execute steps S11 to S15, and the receiving end is used to execute steps S16 to S19. The sending end and the receiving end can pre-agree on the transformation rule and the rule for extracting the binary watermark information sequence, or the sending end can transmit the transformation rule to the receiving end during the semantic communication transmission, so that the receiving end determines the rule for extracting the binary watermark information sequence according to the transformation rule.

[0096] Step S16: sorting the transformed coordinates of the sketch points in the target semantic sketch image according to a sorting rule for sorting the coordinates of the sketch points to obtain a sequential position vector matrix.

[0097] According to the sorting rule for sorting the coordinates of the sketch points, the transformed coordinates of the sketch points in the target semantic sketch are sorted to obtain a sequential position vector matrix.

[0098] Step S17: extracting the binary watermark information sequence from the sequential position vector matrix according to the parity of each matrix element in the sequential position vector matrix.

[0099] The rule for extracting the binary watermark information sequence from the sequential position vector matrix should be compatible with the rule for transforming the parity of the matrix elements in the position vector matrix.

[0100] The rules for transforming the parity of matrix elements in the position vector matrix include at least the following two:

[0101] The first transformation rule: when the parity of the sequence elements of the binary watermark information sequence is different from the parity of the corresponding matrix elements in the position vector matrix, the parity of the matrix elements in the position vector matrix is ​​transformed to obtain the first matrix element; when the parity of the sequence elements of the binary watermark information sequence is the same as the parity of the corresponding matrix elements in the position vector matrix, the parity of the matrix elements in the position vector matrix is ​​maintained to obtain the second matrix element; based on the first matrix element and the second matrix element, a target matrix carrying the watermark information is obtained.

[0102] Under the first transformation rule, when the matrix elements of the sequential position vector matrix are odd numbers, the sequence elements of the corresponding positions of the binary watermark information sequence are determined to be 1; when the matrix elements of the sequential position vector matrix are even numbers, the sequence elements of the corresponding positions of the binary watermark information sequence are determined to be 0.

[0103] The second transformation rule: when the parity of the sequence elements of the binary watermark information sequence is different from the parity of the corresponding matrix elements in the position vector matrix, the parity of the matrix elements in the position vector matrix is ​​maintained to obtain a third matrix element; when the parity of the sequence elements of the binary watermark information sequence is the same as the parity of the corresponding matrix elements in the position vector matrix, the parity of the matrix elements in the position vector matrix is ​​transformed to obtain a fourth matrix element; based on the third matrix element and the fourth matrix element, a target matrix carrying the watermark information is obtained.

[0104] Under the second transformation rule, when the matrix elements of the sequential position vector matrix are odd numbers, the sequence elements of the corresponding positions of the binary watermark information sequence are determined to be 0; when the matrix elements of the sequential position vector matrix are even numbers, the sequence elements of the corresponding positions of the binary watermark information sequence are determined to be 1.

[0105] As an embodiment, the position vector matrix includes the following five coordinates: (1,7) (2,6) (3,3) (3,4) (3,5), and the binary watermark information sequence is 1000101110; it can be determined that the corresponding relationships between each matrix element in the position vector matrix and each sequence element of the binary watermark information sequence are: 1-1, 7-0, 2-0, 6-0, 3-1, 3-0, 3-1, 4-1, 3-1, 5-0; according to the first transformation rule, in the case of different parities, the matrix elements of the position vector matrix can be reduced by 1, and the target matrix / sequential position vector matrix includes the following five transformed coordinates: (1,6) (2,6) (3,2) (3,3) (3,4); when the matrix elements of the sequential position vector matrix are odd numbers, the corresponding sequence elements of the binary watermark information sequence are 1, and when the matrix elements of the sequential position vector matrix are even numbers, the corresponding sequence elements of the binary watermark information sequence are 0, and the binary watermark information sequence 1000101110 can be obtained.

[0106] Step S18: Decode the binary watermark information sequence to obtain the watermark information.

[0107] In the case where the binary watermark information sequence is a sequence obtained by performing source encoding only, the watermark information can be obtained by directly performing source decoding on the binary watermark information sequence.

[0108] In the case where the binary watermark information sequence is a sequence obtained by source coding and channel coding, the group header contained in the binary watermark information sequence can be detected, so as to determine multiple target binary subsequences according to the group header. According to the group coding represented by the group header of each target binary subsequence, the order of the multiple target binary subsequences is determined; the group headers of the multiple target binary subsequences are removed to obtain multiple binary subsequences; according to the order of the multiple target binary subsequences, the multiple binary subsequences are spliced ​​to obtain a binary sequence; the binary sequence is source decoded to obtain the watermark information.

[0109] Alternatively, if Figure 3 The detection method of the group header and the group tail shown in the figure can detect the group header and the group tail contained in the binary watermark information sequence by using a sliding detection window. The sliding detection window moves from left to right. When the group header is detected, the content after the group header is read out, and it continues to move right until the group tail is detected, and the decoding is ended. When the sliding detection window moves to the bottom line, the decoding is ended.

[0110] Step S19: input the target semantic sketch image carrying the watermark information into a cyclic generative adversarial network to obtain a reconstructed image.

[0111] A recurrent generative adversarial network can be pre-trained, and the recurrent generative adversarial network includes a generator and a discriminator. The semantic sketch image is input into the generator in the trained recurrent generative adversarial network to obtain a reconstructed target image.

[0112] The training steps of the cyclic generative adversarial network may at least include: obtaining image samples and semantic sketches of each image sample; performing the following steps for the semantic sketch of each image sample in turn: initializing the cyclic generative adversarial network; fixing the generator parameters according to the current semantic sketch, generating a reconstructed image sample by the generator, scoring the discriminator according to the reconstructed image sample, and comparing the score with the real score to obtain the discriminator loss function; generating a reconstructed image sample by the generator, fixing the discriminator parameters, scoring the discriminator according to the reconstructed image sample, and comparing the reconstructed image sample with the real image sample to obtain the generator loss function; the discriminator loss function and the generator loss function constitute the cyclic generative adversarial network loss function; inputting the reconstructed image sample into the cyclic generative adversarial network again to obtain a cyclically generated reconstructed image sample, and comparing the cyclically generated reconstructed image sample with the image sample to obtain a cyclic loss function; the cyclic generative adversarial network loss function and the cyclic loss function constitute the reconstruction loss function of the cyclic generative adversarial network, and training the initial cyclic generative adversarial network according to the reconstruction loss function to obtain the trained cyclic generative adversarial network.

[0113] By adopting the technical solution of the embodiment of the present disclosure, the receiving end can reconstruct the target image based on the semantic sketch image carrying the watermark information, and can also extract the watermark information, thereby determining the information represented by the watermark information based on the watermark information.

[0114] It should be noted that, for the method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present disclosure are not limited by the order of the actions described, because according to the embodiments of the present disclosure, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present disclosure.

[0115] Figure 4 is a structural schematic diagram of a digital watermark processing device for a semantic sketch image in an embodiment of the present disclosure, such as Figure 4 As shown, the device includes an acquisition module, a sorting module, an encoding module, a transformation module and a obtaining module, wherein:

[0116] An acquisition module, used to acquire the coordinates of each sketch point of the target image, and to acquire the connection relationship between the sketch points;

[0117] A sorting module, used for sorting the coordinates of each sketch point to obtain a position vector matrix; each matrix element of the position vector matrix is ​​the coordinate of each sketch point;

[0118] An encoding module, used for encoding the watermark information to obtain a binary watermark information sequence;

[0119] A transformation module, used for transforming the position vector matrix according to the parity of each sequence element of the binary watermark information sequence and the parity of each matrix element of the position vector matrix, to obtain a target matrix carrying the watermark information; each matrix element of the target matrix is ​​the transformed coordinate of each sketch point;

[0120] An obtaining module is used to obtain a target semantic sketch map carrying the watermark information according to the connection relationship between the target matrix and the sketch points; the transformed coordinates of the sketch points in the target semantic sketch map are disordered; the target semantic sketch map is used to provide a semantic sketch map for reconstructing the target image, and to retain the watermark information during the semantic communication transmission process.

[0121] Optionally, the device further comprises:

[0122] A coordinate sorting module, used for sorting the transformed coordinates of each sketch point in the target semantic sketch image according to a sorting rule for sorting the coordinates of each sketch point, to obtain a sequential position vector matrix;

[0123] An extraction module, used for extracting the binary watermark information sequence from the sequential position vector matrix according to the parity of each matrix element in the sequential position vector matrix;

[0124] A decoding module, used for decoding the binary watermark information sequence to obtain the watermark information;

[0125] The input module is used to input the target semantic sketch image carrying the watermark information into a recurrent generative adversarial network to obtain a reconstructed image.

[0126] Optionally, the transformation module is specifically used to perform:

[0127] Determine a one-to-one correspondence between each sequence element of the binary watermark information sequence and each matrix element in the position vector matrix;

[0128] When the parity of the sequence elements of the binary watermark information sequence is different from the parity of the matrix elements in the corresponding position vector matrix, transform the parity of the matrix elements in the position vector matrix to obtain a first matrix element;

[0129] When the parity of the sequence elements of the binary watermark information sequence is the same as the parity of the matrix elements in the corresponding position vector matrix, the parity of the matrix elements in the position vector matrix is ​​maintained to obtain a second matrix element;

[0130] Obtaining a target matrix carrying the watermark information according to the first matrix elements and the second matrix elements;

[0131] The extraction module is specifically used to perform:

[0132] When the matrix element of the sequential position vector matrix is ​​an odd number, determining the matrix element at the corresponding position of the binary watermark information sequence to be 1;

[0133] In the case where the matrix element of the sequential position vector matrix is ​​an even number, the matrix element of the corresponding position of the binary watermark information sequence is determined to be 0.

[0134] Optionally, the transformation module is specifically used to perform:

[0135] Determine a one-to-one correspondence between each sequence element of the binary watermark information sequence and each matrix element in the position vector matrix;

[0136] When the parity of the sequence elements of the binary watermark information sequence is different from the parity of the matrix elements in the corresponding position vector matrix, the parity of the matrix elements in the position vector matrix is ​​maintained to obtain a third matrix element;

[0137] When the parity of the sequence elements of the binary watermark information sequence is the same as the parity of the matrix elements in the corresponding position vector matrix, transform the parity of the matrix elements in the position vector matrix to obtain a fourth matrix element;

[0138] Obtaining a target matrix carrying the watermark information according to the third matrix element and the fourth matrix element;

[0139] The extraction module is specifically used to perform:

[0140] When the matrix element of the sequential position vector matrix is ​​an odd number, determining the matrix element at the corresponding position of the binary watermark information sequence to be 0;

[0141] When the matrix element of the sequential position vector matrix is ​​an even number, the matrix element of the corresponding position of the binary watermark information sequence is determined to be 1.

[0142] Optionally, the encoding module is specifically used to execute:

[0143] Performing source encoding on the watermark information to obtain the binary watermark information sequence;

[0144] or

[0145] Performing source encoding on the watermark information to obtain a binary sequence;

[0146] Grouping the binary sequence to obtain multiple binary subsequences;

[0147] Inserting a group header into each of the binary subsequences to obtain a plurality of target binary subsequences, wherein the group header represents a grouping number;

[0148] The binary watermark information sequence is generated according to the multiple target binary subsequences.

[0149] Optionally, the decoding module is specifically used to execute:

[0150] Performing source decoding on the binary watermark information sequence to obtain the watermark information;

[0151] or

[0152] Detecting a group header included in the binary watermark information sequence;

[0153] Determining a plurality of target binary subsequences according to the group header;

[0154] Determining the order of each of the plurality of target binary subsequences according to the group code represented by the group header;

[0155] Removing the group headers of the plurality of target binary subsequences to obtain a plurality of binary subsequences;

[0156] splicing the multiple binary subsequences according to the respective orders of the multiple target binary subsequences to obtain a binary sequence;

[0157] The binary sequence is source decoded to obtain the watermark information.

[0158] It should be noted that the device embodiment is similar to the method embodiment, so the description is relatively simple, and the relevant parts can be referred to the method embodiment.

[0159] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0160] Those skilled in the art will appreciate that the embodiments of the present disclosure may be provided as methods, devices or computer program products. Therefore, the embodiments of the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of the present disclosure may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0161] The embodiments of the present disclosure are described with reference to the flowcharts and / or block diagrams of the methods, apparatuses, electronic devices, and computer program products according to the embodiments of the present disclosure. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0162] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0163] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0164] Although the preferred embodiments of the present disclosure have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present disclosure.

[0165] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.

[0166] The digital watermark processing method and device for a semantic sketch image provided by the present invention are introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method and core idea of ​​the present invention. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A digital watermark processing method for a semantic sketch image, characterized in that: The method comprises: Obtaining coordinates of each sketch point of the target image, and obtaining a connection relationship between the sketch points; The coordinates of the sketch points are sorted to obtain a position vector matrix; each matrix element of the position vector matrix is ​​the coordinate of each sketch point; Encoding the watermark information to obtain a binary watermark information sequence, wherein each sequence element of the binary watermark information sequence corresponds one-to-one to each matrix element in the position vector matrix; According to the parity of each sequence element of the binary watermark information sequence and the parity of each matrix element of the position vector matrix, the position vector matrix is ​​transformed to obtain a target matrix carrying the watermark information, including: according to whether the parity of each sequence element of the binary watermark information sequence is consistent with the parity of the matrix element corresponding to the sequence element in the position vector matrix, determining whether to transform the parity of the corresponding matrix element in the position vector matrix, wherein the transformation of the parity of the matrix element includes subtracting 1 from the matrix element or adding 1 to the matrix element; each matrix element of the target matrix is ​​the transformed coordinate of each sketch point; According to the connection relationship between the target matrix and the sketch points, a target semantic sketch map carrying the watermark information is obtained; the transformed coordinates of the sketch points in the target semantic sketch map are disordered; the target semantic sketch map is used to provide a semantic sketch map for reconstructing the target image, and to retain the watermark information during the semantic communication transmission process.

2. The method according to claim 1, characterized in that After obtaining the target semantic sketch image carrying the watermark information, the method further includes: Sorting the transformed coordinates of each sketch point in the target semantic sketch map according to a sorting rule for sorting the coordinates of each sketch point to obtain a sequential position vector matrix; extracting the binary watermark information sequence from the sequential position vector matrix according to the parity of each matrix element in the sequential position vector matrix; Decoding the binary watermark information sequence to obtain the watermark information; The target semantic sketch image carrying the watermark information is input into a cyclic generative adversarial network to obtain a reconstructed image.

3. The method according to claim 2, characterized in that The step of transforming the position vector matrix according to the parity of each sequence element of the binary watermark information sequence and the parity of each matrix element of the position vector matrix to obtain a target matrix carrying the watermark information includes: Determine a one-to-one correspondence between each sequence element of the binary watermark information sequence and each matrix element in the position vector matrix; When the parity of the sequence element of the binary watermark information sequence is different from the parity of the matrix element in the corresponding position vector matrix, transform the parity of the matrix element to obtain a first matrix element; When the parity of the sequence element of the binary watermark information sequence is the same as the parity of the matrix element in the corresponding position vector matrix, the parity of the matrix element is maintained to obtain a second matrix element; Obtaining a target matrix carrying the watermark information according to the first matrix elements and the second matrix elements; The step of extracting the binary watermark information sequence from the sequential position vector matrix according to the parity of each matrix element in the sequential position vector matrix comprises: When the matrix element of the sequential position vector matrix is ​​an odd number, determining the sequence element of the corresponding position of the binary watermark information sequence to be 1; In the case where the matrix element of the sequential position vector matrix is ​​an even number, the sequence element of the corresponding position of the binary watermark information sequence is determined to be 0.

4. The method according to claim 2, characterized in that: The step of transforming the position vector matrix according to the parity of each sequence element of the binary watermark information sequence and the parity of each matrix element of the position vector matrix to obtain a target matrix carrying the watermark information includes: Determine a one-to-one correspondence between each sequence element of the binary watermark information sequence and each matrix element in the position vector matrix; When the parity of the sequence element of the binary watermark information sequence is different from the parity of the matrix element in the corresponding position vector matrix, the parity of the matrix element is maintained to obtain a third matrix element; When the parity of the sequence elements of the binary watermark information sequence is the same as the parity of the matrix elements in the corresponding position vector matrix, transform the parity of the matrix elements to obtain a fourth matrix element; Obtaining a target matrix carrying the watermark information according to the third matrix element and the fourth matrix element; The step of extracting the binary watermark information sequence from the sequential position vector matrix according to the parity of each matrix element in the sequential position vector matrix comprises: When the matrix element of the sequential position vector matrix is ​​an odd number, determining the sequence element of the corresponding position of the binary watermark information sequence to be 0; When the matrix element of the sequential position vector matrix is ​​an even number, the sequence element of the corresponding position of the binary watermark information sequence is determined to be 1.

5. The method according to claim 1, characterized in that The step of encoding the watermark information to obtain a binary watermark information sequence includes: Performing source encoding on the watermark information to obtain the binary watermark information sequence; or Performing source encoding on the watermark information to obtain a binary sequence; Grouping the binary sequence to obtain multiple binary subsequences; Inserting a group header into each of the binary subsequences to obtain a plurality of target binary subsequences, wherein the group header represents a grouping number; The binary watermark information sequence is generated according to the multiple target binary subsequences.

6. The method according to claim 2, characterized in that The decoding of the binary watermark information sequence to obtain the watermark information includes: Performing source decoding on the binary watermark information sequence to obtain the watermark information; or Detecting a group header included in the binary watermark information sequence; Determining a plurality of target binary subsequences according to the group header; Determining the order of each of the plurality of target binary subsequences according to the group code represented by the group header; Removing the group headers of the plurality of target binary subsequences to obtain a plurality of binary subsequences; splicing the multiple binary subsequences according to the respective orders of the multiple target binary subsequences to obtain a binary sequence; The binary sequence is source decoded to obtain the watermark information.

7. A digital watermark processing device for a semantic sketch image, characterized in that: The device comprises: An acquisition module, used to acquire the coordinates of each sketch point of the target image, and to acquire the connection relationship between the sketch points; A sorting module, used for sorting the coordinates of each sketch point to obtain a position vector matrix; each matrix element of the position vector matrix is ​​the coordinate of each sketch point; An encoding module, used for encoding the watermark information to obtain a binary watermark information sequence, wherein each sequence element of the binary watermark information sequence corresponds one-to-one to each matrix element in the position vector matrix; A transformation module, used for transforming the position vector matrix according to the parity of each sequence element of the binary watermark information sequence and the parity of each matrix element of the position vector matrix to obtain a target matrix carrying the watermark information, including: determining whether to transform the parity of the corresponding matrix element in the position vector matrix according to whether the parity of each sequence element of the binary watermark information sequence is consistent with the parity of the matrix element corresponding to the sequence element in the position vector matrix, wherein the transformation of the parity of the matrix element includes subtracting 1 from the matrix element or adding 1 to the matrix element; each matrix element of the target matrix is ​​the transformed coordinate of each sketch point; An obtaining module is used to obtain a target semantic sketch map carrying the watermark information according to the connection relationship between the target matrix and the sketch points; the transformed coordinates of the sketch points in the target semantic sketch map are disordered; the target semantic sketch map is used to provide a semantic sketch map for reconstructing the target image, and to retain the watermark information during the semantic communication transmission process.

8. The device according to claim 7, characterized in that The device also includes: A coordinate sorting module, used for sorting the transformed coordinates of each sketch point in the target semantic sketch image according to a sorting rule for sorting the coordinates of each sketch point, to obtain a sequential position vector matrix; An extraction module, used for extracting the binary watermark information sequence from the sequential position vector matrix according to the parity of each matrix element in the sequential position vector matrix; A decoding module, used for decoding the binary watermark information sequence to obtain the watermark information; The input module is used to input the target semantic sketch image carrying the watermark information into a recurrent generative adversarial network to obtain a reconstructed image.

9. The device according to claim 8, characterized in that The transformation module is specifically used to perform: Determine a one-to-one correspondence between each sequence element of the binary watermark information sequence and each matrix element in the position vector matrix; When the parity of the sequence element of the binary watermark information sequence is different from the parity of the matrix element in the corresponding position vector matrix, transform the parity of the matrix element to obtain a first matrix element; When the parity of the sequence element of the binary watermark information sequence is the same as the parity of the matrix element in the corresponding position vector matrix, the parity of the matrix element is maintained to obtain a second matrix element; Obtaining a target matrix carrying the watermark information according to the first matrix elements and the second matrix elements; The extraction module is specifically used to perform: When the matrix element of the sequential position vector matrix is ​​an odd number, determining the sequence element of the corresponding position of the binary watermark information sequence to be 1; In the case where the matrix element of the sequential position vector matrix is ​​an even number, the sequence element of the corresponding position of the binary watermark information sequence is determined to be 0.

10. The device according to claim 8, characterized in that The transformation module is specifically used to perform: Determine a one-to-one correspondence between each sequence element of the binary watermark information sequence and each matrix element in the position vector matrix; When the parity of the sequence element of the binary watermark information sequence is different from the parity of the matrix element in the corresponding position vector matrix, the parity of the matrix element is maintained to obtain a third matrix element; When the parity of the sequence elements of the binary watermark information sequence is the same as the parity of the matrix elements in the corresponding position vector matrix, transform the parity of the matrix elements to obtain a fourth matrix element; Obtaining a target matrix carrying the watermark information according to the third matrix element and the fourth matrix element; The extraction module is specifically used to perform: When the matrix element of the sequential position vector matrix is ​​an odd number, determining the sequence element of the corresponding position of the binary watermark information sequence to be 0; When the matrix element of the sequential position vector matrix is ​​an even number, the sequence element of the corresponding position of the binary watermark information sequence is determined to be 1.