Audio watermark embedding and extraction methods based on discrete cosine transform and related products

The audio watermark embedding method based on DCT transform solves the problem of difficulty in balancing robustness and imperceptibility in audio signals, achieves efficient watermark embedding and extraction, and reduces complexity and bit error rate.

CN114582358BActive Publication Date: 2024-10-15SUIRUI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210142677.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-16
Publication Date
2024-10-15
Estimated Expiration
2042-02-16

AI Technical Summary

Technical Problem

It is difficult for existing digital audio watermarking algorithms to balance robustness and imperceptibility. Especially when watermarks are embedded in audio signals, there is a conflict between robustness and imperceptibility.

Method used

A blind watermark embedding method based on discrete cosine transform (DCT) is adopted. By dividing the original audio signal into frames and performing DCT transformation, the DCT coefficients within the selected frequency band range are changed or maintained to embed the watermark bits, and the linear regression method is used. Extract watermark bits.

Benefits of technology

It achieves watermark embedding and extraction that takes into account robustness and imperceptibility in audio signals, reduces complexity and overhead, improves extraction accuracy and reduces bit error rates, and can achieve effective extraction of blind watermarks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114582358B_ABST
    Figure CN114582358B_ABST
Patent Text Reader

Abstract

The present application relates to an audio watermark embedding and extraction method based on discrete cosine transform and related products. The watermark embedding method includes: dividing the original audio signal into multiple frame signals; performing DCT transformation on each frame signal to obtain the first DCT coefficient within the full frequency band of each frame signal; according to the watermark bit corresponding to each frame signal, obtaining the second DCT coefficient from the first DCT coefficient within the selected frequency band of each frame signal to embed the watermark bit corresponding to each frame signal into each frame signal; performing DCT inverse transformation on each frame signal with embedded watermark bit; combining all frame signals after the DCT inverse transformation to form an audio signal with watermark. The watermark embedding method of the present application takes into account the robustness and imperceptibility of the watermark, is relatively easy to implement, and has low complexity and overhead.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application generally relates to the field of digital watermark technology, and specifically relates to an audio watermark embedding method based on discrete cosine transform, an audio watermark extraction method, a computer-readable storage medium and an electronic device. Background Art

[0002] Digital watermarking is a well-known copyright protection technology. It embeds a digital signature (watermark) into digital products such as images, videos, and audio, making it difficult for people to distinguish between the digital products with watermarks and the original products. However, through special detection methods, the added information can be extracted to prove the copyright of the digital products. The characteristics of digital watermarking include: (1) Robustness, which means that the digital watermark can still be detected and extracted after some changes (such as noise, filtering, compression, etc.) to the carrier digital product (i.e., the carrier of the digital watermark, including images, videos, and audio, etc.). (2) Imperceptibility, after a series of hiding, the carrier digital product has no obvious degradation, and the hidden data is imperceptible to the auditory or visual sense.

[0003] According to the process of digital watermark detection, digital watermarks can be divided into blind watermarks and non-blind watermarks. Blind watermarks do not require the original data and watermarks when extracting the watermark, while non-blind watermarks require the use of one or both of the original data and the watermark when extracting.

[0004] Since the human auditory system is more sensitive to sound changes than the human visual system is to image changes, it is difficult to embed a watermark in an audio signal. Digital audio watermarking algorithms are mainly divided into two categories: time domain method and transform domain method. The time domain method is a method of directly superimposing watermark information in the signal space. The transform domain method uses a mathematical transformation method to map a digital signal in one domain to a digital signal in another domain, then add a watermark, and then inversely transform it to a digital signal in the original domain, such as discrete Fourier transform (DFT transform), discrete cosine transform (DCT transform) and discrete wavelet transform (DWT transform).

[0005] For DCT transformation, the important information of digital audio signals is concentrated in the front part of DCT coefficients (low and medium frequency parts), while the back part of DCT coefficients (medium and high frequency parts) contains only a small amount of audio information.

[0006] The robustness and imperceptibility of digital audio watermarks are a pair of contradictory characteristics. The purpose of this application is to provide a blind watermark algorithm based on DCT transform that takes into account both robustness and imperceptibility. Summary of the invention

[0007] The present application provides an audio watermark embedding method based on discrete cosine transform, an audio watermark extraction method, a computer-readable storage medium and an electronic device to take into account both robustness and imperceptibility.

