Digital watermark embedding method and device, equipment and storage medium

By converting multimedia data from the airspace to the frequency domain, and grouping and modification of the frequency domain coefficient of the specified area in the frequency domain matrix, the watermark data is embedded, which solves the easy to change and easy to wipe the digital watermark in the existing technology in the data transmission or compression process. The problem realizes higher anti -interference ability and robustness.

CN119379523APending Publication Date: 2025-01-28TENCENT TECH (BEIJING) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310920796.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-07-26
Publication Date
2025-01-28

AI Technical Summary

Technical Problem

The existing digital watermark embedding methods can easily lead to changes or erasure of watermark information during data transmission or compression, resulting in relatively fragile watermarks and low anti-interference ability.

Method used

By converting multimedia data from the airspace to the frequency domain, the frequency domain matrix is ​​obtained, and the frequency domain coefficients of the specified area in the frequency domain matrix are packed and modified, and the watermark data is embedded. This method uses the stability of the frequency domain coefficient to reduce the interference of the watermark data of the image processing technology, and characterize a comparison value through multiple frequency domain coefficients, which increases the fault tolerance rate of the frequency domain coefficient jump.

Benefits of technology

Improved the anti -interference ability of digital watermark, enhance the stealth properties of watermark data, and make it easier for digital watermarks to be more complete during the transmission and compression process of images or videos.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119379523A_ABST
    Figure CN119379523A_ABST
Patent Text Reader

Abstract

The invention relates to the field of information security, in particular to a digital watermark embedding method, device and equipment and a storage medium, and the method comprises the steps: converting to-be-processed multimedia data from a spatial domain to a frequency domain, obtaining a frequency domain matrix composed of frequency domain coefficients, and encoding target watermark information to obtain watermark data in a bit stream form, and embedding each bit value in the watermark data into a specified area of the frequency domain matrix, representing one bit value by using a plurality of frequency domain coefficients, and finally converting the watermark frequency domain matrix from a frequency domain to a space domain to obtain target multimedia data embedded with the digital watermark. Therefore, the robustness of the watermark data can be improved by selecting the relatively stable frequency domain coefficient in the specified area in the frequency domain matrix for modification and using the plurality of frequency domain coefficients in one coefficient group to represent one bit number.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] In the current environment where infringements of multimedia works such as short videos and images continue and the voice for copyright protection is gradually growing, digital watermark technology has gradually been introduced into scenarios involving multimedia content distribution. As the "last line of defense" against pirated multimedia works, digital watermarks, with their good concealment, convenient traceability and easy operation, effectively solve the problems of unclear copyright ownership of multimedia works and the prevalence of pirated works.

[0003] In related technologies, the commonly used digital watermark embedding method is mainly the Least Significant Bit (LSB) algorithm. The specific operation of this algorithm is: modify the lowest bit of each pixel value in the image or video frame data to a bit number in the watermark information, thereby embedding multi-bit watermark information. Since the human eye cannot notice the color changes before and after the pixel value is modified, the LSB algorithm can achieve watermark embedding that is invisible to the naked eye in the spatial domain.

[0004] However, when using the above method, after the data is transmitted or compressed, the bit positions of the pixel values ​​are prone to jump, causing the watermark information to be changed or even erased. Therefore, the watermark embedded using this method is relatively fragile and has low anti-interference ability. Summary of the invention

[0005] The present application provides a digital watermark embedding method, device, equipment and storage medium to improve the anti-interference capability of the digital watermark.

[0006] In a first aspect, an embodiment of the present application provides a digital watermark embedding method, the method comprising:

[0007] Convert the multimedia data to be processed from the spatial domain to the frequency domain to obtain a frequency domain matrix composed of frequency domain coefficients, wherein the frequency domain coefficients represent the gray value change rate of the multimedia data to be processed in the neighborhood of the corresponding pixel point in the spatial domain;

[0008] Acquire watermark data for embedding into the multimedia data to be processed, the watermark data being a bit stream obtained by encoding target watermark information;

[0009] A plurality of frequency domain coefficients in a specified area in the frequency domain matrix are grouped to obtain a plurality of coefficient groups, and each frequency domain coefficient contained in each coefficient group is modified in turn based on each bit value contained in the watermark data to obtain a corresponding watermark frequency domain matrix, wherein in one modification process, the following operations are performed: a bit value obtained from the watermark data is used to modify each frequency domain coefficient contained in a target coefficient group to be modified in the frequency domain matrix at least once, until each frequency domain coefficient contained in the target coefficient group satisfies an embedding rule corresponding to a bit value;

[0010] The watermark frequency domain matrix is ​​converted from the frequency domain to the spatial domain to obtain the target multimedia data embedded with the digital watermark.

[0011] In a second aspect, an embodiment of the present application further provides a digital watermark embedding device, the device comprising:

[0012] A conversion module, used to convert the multimedia data to be processed from the spatial domain to the frequency domain, and obtain a frequency domain matrix composed of frequency domain coefficients, wherein the frequency domain coefficients represent the gray value change rate of the multimedia data to be processed in the neighborhood where the corresponding pixel point is located in the spatial domain;

[0013] The encoding module is used to obtain watermark data for embedding into the multimedia data to be processed, where the watermark data is a bit stream obtained by encoding the target watermark information;

[0014] The modification module is used to group multiple frequency domain coefficients in a specified area in the frequency domain matrix to obtain multiple coefficient groups, and modify each frequency domain coefficient contained in each coefficient group based on each bit value contained in the watermark data in turn to obtain a corresponding watermark frequency domain matrix, wherein in one modification process, the following operations are performed: using a bit value obtained from the watermark data, each frequency domain coefficient contained in the target coefficient group to be modified in the frequency domain matrix is ​​modified at least once until each frequency domain coefficient contained in the target coefficient group satisfies an embedding rule corresponding to a bit value;

[0015] The processing module is used to convert the watermark frequency domain matrix from the frequency domain to the spatial domain to obtain the target multimedia data embedded with the digital watermark.

[0016] In a possible implementation, when a plurality of frequency domain coefficients in a specified area in a frequency domain matrix are grouped to obtain a plurality of coefficient groups, the modification module is used to:

[0017] Get the frequency domain coefficients located on the diagonal of the frequency domain matrix;

[0018] Starting from the center point of the frequency domain matrix, with a step size of N, the frequency domain coefficients located on the first part and the second part of the diagonal are divided to obtain multiple coefficient groups, where the first part is any half of the diagonal, the second part is the other half of the diagonal except the first part, and N is a positive integer.

[0019] In a possible implementation, a bit value obtained from the watermark data is used to modify each frequency domain coefficient contained in the target coefficient group to be modified in the frequency domain matrix at least once, until each frequency domain coefficient contained in the target coefficient group satisfies the embedding rule corresponding to the bit value, and the modification module is used to:

[0020] determining a target coefficient group from the first portion based on a position in the watermark data of a bit value obtained from the watermark data;

[0021] Selecting a first frequency domain coefficient that meets a preset screening condition from the target coefficient group;

[0022] The first frequency domain coefficient is modified at least once based on a category of a bit value until each frequency domain coefficient in the target coefficient group satisfies an embedding rule corresponding to a bit value.

