A watermarking method and apparatus
Patent Information
- Application Number
- CN202310218528.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-08
- Publication Date
- 2026-09-18
- Estimated Expiration
- 2043-03-08
AI Technical Summary
但是,随之而来的网络安全问题也愈发严重,信息泄漏且难以追根溯源对个人和企业事业单位的发展、经营都造成严重的损害
[0020]The technical solution provided in this application embodiment uses a transform domain watermarking method based on differential adaptive block segmentation to adaptively segment the screen image according to its content features, determine the watermark embedding position, and improve the watermark's imperceptibility and resistance to attacks by embedding the watermark in the transform domain. This allows the image watermark to survive under deliberate attacks and various transmission environment disruptions. During source tracing, information can be extracted from the watermark in the leaked image without the original image, achieving a completely blind watermark extraction effect, timely cutting off the source of leakage, and improving the security of enterprise network data.
Smart Images

Figure CN116340907B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of network security technology, specifically to watermarking-related technologies and methods, and more specifically to a watermarking processing method and apparatus. Background Technology
[0002] With the rapid development of internet technology, cloud desktops are becoming increasingly widely used, and cloud desktop products have been deployed in various industries, bringing great convenience to people's production and lives. However, the accompanying network security issues are also becoming increasingly serious. Information leaks, which are difficult to trace, cause serious damage to the development and operation of individuals and enterprises. Considering the realities of cloud desktops, current methods for improving cloud desktop network data security are mainly constrained by the following two points: First, with the widespread use of smart devices, taking and recording screens has become more convenient and unrestricted. The phenomenon of spreading important internal information of enterprises through the internet via screenshots and photos is becoming more common, ultimately leading to the silent breach of enterprise security barriers without being noticed, causing very serious consequences for enterprises. Second, tracing the source of leaks is difficult when they are known to have occurred. Because leaked images contain relatively little terminal information and personal information of the users, it is difficult to pinpoint the source of the leak from a single image, making it impossible to fundamentally solve the problem of information leakage.
[0003] Existing technologies primarily address the aforementioned data leakage issues through two main methods. First, installing enterprise security software actively monitors users' screenshot behavior. This can forcefully prevent screenshot operations or record screenshot content without affecting the user's normal work. This method can mitigate screenshot leaks to some extent, but it is ineffective against photo-based leaks. Second, displaying the user's basic information as a visible watermark on all terminal screens. This indiscriminate watermarking method is easily removed and has weak anti-attack capabilities. Furthermore, displaying the watermark as a desktop tile greatly reduces the user experience and work efficiency, especially in scenarios where high image quality is required. Summary of the Invention
[0004] To address the aforementioned technical issues, this application provides a watermarking method and apparatus. The transform domain watermarking method based on differential adaptive block segmentation can adaptively segment the screen image according to its content features, determine the watermark embedding position, and improve the watermark's imperceptibility and resistance to attacks by embedding the watermark in the transform domain.
[0005] To achieve the above objectives, the technical solutions adopted in the embodiments of this application are as follows:
[0006] In a first aspect, a watermarking method is applied to a cloud desktop server. The method includes: dividing the interface image to be processed into blocks using a differential adaptive block division method to obtain a region to be embedded; embedding the watermark to be embedded into the region to be embedded using a frequency domain modulation method to generate a target interface image, wherein the target interface image is an interface image with the watermark.
[0007] In a first possible implementation of the first aspect, the method further includes generating the watermark to be embedded. The method for generating the watermark to be embedded includes: obtaining unique identity information corresponding to the interface image to be processed, performing verification processing on the unique identity information to obtain a verification sequence, and the unique identity information and the verification sequence being the watermark to be embedded.
[0008] In the second possible implementation of the first aspect, the interface image to be processed is divided into blocks using a differential adaptive block division method. This includes: initially dividing the interface image to be processed into first, second, third, and fourth image blocks; calculating feature elements for each of the first, second, third, and fourth image blocks, and sequentially determining whether the number of feature elements in each block meets a threshold requirement; when the number of feature elements in any block meets the threshold requirement, the corresponding block is determined as the region to be embedded; when the number of feature elements in none of the block meets the threshold requirement, the first, second, third, and fourth image blocks are divided a second or multiple times until the block meets the watermark embedding requirement or the requirement for further block division is reached.
[0009] In conjunction with the second possible implementation of the first aspect, in the third possible implementation of the first aspect, the watermark to be embedded is embedded into the region to be embedded using a frequency domain modulation method, including: decomposing the watermark to be embedded into multiple macroblocks of the same size; converting each macroblock to YUV format and performing a discrete cosine transform on the Y channel to obtain a discrete cosine matrix D; performing singular value decomposition on matrix D to obtain a singular value matrix; taking the singular value at (0,0) bit as S1 = ∑(0,0) as the embedding target bit; obtaining the embedding bit of the watermark to be embedded; embedding the embedding bit in the embedding target bit to obtain the transformed singular value matrix and the corresponding transformed discrete cosine matrix; performing an inverse discrete cosine transform on the transformed discrete cosine matrix to complete the embedding process and obtain a reconstructed pixel block; replacing the Y channel of the original macroblock with the reconstructed pixel block and reconstructing an RGB macroblock as the embedded macroblock.
[0010] In combination with any of the various possible implementations of the first aspect, in the fourth possible implementation of the first aspect, the following processing is performed during embedding:
[0011] Where w is the watermark bit to be embedded, and d is the parameter controlling the watermark embedding.
[0012] In a fifth possible implementation of the first aspect, the method further includes a method for extracting the watermark, specifically comprising: dividing the interface image to be processed into blocks using a differential adaptive block division method to obtain an area to be extracted; decomposing the interface portion image within the area to be extracted into multiple macroblocks of the same size; performing singular value matrix processing on each macroblock; calculating watermark extraction bits based on the obtained singular value matrix; and extracting the watermark based on the numerical relationship of the watermark extraction bits.
[0013] In conjunction with the fifth possible implementation of the first aspect, in the sixth possible implementation of the first aspect, the numerical relationship of the watermark extraction bits is as follows:
[0014] Where bit represents the extracted watermark bit.
[0015] In conjunction with the sixth possible implementation of the first aspect, the seventh possible implementation of the first aspect further includes verifying the extracted watermark. The verification includes calculating a check bit using the CRC32 algorithm on the watermark and comparing the check bit with the check bit in the watermark to see if they are consistent.
[0016] In conjunction with the fifth possible implementation of the first aspect, the eighth possible implementation of the first aspect also includes cropping and distortion correction of the watermark image to be extracted to obtain the interface image to be processed.
[0017] Secondly, a watermark processing apparatus is provided, the apparatus comprising: a partitioning module for partitioning an interface image to be processed into blocks using a differential adaptive block partitioning method to obtain an embedding region; and an embedding module for embedding a watermark to be embedded into the embedding region using a frequency domain modulation method to generate a target interface image, wherein the target interface image is an interface image with the watermark.
[0018] Thirdly, a terminal device is provided, comprising: at least one processor; and a memory storing computer instructions executable on the processor, the instructions, when executed by the processor, implementing the steps of any of the methods described above.
[0019] Fourthly, a computer-readable storage medium is provided, the computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of any of the methods described above.
[0020] The technical solution provided in this application embodiment uses a transform domain watermarking method based on differential adaptive block segmentation to adaptively segment the screen image according to its content features, determine the watermark embedding position, and improve the watermark's imperceptibility and resistance to attacks by embedding the watermark in the transform domain. This allows the image watermark to survive under deliberate attacks and various transmission environment disruptions. During source tracing, information can be extracted from the watermark in the leaked image without the original image, achieving a completely blind watermark extraction effect, timely cutting off the source of leakage, and improving the security of enterprise network data. Attached Figure Description
[0021] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0022] The methods, systems, and / or procedures shown in the accompanying drawings will be further described with reference to exemplary embodiments. These exemplary embodiments will be described in detail with reference to the drawings. These exemplary embodiments are non-limiting exemplary embodiments, wherein example figures represent similar mechanisms in the various views of the drawings.
[0023] Figure 1 This is a schematic diagram of the structure of the terminal device provided in the embodiments of this application;
[0024] Figure 2 This is a schematic diagram of a watermark processing method in some embodiments of this application;
[0025] Figure 3 This is a schematic diagram of another processing flow method in the watermarking method shown in some embodiments of this application;
[0026] Figure 4 This is a block diagram of a device provided in some embodiments of this application;
[0027] Figure 5 This is a block diagram of another device provided in some embodiments of this application. Detailed Implementation
[0028] To better understand the above technical solutions, the technical solutions of this application will be described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the embodiments of this application and the specific features in the embodiments are detailed descriptions of the technical solutions of this application, rather than limitations on the technical solutions of this application. In the absence of conflict, the embodiments of this application and the technical features in the embodiments can be combined with each other.
[0029] In the detailed description below, numerous specific details are illustrated with examples to provide a comprehensive understanding of the relevant guidance. However, it will be apparent to those skilled in the art that this application can be practiced without these details. In other instances, well-known methods, procedures, systems, components, and / or circuits have been described at a relatively high level without detail to avoid unnecessarily obscuring aspects of this application.
[0030] This application uses flowcharts to illustrate the execution process performed by a system according to embodiments of this application. It should be clearly understood that the execution processes in the flowcharts may not be executed sequentially. Instead, these execution processes may be executed in reverse order or simultaneously. Additionally, at least one other execution process may be added to the flowchart. One or more execution processes may be deleted from the flowchart.
[0031] Before providing a further detailed description of the embodiments of the present invention, the nouns and terms involved in the embodiments of the present invention will be explained, and the nouns and terms involved in the embodiments of the present invention shall be interpreted as follows.
[0032] (1) In response to, used to indicate the conditions or states on which the operation is performed depends. When the conditions or states on which the operation is performed are met, one or more operations may be performed in real time or with a set delay. Unless otherwise specified, there is no restriction on the order in which the multiple operations are performed.
[0033] (2) Based on, used to indicate the conditions or states on which the operation is performed depends. When the conditions or states on which it depends are met, one or more operations can be performed in real time or with a set delay. Unless otherwise specified, there is no restriction on the order of execution of the multiple operations.
[0034] The technical solution provided in this application embodiment is a scheme for adding and extracting watermarks on an operating interface. This scheme is configured and executed as hardware in a terminal device. The terminal device in this embodiment is, for example... Figure 1 As shown.
[0035] like Figure 1 As shown, embodiments of the present invention include the following apparatus: at least one processor 120; and a memory 110 storing computer instructions, i.e., computer programs, that can be executed on the processor.
[0036] In this embodiment, the memory, processor, and communication unit are electrically connected directly or indirectly to achieve data transmission or interaction. For example, these components can be electrically connected to each other through one or more communication buses or signal lines. The memory is used to store specific information and programs, and the communication unit is used to send the processed information to the corresponding user terminal.
[0037] In this embodiment, the storage module is divided into two storage areas: a program storage unit and a data storage unit. The program storage unit is equivalent to the firmware area, and its read / write permissions are set to read-only mode, meaning the data stored therein cannot be erased or modified. The data storage unit, on the other hand, allows for erasure and reading / writing. When the data storage area is full, newly written data will overwrite the oldest historical data.
[0038] The memory can be, but is not limited to, Random Access Memory (RAM), Read Only Memory (ROM), Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (EPROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), etc.
[0039] The processor may be an integrated circuit chip with signal processing capabilities. The aforementioned processor can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application-Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this invention. The general-purpose processor can be a microprocessor or any conventional processor.
[0040] The terminal device provided in this embodiment is used to perform watermark processing, which includes two overall processes: adding a watermark and extracting a watermark. The method for adding a watermark in this embodiment is as follows: Figure 2 As shown, the specific steps include:
[0041] See Figure 2 The process of adding a watermark in watermark processing methods includes:
[0042] Step S210. Obtain the unique identity information corresponding to the interface image to be processed, and verify the unique identity information to generate a watermark to be embedded.
[0043] In this embodiment, there are two sources for obtaining the watermark. The first is to take a screenshot of the interface to obtain the corresponding interface image to be processed. The second is to take a picture of the interface image through an external image acquisition device, such as a camera, to obtain the corresponding interface image to be processed. However, regardless of the method used to obtain the image, there is a corresponding embedded watermark.
[0044] In this embodiment, the watermark is an identifier with certain encoding logic, which is a binary sequence of length 'a'. It is input into the CRC32 checksum algorithm to generate a checksum of length 32, where the generator polynomial f(x) used in the algorithm is:
[0045] f(x) = x 32 +x 26 +x 23 +x 22 +x 16 +x 12 +x 11 +x 10 +x 8 +x 7 +x 5 +x 4 +x 2 +x+1, the generated check bits are concatenated after the user identifier to form the final watermark sequence to be embedded. The final watermark length is a+32, where the check bits are used to verify the user's information when recognizing the watermark.
[0046] Step S220. Divide the interface image to be processed into blocks using the differential adaptive block division method to obtain the region to be embedded.
[0047] In this embodiment, the purpose of segmenting the interface image to be processed is to identify areas with higher information density within the image, embedding the watermark into these areas to enhance its utilization value. The specific segmentation process includes the following steps:
[0048] The interface image to be processed is initially divided into regions. The interface image to be processed is denoted as I, and its size is w×h. I is divided into 4 regions, each with a size of 1 / 2w×1 / 2h. The 4 regions are denoted as A, B, C and D.
[0049] Feature element calculations are performed on the image regions A, B, C, and D respectively to determine whether the number of feature elements in each image region meets the threshold requirement. When the number of feature elements in any image region meets the threshold requirement, the corresponding image region is determined as the region to be embedded. When the number of feature elements in no image region meets the threshold requirement, the image region is divided into secondary or multiple blocks until the image region meets the watermark embedding requirement or the requirement that further segmentation is not possible is reached. Specifically, the horizontal difference matrix and vertical difference matrix are calculated for regions A, B, C, and D respectively. Taking region A as an example: the first step is to calculate the horizontal difference matrix A. hori :
[0050]
[0051] The second step is to calculate the vertical difference matrix A. vert :
[0052]
[0053] The third step is to calculate the sum of the horizontal difference matrix and the vertical difference matrix respectively: a hori =sum(A hori ), a vert =sun(A vert ). (a) hori and a vert Compare with a threshold to determine whether to continue segmenting; if a is satisfied... hori ≤t hori and a vert ≤t vert If the content characteristics of region A are simple and do not meet the conditions for watermark insertion, region A is removed. Otherwise, determine whether region A meets the conditions. or If the conditions are met, then region A is the final watermark insertion block; if not, region A will continue to be divided into blocks using the above steps.
[0054] Step S230. The watermark to be embedded is embedded into the region to be embedded using a frequency domain modulation method to generate a target interface image, wherein the target interface image is an interface image with the watermark.
[0055] After determining the target region for watermark embedding in step S220, the watermark to be embedded needs to be embedded. This specifically includes the following steps: decomposing the watermark to be embedded into multiple macroblocks of the same size. Taking a watermark of size W as an example, W is divided into a×b 8×8 macroblocks. For each macroblock, a YV conversion is first performed, then a discrete cosine transform is performed on the Y channel to obtain a discrete cosine matrix D. SVD decomposition is then performed on matrix D to obtain U, ∑, V. T Three matrices satisfy the following relationship:
[0056] D=U∑V T
[0057] The ∑ matrix is the singular value matrix of matrix D, with a size of 8×8. The singular value at position (0,0) is denoted as S1=∑(0,0) as the embedding target position. The following processing is performed when embedding the watermark:
[0058]
[0059] Where w is the watermark bit to be embedded, and d is the parameter controlling the watermark embedding. The larger d is, the lower the robustness and perceptibility of the watermark; the smaller d is, the higher the robustness and perceptibility of the watermark.
[0060] After bit embedding is complete, a new singular value matrix ∑1 is obtained, which is used to reconstruct the discrete cosine matrix:
[0061] D1=U∑1V T Where D1 is the reconstructed discrete cosine matrix. Performing an inverse discrete cosine transform on D1 completes the embedding process, yielding the reconstructed pixel block W. WM W WM Replace the Y channel of the original macroblock W and reconstruct the RGB macroblock as the embedded macroblock.
[0062] For steps S210 to S230, the watermark embedding is completed, that is, a watermark consistent with the identity information is added to the image.
[0063] The processing methods also include watermark extraction; see [link / reference]. Figure 3 This embodiment provides a method for extracting watermarks from images:
[0064] Step S310. Preprocess the image to be processed to obtain a standard interface image to be processed.
[0065] In this embodiment, the images to be processed are obtained through screenshots and photographs. Screenshot images are standard images containing watermark information, while photographed images include not only the interface image with watermark information but also the external environment image. Therefore, for the sake of subsequent processing efficiency and accuracy, it is necessary to remove irrelevant information from these images, retaining only the image of the user interface. This step can be achieved using a corresponding cropping tool, and will not be elaborated upon in this embodiment.
[0066] Distortions in the image require corresponding processing. In this embodiment, the distortion processing includes the following steps:
[0067] For the input image I, first determine the positions of the four vertices of the watermarked image within I, denoted as P1(x1, y1), P2(x2, y2), P3(x3, y3), and P4(x4, y4). Simultaneously, denote the positions of the four corrected points as P1′(x1, y1). ′ Given P1(x′1), P2(x′2, y′2), P3(x′3, y′2), and P4(x′4, y′4), calculate the corrected coordinates using the following formulas:
[0068]
[0069]
[0070] Step S320. Divide the interface image to be processed into blocks using the differential adaptive block division method to obtain the region to be extracted.
[0071] The method used to determine the region in the watermark extraction process is the same as that used in the watermark embedding process, so it will not be repeated here. The processing method in step S220 can be used.
[0072] Step S330. Decompose the image of the interface portion to be processed in the region to be extracted into multiple macroblocks of the same size, perform singular value matrix processing on each macroblock, calculate the watermark extraction bits based on the obtained singular value matrix, and extract the watermark based on the numerical relationship of the watermark extraction bits.
[0073] Similarly, this process is partially the same as the process in step S230, except for the processing of the watermark position.
[0074] This step specifically involves: decomposing each region to be extracted into a×b 8×8 macroblocks; performing YV conversion on each macroblock; then performing Discrete Cosine Transform (DCT) on the Y channel to obtain the Discrete Cosine Matrix D; and finally performing SVD decomposition on matrix D to obtain U, ∑, V. T Given three matrices, take the singular value at position (0, 0) of the ∑ matrix and denote it as S1 = ∑(0, 0). Then process it as follows:
[0075]
[0076] bit is the extracted watermark bit.
[0077] Step S340. Verify the extracted watermark.
[0078] This step is the verification step after the watermark is extracted. The specific method used is as follows: the extracted watermark is an a+32-bit watermark. For the first a bits, the CRC32 algorithm is used to calculate the check bit. If the calculated check bit is the same as the extracted one, then it is a correct watermark. Finally, the user ID, the terminal used, and the time of leakage are obtained by parsing bit by bit.
[0079] Furthermore, see Figure 4 and Figure 5 This embodiment provides hardware devices 400 and 500 for watermark embedding and watermark extraction, respectively. Device 400 includes: a partitioning module 410, used to divide the interface image to be processed into blocks using a differential adaptive block method to obtain an embedding region; and an embedding module 420, used to embed the watermark to be embedded into the embedding region using a frequency domain modulation method to generate a target interface image, wherein the target interface image is an interface image with the watermark.
[0080] The device 500 includes: a partitioning module 510, used to partition the interface image to be processed into blocks using a differential adaptive block partitioning method to obtain the region to be extracted; and an extraction module 520, used to decompose the portion of the interface image to be processed within the region to be extracted into multiple macroblocks of the same size, perform singular value matrix processing on each macroblock, calculate watermark extraction bits based on the obtained singular value matrix, and extract the watermark based on the numerical relationship of the watermark extraction bits.
[0081] The technical solution provided in this embodiment has the following technical advantages:
[0082] 1. The watermark embedding process proposed in this application is simple. Users do not need to install any watermark client software on the terminal or virtual machine, which reduces system resource consumption and avoids the problem of system attack due to incompatibility with the operating system.
[0083] 2. The watermark in this embodiment is embedded. The embedded watermark is less perceptible to the human eye and can be compatible with various scenarios of cloud desktop use, preventing the watermark from being damaged or eliminated by human intervention, and improving security without affecting the user's daily use.
[0084] 3. The method provided in this application supports both screenshot and screen capture modes during watermark decoding, covering most cases of data leakage through smart devices. Because the embedded watermark has high robustness, it can still maintain partial integrity and be accurately identified after undergoing various signal processing processes.
[0085] 4. In this embodiment, the watermark extraction is blind, meaning the watermark can be extracted from the image without the original image. When users use cloud desktops for daily office work, the scenarios they handle are varied. Storing the original image would consume unpredictable storage resources and would not protect user privacy during the upload process. Therefore, blind extraction is simpler and more convenient, making it suitable for cloud desktop scenarios.
[0086] It should be understood that for the technical terms for which no definition has been provided above, those skilled in the art can infer their meanings without doubt based on the disclosed content, and no limitation is made here.
[0087] Those skilled in the art can, without question, determine certain preset, benchmark, predetermined, set, and preference-labeled technical features / terms, such as thresholds, threshold intervals, and threshold ranges, based on the aforementioned disclosed content. For some unexplained technical feature terms, those skilled in the art can reasonably and unambiguously deduce them based on the logical relationship between the context, thereby clearly and completely implementing the aforementioned technical solution. Prefixes of unexplained technical feature terms, such as "first," "second," "example," and "target," can be unambiguously deduced and determined based on the context. Suffixes of unexplained technical feature terms, such as "set" and "list," can also be unambiguously deduced and determined based on the context.
[0088] The content disclosed in the embodiments of this application is clear and complete to those skilled in the art. It should be understood that the process by which those skilled in the art derive and analyze the unexplained technical terms based on the above disclosure is based on the content recorded in this application, and therefore the above content is not a judgment of the inventiveness of the overall solution.
[0089] The basic concepts have been described above. Obviously, for those skilled in the art, the detailed disclosure above is merely illustrative and does not constitute a limitation of this application. Although not explicitly stated herein, those skilled in the art can make various modifications, improvements, and corrections to this application. Such modifications, improvements, and corrections are suggested in this application, and therefore remain within the spirit and scope of the exemplary embodiments of this application.
[0090] Furthermore, this application uses specific terms to describe embodiments of the application. For example, "an embodiment," "one embodiment," and / or "some embodiments" refer to a particular feature, structure, or characteristic associated with at least one embodiment of the application. Therefore, it should be emphasized and noted that "an embodiment," "one embodiment," or "an alternative embodiment" mentioned twice or more in different parts of this specification do not necessarily refer to the same embodiment. In addition, certain features, structures, or characteristics in at least one embodiment of the application can be appropriately combined.
[0091] Furthermore, it will be understood by those skilled in the art that various aspects of this application can be described and illustrated through several patentable types or situations, including any new and useful combination of processes, machines, products, or substances, or any new and useful improvements thereof. Accordingly, various aspects of this application can be implemented entirely by hardware, entirely by software (including firmware, resident software, microcode, etc.), or by a combination of hardware and software. All of the above hardware or software can be referred to as a “unit,” “component,” or “system.” Moreover, various aspects of this application can be embodied as a computer product residing in at least one computer-readable medium, said product including computer-readable program code.
[0092] A computer-readable signal medium may contain a propagated data signal containing computer program encoding, for example, on baseband or as part of a carrier wave. This propagated signal may take various forms, including electromagnetic, optical, and so on, or suitable combinations thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can be connected to an instruction execution system, apparatus, or device to enable communication, propagation, or transmission of a program for use. The program encoding located on the computer-readable signal medium can be propagated through any suitable medium, including radio, cable, fiber optic cable, RF, or similar media, or any combination of the above media.
[0093] The computer program code required for the execution of any aspect of this application can be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, Scala, Smalltalk, Eiffel, JADE, Emerald, C++, C#, VB.NET, Python, etc., or similar conventional programming languages such as the "C" programming language, Visual Basic, Fortran2003, Perl, COBOL 2002, PHP, ABAP, dynamic programming languages such as Python, Ruby, and Groovy, or other programming languages. The program code can be executed entirely on the user's computer, or as a standalone software package on the user's computer, or partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the latter case, the remote computer can be connected to the user's computer via any network, such as a local area network (LAN) or wide area network (WAN), or connected to an external computer (e.g., via the Internet), or in a cloud computing environment, or used as a service such as Software as a Service (SaaS).
[0094] Furthermore, unless expressly stated in the claims, the order of processing elements and sequences, the use of digits, or other names described in this application are not intended to limit the order of the processes and methods of this application. Although various examples have been discussed in the foregoing disclosure of some embodiments of the invention that are currently considered useful, it should be understood that such details are for illustrative purposes only, and the appended claims are not limited to the disclosed embodiments. Rather, the claims are intended to cover all modifications and equivalent combinations that conform to the substance and scope of the embodiments of this application. For example, while the system components described above can be implemented by hardware devices, they can also be implemented solely by software solutions, such as installing the described system on an existing server or mobile device.
[0095] It should also be understood that, in order to simplify the description disclosed in this application and thus aid in the understanding of at least one embodiment of the invention, multiple features may sometimes be grouped into a single embodiment, drawing, or description thereof in the foregoing description of the embodiments of this application. However, this method of disclosure does not imply that the subject matter of this application requires more features than those mentioned in the claims. In fact, the embodiments contain fewer features than all the features of the single embodiments disclosed above.
Claims
1. A watermark processing method, characterized in that, Applied to cloud desktop servers, the method includes: The interface image to be processed is divided into blocks using a differential adaptive block division method to obtain the region to be embedded. Specifically, this includes: initially dividing the interface image to be processed into first, second, third, and fourth image blocks; calculating feature elements for the first, second, third, and fourth image blocks respectively, and determining whether the number of feature elements in each image block meets the threshold requirement; when the number of feature elements in any image block meets the threshold requirement, the corresponding image block is determined as the region to be embedded; when the number of feature elements in any image block does not meet the threshold requirement, the first, second, third, and fourth image blocks are divided into blocks a second or multiple times until the image blocks meet the watermark embedding requirements or the requirement that further segmentation is not possible. The watermark to be embedded is embedded into the region to be embedded using a frequency domain modulation method to generate a target interface image, which is an interface image with the watermark. Specifically, this includes: decomposing the watermark to be embedded into multiple macroblocks of the same size; converting each macroblock to YV format; performing a discrete cosine transform on the Y channel to obtain a discrete cosine matrix D; performing singular value decomposition on matrix D to obtain a singular value matrix; and taking the singular value at position (0,0) as... As the embedding target bit; obtain the embedding bit of the watermark to be embedded, and perform the embedding bit on the embedding target bit to obtain the transformed singular value matrix and the corresponding transformed discrete cosine matrix; perform inverse discrete cosine transform on the transformed discrete cosine matrix to complete the embedding process and obtain the reconstructed pixel block, replace the Y channel of the original macroblock with the reconstructed pixel block and reconstruct the RGB macroblock as the embedded macroblock.
2. The watermark processing method according to claim 1, characterized in that, The method further includes generating the watermark to be embedded, wherein the method for generating the watermark to be embedded includes: Obtain the unique identity information corresponding to the interface image to be processed, and perform verification processing on the unique identity information to obtain a verification sequence. The unique identity information and the verification sequence are the watermarks to be embedded.
3. The watermark processing method according to claim 1, characterized in that, The following processing is performed during embedding: ; Where w is the watermark bit to be embedded, and d is the parameter controlling the watermark embedding.
4. The watermark processing method according to claim 1, characterized in that, The method also includes a method for extracting the watermark, specifically including: The interface image to be processed is divided into blocks using the differential adaptive block division method to obtain the region to be extracted; The image of the interface portion to be processed within the region to be extracted is decomposed into multiple macroblocks of the same size. Singular value matrix processing is performed on each macroblock, and watermark extraction bits are calculated based on the obtained singular value matrix. Watermark extraction is performed based on the numerical relationship of the watermark extraction bits.
5. The watermark processing method according to claim 4, characterized in that, The numerical relationship of the watermark extraction bits is as follows: ; Where bit is the extracted watermark bit.
6. The watermarking method according to claim 5, characterized in that, It also includes verifying the extracted watermark, which includes calculating a check bit on the watermark based on the CRC32 algorithm and comparing the check bit with the check bit in the watermark to see if they are consistent.
7. The watermark processing method according to claim 4, characterized in that, It also includes cropping and distortion correction of the watermark image to be extracted to obtain the interface image to be processed.
8. A watermark processing device, characterized in that, The device includes: The partitioning module is used to divide the interface image to be processed into blocks using a differential adaptive block division method to obtain the region to be embedded. Specifically, it includes: initially dividing the interface image to be processed into first, second, third, and fourth image blocks; calculating feature elements for the first, second, third, and fourth image blocks respectively, and determining whether the number of feature elements in each image block meets the threshold requirement; when the number of feature elements in any image block meets the threshold requirement, the corresponding image block is determined as the region to be embedded; when the number of feature elements in any image block does not meet the threshold requirement, the first, second, third, and fourth image blocks are divided into blocks a second or multiple times until the image blocks meet the watermark embedding requirements or the requirement that further segmentation is not possible is reached. An embedding module is used to embed a watermark to be embedded into the region to be embedded using a frequency domain modulation method, generating a target interface image, wherein the target interface image is an interface image with the watermark; specifically, it includes: decomposing the watermark to be embedded into multiple macroblocks of the same size, converting each macroblock to YV format, performing a discrete cosine transform on the Y channel to obtain a discrete cosine matrix D, performing singular value decomposition on matrix D to obtain a singular value matrix, and taking the singular value at (0,0) as . As the embedding target bit; obtain the embedding bit of the watermark to be embedded, and perform the embedding bit on the embedding target bit to obtain the transformed singular value matrix and the corresponding transformed discrete cosine matrix; perform inverse discrete cosine transform on the transformed discrete cosine matrix to complete the embedding process and obtain the reconstructed pixel block, replace the Y channel of the original macroblock with the reconstructed pixel block and reconstruct the RGB macroblock as the embedded macroblock.
Citation Information
Patent Citations
Digital watermarking method based on self-adaptive partitioning and compressed sensing
CN110120004A
Screen watermark-based anti-leakage method, system and equipment and medium
CN115018685A