[0008] According to the first aspect of the present application, there is provided an audio watermark embedding method based on discrete cosine transform, comprising: dividing an original audio signal into multiple frame signals; performing DCT transform on each frame signal to obtain a first DCT coefficient within the full frequency band of each frame signal; according to the watermark bit corresponding to each frame signal, obtaining a second DCT coefficient from the first DCT coefficient within the selected frequency band of each frame signal, thereby embedding the watermark bit corresponding to each frame signal into each frame signal; performing inverse DCT transform on each frame signal in which the watermark bit is embedded; and combining all frame signals after inverse DCT transform to form an audio signal with a watermark.

[0009] In one embodiment, obtaining a second DCT coefficient from a first DCT coefficient within a selected frequency band of each frame signal according to the watermark bit corresponding to each frame signal comprises: in response to the watermark bit being a first value, changing the first DCT coefficient within the selected frequency band to obtain a second DCT coefficient, wherein the second DCT coefficient is determined according to an average level of the first DCT coefficient within the full frequency band of the corresponding frame signal; and in response to the watermark bit being a second value, maintaining the first DCT coefficient within the selected frequency band to obtain the second DCT coefficient.

[0010] In one embodiment, the second DCT coefficient is determined based on the average level of the first DCT coefficient within the full frequency band of the corresponding frame signal, including one of the following methods: the second DCT coefficient is equal to the average level of the first DCT coefficient within the full frequency band of the corresponding frame signal; the second DCT coefficient is equal to the median of the first DCT coefficient within the full frequency band of the corresponding frame signal; and the second DCT coefficient is equal to the average value of the sum of the K largest first DCT coefficients and the K smallest first DCT coefficients within the full frequency band of the corresponding frame signal, where K≥1.

[0011] In one embodiment, the selected frequency band is from 1 KHz to 2 KHz.

[0012] According to the first aspect of the present application, the present application also provides an audio watermark extraction method, comprising: dividing a watermarked audio signal into multiple frame signals; performing DCT transformation on each frame signal to obtain the DCT coefficient within the full frequency band of each frame signal; calculating the third DCT coefficient and its predicted value within the selected frequency band of each frame signal according to a linear regression method; comparing the third DCT coefficient and its predicted value to obtain a comparison result, and determining the watermark bit position embedded in the corresponding frame signal according to the comparison result; and obtaining the watermark embedded in the watermarked audio signal according to the watermark bit positions embedded in all frame signals.

[0013] In one embodiment, determining the watermark bit embedded in the corresponding frame signal according to the comparison result includes: in response to the difference between the third DCT coefficient and its predicted value being within a set range, the watermark bit embedded in the corresponding frame signal is a first value; in response to the difference between the third DCT coefficient and its predicted value being not within the set range, the watermark bit embedded in the corresponding frame signal is a second value.

[0014] In one embodiment, the selected frequency band is from 1 KHz to 2 KHz.

[0015] In one embodiment, comparing the third DCT coefficient and its predicted value to obtain a comparison result includes: calculating a standard deviation of the third DCT coefficient and its predicted value.

[0016] According to the second aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium is used to store a computer program. When the computer program is executed, the watermark embedding method or watermark extraction method according to any one of the first aspect of the present application is implemented.

[0017] According to the third aspect of the present application, an electronic device is provided, characterized in that it includes a processor and a memory, the memory stores a computer program, and when the computer program is executed, it implements the watermark embedding method or watermark extraction method according to any one of the first aspect of the present application.

[0018] The watermark embedding method of the present application only changes the DCT coefficients within the selected frequency band, taking into account the robustness and imperceptibility of the watermark, and the way of changing the DCT coefficients is relatively easy to implement, with low complexity and overhead.

[0019] The watermark extraction method of the present application corresponds to the watermark embedding method of the present application. Since only the linear regression method is used, the complexity is low and it is easy to implement. Moreover, according to the test results, the extraction method has high accuracy and low bit error rate, and can achieve blind solution of watermark extraction. The watermark extraction method provided by the present application is a blind watermark extraction method. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] By reading the detailed description below with reference to the accompanying drawings, the above and other purposes, features and advantages of the exemplary embodiments of the present application will become easy to understand. In the accompanying drawings, several embodiments of the present application are shown in an exemplary and non-limiting manner, and the same or corresponding reference numerals represent the same or corresponding parts, wherein:

[0021] Figure 1 is a flow chart of an audio watermark embedding method based on DCT transform according to an embodiment of the present application;