[0023] In a possible implementation, when selecting a first frequency domain coefficient that meets a preset screening condition from the target coefficient group, the modification module is used to:

[0024] Obtain the linear distance of each frequency domain coefficient in the target coefficient group relative to the center point of the frequency domain matrix, and select the frequency domain coefficient with the smallest linear distance as the first frequency domain coefficient.

[0025] In a possible implementation, the first frequency domain coefficient is modified at least once based on a category of a bit value until each frequency domain coefficient in the target coefficient group satisfies an embedding rule corresponding to a bit value, and the modification module is used to:

[0026] If a bit value is bit 0, then the first frequency domain coefficient is incremented by 1 until the modulo result of the sum of the frequency domain coefficients in the target coefficient group and the preset first parameter is less than the preset first threshold;

[0027] If a bit value is bit 1, the first frequency domain coefficient is reduced by 1 successively until the sum of the frequency domain coefficients in the target coefficient group modulo the first parameter is not less than the first threshold.

[0028] In a possible implementation, the modification module is further used to:

[0029] After completing the modification of each frequency domain coefficient on the first part based on each bit value in the watermark data, the frequency domain coefficient on the second part is mirror-modified based on each modified frequency domain coefficient on the first part, taking the center point of the frequency domain matrix as the center of symmetry.

[0030] In a possible implementation, after converting the watermark frequency domain matrix from the frequency domain to the spatial domain to obtain the target multimedia data embedded with the digital watermark, the processing module is further used to:

[0031] Performing interference processing on the target multimedia data to obtain test multimedia data, wherein the interference processing is an operation that has the possibility of changing each frequency domain coefficient in the watermark frequency domain matrix;

[0032] Convert the test multimedia data from the spatial domain to the frequency domain to obtain a test frequency domain matrix composed of various test frequency domain coefficients;

[0033] Obtain each test frequency domain coefficient located in a test area in the test frequency domain matrix, wherein the test area is any half of the main diagonal or the sub-diagonal of the test frequency domain matrix;

[0034] Based on each test frequency domain coefficient in the test area, the target watermark data is extracted.

[0035] In a possible implementation, when extracting target watermark data based on each test frequency domain coefficient in the test area, the processing module is used to:

[0036] Starting from the center point of the test frequency domain matrix, with N as the step length, each test frequency domain coefficient in the test area is divided to obtain multiple test coefficient groups;

[0037] Based on each test coefficient group, a plurality of bit values ​​are obtained according to a preset extraction rule;

[0038] Based on the position of each test coefficient group relative to the center point of the test frequency domain matrix, the position of each bit value obtained in the target watermark data is determined, and based on each bit value, the target watermark data is obtained.

[0039] In a possible implementation, when multiple bit values ​​are obtained based on each test coefficient group according to a preset extraction rule, the processing module is used to:

[0040] For each test coefficient group, perform the following operations:

[0041] Calculate the sum of each test frequency domain coefficient in the current test coefficient group and the modulo result of the preset second parameter;

[0042] If the modulo result is less than the preset second threshold, bit 0 is obtained based on the current test coefficient group;

[0043] If the modulo result is not less than the second threshold, bit 1 is obtained based on the current test coefficient group.

[0044] In a third aspect, an embodiment of the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements a method as described in any one of the first aspects when executing the computer program.

[0045] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of any method described in the first aspect.

[0046] In a fifth aspect, an embodiment of the present application provides a computer program product, which, when called by a computer, enables the computer to execute the method described in the first aspect.

[0047] The beneficial effects of this application are as follows:

[0048] In an embodiment of the present application, a content multi-target prediction method, apparatus, device and storage medium are proposed. The server converts the multimedia data to be processed from the spatial domain to the frequency domain, obtains a frequency domain matrix composed of various frequency domain coefficients, and encodes the target watermark information to obtain watermark data in the form of a bit stream. Then, each bit value in the watermark data is embedded into a specified area of ​​the frequency domain matrix, and a plurality of frequency domain coefficients are used to represent a bit value. Finally, the watermark frequency domain matrix obtained after embedding the watermark data is converted to the spatial domain to obtain the target multimedia data.

[0049] In this way, the watermark data is embedded by modifying the frequency domain coefficients of the data to be processed in the frequency domain. Compared with the method of modifying the lowest bit of the pixel value by the LSB algorithm, the present application utilizes the characteristic that the frequency domain coefficients are not easily affected, reduces the interference of related operations in the image processing technology on the watermark data, and selects the relatively stable frequency domain coefficients in the specified area in the frequency domain matrix for modification, which can further improve the anti-interference ability of the watermark data. At the same time, the frequency domain coefficients in the specified area are divided into multiple coefficient groups, and multiple frequency domain coefficients in a coefficient group are used to represent a bit number, which increases the fault tolerance of frequency domain coefficient jumps. Compared with the method of using a frequency domain coefficient to represent a bit value, even if individual frequency domain coefficients jump, the multiple frequency domain coefficients in the same coefficient group are likely to still meet the embedding rules of the corresponding bit number, making the digital watermark more robust.

[0050] Other features and advantages of the present application will be described in the subsequent description, and partly become apparent from the description, or be understood by practicing the present application. The purpose and other advantages of the present application can be realized and obtained by the structures specifically pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] Figure 1 A schematic diagram of an application scenario of an embodiment of the present application;

[0052] Figure 2 This is a flow chart of a digital watermark embedding method in an embodiment of the present application;

[0053] Figure 3 This is a schematic diagram of a scenario in which the data to be processed is converted from the spatial domain to the frequency domain in an embodiment of the present application;

[0054] Figure 4A schematic diagram of a scenario in which watermark information is converted into watermark data in an embodiment of the present application;

[0055] Figure 5 This is a schematic diagram of coefficient group division in an embodiment of the present application;

[0056] Figure 6 A flow chart of a method for modifying a coefficient group in an embodiment of the present application;

[0057] Figure 7 This is a schematic diagram of a scenario of modifying a coefficient group in an embodiment of the present application;

[0058] Figure 8 This is a schematic diagram of target multimedia data after embedding a digital watermark in an embodiment of the present application;

[0059] Fig. 9 This is another schematic diagram of target multimedia data after embedding a digital watermark in an embodiment of the present application;

[0060] Fig.10 This is a flow chart of a watermark extraction method in an embodiment of the present application;

[0061] Fig.11 This is a flow chart of a method for extracting watermark data in an embodiment of the present application;

[0062] Fig.12 This is a flowchart of a bit value extraction rule in an embodiment of the present application;

[0063] Fig.13 A schematic diagram of a scenario in which target watermark data is obtained based on a bit value in an embodiment of the present application;

[0064] Fig.14 This is an example diagram of the process of adding an identity mark to an image in an embodiment of the present application;

[0065] Fig.15 This is a logical diagram of adding an identity tag to an image in an embodiment of the present application;

[0066] Fig.16 This is a structural schematic diagram of a digital watermark embedding device in an embodiment of the present application;

[0067] Fig.17 A schematic diagram of a hardware structure of a computing device in an embodiment of the present application;

[0068] Fig.18 A schematic diagram of the hardware composition structure of another computing device in an embodiment of the present application. DETAILED DESCRIPTION

