A method of digital audio embedding and detection
By embedding synchronization codes and watermark information into digital audio, and utilizing wavelet decomposition and singular value decomposition techniques, the problem of watermark location difficulties caused by synchronization attacks is solved, achieving fast frame synchronization and efficient watermark detection, thus enhancing the robustness of the watermark.
Patent Information
- Application Number
- CN202411443246.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-16
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2044-10-16
AI Technical Summary
When faced with synchronous attacks, digital audio watermarks are difficult to embed, making watermark detection challenging and vulnerable to synchronous attacks such as cropping, thus affecting detection efficiency and accuracy.
The synchronization code and watermark information are embedded into the audio simultaneously. Fast frame synchronization is achieved through two-level wavelet decomposition, discrete cosine transform and singular value decomposition. In the watermark detection stage, the position of the synchronization code is confirmed by the sliding window method and the watermark information is extracted.
It improves the synchronization speed and robustness of watermark detection, enhances resistance to synchronization attacks, and improves the efficiency and accuracy of watermark detection.
Smart Images

Figure CN119339730B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of digital audio watermarking, in particular to a digital audio embedding and detecting method. BACKGROUND
[0002] Digital audio watermarking is a piece of identification generated or embedded based on digital audio content, which can be used to identify the copyright ownership of digital audio content, and also can be used to protect the integrity of digital audio content. When audio watermarking is used to identify the copyright ownership of digital audio content, in the whole life cycle of digital audio content generation, management, distribution and use, the audio watermark is added in the digital audio content in an imperceptible and inseparable manner, and once a copyright dispute occurs, the watermark information embedded in the digital audio content can be extracted to prove the copyright ownership of the digital audio content.
[0003] Synchronization attack is the most challenging attack in the field of digital audio watermarking. In audio watermarking, the watermark is generally embedded in some fixed points of the audio signal, and the watermark signal is extracted from these fixed points during watermark detection. The purpose of synchronization attack is to destroy the synchronization points of watermark embedding, so that the embedding points of the watermark are shifted and the correct watermark cannot be extracted at the detection end. Due to the continuity of audio on the time axis, any position cutting and inserting samples will destroy the synchronization structure. SUMMARY
[0004] The present application provides a digital audio embedding and detecting method, which embeds a synchronization code and watermark information into the audio at the same time, solves the problem that the embedding position of the watermark is difficult to locate in the detecting stage, and is difficult to resist synchronization attacks such as cutting, and improves the watermark detection efficiency and accuracy.
[0005] The present application provides a digital audio embedding and detecting method including three steps of watermark information generation, watermark embedding and watermark detection. S1: generating watermark information according to time and watermark load device coding; S2: performing frame processing on the audio to be embedded with watermark, and performing two-level wavelet decomposition DWT; embedding a synchronization code in the first half of the low-frequency wavelet coefficient, and performing discrete cosine transform DCT and singular value decomposition SVD processing on the second half of the low-frequency wavelet coefficient to embed watermark information; S3: in the watermark detection stage, first, through the sliding window method, performing two-level wavelet decomposition on the audio after being attacked in the current sliding window, confirming whether the current sliding window contains a synchronization code, and determining the position of the synchronization code, realizing frame synchronization, and then processing the second half of the frame after the frame synchronization of the audio frame after being attacked to extract the watermark information.
[0006] Furthermore, the 64-bit watermark information in step S1 includes 16-bit time information, 8-bit year information, and 40-bit device code information. The time information is the watermark time minus the minutes of January 1st, 00:00 of the current year, divided by 15 and rounded down; the year information is the difference between the current watermark time and 1970; and the device code information is a hexadecimal device code.
[0007] The present invention provides a digital audio watermark embedding method, the technical solution of which is as follows:
[0008] The process includes the following steps: S1: Generate watermark information based on time and watermark payload device encoding; S2: Perform frame segmentation on the audio to be watermarked and perform second-order wavelet decomposition (DWT); embed a synchronization code in the first half of the low-frequency wavelet coefficients, and perform discrete cosine transform (DCT) and singular value decomposition (SVD) on the second half of the low-frequency wavelet coefficients to embed the watermark information; S3: In the watermark detection stage, firstly, the second-order wavelet decomposition is performed on the attacked audio within the current sliding window using the sliding window method to confirm whether the current sliding window contains a synchronization code and determine the position of the synchronization code to achieve frame synchronization. Then, the second half of the synchronized audio frame after the attack is processed to extract the watermark information.
[0009] Furthermore, the watermark information in step S1 is a 64-bit watermark information containing 16-bit time information, 8-bit year information, and 40-bit device code information.
[0010] Furthermore, the time information is the number of minutes obtained by subtracting the watermark time from 0:00 on January 1st of the current year, dividing by 15 and rounding down; the year information is the difference between the current watermark time and 1970; and the device code information is a hexadecimal device code.
[0011] Furthermore, the operation of embedding the synchronization code in the first half of the low-frequency wavelet coefficients in step S2 specifically includes S204: dividing the first half {c(i)|i∈[1,L]} into equal lengths L b Segment, of which L b The number of bits in the synchronization code, with each segment having a length of L. B =floor(L / L) b Each segment embeds one synchronization code; then {c(i)|i∈[1,L]} B The data is divided into three equal segments. The energy of each segment is calculated and sorted from largest to smallest to obtain E. max E mid and E min S205: When the currently embedded synchronization code bit b(i) is 1, change c(i) according to the following formula:
[0012]
[0013] in The coefficient α must satisfy
[0014]
[0015] When the currently embedded synchronization code bit b(i) is -1, c(i) is changed according to the following formula:
[0016]
[0017] The requirements for S and coefficient α are the same as above, and the final result is {c′(i)|i∈[1,L]} after embedding the synchronization code;
[0018] Further, the operation of performing Discrete Cosine Transform (DCT) and Singular Value Decomposition (SVD) on the latter half of the low-frequency wavelet coefficients in step S2, and embedding 64-bit watermark information, specifically includes the following steps: S206: Perform Discrete Cosine Transform on the latter half {c(i)|i∈[L+1,2L]}, and select the 3000-4500Hz segment, which is not sensitive to human hearing; S207: Divide the 3000-4500Hz segment into segments according to the 64-bit watermark information, and perform Singular Value Decomposition (SVD) on each segment; S208: Take the first two singular values S1 and S2, and calculate the coefficients. When D has the same parity as the current watermark information bit w(i), S1 = S2D / 2; when D has a different parity than the current watermark information bit w(i), S1 = S2(D+1) / 2; S209: After embedding the watermark information, perform inverse SVD transformation to restore it; S210: Combine the 3000-4500Hz segment after embedding the watermark information with the unmodified DCT transformed audio segment, and perform IDCT transformation to obtain {c′(i)|i∈[L+1,2L]}; S211: Combine {c′(i)|i∈[1,L]} obtained in step S205 and {c′(i)|i∈[L+1,2L]} obtained in step S210 to obtain {c′(i)|i∈[1,2L]} and perform second-order wavelet decomposition inverse transform IDWT to complete the processing of the current audio frame.
[0019] Furthermore, the synchronization code in step S203 is a quasi-m sequence of length 126, which is composed of two m sequences of length 63 joined end to end.
[0020] Furthermore, step S3 specifically includes the following steps: S301: Sliding window capture, when the audio A is attacked T ={a T (i)|i∈[1,L aIf the input length of ]} is greater than 4L, the input audio will be truncated using a sliding window of length 4L; S302: Extract the audio A within the current sliding window. T ={a T (i)|i∈[1,4L]} is subjected to second-order wavelet decomposition (DWT), and the low-frequency wavelet coefficients {c T (i)|i∈[1,L]};S303:Set {c T (i)|i∈[1,L]} are divided into equal lengths L b Segment, of which L b The number of bits in the synchronization code, with each segment having a length of L. B =floor(L / L) b ); then {c T (i)|i∈[1,L B The data is divided into three equal segments. The energy of each segment is calculated and sorted from largest to smallest to obtain E. T max E T mid and E T min S304: Solve the synchronization code b according to the following formula. T (i): S305: Solve for b T Perform convolution with the embedded synchronization code b. If the convolution value is less than a set threshold, it is considered that there is no synchronization code in the current window, and the sliding window continues to slide forward, repeating steps S302-S305; if the convolution value is greater than the set threshold, it is considered that the starting position of the current sliding window is the watermark embedding position, and subsequent input audio is processed into frames according to the length of 8L, starting from this point; S306: Process the audio A framed after confirming the synchronization code. T ={a T (i)|i∈[1,8L]} The first half of the segment can be repeated using steps S302-S305 to confirm the existence of a synchronization code; S307: For the audio A frame after confirming the synchronization code, T ={a T (i)|i∈[1,8L]} is subjected to second-order wavelet decomposition (DWT), and the low-frequency wavelet coefficients {c T (i)|i∈[1,L]}, then perform DCT transformation, and take the 3000-4500Hz segment, divide it again according to the watermark information bit length of 64, perform SVD decomposition on each segment, take the first two singular values S1 and S2, and calculate the coefficients. When D is odd, the current watermark information bit is 1; when D is even, the current watermark information bit is 0. Attached Figure Description
[0021] Figure 1This is a flowchart of a digital audio watermark embedding and detection method according to the present invention;
[0022] Figure 2 This is a schematic diagram of 64-bit watermark information generated by a digital audio watermark embedding and detection method of the present invention;
[0023] Figure 3 This is a flowchart of the watermark embedding process in a digital audio watermark embedding and detection method of the present invention;
[0024] Figure 4 This is a flowchart of watermark detection in a digital audio watermark embedding and detection method of the present invention. Detailed Implementation
[0025] The present invention will be further described in detail below with reference to the accompanying drawings.
[0026] In the process of digital audio watermark detection, synchronization attacks can disrupt synchronization points, preventing the correct detection of watermark information. This invention embeds both synchronization codes and watermark information into the audio. The synchronization code improves the synchronization speed of the detection step, resists synchronization attacks, and further enhances robustness because the embedding method of the synchronization code differs from that of the watermark information.
[0027] Reference Figure 1 This invention discloses a flowchart of a digital audio embedding and detection method, and the specific operation steps are as follows:
[0028] S1: Generate watermark information based on the time and watermark payload device code;
[0029] S2: Perform frame segmentation on the audio to be embedded with the watermark and perform second-order wavelet decomposition (DWT); embed the synchronization code in the first half of the low-frequency wavelet coefficients, and perform discrete cosine transform (DCT) and singular value decomposition (SVD) on the second half of the low-frequency wavelet coefficients to embed the watermark information.
[0030] S3: In the watermark detection stage, the audio after the attack within the current sliding window is first decomposed into two-level wavelet decompositions using the sliding window method to confirm whether the current sliding window contains a synchronization code and to determine the position of the synchronization code, thereby achieving frame synchronization. Then, the second half of the audio frame after frame synchronization is processed to extract the watermark information.
[0031] In this embodiment, the watermark information in step S1 is a 64-bit watermark information containing 16-bit time information, 8-bit year information, and 40-bit device code information. The 64-bit watermark information is as follows: Figure 2As shown, it contains 16-digit time information, 8-digit year information, and 40-digit device code information. The time information is the watermark time minus the minutes of January 1st, 0:00 of the current year, divided by 15 and rounded down; the year information is the difference between the current watermark time and 1970; the device code information is a hexadecimal device code.
[0032] Reference Figure 3 The above step S2 is a digital audio watermark embedding method, which specifically includes two steps.
[0033] The first step, embedding the synchronization code in the first half of the low-frequency wavelet coefficients, specifically includes the following steps:
[0034] S201: Frame segmentation processing, the audio to be embedded with the watermark A = {a(i)|i∈[1,L} a The frame is divided into N frames, where L a The length of the audio is 8L, and the frame length is 8L. N = floor(L) a / 8L);
[0035] S202: Perform a second-order wavelet decomposition (DWT) on each audio frame and take the low-frequency wavelet coefficients {c(i)|i∈[1,2L]};
[0036] S203: Take the first half of the low-frequency wavelet coefficients {c(i)|i∈[1,L]} and embed the synchronization code; take the second half of the low-frequency wavelet coefficients {c(i)|i∈[L+1,2L]} and embed the watermark information.
[0037] It is important to note that the synchronization code is added here to achieve rapid synchronization and positioning of audio frames. Otherwise, due to the relatively complex embedding method of watermark information, synchronization during the detection phase would have to be performed by judging the repetition period without knowing the embedded information content, which is slow. Therefore, in this embodiment, the low-frequency wavelet coefficients are divided into two halves: one half is used for rapid synchronization, and the other half is used for embedding information. This ensures both the speed and robustness of audio watermark detection.
[0038] S204: Divide the first half {c(i)|i∈[1,L]} into equal lengths L. b Segment, of which L b The number of bits in the synchronization code, with each segment having a length of L. B =floor(L / L) b Each segment embeds one synchronization code; then {c(i)|i∈[1,L]} B The data is divided into three equal segments. The energy of each segment is calculated and sorted from largest to smallest to obtain E. max E mid and E min ;
[0039] S205: When the currently embedded synchronization code bit b(i) is 1, change c(i) according to the following formula:
[0040]
[0041] in The coefficient α must satisfy
[0042]
[0043] When the currently embedded synchronization code bit b(i) is -1, c(i) is changed according to the following formula:
[0044]
[0045] The requirements for S and coefficient α are the same as above, and the final result is {c′(i)|i∈[1,L]} after embedding the synchronization code;
[0046] The second step involves performing Discrete Cosine Transform (DCT) and Singular Value Decomposition (SVD) on the latter half of the low-frequency wavelet coefficients, and embedding 64-bit watermark information. The specific steps include:
[0047] S206: Perform Discrete Cosine Transform (DCT) on the second half {c(i)|i∈[L+1,2L]} and select the 3000-4500Hz segment that is not sensitive to human hearing.
[0048] The 3000-4500Hz frequency range was selected for processing to ensure the auditory quality of the original audio; therefore, a frequency range that is not sensitive to human hearing was chosen for operation.
[0049] S207: Divide the 3000-4500Hz range into segments according to the watermark information bit width of 64, and perform Singular Value Decomposition (SVD) on each segment;
[0050] S208: Take the first two singular values S1 and S2, and calculate the coefficients. When D has the same parity as the current watermark information bit w(i)
[0051] S1 = S2D / 2;
[0052] When D has a different parity than the current watermark information bit w(i)
[0053] S1 = S2(D+1) / 2;
[0054] S209: After embedding the watermark information, perform inverse SVD transformation to restore it;
[0055] S210: Combine the 3000-4500Hz segment after embedding the watermark information with the unmodified DCT-transformed audio segment, and perform IDCT transformation to obtain {c′(i)|i∈[L+1,2L]};
[0056] S211: Perform IDWT transformation on the merged {c′(i)|i∈[1,L]} obtained in step S205 and {c′(i)|i∈[L+1,2L]} obtained in step S210 to complete the processing of the current audio frame.
[0057] In this embodiment, the frame length 8L in step S201 is 220000.
[0058] In this embodiment, the synchronization code in step S203 is a quasi-m sequence with a length of 126, which is composed of two m sequences with a length of 63 joined end to end.
[0059] In this embodiment, in step S204, {c(i)|i∈[1,L} B The text is divided into three equal segments, each 70 units long.
[0060] Reference Figure 4 Step S3 of this invention is a digital audio watermark detection method, which specifically includes the following steps:
[0061] S301: Sliding window capture, audio A after being attacked. T ={a T (i)|i∈[1,L a If the input length of ]} is greater than 4L, the input audio will be truncated using a sliding window with a length of 4L;
[0062] S302: For audio A in the current sliding window T ={a T (i)|i∈[1,4L]} is subjected to second-order wavelet decomposition (DWT), and the low-frequency wavelet coefficients {c T (i)|i∈[1,L]};
[0063] S303: {c T (i)|i∈[1,L]} are divided into equal lengths L b Segment, of which L b The number of bits in the synchronization code, with each segment having a length of L. B =floor(L / L) b ); then {c T (i)|i∈[1,L B The data is divided into three equal segments. The energy of each segment is calculated and sorted from largest to smallest to obtain E. T maxE T mid and E T min ;
[0064] S304: Determine the synchronization code b according to the following formula. T (i):
[0065]
[0066] S305: Solve for b T Convolve with the embedded synchronization code b. If the convolution value is less than the set threshold, it is considered that there is no synchronization code in the current window, and the sliding window continues to slide forward, repeating steps S302-S305; if the convolution value is greater than the set threshold, it is considered that the starting position of the current sliding window is the watermark embedding position, and subsequent input audio is processed into frames according to the length of 8L, starting from this point.
[0067] It should be noted that the threshold here is generally not less than 80% of the number of synchronization code bits in applications. Without loss of generality, the threshold is set to ceil(126*0.8) = 101 in this embodiment.
[0068] S306: Audio A framed after acknowledging the synchronization code. T ={a T (i)|i∈[1,8L]} The first half of the process can be repeated using steps S302-S305 to confirm the existence of a synchronization code;
[0069] S307: Audio A framed after acknowledging the synchronization code. T ={a T (i)|i∈[1,8L]} is subjected to second-order wavelet decomposition (DWT), and the low-frequency wavelet coefficients {c T (i)|i∈[1,L]}, then perform DCT transformation, and take the 3000-4500Hz segment, divide it again according to the watermark information bit length of 64, perform SVD decomposition on each segment, take the first two singular values S1 and S2, and calculate the coefficients. When D is odd, the current watermark information bit is 1; when D is even, the current watermark information bit is 0.
[0070] In this embodiment, in step S303, {c T (i)|i∈[1,L B The text is divided into three equal segments, each 70 units long.
[0071] In this embodiment, the threshold value is set to 101 in step S305, and the sliding window step size is set to 1.
[0072] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.
Claims
1. A method for embedding and detecting digital audio watermarks, characterized in that, Includes the following steps: S1: Generate watermark information based on the time and watermark payload device code; S2: Perform frame segmentation on the audio to be embedded with the watermark and perform second-order wavelet decomposition (DWT); embed the synchronization code in the first half of the low-frequency wavelet coefficients, and perform discrete cosine transform (DCT) and singular value decomposition (SVD) on the second half of the low-frequency wavelet coefficients to embed the watermark information. S3: In the watermark detection stage, firstly, the audio after the attack within the current sliding window is decomposed into two-level wavelet decompositions using the sliding window method to confirm whether the current sliding window contains a synchronization code and to determine the position of the synchronization code, thereby achieving frame synchronization. Then, the second half of the audio frame after frame synchronization after the attack is processed to extract the watermark information. The operation of embedding the synchronization code in the first half of the low-frequency wavelet coefficients in step S2 specifically includes the following steps: S201: Frame segmentation processing, the audio to be embedded with the watermark A = {a(i)|i∈[1,L} a The frame is divided into N frames, where L a The length of the audio is 8L, and the frame length is 8L. N = floor(L) a / 8L); S202: Perform a second-level wavelet decomposition on each audio frame and take the low-frequency wavelet coefficients {c(i)|i∈[1,2L]}; S203: Take the first half of the low-frequency wavelet coefficients {c(i)|i∈[1,L]} and embed the synchronization code; take the second half of the low-frequency wavelet coefficients c(i)|i∈[L+1,2L]} and embed the watermark information. S204: Divide the first half {c(i)|i∈[1,L]} into equal lengths L. b Segment, of which L b The number of bits in the synchronization code, with each segment having a length of L. B =floor(L / L) b Each segment embeds one synchronization code; then {c(i)|i∈[1,L]} B The data is divided into three equal segments. The energy of each segment is calculated and sorted from largest to smallest to obtain E. max E mid and E min ; S205: When the currently embedded synchronization code bit b(i) is 1, change c(i) according to the following formula: in The coefficient α must satisfy When the currently embedded synchronization code bit b(i) is -1, c(i) is changed according to the following formula: Finally, we obtain {c'(i)|i∈[1,L]} after embedding the synchronization code.
2. The digital audio watermark embedding and detection method according to claim 1, characterized in that, The watermark information in step S1 is a 64-bit watermark information containing 16-bit time information, 8-bit year information, and 40-bit device code information.
3. The digital audio watermark embedding and detection method according to claim 2, characterized in that, The time information is the number of minutes obtained by subtracting the watermark time from 0:00 on January 1st of the current year, dividing by 15 and rounding down; the year information is the difference between the current watermark time and 1970; the device code information is a hexadecimal device code.
4. The digital audio watermark embedding and detection method according to claim 1, characterized in that, The operation of performing Discrete Cosine Transform (DCT) and Singular Value Decomposition (SVD) on the latter half of the low-frequency wavelet coefficients in step S2, and embedding 64-bit watermark information, specifically includes the following steps: S206: Perform discrete cosine transform on the second half {c(i)|i∈[L+1,2L]} and select the 3000-4500Hz segment that is not sensitive to human hearing; S207: Divide the 3000-4500Hz range into segments with a watermark information bit depth of 64, and perform singular value decomposition on each segment; S208: Take the first two singular values S1 and S2, and calculate the coefficients. When D has the same parity as the current watermark information bit w(i) S1 = S2D / 2; When D has a different parity than the current watermark information bit w(i) S1 = S2(D+1) / 2; S209: After embedding the watermark information, perform inverse SVD transformation to restore it; S210: Combine the 3000-4500Hz segment after embedding the watermark information with the unmodified DCT-transformed audio segment, and perform inverse DCT transformation to obtain {c'(i)|i∈[L+1,2L]}; S211: Perform a second-order wavelet decomposition inverse transform IDWT on the merged {c'(i)|i∈[1,L]} obtained in step S205 and {c'(i)|i∈[L+1,2L]} obtained in step S210 to complete the processing of the current audio frame.
5. The digital audio watermark embedding and detection method according to claim 4, characterized in that, The synchronization code in step S203 is a quasi-m sequence of length 126, which is formed by concatenating two m sequences of length 63 end to end.
6. The digital audio watermark embedding and detection method according to claim 1, characterized in that, Step S3 specifically includes the following steps: S301: Sliding window capture, audio A after being attacked. T ={a T (i)|i∈[1,L a If the input length of ]} is greater than 4L, the input audio will be truncated using a sliding window with a length of 4L; S302: For audio A in the current sliding window T ={a T (i)|i∈[1,4L]} is subjected to second-order wavelet decomposition, and the low-frequency wavelet coefficients {c T (i)|i∈[1,L]}; S303: {c T (i)|i∈[1,L]} are divided into equal lengths L b Segment, of which L b The number of bits in the synchronization code, with each segment having a length of L. B =floor(L / L) b ); then {c T (i)|i∈[1,L B The data is divided into three equal segments. The energy of each segment is calculated and sorted from largest to smallest to obtain E. T max E T mid and E T min ; S304: Determine the synchronization code b according to the following formula. T (i): S305: Solve for b T Convolve with the embedded synchronization code b. If the convolution value is less than the set threshold, it is considered that there is no synchronization code in the current window, and the sliding window continues to slide forward, repeating steps S302-S305; if the convolution value is greater than the set threshold, it is considered that the starting position of the current sliding window is the watermark embedding position, and subsequent input audio is processed into frames according to the length of 8L, starting from this point. S306: Audio A framed after acknowledging the synchronization code. T ={a T (i)|i∈[1,8L]} For the first half of the segment, repeat steps S302-S305 to confirm whether a synchronization code exists; S307: Audio A framed after acknowledging the synchronization code. T ={a T (i)|i∈[1,8L]} is subjected to second-order wavelet decomposition DWT, and the low-frequency wavelet coefficients {c T (i)|i∈[1,L]}, then perform DCT transformation, and take the 3000-4500Hz segment, divide it again according to the watermark information bit length of 64, perform SVD decomposition on each segment, take the first two singular values S1 and S2, and calculate the coefficients. When D is odd, the current watermark information bit is 1; when D is even, the current watermark information bit is 0.
Citation Information
Patent Citations
Method and apparatus for transmitting an audio stream having additional payload in a hidden sub-channel
CA2444151A1
Digital watermark imbedding and detecting method and device
CN101482965A