[0022] Figure 2 is a schematic diagram of a mapping relationship between a watermark and an original audio signal according to an embodiment of the present application;

[0023] Figure 3 is a schematic diagram of another mapping relationship between a watermark and an original audio signal according to an embodiment of the present application;

[0024] Figure 4 is a schematic diagram of an audio watermark embedding method based on DCT transformation according to an embodiment of the present application;

[0025] Figure 5 is a flow chart of an audio watermark extraction method according to an embodiment of the present application;

[0026] Figure 6 is a schematic diagram of an audio watermark extraction method according to an embodiment of the present application; and

[0027] Figure 7 It is a schematic diagram of the structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0028] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.

[0029] It should be understood that when the terms "first", "second", etc. are used in the claims, specification and drawings of the present application, they are only used to distinguish different objects, rather than to describe a specific order. The terms "include" and "comprise" used in the specification and claims of the present application indicate the presence of the described features, wholes, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or their collections.

[0030] According to the first aspect of the present application, the present application provides a watermark embedding method and a watermark extraction method. The watermark embedding method and the watermark extraction method are related. The following first introduces the watermark embedding method and then introduces the watermark extraction method.

[0031] Figure 1 The flowchart of a method for embedding an audio watermark based on DCT transformation according to an embodiment of the present application is shown. The method for embedding an audio watermark includes steps S11 to S15, which are described in detail below.

[0032] Step S11, the original audio signal is framed, that is, the original audio signal is divided into multiple frame signals, each frame signal has a fixed time length. Since the audio signal is a non-stationary process, its frequency characteristics change with time, so it cannot be analyzed and processed by the digital signal processing technology for processing stationary signals. Therefore, in step S11, the original audio signal is framed, and the original audio signal can be divided into multiple very short audio segments, and the time length of each audio segment can be 20ms-40ms. As an example, for each frame signal, 512 sampling points are obtained at a sampling frequency of 16KHz, that is, 512 sampling points are used as the length of a frame signal.

[0033] Step S12, processing each frame signal formed by framing, including: performing DCT transformation on each frame signal to obtain the first DCT coefficient within the full frequency band of each frame signal. The DCT transformation converts the time domain signal into the frequency domain to form a series of DCT coefficients, and these DCT coefficients cover the full frequency band from low frequency to high frequency.

[0034] Step S13, according to the watermark bits corresponding to each frame signal, obtain the second DCT coefficient from the first DCT coefficient within the selected frequency band of each frame signal, so as to embed the watermark bits corresponding to each frame signal into each frame signal.

[0035] The selected frequency band is a preset frequency range. Generally speaking, since compression processing (such as MP3 compression attack) will discard high-frequency components, the selected frequency band is generally a medium-low frequency band.

[0036] Furthermore, the DCT coefficients within the full frequency band are all DCT coefficients (or called DCT coefficient sequences) obtained by performing DCT transform on a frame of signal, and the DCT coefficients within the selected frequency band are part of the DCT coefficients within the full frequency band; in other words, the selected frequency band corresponds to a subframe, and the DCT coefficients of the subframe are the DCT coefficients within the selected frequency band.

[0037] For example, in response to a watermark bit corresponding to a frame signal being equal to 0, the DCT coefficients within the selected frequency band of the frame are changed; in response to a watermark bit corresponding to a frame signal being equal to 1, the DCT coefficients within the selected frequency band of the frame are maintained.

[0038] In addition, the term "first DCT coefficient" is used to distinguish it from the "second DCT coefficient" that changes when embedding the watermark bit and the "third DCT coefficient" in the watermark extraction process; it refers to different DCT coefficient sequences, rather than a certain DCT coefficient in a DCT coefficient sequence.

[0039] Step S14, performing an inverse DCT transform on each frame signal in which the watermark bits are embedded.

[0040] Step S15: combine all frame signals after the inverse DCT transformation to form an audio signal with a watermark.

[0041] The watermark embedding method of the embodiment of the present application only changes the DCT coefficients within the selected frequency band, which takes into account the robustness and imperceptibility of the watermark. In addition, the method of changing the DCT coefficients is relatively easy to implement, with low complexity and overhead.