[0069] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the technical solution of the present application, rather than all of the embodiments. Based on the embodiments recorded in the application documents, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the technical solution of the present application.

[0070] The terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the invention described herein can be implemented in sequences other than those illustrated or described herein.

[0071] Some of the terms used in the embodiments of the present application are explained below to facilitate understanding by those skilled in the art.

[0072] (1) Digital watermark technology: A digital watermark is an identifiable digital signal or pattern that is permanently embedded in other data (host data or carrier data) and does not affect the availability of the host data. Digital watermark technology is an information hiding technology. Its basic idea is to embed secret information in digital products such as digital images, audio and video in order to protect the copyright of digital products, prove the authenticity of products, monitor piracy or provide additional information about products.

[0073] (2) Multimedia data: refers to image data, video data or audio data, etc.

[0074] (3) Discrete Fourier Transform (DFT) is the discrete representation of Fourier transform in time domain and frequency domain. It transforms the finite length time domain discrete sampling sequence into the same length frequency domain discrete sampling sequence. By properly converting and processing the transformed frequency domain sampling sequence, the spectrum of the signal can be obtained.

[0075] (4) Spatial domain: short for spatial domain, also called pixel domain. Processing in the spatial domain is processing at the pixel level. The spatial domain map corresponds to the grayscale value of the image.

[0076] (5) Frequency domain: It is the abbreviation of frequency domain. The frequency domain graph represents the grayscale gradient change value, which is obtained by Fourier transform in the spatial domain.

[0077] The following is a brief introduction to the design concept of the embodiment of the present application:

[0078] In recent years, relevant departments have been committed to actively maintaining the copyright order of film and television works, and have included copyright protection of film and television works into special key tasks. In the current environment where short video infringements are frequent, digital watermark technology, with its concealed characteristics, has effectively solved the problems of unclear copyright ownership of short video works and the prevalence of pirated works.

[0079] At present, the commonly used digital watermark embedding method is the LSB algorithm, which embeds watermark data by changing the lowest bit of each pixel value in the image or video frame data. This method belongs to the digital watermark technology in the spatial domain and is not easily detected by the naked eye.

[0080] However, when using the LSB method, since the lowest bit of the pixel value is usually more prone to jumps, the watermark data contained in the image or video embedded with the watermark data may change after transmission or compression, making the work untraceable.

[0081] In view of this, in the embodiments of the present application, a digital watermark embedding method, device, equipment and storage medium are proposed.

[0082] In an embodiment of the present application, the server converts the multimedia data to be processed from the spatial domain to the frequency domain, obtains a frequency domain matrix composed of various frequency domain coefficients, and encodes the target watermark information to obtain watermark data in the form of a bit stream. Then, each bit value in the watermark data is embedded into a specified area of ​​the frequency domain matrix, and a plurality of frequency domain coefficients are used to represent a bit value. Finally, the watermark frequency domain matrix obtained after embedding the watermark data is converted to the spatial domain to obtain the target multimedia data.

[0083] In this way, watermark data is embedded by modifying the frequency domain coefficients of the data to be processed in the frequency domain. Compared with the method of modifying the lowest bit of the pixel value by the LSB algorithm, the present application utilizes the characteristic that the frequency domain coefficients are not easily affected, reduces the interference of related operations in the image processing technology on the watermark data, and selects the relatively stable frequency domain coefficients in the specified area in the frequency domain matrix for modification, which can further improve the anti-interference ability of the watermark data. At the same time, each frequency domain coefficient in the specified area is divided into multiple coefficient groups, and multiple frequency domain coefficients in a coefficient group are used to represent a bit number. Even if individual frequency domain coefficients jump, the multiple frequency domain coefficients in the same coefficient group are likely to still meet the embedding rules of the corresponding bit number, making the digital watermark more robust. In addition, since the changes in the image or video in the frequency domain are less likely to be detected by the human eye than the changes in the pixel value in the spatial domain, the digital watermark embedding method provided by the present application has less sensory impact on the video and image.

[0084] The preferred embodiments of the present application are described below in conjunction with the drawings in the specification. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present application, and are not used to limit the present application. In addition, the embodiments of the present application and the features in the embodiments may be combined with each other if there is no conflict.

[0085] See also Figure 1 The figure shows a possible application scenario in the embodiment of the present application.

[0086] The application scenario includes terminal devices 110 (including terminal devices 1101, 1102 ... terminal devices 110n) and a server 120. The terminal devices 110 and the server 120 can communicate with each other through a communication network.

[0087] In an optional implementation, the communication network may be a wired network or a wireless network. Therefore, the terminal device 110 and the server 120 may be directly or indirectly connected via a wired or wireless communication. For example, the terminal device 110 may be indirectly connected to the server 120 via a wireless access point, or the terminal device 110 may be directly connected to the server 120 via the Internet, and this application does not limit this.

[0088] In the embodiment of the present application, the terminal device 110 includes but is not limited to mobile phones, tablet computers, laptop computers, desktop computers, e-book readers, intelligent voice interaction devices, smart home appliances, vehicle-mounted terminals and other devices; various clients may be installed on the terminal device, and the client may be an application program (such as a browser, game software, etc.) that supports functions such as video preview and video playback, or a web page, a small program, etc.;

[0089] The server 120 is a background server corresponding to the client installed in the terminal device 110. The server 120 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.

[0090] It should be noted that the digital watermark embedding method in the embodiment of the present application can be executed by a computing device, which can be a server 120 or a terminal device 110, that is, the method can be executed by the server 120 or the terminal device 110 alone, or can be executed by the server 120 and the terminal device 110 together.

[0091] It should be noted that, in the following, the example of execution by a server alone is mainly used for illustration, and no specific limitation is made here.

[0092] It should be noted that Figure 1 The figure is only an example. In fact, the number of terminal devices 110 and servers 120 is not limited and is not specifically limited in the embodiments of the present application.

[0093] In the embodiment of the present application, when there are multiple servers 120, the multiple servers 120 can form a blockchain, and the servers 120 are nodes on the blockchain.

[0094] See also Figure 2 As shown, it is a flow chart of a digital watermark embedding method in an embodiment of the present application. Figure 2 , and explain the specific execution steps in detail:

[0095] Step S201: convert the multimedia data to be processed from the spatial domain to the frequency domain to obtain a frequency domain matrix composed of frequency domain coefficients.

[0096] The frequency domain coefficient represents the gray value change rate of the multimedia data to be processed in the neighborhood of the corresponding pixel point in the spatial domain.

[0097] Specifically, the digital watermark embedding method provided in the embodiments of the present application can be used for multimedia data such as images and videos. Before adding a digital watermark to a video, it is necessary to first perform frame extraction on the video to obtain multiple video frames. Therefore, the multimedia data to be processed in the embodiments of the present application can be an image or a video frame, and the present application does not impose any restrictions on this.

[0098] At the same time, when adding a digital watermark to a video, the digital watermark may be added to each video frame, or a preset method may be used to select a few key frames for adding the digital watermark, and this application does not impose any restrictions on this.

[0099] Specifically, in an embodiment of the present application, the server uses a DFT method to convert the data to be processed from the spatial domain to the frequency domain to obtain a frequency domain matrix composed of frequency domain coefficients.

[0100] See also Figure 3 As shown, it is a schematic diagram of a scenario in which the data to be processed is converted from the spatial domain to the frequency domain in an embodiment of the present application, wherein, in addition to using the DFT method, a discrete cosine transform (DCT) can also be used to perform domain conversion on the image.

[0101] Step S202: Acquire watermark data for embedding into the multimedia data to be processed.

[0102] The watermark data is a bit stream obtained by encoding the target watermark information.

[0103] Specifically, in the embodiment of the present application, the server encodes the watermark information into a character set consisting of any number of characters from a total of 64 characters, including lowercase letters az, uppercase letters AZ, numbers 0-9, symbols "+", and " / ", based on Base64 encoding, and then converts each character into a corresponding binary number according to the ASCII code table to obtain watermark data in the form of a bit stream.

[0104] See also Figure 4 As shown, it is a schematic diagram of a scenario in which watermark information is converted into watermark data in an embodiment of the present application, wherein the watermark information may be different types of information, such as pictures, text, etc., and the present application does not impose any restrictions on this.

[0105] Step S203: Group multiple frequency domain coefficients in a specified area in the frequency domain matrix to obtain multiple coefficient groups, and modify each frequency domain coefficient included in each coefficient group based on each bit value included in the watermark data to obtain a corresponding watermark frequency domain matrix.

[0106] Specifically, in the DFT frequency domain, the closer the frequency domain coefficient is to the center point of the matrix, the lower the frequency information it represents, and the farther the frequency domain coefficient is from the center point, the higher the frequency information it represents. Therefore, choosing a suitable position on the frequency domain matrix to embed watermark information can improve the anti-interference ability of digital watermarking technology.

[0107] In an embodiment of the present application, the server obtains each frequency domain coefficient located on the diagonal of the frequency domain matrix, wherein the diagonal is the main diagonal or the secondary diagonal of the frequency domain matrix.

[0108] Starting from the center point of the frequency domain matrix, with a step size of N, the frequency domain coefficients located on the first part and the second part of the diagonal are divided to obtain multiple coefficient groups, where the first part is any half of the diagonal, the second part is the other half of the diagonal except the first part, and N is a positive integer.

[0109] For example, see Figure 5 As shown, it is a schematic diagram of coefficient group division in an embodiment of the present application, wherein O is the center point of the frequency domain matrix, the designated area is the main diagonal of the frequency domain matrix in the figure, the first part is the upper half of the main diagonal, and the second part is the lower half of the main diagonal.

[0110] When dividing the coefficient groups, since the frequency domain coefficient of the center point is a DC coefficient, it is necessary to skip this point, and then the first part and the second part start from the next position of the center point, with N as the step length, to divide multiple frequency domain coefficient groups, combined with Figure 5As shown, in the embodiment of the present application, N=2, that is, every two frequency domain coefficients form a coefficient group.

[0111] When modifying each coefficient group, since the frequency domain coefficients of DFT are symmetric about the origin, the modification of the frequency domain coefficients of the first part is exactly the same as the modification of the frequency domain coefficients of the second part. In specific implementation, the two parts can be modified separately in the same way, or the first part can be modified first, and then the modified first part can be directly mirrored to the second part to complete the modification of the entire frequency domain matrix. This application does not impose any restrictions on this.

[0112] The following takes the modification of each coefficient group in the first part as an example. In the process of modifying a coefficient group, the server performs the following operations:

[0113] Using a bit value obtained from the watermark data, each frequency domain coefficient contained in the target coefficient group to be modified in the frequency domain matrix is ​​modified at least once until each frequency domain coefficient contained in the target coefficient group satisfies the embedding rule corresponding to a bit value.

[0114] For details, see Figure 6 As shown, it is a flow chart of a method for modifying a coefficient group in an embodiment of the present application. Figure 6 , and explain the specific execution steps in detail:

[0115] Step S601: Determine a target coefficient group from the first part based on the position of a bit value obtained from the watermark data in the watermark data.

[0116] For example, starting from the first bit value in the watermark data, each coefficient group in the first part is modified in sequence, that is, the first bit value in the watermark data is embedded in the first coefficient group in the first part.

[0117] Step S602: Selecting a first frequency domain coefficient that meets a preset screening condition from the target coefficient group.

[0118] Specifically, in an embodiment of the present application, the server obtains the straight-line distance of each frequency domain coefficient in the target coefficient group relative to the center point of the frequency domain matrix, and selects the frequency domain coefficient with the smallest straight-line distance as the first frequency domain coefficient.

[0119] For example, a coefficient group contains two frequency domain coefficients, that is, the two frequency domain coefficients jointly represent a bit value. When modifying a coefficient group, the frequency domain coefficient closer to the center point of the frequency domain matrix is ​​selected as the first frequency domain coefficient, and the first frequency domain coefficient is modified.

[0120] Based on step S602, since the frequency domain coefficients close to the center point of the frequency domain matrix are more stable and less likely to jump when encountering interference, in an embodiment of the present application, selecting to modify the frequency domain coefficients closer to the center point in each coefficient group can further improve the anti-interference ability of the watermark data.

[0121] Step S603: modify the first frequency domain coefficient at least once based on a category of a bit value until each frequency domain coefficient in the target coefficient group satisfies an embedding rule corresponding to a bit value.

[0122] For example, see Figure 7 As shown, it is a schematic diagram of a scenario for modifying a coefficient group in an embodiment of the present application. Assuming that the frequency domain coefficient closer to the center point in the first coefficient group, that is, the first frequency domain coefficient is coded as a, and the remaining frequency domain coefficient is coded as b, a is modified at least once until the value of a+b satisfies the embedding rule corresponding to the first bit value in the watermark data.

[0123] Specifically, in the embodiment of the present application, the embedding rules corresponding to bit 0 and bit 1 are as follows:

[0124] (1) If a bit value is bit 0, then 1 is added to the first frequency domain coefficient one by one until the sum of the frequency domain coefficients in the target coefficient group modulo a preset first parameter is less than a preset first threshold.

[0125] For example, assuming that the first bit value in the watermark data is bit 0, then 1 is added to a successively until (a+b) mod 10<5, thus completing the embedding of bit 0.

[0126] (2) If a bit value is bit 1, the first frequency domain coefficient is reduced by 1 successively until the sum of the frequency domain coefficients in the target coefficient group modulo the first parameter is not greater than the first threshold.

[0127] For example, assuming that the first bit value in the watermark data is bit 1, a is reduced by 1 until (a+b) mod 10≥5, thus completing the embedding of bit 1.

[0128] Among them, in the embodiment of the present application, the first parameter is 10 and the first threshold is 5.

[0129] Furthermore, in an embodiment of the present application, after the modification of each frequency domain coefficient on the first part is completed based on each bit value in the watermark data, the center point of the frequency domain matrix is ​​used as the center of symmetry, and based on the modified frequency domain coefficients on the first part, the frequency domain coefficients on the second part are mirrored.

[0130] For example, after completing the modification of each frequency domain coefficient on the main diagonal line of the frequency domain matrix, the watermark frequency domain matrix in which the watermark data is embedded can be obtained.

[0131] Step S204: converting the watermark frequency domain matrix from the frequency domain to the spatial domain to obtain target multimedia data embedded with the digital watermark.