[0042] In order to embed the watermark bit into each frame signal, corresponding rules need to be formulated. For example, each frame signal and the watermark bit have a pre-arranged mapping relationship. Specifically, Figure 2 A schematic diagram of the mapping relationship between a watermark and an original audio signal in an embodiment of the present application is shown. The watermark to be embedded is 010101; the original audio signal is framed to obtain m frames, such as frames F0, F1, F2, F3, F4, F5...Fm-1 arranged in time order. In one embodiment, if the time length of an original audio signal is T, the time length of a frame signal is t, and T cannot divide t, an audio segment with a time length less than t will be generated, and the audio segment does not need to be embedded with a watermark bit.

[0043] In this embodiment, the watermark to be embedded is continuously and cyclically embedded into the original audio signal. Figure 2 As shown, starting from the first frame F0, the first watermark bit "0" is embedded in the first frame F0; the second watermark bit "1" is embedded in the second frame F1; the third watermark bit "0" is embedded in the third frame F2; the fourth watermark bit "1" is embedded in the fourth frame F3; the fifth watermark bit "0" is embedded in the fifth frame F4; and the sixth watermark bit "1" is embedded in the sixth frame F5.

[0044] Cyclic in sequence, the first watermark bit "0" is embedded in the seventh frame F6; the second watermark bit "1" is embedded in the eighth frame F7; the third watermark bit "0" is embedded in the ninth frame F8; the fourth watermark bit "1" is embedded in the tenth frame F9; the fifth watermark bit "0" is embedded in the eleventh frame F10; the sixth watermark bit "1" is embedded in the twelfth frame F11... the first watermark bit "0" is embedded in the frame Fm-6; the second watermark bit "1" is embedded in the frame Fm-5; the third watermark bit "0" is embedded in the frame Fm-4; the fourth watermark bit "1" is embedded in the frame Fm-3; the fifth watermark bit "0" is embedded in the frame Fm-2; the sixth watermark bit "1" is embedded in the frame Fm-1. Thus, all frames are embedded with the corresponding watermark bits.

[0045] Figure 3 A schematic diagram of another mapping relationship between a watermark and an original audio signal according to an embodiment of the present application is shown, wherein the content in the dotted box represents a frame in which no watermark bits are embedded.

[0046] In this embodiment, the watermark to be embedded is embedded into the original audio signal discontinuously and cyclically. Figure 3 As shown, starting from the first frame F0, the first watermark bit "0" is embedded in the first frame F0; the second watermark bit "1" is embedded in the second frame F1; the third watermark bit "0" is embedded in the third frame F2; the fourth watermark bit "1" is embedded in the fourth frame F3; the fifth watermark bit "0" is embedded in the fifth frame F4; the sixth watermark bit "1" is embedded in the sixth frame F5; and no watermark bit is embedded in the seventh frame F6.

[0047] Cyclicly, the first watermark bit "0" is embedded in the eighth frame F7; the second watermark bit "1" is embedded in the ninth frame F8; the third watermark bit "0" is embedded in the tenth frame F9; the fourth watermark bit "1" is embedded in the eleventh frame F10; the fifth watermark bit "0" is embedded in the twelfth frame F11; the sixth watermark bit "1" is embedded in the thirteenth frame F12; the fourteenth frame F13 has no watermark bit embedded... the first watermark bit "0" is embedded in frame Fm-7; the second watermark bit "1" is embedded in frame Fm-6; the third watermark bit "0" is embedded in frame Fm-5; the fourth watermark bit "1" is embedded in frame Fm-4; the fifth watermark bit "0" is embedded in frame Fm-3; the sixth watermark bit "1" is embedded in frame Fm-2; the last frame Fm-1 has no watermark bit embedded.

[0048] In summary, the watermark bit can be embedded in each frame of the original audio signal continuously, or non-continuously, for example, several frames are separated between each complete watermark, or the watermark may not be embedded in several frames at the beginning or several frames at the end of the original audio signal. Furthermore, the watermark bit embedded in each frame can be one bit or multiple bits, such as "00" or "01". The way to embed multiple watermark bits is the same as that to embed one watermark bit.

[0049] Figure 4 A schematic diagram of an audio watermark embedding method based on DCT transformation according to an embodiment of the present application is shown.

[0050] According to step S11, the original audio signal Aud is divided into frames to obtain m frames, including: F0, F1, ..., Fj, ..., Fm-1, where j represents the sequence number of each frame.

[0051] According to step S12, DCT transformation is performed on each frame, and each frame includes a group of sampling points. Taking frame Fj as an example, after DCT transformation, the DCT coefficients obtained are C(0), C(1), C(2)...C(i)...C(N-1), i represents the sequence number of the DCT coefficient, C(0) represents the 0th DCT coefficient, and C(i) represents the i-th DCT coefficient. In this embodiment, N=512, that is, a total of 512 DCT coefficients. The formula for DCT transformation is as follows:

[0052]

[0053]

[0054] Where y(x) represents the original audio signal corresponding to frame Fj. Figure 4 As shown, the DCT coefficient of frame Fj (i.e., the DCT coefficient within the entire frequency band) is represented as C, C=C(0), C(1), C(2)...C(i)...C(N-1), which can be expressed as DCT(Fj)=C.

[0055] The sensitivity of the human ear varies at different frequencies, and is more sensitive in the range of 1KHz to 4kHz. In addition, since the high-frequency components are removed after compression, it is preferred to embed the watermark in the intermediate frequency. In order to balance imperceptibility and robustness, the selected frequency band in this embodiment is 1KHz-2KHz, that is, the watermark is embedded in this frequency band, thereby achieving stronger robustness.

[0056] like Figure 4As shown, C=C(0), C(1), C(2)...C(i)...C(N-1) indicates the DCT coefficients in the full frequency band of frame Fj (referred to as the first DCT coefficients in this article), and the corresponding frequency range is 0KHz to 8KHz. The DCT coefficients in the selected frequency band (1KHz-2KHz) of frame Fj are C(64)-C(127). According to step S13, C(64)-C(127) need to be processed to embed watermark bits. Among them, the selected frequency band occupies one eighth of the full frequency band. According to 512 / 8=64, it is concluded that the selected frequency band occupies 64 points, and then it can be determined that the DCT coefficients in the selected frequency band are C(64)-C(127), that is, the 65th point to the 128th point.

[0057] The method of processing C(64)-C(127) includes: changing or maintaining the DCT coefficients within the selected frequency band of the frame signal according to the watermark bits corresponding to the frame signal. Figure 2 and Figure 3 The mapping relationship shown can determine the watermark bit corresponding to the frame Fj, and then replace the DCT coefficients C(64)-C(127) in the selected frequency band of the frame Fj with C(64)′-C(127)′. In this article, C(64)′-C(127)′ is called the second DCT coefficient.

[0058] Specifically, if the watermark bit corresponding to the frame Fj is 0 (in this case, 0 is called the first value), the DCT coefficient within the selected frequency band is changed to obtain C(64)′-C(127)′. If the watermark bit corresponding to the frame Fj is 1 (in this case, 1 is called the second value), the DCT coefficient within the selected frequency band is maintained, that is, C(64)′=C(64), C(65)′=C(65), C(127)′=C(127). It can be expressed as:

[0059]

[0060] Where i = 64-127. wl represents the watermark bit corresponding to frame Fj. Where each coefficient in the DCT coefficients C(64)-C(127) is changed, for example, C(64), C(65), C(66)...C(127) are replaced by C(64)', C(65)', C(66)'...C(127)'.

[0061] Of course, it can also be set as follows: if the watermark bit corresponding to the frame Fj is 1 (in this case, 1 is called the first value), the DCT coefficients within the selected frequency band are changed. If the watermark bit corresponding to the frame Fj is 0 (in this case, 0 is called the second value), the DCT coefficients within the selected frequency band are maintained. It can be expressed as:

[0062]

[0063] Further, Aj is determined based on the average level of DCT coefficients in the full frequency band of frame Fj. Specifically, there are multiple ways to determine Aj, one of which can be expressed as:

[0064]

[0065] Among them, Aj is equal to the average value of the DCT coefficients in the full frequency band of frame Fj, that is, Aj is equal to the average value of the sum of C(0), C(1), C(2)...C(i)...C(N-1). Therefore, the second DCT coefficient C(64)′=C(65)′=C(66)′=…=C(127)′=Aj. In other words, all the DCT coefficients in the selected frequency band are replaced by the average value Aj of the DCT coefficients in the full frequency band, and the average value Aj of the DCT coefficients in the full frequency band is a very small value (this is because the DCT coefficients in the high frequency part are very small), so the second DCT coefficient C(64)′-C(127)′ is a very small value.

[0066] Another way is: Aj is equal to the median of the DCT coefficients in the full frequency band of frame Fj. In this embodiment, there are 512 DCT coefficients in the full frequency band of frame Fj. Assuming that these 512 coefficients are arranged in descending order (which may not be the case in practice), the median of the DCT coefficients in the full frequency band of frame Fj is equal to [C(255)+C(256)] / 2. Similarly, the result of [C(255)+C(256)] / 2 is also a very small value.