[0132] After obtaining the watermark frequency domain matrix, the DFT inverse operation is used to convert the watermark frequency domain matrix from the frequency domain to the spatial domain, thus obtaining the target multimedia data embedded with the digital watermark.

[0133] For example, see Figure 8 As shown, it is a schematic diagram of target multimedia data after embedding a digital watermark in an embodiment of the present application, wherein the multimedia data to be processed is an image, and an image watermark has been embedded in the processed target image. Since the image watermark is a digital watermark, it is not visible to the naked eye.

[0134] For example, see Fig. 9 As shown, it is another schematic diagram of target multimedia data after embedding a digital watermark in an embodiment of the present application, wherein the multimedia data to be processed is a plurality of video frames contained in a video, and the same text watermark has been embedded in some key frames. After the key frames are processed, all video frames need to be reassembled into a complete video, and the entire digital watermark embedding process is completed.

[0135] Furthermore, in order to verify the anti-interference ability of the digital watermark, in the embodiment of the present application, a watermark extraction test is also performed on the target multimedia data after the watermark is embedded.

[0136] See also Fig.10 As shown, it is a flow chart of a watermark extraction method in an embodiment of the present application. Fig.10 , and explain the specific execution steps in detail:

[0137] Step S1001: performing interference processing on target multimedia data to obtain test multimedia data.

[0138] The interference processing is an operation that has the possibility of changing each frequency domain coefficient in the watermark frequency domain matrix.

[0139] Specifically, in an embodiment of the present application, in order to verify whether the watermark data embedded in the target multimedia data is affected after transmission and other operations, the server performs any one or more operations such as rotation, cropping, adding Gaussian noise, and compression on the target multimedia data to obtain test multimedia data.

[0140] Step S1002: convert the test multimedia data from the spatial domain to the frequency domain to obtain a test frequency domain matrix composed of various test frequency domain coefficients.

[0141] For the test multimedia data, the DFT method is used to convert it from the spatial domain to the frequency domain to obtain its corresponding test frequency domain matrix composed of test frequency domain coefficients.

[0142] Step S1003: Acquire each test frequency domain coefficient within the test area in the test frequency domain matrix.

[0143] The test area is any half of the main diagonal or the secondary diagonal of the test frequency domain matrix.

[0144] Specifically, in the embodiment of the present application, when embedding a digital watermark, the frequency domain coefficients on the main diagonal or the sub-diagonal in the frequency domain matrix are selected to represent the bit values ​​in the watermark data, and the frequency domain coefficients on the diagonal are symmetrical about the center point of the frequency domain matrix. Therefore, when extracting the watermark, only any half of the main diagonal or the sub-diagonal is processed.

[0145] Step S1004: extracting target watermark data based on each test frequency domain coefficient in the test area.

[0146] For example, the server extracts the target watermark data based on each frequency domain coefficient in the upper half of the main diagonal in the frequency domain matrix.

[0147] See also Fig.11 As shown, it is a flow chart of a method for extracting watermark data in an embodiment of the present application. Fig.11 , and explain in detail the specific operations performed:

[0148] Step S1004-1: Starting from the center point of the test frequency domain matrix, with a step length of N, each test frequency domain coefficient in the test area is divided to obtain a plurality of test coefficient groups.

[0149] For example, the server divides each test frequency domain coefficient in the upper half of the main diagonal line from the center point of the test frequency domain matrix with a step size of 2 to obtain multiple test coefficient groups.

[0150] Step S1004-2: Based on each test coefficient group, multiple bit values ​​are obtained according to a preset extraction rule.

[0151] For details, see Fig.12 As shown, it is a flowchart of a bit value extraction rule in an embodiment of the present application, which specifically includes the following steps:

[0152] Step S1201: Calculate the sum of the test frequency domain coefficients in the current test coefficient group and take the modulo result of the preset second parameter.

[0153] For example, assuming that the two test frequency domain coefficients in the current coefficient group are A and B respectively, then the value of (A+B)%10 is calculated, where the second parameter is 10.

[0154] Step S1202: Determine whether the remainder result is less than a preset second threshold value, if so, execute step S1203, otherwise, execute step S1204.

[0155] For example, to determine whether (A+B)%10 is less than 5, the second threshold is 5.

[0156] Step S1203: Based on the current test coefficient group, obtain bit 0.

[0157] If (A+B)%10<5, then based on the current test coefficient group, bit 0 is obtained.

[0158] Step S1204: Based on the current test coefficient group, obtain bit 1.

[0159] If (A+B)%10≥5, then based on the current test coefficient group, bit 1 is obtained.

[0160] Step S1004-3: Based on the position of each test coefficient group relative to the center point of the test frequency domain matrix, determine the position of each bit value obtained in the target watermark data, and obtain the target watermark data based on each bit value.

[0161] Furthermore, in an embodiment of the present application, after the server obtains each bit value based on each test coefficient group, it determines the position of each bit value in the target watermark data based on the position of each test coefficient group relative to the center point of the test frequency domain matrix, thereby splicing each bit value into the target watermark data.

[0162] For example, see Fig.13 As shown, it is a schematic diagram of the scenario of obtaining the target watermark data based on the bit value in an embodiment of the present application, wherein the test frequency domain coefficients in the upper half of the main diagonal of the test frequency domain matrix are exemplarily shown. The first test coefficient group closest to the center point O of the test frequency domain matrix has an extracted bit value of 0, which is the first bit value in the target watermark data. The second test coefficient group has an extracted bit value of 1, which is the second bit value in the target watermark data. The third test coefficient group has an extracted bit value of 1, which is the third bit value in the target watermark data, and so on, until all the bit values ​​are extracted to obtain a complete bit sequence, namely the target watermark data.

[0163] After obtaining the target watermark data, convert each bit value back to the character represented by ASCII, and then use the reverse decoding operation of Base64 to restore each character back to the original target watermark information to determine whether the target watermark information is complete, thereby determining whether the digital watermark is interfered with during the data enhancement process.

[0164] Based on the above embodiment, a specific application scenario is used below to further explain the process of digital watermark embedding in the embodiment of the present application in detail:

[0165] Assume that user I creates a photographic work - Image W. In order to share his work on the Internet and protect it from malicious theft, he can use the digital watermark embedding method provided by this application to add his own identity - Admin I as watermark information to Image W.

[0166] See also Fig.14 As shown in FIG. 1 , it is an example diagram of the process of adding an identity identifier to an image in an embodiment of the present application, which specifically includes:

[0167] Step S1401: Convert the image W from the spatial domain to the frequency domain to obtain a frequency domain matrix Z composed of frequency domain coefficient matrices.

[0168] Step S1402: Encode the identity identifier Admin I to obtain watermark data S in the form of a bit stream.

[0169] Step S1403: embed the watermark data S in the form of a bit stream into the frequency domain matrix Z to obtain the watermark frequency domain matrix Z'.

[0170] Step S1404: convert the watermark frequency domain matrix Z' from the frequency domain to the spatial domain to obtain the target image W'.

[0171] See also Fig.15 As shown, it is a logical schematic diagram of adding an identity identifier to an image in an embodiment of the present application. Specifically, when obtaining the frequency domain matrix Z based on the image W, DFT or DCT transformation is adopted, and when obtaining the watermark data S based on the identity identifier, Base64 encoding and ASCII code table are adopted. When embedding the watermark data S into the frequency domain matrix Z', the digital watermark embedding method as described above is adopted. The target image W' finally obtained has the effect of anti-infringement and traceability, and the watermark data has a strong anti-interference ability, and even after multiple compressions or transmissions, it is more likely to remain intact.

[0172] To summarize, in an embodiment of the present application, by converting the data to be processed from the spatial domain to the frequency domain, and selecting the frequency domain coefficients on the diagonal of the frequency domain matrix to perform bit embedding of the watermark, the integrity and traceability of the digital watermark can be ensured after the image data obtains the video data after transmission or compression. At the same time, the frequency domain coefficients on the diagonal are divided into multiple groups, and multiple frequency domain coefficients in a coefficient group are used to represent a bit value, thereby increasing the fault tolerance of the frequency domain coefficient jump. Compared with the method of representing a bit value with one frequency domain coefficient, the anti-interference ability of the digital watermark can be further improved.

[0173] In addition, although the operations of the method of the present application are described in a specific order in the drawings, this does not require or imply that the operations must be performed in this specific order, or that all the operations shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps.

[0174] Based on the same technical concept, see Fig.16 As shown, the embodiment of the present application further provides a digital watermark embedding device 1600, which includes:

[0175] The conversion module 1601 is used to convert the multimedia data to be processed from the spatial domain to the frequency domain, and obtain a frequency domain matrix composed of frequency domain coefficients, wherein the frequency domain coefficient represents the gray value change rate of the multimedia data to be processed in the neighborhood where the corresponding pixel point is located in the spatial domain;

[0176] The encoding module 1602 is used to obtain watermark data for embedding into the multimedia data to be processed, where the watermark data is a bit stream obtained by encoding the target watermark information;

[0177] The modification module 1603 is used to group multiple frequency domain coefficients in a specified area in the frequency domain matrix to obtain multiple coefficient groups, and modify each frequency domain coefficient contained in each coefficient group based on each bit value contained in the watermark data in turn to obtain a corresponding watermark frequency domain matrix, wherein in one modification process, the following operations are performed: using a bit value obtained from the watermark data, each frequency domain coefficient contained in the target coefficient group to be modified in the frequency domain matrix is ​​modified at least once until each frequency domain coefficient contained in the target coefficient group satisfies an embedding rule corresponding to a bit value;

[0178] The processing module 1604 is used to convert the watermark frequency domain matrix from the frequency domain to the spatial domain to obtain the target multimedia data embedded with the digital watermark.

[0179] In a possible implementation, when a plurality of frequency domain coefficients in a specified area in the frequency domain matrix are grouped to obtain a plurality of coefficient groups, the modification module 1603 is used to:

[0180] Get the frequency domain coefficients located on the diagonal of the frequency domain matrix;

[0181] Starting from the center point of the frequency domain matrix, with a step size of N, the frequency domain coefficients located on the first part and the second part of the diagonal are divided to obtain multiple coefficient groups, where the first part is any half of the diagonal, the second part is the other half of the diagonal except the first part, and N is a positive integer.

[0182] In a possible implementation, a bit value obtained from the watermark data is used to modify each frequency domain coefficient included in the target coefficient group to be modified in the frequency domain matrix at least once, until each frequency domain coefficient included in the target coefficient group satisfies the embedding rule corresponding to the bit value, and the modification module 1603 is used to:

[0183] determining a target coefficient group from the first portion based on a position in the watermark data of a bit value obtained from the watermark data;

[0184] Selecting a first frequency domain coefficient that meets a preset screening condition from the target coefficient group;

[0185] The first frequency domain coefficient is modified at least once based on a category of a bit value until each frequency domain coefficient in the target coefficient group satisfies an embedding rule corresponding to a bit value.

[0186] In a possible implementation, when selecting a first frequency domain coefficient that meets a preset screening condition from the target coefficient group, the modification module 1603 is used to:

[0187] Obtain the linear distance of each frequency domain coefficient in the target coefficient group relative to the center point of the frequency domain matrix, and select the frequency domain coefficient with the smallest linear distance as the first frequency domain coefficient.

[0188] In a possible implementation, the first frequency domain coefficient is modified at least once based on a category of a bit value until each frequency domain coefficient in the target coefficient group satisfies an embedding rule corresponding to a bit value, and the modification module 1603 is used to:

[0189] If a bit value is bit 0, then the first frequency domain coefficient is incremented by 1 until the modulo result of the sum of the frequency domain coefficients in the target coefficient group and the preset first parameter is less than the preset first threshold;

[0190] If a bit value is bit 1, the first frequency domain coefficient is reduced by 1 successively until the sum of the frequency domain coefficients in the target coefficient group modulo the first parameter is not less than the first threshold.

[0191] In a possible implementation, the modification module 1603 is further configured to:

[0192] After completing the modification of each frequency domain coefficient on the first part based on each bit value in the watermark data, the frequency domain coefficient on the second part is mirror-modified based on each modified frequency domain coefficient on the first part, taking the center point of the frequency domain matrix as the center of symmetry.

[0193] In a possible implementation, after converting the watermark frequency domain matrix from the frequency domain to the spatial domain to obtain the target multimedia data embedded with the digital watermark, the processing module 1604 is further used to:

[0194] Performing interference processing on the target multimedia data to obtain test multimedia data, wherein the interference processing is an operation that has the possibility of changing each frequency domain coefficient in the watermark frequency domain matrix;

[0195] Convert the test multimedia data from the spatial domain to the frequency domain to obtain a test frequency domain matrix composed of various test frequency domain coefficients;

[0196] Obtain each test frequency domain coefficient located in a test area in the test frequency domain matrix, wherein the test area is any half of the main diagonal or the sub-diagonal of the test frequency domain matrix;

[0197] Based on each test frequency domain coefficient in the test area, the target watermark data is extracted.

[0198] In a possible implementation, when extracting target watermark data based on each test frequency domain coefficient in the test area, the processing module 1604 is used to:

[0199] Starting from the center point of the test frequency domain matrix, with N as the step length, each test frequency domain coefficient in the test area is divided to obtain multiple test coefficient groups;

[0200] Based on each test coefficient group, a plurality of bit values ​​are obtained according to a preset extraction rule;

[0201] Based on the position of each test coefficient group relative to the center point of the test frequency domain matrix, the position of each bit value obtained in the target watermark data is determined, and based on each bit value, the target watermark data is obtained.

[0202] In a possible implementation, when multiple bit values ​​are obtained according to a preset extraction rule based on each test coefficient group, the processing module 1604 is used to:

[0203] For each test coefficient group, perform the following operations:

[0204] Calculate the sum of each test frequency domain coefficient in the current test coefficient group and the modulo result of the preset second parameter;

[0205] If the modulo result is less than the preset second threshold, bit 0 is obtained based on the current test coefficient group;

[0206] If the modulo result is not less than the second threshold, bit 1 is obtained based on the current test coefficient group.

[0207] After introducing the digital watermark embedding method and apparatus according to an exemplary embodiment of the present application, next, a computing device according to another exemplary embodiment of the present application is introduced.