[0067] Another way is: Aj is equal to the average value of the sum of the K largest DCT coefficients and the K smallest DCT coefficients in the full frequency band of the corresponding frame signal, where K≥1. In this embodiment, there are 512 DCT coefficients in the full frequency band of frame Fj. Assuming that these 512 coefficients are arranged in descending order (which may not be the case in practice), for example: when K=1, Aj=[C(0)+C(511)] / 2, when K=2, Aj=[C(0)+C(1)+C(510)+C(511)] / 4. Similarly, the Aj obtained based on this is also a very small value.

[0068] like Figure 4 As shown, by embedding watermark bits, the DCT coefficients in the full frequency band of the Fj frame can be expressed as C′, C′=C(0), C(1)...C(63), C(64)′, C(65)′...C(127)′, C(128)...C(511).

[0069] According to step S14, the DCT coefficients C′ in the full frequency band of the Fj frame are subjected to an inverse DCT transform (IDCT) to obtain the watermarked audio signal Fj′ corresponding to the Fj frame, which is expressed as: IDCT(C′)=Fj′.

[0070] The operations from step S12 to step S14 are performed for each frame to obtain all watermarked audio signal frames F0′, F1′…Fj′…Fm-1′. According to step S15, these signals are combined to obtain the watermarked audio signal Aud′ corresponding to the original audio signal Aud. The watermarked audio signal Aud′ is the output result of the watermark embedding method of the embodiment of the present application.

[0071] The watermark embedding method of the embodiment of the present application is described in detail above. The watermark extraction method of the embodiment of the present application is described in detail below. Figure 5 A flow chart of an audio watermark extraction method according to an embodiment of the present application is shown, including steps S21 to S25. Figure 6 A schematic diagram of an audio watermark extraction method according to an embodiment of the present application is shown, and is described in detail below with reference to the accompanying drawings.

[0072] Step S21, dividing the watermarked audio signal into multiple frame signals.

[0073] Step S22: Perform DCT transformation on each frame signal to obtain DCT coefficients within the full frequency band of each frame signal.

[0074] Step S23, calculating the third DCT coefficient and its predicted value within the selected frequency band of each frame signal according to the linear regression method.

[0075] Step S24, comparing the third DCT coefficient and its predicted value to obtain a comparison result; and determining the watermark bit embedded in the corresponding frame signal according to the comparison result.

[0076] Step S25: obtaining the watermark embedded in the watermarked audio signal according to the watermark bits embedded in all frame signals.

[0077] The watermark extraction method of the embodiment of the present application corresponds to the watermark embedding method of the present application. Since only the linear regression method is used, the complexity is low and it is easy to implement. The watermark extraction method provided in the embodiment of the present application is a blind watermark extraction method.

[0078] The framing method in step S21 should be consistent with the framing method in step S12, that is, the time length, sampling frequency, and number of sampling points of each frame are the same as those in step S12. Figure 6As shown, according to the framing method in step S21, the watermarked audio signal Aud' is framed to obtain frames F0', F1'...Fj'...Fm-1'. Step S21 is consistent with the framing method in step S12 to ensure that the obtained frames F0', F1'...Fj'...Fm-1' are consistent with the frame division method in step S12. Figure 4 The frames F0, F1...Fj...Fm-1 of the original audio signal shown in FIG.

[0079] In step S22, DCT transformation is performed on each frame. Frame Fj' is used as an example for explanation. DCT transformation is performed on frame Fj' to obtain DCT coefficients within the full frequency band of frame Fj'. In this embodiment, the DCT coefficients within the full frequency band of Fj' also include 512 points.

[0080] In step S23, the third DCT coefficient and its predicted value within the selected frequency band of Fj′ are calculated according to the linear regression method. Figure 4 Similarly, the DCT coefficients within the selected frequency band of Fj' also include the 65th to 128th points among the above 512 points. The selected frequency band is also 1KHz-2KHz, which is the same as the selected frequency band of the watermark embedding method.