[0208] Those skilled in the art will appreciate that various aspects of the present application may be implemented as a system, method or program product. Therefore, various aspects of the present application may be specifically implemented in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to as "circuit", "module" or "system" herein.

[0209] Based on the same inventive concept as the above method embodiment, the present application embodiment also provides a computing device. In one embodiment, the computing device may be a server, such as Figure 1 In this embodiment, the structure of the computing device 1700 is as follows: Fig.17 As shown, it may include at least a memory 1701 , a communication module 1703 , and at least one processor 1702 .

[0210] The memory 1701 is used to store computer programs executed by the processor 1702. The memory 1701 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and programs required for running the instant messaging function, etc.; the data storage area may store various instant messaging information and operation instruction sets, etc.

[0211] The memory 1701 may be a volatile memory, such as a random-access memory (RAM); the memory 1701 may also be a non-volatile memory, such as a read-only memory, a flash memory, a hard disk drive (HDD) or a solid-state drive (SSD); or the memory 1701 may be any other medium that can be used to carry or store a desired computer program in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 1701 may be a combination of the above memories.

[0212] The processor 1702 may include one or more central processing units (CPU) or a digital processing unit, etc. The processor 1702 is used to implement the above digital watermark embedding method when calling the computer program stored in the memory 1701 .

[0213] The communication module 1703 is used to communicate with terminal devices and other servers.

[0214] The specific connection medium between the memory 1701, the communication module 1703 and the processor 1702 is not limited in the embodiment of the present application. Fig.17 In the embodiment, the memory 1701 and the processor 1702 are connected via a bus 1704. The bus 1704 is connected to the processor 1702 via a bus 1704. Fig.17 The connections between the other components are described with bold lines, which are only for illustration and are not intended to be limiting. The bus 1704 can be divided into an address bus, a data bus, a control bus, etc. For ease of description, Fig.17 Only thick lines are used in the diagram, but this does not mean that there is only one bus or one type of bus.

[0215] The memory 1701 stores a computer storage medium, which stores computer executable instructions, and the computer executable instructions are used to implement the digital watermark embedding method of the embodiment of the present application. The processor 1702 is used to execute the above digital watermark embedding method.

[0216] In another embodiment, the computing device may also be other computing devices, such as Figure 1 In this embodiment, the structure of the computing device can be as follows: Fig.18 As shown, it includes: a communication component 1810, a memory 1820, a display unit 1830, a camera 1840, a sensor 1850, an audio circuit 1860, a Bluetooth module 1870, a processor 1880 and other components.

[0217] The communication component 1810 is used to communicate with the server. In some embodiments, a wireless fidelity (WiFi) module may be included. The WiFi module belongs to a short-range wireless transmission technology. The electronic device can help the object to send and receive information through the WiFi module.

[0218] The memory 1820 can be used to store software programs and data. The processor 1880 executes various functions and data processing of the terminal device 110 by running the software programs or data stored in the memory 1820. The memory 1820 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage device. The memory 1820 stores an operating system that enables the terminal device 110 to run. In the present application, the memory 1820 can store an operating system and various application programs, and can also store a computer program for executing the digital watermark embedding method of the embodiment of the present application.

[0219] The display unit 1830 may also be used to display information input by the object or information provided to the object and a graphical user interface (GUI) of various menus of the terminal device 110. Specifically, the display unit 1830 may include a display screen 1832 disposed on the front of the terminal device 110. The display screen 1832 may be configured in the form of a liquid crystal display, a light emitting diode, etc. The display unit 1830 may be used to display the game simulation game interface, etc. in the embodiment of the present application.

[0220] The display unit 1830 can also be used to receive input digital or character information, and generate signal input related to the object setting and function control of the terminal device 110. Specifically, the display unit 1830 may include a touch screen 1831 set on the front of the terminal device 110, which can collect touch operations of objects on or near it, such as clicking a button, dragging a scroll box, etc.

[0221] The touch screen 1831 can be covered on the display screen 1832, or the touch screen 1831 and the display screen 1832 can be integrated to realize the input and output functions of the terminal device 110. The integrated touch screen can be referred to as a touch display screen. In this application, the display unit 1830 can display the application and the corresponding operation steps.

[0222] The camera 1840 can be used to capture static images, and the subject can publish the images taken by the camera 1840 through the application. The camera 1840 can be one or more. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the processor 1880 to convert it into a digital image signal.

[0223] The terminal device may further include at least one sensor 1850, such as an acceleration sensor 1851, a distance sensor 1852, a fingerprint sensor 1853, and a temperature sensor 1854. The terminal device may also be configured with other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, a light sensor, and a motion sensor.

[0224] The audio circuit 1860, the speaker 1861, and the microphone 1862 can provide an audio interface between the object and the terminal device 110. The audio circuit 1860 can transmit the electrical signal converted from the received audio data to the speaker 1861, which is converted into a sound signal for output. The terminal device 110 can also be configured with a volume button for adjusting the volume of the sound signal. On the other hand, the microphone 1862 converts the collected sound signal into an electrical signal, which is received by the audio circuit 1860 and converted into audio data, and then the audio data is output to the communication component 1810 to be sent to, for example, another terminal device, or the audio data is output to the memory 1820 for further processing.

[0225] The Bluetooth module 1820 is used to exchange information with other Bluetooth devices having Bluetooth modules through the Bluetooth protocol. For example, the terminal device can establish a Bluetooth connection with a wearable electronic device (such as a smart watch) that also has a Bluetooth module through the Bluetooth module 1820 to exchange data.

[0226] The processor 1880 is the control center of the terminal device. It uses various interfaces and lines to connect various parts of the entire terminal. It executes various functions of the terminal device and processes data by running or executing software programs stored in the memory 1820 and calling data stored in the memory 1820. In some embodiments, the processor 1880 may include one or more processing units; the processor 1880 may also integrate an application processor and a baseband processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the baseband processor mainly processes wireless communications. It is understandable that the above-mentioned baseband processor may not be integrated into the processor 1880. In the present application, the processor 1880 can run the operating system, application programs, user interface display and touch response, as well as the digital watermark embedding method of the embodiment of the present application. In addition, the processor 1880 is coupled to the display unit 1830.

[0227] In addition, it should be noted that in the specific implementation of this application, object data related to digital watermark embedding is involved. When the above embodiments of this application are applied to specific products or technologies, it is necessary to obtain the object's permission or consent, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0228] In some possible implementations, various aspects of the digital watermark embedding method provided by the present application may also be implemented in the form of a program product, which includes a computer program. When the program product is run on a computing device, the computer program is used to enable the computing device to execute the steps of the digital watermark embedding method according to various exemplary implementations of the present application described above in this specification.

[0229] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0230] The program product of the embodiment of the present application may adopt a portable compact disk read-only memory (CD-ROM) and include a computer program, and can be run on an electronic device. However, the program product of the present application is not limited thereto, and in this document, a readable storage medium may be any tangible medium containing or storing a program, which can be used by or in combination with a command execution system, apparatus, or device.

[0231] A readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, wherein a readable computer program is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. A readable signal medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with a command execution system, apparatus, or device.

[0232] The computer program embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0233] The computer program for performing the operations of the present application may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The computer program may be executed entirely on the user computing device, partially on the user computing device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on the remote computing device. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).

[0234] It should be noted that, although several units or subunits of the device are mentioned in the above detailed description, this division is merely exemplary and not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more units described above can be embodied in one unit. Conversely, the features and functions of one unit described above can be further divided into multiple units to be embodied.

[0235] In addition, although the operations of the method of the present application are described in a specific order in the drawings, this does not require or imply that the operations must be performed in this specific order, or that all the operations shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps.

[0236] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A digital watermark embedding method, characterized in that: include: Convert the multimedia data to be processed from the spatial domain to the frequency domain to obtain a frequency domain matrix composed of frequency domain coefficients, wherein the frequency domain coefficients represent the gray value change rate of the multimedia data to be processed in the neighborhood where the corresponding pixel point is located in the spatial domain; Acquire watermark data for embedding into the multimedia data to be processed, wherein the watermark data is a bit stream obtained by encoding target watermark information; Grouping multiple frequency domain coefficients in a specified area in the frequency domain matrix to obtain multiple coefficient groups, and modifying each frequency domain coefficient contained in each coefficient group based on each bit value contained in the watermark data in turn to obtain a corresponding watermark frequency domain matrix, wherein in one modification process, the following operations are performed: using a bit value obtained from the watermark data, modifying each frequency domain coefficient contained in a target coefficient group to be modified in the frequency domain matrix at least once until each frequency domain coefficient contained in the target coefficient group satisfies the embedding rule corresponding to the one bit value; The watermark frequency domain matrix is ​​converted from the frequency domain to the spatial domain to obtain target multimedia data embedded with the digital watermark.

2. The method according to claim 1, characterized in that The step of grouping a plurality of frequency domain coefficients in a specified area in the frequency domain matrix to obtain a plurality of coefficient groups includes: Obtaining frequency domain coefficients located on the diagonal of the frequency domain matrix; Starting from the center point of the frequency domain matrix, with a step size of N, each frequency domain coefficient located on the first part and the second part of the diagonal is divided to obtain multiple coefficient groups, wherein the first part is any half of the diagonal, the second part is the other half of the diagonal except the first part, and N is a positive integer.

3. The method according to claim 2, characterized in that The step of using a bit value obtained from the watermark data to modify at least once each frequency domain coefficient contained in a target coefficient group to be modified in the frequency domain matrix until each frequency domain coefficient contained in the target coefficient group satisfies an embedding rule corresponding to the bit value includes: determining the target coefficient group from the first portion based on a position in the watermark data of a bit value obtained from the watermark data; Selecting a first frequency domain coefficient that meets a preset screening condition from the target coefficient group; The first frequency domain coefficient is modified at least once based on the category of the one bit value until each frequency domain coefficient in the target coefficient group satisfies the embedding rule corresponding to the one bit value.

4. The method according to claim 3, characterized in that The step of selecting a first frequency domain coefficient that meets a preset screening condition from the target coefficient group includes: Obtain the linear distance of each frequency domain coefficient in the target coefficient group relative to the center point of the frequency domain matrix, and select the frequency domain coefficient with the smallest linear distance as the first frequency domain coefficient.

5. The method according to claim 3, characterized in that The modifying the first frequency domain coefficient at least once based on the category of the one bit value until each frequency domain coefficient in the target coefficient group satisfies the embedding rule corresponding to the one bit value includes: If the one bit value is bit 0, then the first frequency domain coefficient is incremented by 1 until the modulo result of the sum of the frequency domain coefficients in the target coefficient group and the preset first parameter is less than a preset first threshold; If the one bit value is bit 1, the first frequency domain coefficient is successively reduced by 1 until the sum of the frequency domain coefficients in the target coefficient group modulo the first parameter is not less than the first threshold.

6. The method according to claim 3, characterized in that Also includes: After completing the modification of each frequency domain coefficient on the first part based on each bit value in the watermark data, taking the center point of the frequency domain matrix as the center of symmetry, mirror modification is performed on each frequency domain coefficient on the second part based on the modified frequency domain coefficients on the first part.

7. The method according to any one of claims 1 to 6, characterized in that: After converting the watermark frequency domain matrix from the frequency domain to the spatial domain to obtain the target multimedia data embedded with the digital watermark, the method further includes: Performing interference processing on the target multimedia data to obtain test multimedia data, wherein the interference processing is an operation that has the possibility of changing each frequency domain coefficient in the watermark frequency domain matrix; Convert the test multimedia data from the spatial domain to the frequency domain to obtain a test frequency domain matrix composed of test frequency domain coefficients; Acquire each test frequency domain coefficient located in a test area in the test frequency domain matrix, wherein the test area is any half of the main diagonal or the sub-diagonal of the test frequency domain matrix; Target watermark data is extracted based on each test frequency domain coefficient in the test area.

8. The method according to claim 7, characterized in that The extracting target watermark data based on each test frequency domain coefficient in the test area includes: Starting from the center point of the test frequency domain matrix, with N as the step length, each test frequency domain coefficient in the test area is divided to obtain a plurality of test coefficient groups; Based on each test coefficient group, a plurality of bit values ​​are obtained according to a preset extraction rule; Based on the position of each test coefficient group relative to the center point of the test frequency domain matrix, the position of each obtained bit value in the target watermark data is determined, and based on the each bit value, the target watermark data is obtained.

9. The method according to claim 8, characterized in that The method of obtaining multiple bit values ​​based on each test coefficient group according to a preset extraction rule includes: For each test coefficient group, perform the following operations: Calculate the sum of each test frequency domain coefficient in the current test coefficient group and the modulo result of the preset second parameter; If the modulo result is less than a preset second threshold, obtaining bit 0 based on the current test coefficient group; If the modulo result is not less than the second threshold, bit 1 is obtained based on the current test coefficient group.

10. A digital watermark embedding device, characterized in that: include: A conversion module, used for converting the multimedia data to be processed from the spatial domain to the frequency domain, and obtaining a frequency domain matrix composed of frequency domain coefficients, wherein the frequency domain coefficients represent the gray value change rate of the multimedia data to be processed in the neighborhood where the corresponding pixel point is located in the spatial domain; An encoding module, used for acquiring watermark data for embedding into the multimedia data to be processed, wherein the watermark data is a bit stream obtained by encoding target watermark information; A modification module, used for grouping a plurality of frequency domain coefficients in a specified area in the frequency domain matrix to obtain a plurality of coefficient groups, and sequentially modifying each frequency domain coefficient contained in each coefficient group based on each bit value contained in the watermark data to obtain a corresponding watermark frequency domain matrix, wherein in one modification process, the following operations are performed: using a bit value obtained from the watermark data, modifying each frequency domain coefficient contained in a target coefficient group to be modified in the frequency domain matrix at least once, until each frequency domain coefficient contained in the target coefficient group satisfies the embedding rule corresponding to the one bit value; The processing module is used to convert the watermark frequency domain matrix from the frequency domain to the spatial domain to obtain the target multimedia data embedded with the digital watermark.

11. An electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 9 is implemented.

12. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 9 are implemented.

13. A computer program product, characterized in that When the computer program product is called by a computer, the computer executes the method according to any one of claims 1 to 9.