[0081] Linear regression is a method for modeling the relationship between a scalar dependent variable Y (predicted value) and one or more explanatory variables X (or independent variables). The case of one explanatory variable is called simple linear regression. In general, the goal of linear regression is to find the best straight line to predict Y from X. Therefore, according to the linear regression method, the third DCT coefficient X within the selected frequency band of frame Fj′ (for example, the third DCT coefficient adopts the average value of the DCT coefficients within the selected frequency band of frame Fj′) and the predicted value of the third DCT coefficient within the selected frequency band of frame Fj′ is Y, and then the predicted value rj′ of the DCT coefficient within the selected frequency band of Fj′ can be calculated.

[0082] As an example, Figure 6 As shown, the third DCT coefficient within the selected frequency band of Fj′ participating in the comparison in step S24 can adopt the average value yj′, and then calculate the predicted value rj′ of the average value according to the linear regression method, which can be expressed as:

[0083] yj′=mean value {DCT 1-2KHZ (Fj′)}, rj′=prediction value {DCT 1-2KHZ (Fj′)}.

[0084] In other embodiments, the third DCT coefficient within the selected frequency band of Fj′ participating in the comparison in step S24 may also adopt other types of values, such as the median of the DCT coefficients within the selected frequency band of Fj′, or the average of the K largest DCT coefficients and the K smallest DCT coefficients, etc., which reflects the average level of the DCT coefficients within the selected frequency band of Fj′, K≥1.

[0085] In step S24, the watermark bit embedded in the corresponding frame signal is determined according to the comparison result, including: in response to the difference between the third DCT coefficient and its predicted value being within a set range, the watermark bit embedded in the corresponding frame signal is a first value; in response to the difference between the third DCT coefficient and its predicted value being not within the set range, the watermark bit embedded in the corresponding frame signal is a second value.

[0086] If the difference between the third DCT coefficient and its predicted value is small, it means that the original audio signal frame Fj corresponding to the frame Fj′ is embedded with the first value in step S13. This is because, when embedding the first value, the DCT coefficients within the selected frequency band of the original audio signal frame Fj are uniformly changed to a very small value; and according to the property of linear regression, the predicted value of the third DCT coefficient within the selected frequency band of the frame Fj′ also tends to a very small value, so the above conclusion can be obtained. On the contrary, if the difference between the third DCT coefficient and its predicted value is large, it means that the original audio signal frame Fj corresponding to the frame Fj′ is embedded with the second value in step S13.

[0087] For example, if the first value is 0 and the second value is 1, the determination method of the watermark bit wj′ embedded in the frame Fj′ is expressed as:

[0088]

[0089] Wherein, f is a coefficient factor, which can be 0.05, σ is a standard deviation, and || represents an absolute value. That is, in this embodiment, the standard deviation of the average value and its predicted value is used to measure the difference between the average value and its predicted value. In other embodiments, other mathematical methods can also be used to measure the difference between the average value and its predicted value, such as variance, division, etc.

[0090] In step S25, by performing steps S22 to S24 on each frame of signal, the watermark bits embedded in each frame of signal can be obtained. Figure 2 and Figure 3 The complete watermark can be extracted.

[0091] After testing, it is found that the watermark extraction method of the present application has high extraction accuracy and low bit error rate, and can achieve blind solution of watermark extraction.

[0092] According to the second aspect of the present application, the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed, it can implement the watermark embedding method described in any embodiment of the first aspect of the present application, or implement the watermark extraction method described in any embodiment of the first aspect of the present application. Since the watermark embedding method and the watermark extraction method have been described in detail above, they will not be repeated below.

[0093] Figure 7 It is a schematic diagram of the structure of an electronic device according to an embodiment of the present application. According to the third aspect of the present invention, the present invention also provides an electronic device, including a processor, a memory, a communication interface and a communication bus, the processor, the memory and the communication interface complete mutual interaction through the communication bus, and the processor executes the watermark embedding method described in any embodiment of the first aspect of the present application, or implements the watermark extraction method described in any embodiment of the first aspect of the present application. Since the watermark embedding method and the watermark extraction method have been described in detail above, they will not be repeated below.

[0094] In the present application, the electronic device may be any type of electronic device such as a PC, an industrial computer or a smart terminal.

[0095] In the present application, the aforementioned readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, apparatus or device. For example, a computer-readable storage medium may be any suitable magnetic storage medium or magneto-optical storage medium, such as a resistive random access memory RRAM (Resistive Random Access Memory), a dynamic random access memory DRAM (Dynamic Random Access Memory), a static random access memory SRAM (Static Random-Access Memory), an enhanced dynamic random access memory EDRAM (Enhanced Dynamic Random Access Memory), a high-bandwidth memory HBM (High-Bandwidth Memory), a hybrid memory cube HMC (Hybrid Memory Cube), etc., or any other medium that can be used to store the required information and can be accessed by an application, a module, or both. Any such computer storage medium may be part of a device or accessible or connectable to a device. Any application or module described in this application may be implemented using computer-readable / executable instructions that may be stored or otherwise maintained by such a computer-readable medium.

[0096] According to the above description of this specification, those skilled in the art may also understand that the terms used below, such as "upper", "lower" and other terms indicating orientation or positional relationship, are based on the orientation or positional relationship shown in the drawings of this specification, and are only for the purpose of facilitating the explanation of the scheme of the present application and simplifying the description, rather than explicitly or implicitly indicating that the device or element involved must have the specific orientation, be constructed and operated in a specific orientation. Therefore, the above-mentioned orientation or positional relationship terms cannot be understood or interpreted as limitations on the scheme of the present application.

[0097] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0098] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be construed as limiting the scope of the patent application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent application shall be subject to the attached claims.

Claims

1. An audio watermark embedding method based on discrete cosine transform, characterized in that: include: Divide the original audio signal into multiple frame signals; Performing DCT transformation on each frame signal to obtain the first DCT coefficient within the full frequency band of each frame signal; According to the watermark bit corresponding to each frame signal, a second DCT coefficient is obtained from the first DCT coefficient within the selected frequency band of each frame signal, so as to embed the watermark bit corresponding to each frame signal into each frame signal; Perform inverse DCT transform on each frame signal with embedded watermark bits; Combine all frame signals after inverse DCT transformation to form an audio signal with a watermark; Obtaining a second DCT coefficient from a first DCT coefficient within a selected frequency band of each frame signal according to the watermark bit corresponding to each frame signal, comprising: In response to the watermark bit being a first value, changing the first DCT coefficient within the selected frequency band to obtain the second DCT coefficient, wherein the second DCT coefficient is determined according to an average level of the first DCT coefficient within the full frequency band of the corresponding frame signal; In response to the watermark bit being a second value, retaining the first DCT coefficient within the selected frequency band to obtain the second DCT coefficient; The second DCT coefficient is determined according to the average level of the first DCT coefficient in the full frequency band of the corresponding frame signal, including one of the following methods: The second DCT coefficient is equal to the average value of the first DCT coefficient in the full frequency band of the corresponding frame signal; The second DCT coefficient is equal to the median of the first DCT coefficient within the full frequency band of the corresponding frame signal; and The second DCT coefficient is equal to an average value of the sum of K largest first DCT coefficients and K smallest first DCT coefficients within the full frequency band of the corresponding frame signal, where K≥1.

2. The audio watermark embedding method according to claim 1, characterized in that: The selected frequency band is from 1 KHz to 2 KHz.

3. An audio watermark extraction method, characterized in that: include: Dividing the watermarked audio signal into multiple frame signals; Perform DCT transformation on each frame signal to obtain DCT coefficients within the full frequency band of each frame signal; Calculate the third DCT coefficient and its predicted value within the selected frequency band of each frame signal according to the linear regression method; Comparing the third DCT coefficient and its predicted value to obtain a comparison result, and determining the watermark bit embedded in the corresponding frame signal according to the comparison result; as well as Obtaining the watermark embedded in the watermarked audio signal according to the watermark bits embedded in all frame signals; Determining the watermark bit embedded in the corresponding frame signal according to the comparison result includes: In response to the difference between the third DCT coefficient and the predicted value thereof being within a set range, the watermark bit embedded in the corresponding frame signal is a first value; In response to the difference between the third DCT coefficient and its predicted value not being within a set range, the watermark bit embedded in the corresponding frame signal is a second value.

4. The audio watermark extraction method according to claim 3, characterized in that: The selected frequency band is from 1 KHz to 2 KHz.

5. The audio watermark extraction method according to any one of claims 3 to 4, characterized in that: Comparing the third DCT coefficient and its predicted value to obtain a comparison result, comprising: The standard deviation of the third DCT coefficient and its predicted value is calculated.

6. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store a computer program, and when the computer program is executed, the watermark embedding method or watermark extraction method according to any one of claims 1 to 5 is implemented.

7. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed, the watermark embedding method or the watermark extraction method as claimed in any one of claims 1 to 5 is implemented.