Method and apparatus for training reversible neural network for audio watermarking processing

By using a reversible neural network training method and optimizing audio watermarking technology with a composite loss function and a weighted attack strategy, the problem of balancing robustness and audio quality is solved, and more efficient audio watermarking processing is achieved.

CN120745706BActive Publication Date: 2026-02-13CHINA TELECOM ARTIFICIAL INTELLIGENCE TECHNOLOGY (BEIJING) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202511261713.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-04
Publication Date
2026-02-13
Estimated Expiration
2045-09-04

AI Technical Summary

Technical Problem

Existing deep neural network-based audio watermarking technologies struggle to balance robustness and audio quality with watermark imperceptibility, resulting in insufficient coding capabilities and vulnerability to attacks.

Method used

A reversible neural network training method is adopted. By acquiring sample datasets, adding watermark information and conducting simulated attacks, the network parameters are optimized using a composite loss function and a weighted attack strategy to ensure a balance between audio quality and the imperceptibility of the watermark.

Benefits of technology

It improves the robustness and imperceptibility of audio watermarks, maintains audio quality, and enhances encoding capacity and watermark generation quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120745706B_ABST
    Figure CN120745706B_ABST
Patent Text Reader

Abstract

The application discloses a method and device for training a reversible neural network for audio watermark processing. The method comprises: obtaining a sample data set; repeatedly performing the following process until the target loss value is less than the preset threshold, stopping iteration, and obtaining a target reversible neural network: adding watermark information to each sample audio data in the target training set according to the encoder of the initial reversible neural network to obtain a plurality of first sample audio data embedded with watermark information; performing simulated attacks on the plurality of first sample audio data according to a weighted attack strategy to obtain a plurality of second sample audio data; decoding the plurality of second sample audio data according to the decoder of the initial reversible neural network to obtain restored watermark information of each second sample audio data; determining the target loss value according to the loss value corresponding to all sample audio data, and adjusting the network parameters of the initial reversible neural network according to the target loss value.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of audio signal processing, in particular, to a training method and device of a reversible neural network for audio watermark processing. BACKGROUND

[0002] With the rapid development of speech synthesis technology, the naturalness and similarity of generated speech are continuously improving, and people's concerns about the possible misuse of synthesized speech are also increasing. Audio watermarking technology can be used to alleviate the security risks brought by speech synthesis and plays an increasingly important role in maintaining the integrity of audio recordings and ensuring the compliance use of synthesized speech in various scenarios. By encoding a unique digital signature in the audio signal, audio watermarking can help verify the authenticity of the speech and detect any tampering behavior.

[0003] For a long time, audio watermarking technology has been mainly dominated by methods such as Least Significant Bit (LSB), Echo Hiding, Spread Spectrum, Patchwork, and Quantization Index Modulation (QIM). These methods highly rely on expert knowledge and experience rules, and have poor encoding ability, and can only resist limited attacks. In recent years, the application of Deep Neural Network (DNN) in audio watermarking has shown good prospects. However, the audio watermarking technology based on DNN is still in its early stages, and there are problems such as low encoding capacity, weak robustness, and inability to maintain the balance between audio quality and watermark imperceptibility.

[0004] In view of the above problems, no effective solution has been proposed so far. SUMMARY

[0005] The embodiments of the present application provide a training method and device of a reversible neural network for audio watermark processing, to at least solve the technical problems of weak robustness, inability to maintain the balance between audio quality and watermark imperceptibility during audio watermark processing.

[0006] According to an aspect of some embodiments of the present application, a method for training a reversible neural network for audio watermark processing is provided, including: obtaining a sample data set, wherein the sample data set includes sample audio data; repeatedly performing the following processes until a target loss value is less than a preset threshold, stopping iteration, and obtaining a target reversible neural network: randomly selecting a preset number of sample audio data from the sample data set to determine a target training set; adding watermark information to each sample audio data in the target training set according to an encoder of an initial reversible neural network to obtain a plurality of first sample audio data embedded with watermark information, wherein each first sample audio data corresponds to one watermark information; performing simulated attacks on the plurality of first sample audio data according to a weighted attack strategy to obtain a plurality of second sample audio data, wherein the weighted attack strategy is used to indicate an attack type when each first sample audio data is simulated and an attack weight corresponding to each attack type; decoding the plurality of second sample audio data according to a decoder of the initial reversible neural network to obtain restored watermark information of each second sample audio data; calculating a loss value of a composite loss function corresponding to each sample audio data in the target training set, determining a target loss value according to the loss values corresponding to all sample audio data, and adjusting network parameters of the initial reversible neural network according to the target loss value.

[0007] According to some embodiments of the present application, the composite loss function includes a first loss, a second loss, a third loss, and a fourth loss, the first loss is used to quantify the difference between the watermark information corresponding to the sample audio data in the target training set and the restored watermark information through the initial reversible neural network, the second loss is used to quantify the difference between the sample audio data in the target training set before and after adding watermark information, the third loss is used to control the auditory quality of the sample audio data after adding watermark information, and the fourth loss is used to train the performance of the encoder of the initial reversible neural network in the process of adding watermark information.

[0008] According to some embodiments of the present application, watermark information is added to any one sample audio data in the target training set to obtain first sample audio data embedded with watermark information in the following manner: for a sample audio data spectrum corresponding to a third sample audio data in the target training set and a watermark information feature map corresponding to watermark information of the third sample audio data, encoding processing is started through a first reversible block of the encoder and is performed until a last reversible block is traversed, and first sample audio data embedded with watermark information corresponding to the third sample audio data is obtained, wherein the third sample audio data is any one sample audio data in the target training set, and the watermark information is a random binary vector of a preset length.

[0009] According to some embodiments of the present application, before the simulating attacks on the plurality of first sample audio data according to the weighted attack strategy, the method further comprises: performing offset processing on the plurality of first sample audio data according to a preset offset rule, wherein the preset offset rule is used to indicate an offset degree of the offset processing on the first sample audio data.

[0010] According to some embodiments of the present application, the offset processing on the plurality of first sample audio data according to the preset offset rule comprises: for each first sample audio data: determining an audio truncation segment and an audio splicing segment according to the preset offset rule, wherein the audio truncation segment is a sample audio data segment of the first sample audio data for audio truncation, the audio splicing segment is a sample audio data segment of the first sample audio data for filling the audio truncation segment, and the audio truncation segment and the audio splicing segment have the same length; truncating the audio truncation segment from the first sample audio data to obtain a truncated first sample audio data; and splicing the truncated first sample audio data and the audio splicing segment to obtain a new first sample audio data.

[0011] According to some embodiments of the present application, the simulating attacks on the plurality of first sample audio data according to the weighted attack strategy to obtain a plurality of second sample audio data comprises: for each new first sample audio data: determining a target attack type for the new first sample audio data from a preset attack type set according to the weight of each attack type in the preset attack type set indicated in the weighted attack strategy, wherein the initial weights of all attack types in the preset attack type set are the same, and the initial weight of each attack type is updated according to the corresponding bit error rate after each simulation attack; and simulating an attack on the new first sample audio data by using an attack simulator corresponding to the target attack type to obtain a second sample audio data, wherein the attack simulator is used to simulate the interference on the new first sample audio data in the transmission process according to the target attack type.

[0012] According to some embodiments of the present application, the decoding of the plurality of second sample audio data according to the decoder of the initial reversible neural network to obtain the restored watermark information of each second sample audio data comprises: for each second sample audio data: starting from the last reversible block of the decoder to perform decoding until the first reversible block is traversed to obtain the restored watermark information feature map of the second sample audio data; and performing inverse short-time Fourier transform on the restored watermark information feature map to obtain the restored watermark information.

[0013] According to some embodiments of the present application, the loss value of the composite loss function corresponding to each sample audio data in the target training set is calculated, comprising: for each sample audio data in the target training set: determining the loss value corresponding to the first loss, the loss value corresponding to the second loss, the loss value corresponding to the third loss, and the loss value corresponding to the fourth loss; determining the loss value of the composite loss function according to the loss value corresponding to the first loss, the loss value corresponding to the second loss, the loss value corresponding to the third loss, and the loss value corresponding to the fourth loss, and the first hyperparameter corresponding to the first loss, the second hyperparameter corresponding to the second loss, the third hyperparameter corresponding to the third loss, and the fourth hyperparameter corresponding to the fourth loss.

[0014] According to some embodiments of the present application, the loss value corresponding to the first loss, the loss value corresponding to the second loss, and the loss value corresponding to the fourth loss are determined by: determining the loss value corresponding to the first loss according to the watermark information corresponding to the sample audio data and the restored watermark information corresponding to the sample audio data; determining the loss value corresponding to the second loss according to the sample audio data and the first sample audio data corresponding to the sample audio data; and determining the loss value corresponding to the fourth loss according to at least the discriminator, wherein the discriminator is used to classify the sample audio data as 0 and the first sample audio data corresponding to the sample audio data as 1.

[0015] According to some embodiments of the present application, the loss value corresponding to the third loss is determined by: dividing the sample audio data and the first sample audio data corresponding to the sample audio data into a plurality of sub-signals according to mutually non-overlapping frequency bands respectively; performing frame processing on each sub-signal of the audio signal of the sample audio data and each sub-signal of the first sample audio data corresponding to the sample audio data respectively to obtain a plurality of time-frequency windows, wherein each time-frequency window corresponds to a time window size and a frequency band; calculating the loudness difference value of the sample audio data segment corresponding to each time-frequency window and the first sample audio data segment corresponding to the sample audio data; and determining the loss value corresponding to the third loss according to the loudness difference values corresponding to all time-frequency windows.

[0016] According to another aspect of the embodiments of the present application, a method for processing audio watermark is also provided, including: obtaining audio data; embedding watermark information into the audio data using an encoder of a target reversible neural network to obtain audio data with embedded watermark information, wherein the target reversible neural network is obtained by training an initial reversible neural network using a target training set, a weighted attack strategy and a composite loss function, the target training set includes sample audio data, the composite loss function is used to quantify the performance difference of the initial reversible neural network before and after each training using the sample audio data from multiple dimensions, the composite loss function includes a first loss, a second loss, a third loss and a fourth loss, the first loss is used to quantify the difference between the watermark information corresponding to the sample audio data in the target training set and the watermark information restored by the initial reversible neural network, the second loss is used to quantify the difference between the sample audio data in the target training set before and after adding the watermark information, the third loss is used to control the auditory quality of the sample audio data after adding the watermark information, and the fourth loss is used to train the performance of the encoder of the initial reversible neural network in the process of adding the watermark information, and the weighted attack strategy is used to indicate the attack type when simulating attacks on the sample audio data with embedded watermark information in the training process and the weight corresponding to each attack type.

[0017] According to another aspect of the embodiments of the present application, a method for processing audio watermark is also provided, including: obtaining audio data with embedded watermark information; decoding the audio data with embedded watermark information using a decoder of a target reversible neural network to obtain restored watermark information corresponding to the audio data with embedded watermark information, wherein the target reversible neural network is obtained by training an initial reversible neural network using a target training set, a weighted attack strategy and a composite loss function, the target training set includes sample audio data, the composite loss function is used to quantify the performance difference of the initial reversible neural network before and after each training using the sample audio data from multiple dimensions, the composite loss function includes a first loss, a second loss, a third loss and a fourth loss, the first loss is used to quantify the difference between the watermark information corresponding to the sample audio data in the target training set and the watermark information restored by the initial reversible neural network, the second loss is used to quantify the difference between the sample audio data in the target training set before and after adding the watermark information, the third loss is used to control the auditory quality of the sample audio data after adding the watermark information, and the fourth loss is used to train the performance of the encoder of the initial reversible neural network in the process of adding the watermark information, and the weighted attack strategy is used to indicate the attack type when simulating attacks on the sample audio data with embedded watermark information in the training process and the weight corresponding to each attack type.

[0018] According to a further aspect of the embodiments of the present application, a device for training a reversible neural network for audio watermark processing is also provided, comprising: an obtaining module configured to obtain a sample data set, wherein the sample data set comprises sample audio data; a training module configured to repeatedly perform the following processes until a target loss value is less than a preset threshold, stop iteration, and obtain a target reversible neural network: randomly selecting a preset number of sample audio data from the sample data set to determine as a target training set; adding watermark information to each sample audio data in the target training set according to an encoder of an initial reversible neural network to obtain a plurality of first sample audio data embedded with watermark information, wherein each first sample audio data corresponds to one watermark information; performing simulated attacks on the plurality of first sample audio data according to a weighted attack strategy to obtain a plurality of second sample audio data, wherein the weighted attack strategy is used to indicate an attack type when performing a simulated attack on each first sample audio data and a weight corresponding to each attack type; decoding the plurality of second sample audio data according to a decoder of the initial reversible neural network to obtain restored watermark information of each second sample audio data; calculating a loss value of a composite loss function corresponding to each sample audio data in the target training set, determining a target loss value according to the loss values corresponding to all sample audio data, and adjusting network parameters of the initial reversible neural network according to the target loss value.

[0019] According to a further aspect of the embodiments of the present application, a non-volatile storage medium is also provided, wherein the non-volatile storage medium stores a program, and when the program is executed, the device in which the non-volatile storage medium is located performs the above audio watermark processing method or the reversible neural network training method for audio watermark processing.

[0020] According to a further aspect of the embodiments of the present application, an electronic device is also provided, comprising: a memory and a processor, wherein the processor is configured to execute a program stored in the memory, and when the program is executed, the electronic device performs the above audio watermark processing method or the reversible neural network training method for audio watermark processing.

[0021] According to a further aspect of the embodiments of the present application, a computer program product is also provided, comprising computer instructions, and when the computer instructions are executed by a processor, the above audio watermark processing method or the reversible neural network training method for audio watermark processing is implemented.

[0022] In the embodiment of the present application, a sample data set is obtained, wherein the sample data set includes sample audio data; the following processes are repeatedly performed until the target loss value is less than the preset threshold, the iteration is stopped, and the target reversible neural network is obtained: a preset number of sample audio data is randomly selected from the sample data set, and is determined as a target training set; watermark information is added to each sample audio data in the target training set according to the encoder of the initial reversible neural network, and a plurality of first sample audio data embedded with watermark information is obtained, wherein each first sample audio data corresponds to one watermark information; the plurality of first sample audio data is simulatedly attacked according to the weighted attack strategy, and a plurality of second sample audio data is obtained, wherein the weighted attack strategy is used to indicate the attack type when each first sample audio data is simulatedly attacked and the weight corresponding to each attack type; each second sample audio data is decoded according to the decoder of the initial reversible neural network, and the restored watermark information of each second sample audio data is obtained; the loss value of the composite loss function corresponding to each sample audio data in the target training set is calculated, the target loss value is determined according to the loss values corresponding to all sample audio data, and the network parameters of the initial reversible neural network are adjusted according to the target loss value. Through the use of the initial reversible neural network, the robustness of the training of the initial reversible neural network is improved through the simulated attack of multiple types through the weighted attack strategy, and the network parameters of the initial reversible neural network are adjusted through the target loss value, so that the trained target reversible neural network improves the robustness and maintains the balance between the audio quality and the imperceptibility of the watermark, achieves the purpose of improving the weak robustness of the audio watermark processing and maintaining the balance between the audio quality and the imperceptibility of the watermark, and further solves the technical problems of weak robustness of the audio watermark processing and inability to maintain the balance between the audio quality and the imperceptibility of the watermark. BRIEF DESCRIPTION OF DRAWINGS

[0023] The drawings described herein are used to provide further understanding of the present application, and form a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application, and do not constitute improper limitations on the present application. In the drawings:

[0024] Figure 1 is a hardware structure block diagram of a computer terminal for implementing a training method of a reversible neural network for audio watermark processing according to an embodiment of the present application;

[0025] Figure 2 is a flowchart of a training method of a reversible neural network for audio watermark processing according to an embodiment of the present application;

[0026] Figure 3 is a structure diagram of an audio watermark network according to an embodiment of the present application;

[0027] Figure 4 is a flowchart of an audio watermark processing method according to an embodiment of the present application;

[0028] Figure 5 is a flowchart of another audio watermark processing method according to an embodiment of the present application;

[0029] Figure 6 is a structural schematic diagram of a training device of a reversible neural network for audio watermark processing according to an embodiment of the present application. DETAILED DESCRIPTION

[0030] In order to enable persons skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by persons skilled in the art without creative labor should fall within the scope of protection of the present application.

[0031] The information collected in the embodiments of the present application is information and data authorized by users or authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of related data all comply with relevant laws, regulations and standards in relevant regions, necessary security measures are taken, public order and good customs are not violated, and corresponding operation portals are provided for users to choose authorization or refuse automatic decision results; if the user chooses to refuse, the expert decision process is entered.

[0032] It should be noted that the terms "first", "second", and the like in the specification and claims of the present application and the above-described drawings are used to distinguish similar objects, and do not necessarily have to describe a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device that includes a series of steps or units does not have to be limited to only those steps or units clearly listed, but can include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0033] In order to better understand the embodiments of the present application, the technical terms involved in the embodiments of the present application are explained as follows:

[0034] Audio Watermarking: A type of information hiding technology that embeds imperceptible or barely perceptible watermark information in an audio signal to achieve the purposes of copyright protection, content authentication, tracking, and anti-counterfeiting.

[0035] Invertible Neural Networks (INNs): A special class of neural networks whose forward propagation and backward propagation are reversible, i.e., the input can be uniquely determined by the same set of parameters as the output, and vice versa. This reversibility ensures that information is not lost during transformation, allowing efficient execution of backward propagation without storing intermediate activation values.

[0036] In related technologies, the application of Deep Neural Networks (DNNs) in audio watermarking has shown promising prospects. However, DNN-based audio watermarking technology is still in its early stages, and there are technical problems such as weak robustness during audio watermarking processing, and the inability to maintain a balance between audio quality and imperceptibility of the watermark. To solve this problem, the present application provides related solutions, which are described in detail below.

[0037] According to an embodiment of the present application, an embodiment of a training method for an invertible neural network for audio watermarking processing is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here.

[0038] The method embodiments provided in the present application can be executed in a computer terminal or similar computing device. Figure 1 A hardware structure block diagram of a computer terminal for implementing a training method for an invertible neural network for audio watermarking processing is shown. As shown in Figure 1 The computer terminal 10 can include one or more processors 102 (the processor 102 can include but is not limited to a microprocessor MCU or a programmable logic device FPGA processing device), a memory 104 for storing data, and a transmission device 106 for communication functions. In addition, it can also include a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which can be included as one of the ports in the BUS bus), a network interface, a power supply and / or a camera. Those skilled in the art can understand that Figure 1 The structure shown is only illustrative, and does not limit the structure of the above-mentioned electronic device. For example, the computer terminal 10 can also include moreFigure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.

[0039] It should be noted that the aforementioned one or more processors 102 and / or other data processing circuits are generally referred to herein as "data processing circuits". These data processing circuits may be embodied, in whole or in part, in software, hardware, firmware, or any other combination thereof. Furthermore, the data processing circuits may be a single, independent processing module, or may be integrated, in whole or in part, into any other element within the computer terminal 10. As involved in the embodiments of this application, the data processing circuits serve as processor control (e.g., selection of a variable resistor termination path connected to an interface).

[0040] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the training method of the reversible neural network for audio watermarking processing in the embodiments of this application. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, implementing the above-mentioned training method of the reversible neural network for audio watermarking processing. The memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the computer terminal 10 via a network. Examples of the above-mentioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0041] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the communication provider of the computer terminal 10. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module, used for wireless communication with the Internet.

[0042] The display can be, for example, a touchscreen liquid crystal display (LCD) that allows the user to interact with the user interface of the computer terminal 10.

[0043] In the above operating environment, an embodiment of a training method of a reversible neural network for audio watermark processing is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described herein can be executed in an order different from that shown.

[0044] As shown in Figure 2 is a flowchart of a training method of a reversible neural network for audio watermark processing according to an embodiment of the present application, which comprises:

[0045] In step S202, a sample data set is obtained.

[0046] In the technical solution provided in step S202, the sample data set comprises sample audio data.

[0047] In some embodiments of the present application, when the sample data set is obtained, a plurality of diversified audio sample data is collected from a plurality of audio databases, covering various languages, dialects, background noise and recording quality, to ensure the representativeness and diversity of the sample data set.

[0048] In step S204, the following processes are repeatedly executed until the target loss value is less than a preset threshold, the iteration is stopped, and the target reversible neural network is obtained: a preset number (for example, 100) of sample audio data is randomly selected from the sample data set, and is determined as a target training set; watermark information is added to each sample audio data in the target training set according to the encoder of the initial reversible neural network, to obtain a plurality of first sample audio data embedded with watermark information, wherein each first sample audio data corresponds to one watermark information; a plurality of first sample audio data is simulated attacked according to a weighted attack strategy, to obtain a plurality of second sample audio data, wherein the weighted attack strategy is used to indicate the attack type when each first sample audio data is simulated attacked and the weight corresponding to each attack type; each second sample audio data is decoded according to the decoder of the initial reversible neural network, to obtain the restored watermark information of each second sample audio data; the loss value of the composite loss function corresponding to each sample audio data in the target training set is calculated, the target loss value is determined according to the loss values corresponding to all sample audio data, and the network parameters of the initial reversible neural network are adjusted according to the target loss value. Wherein the encoder and the decoder use the same network parameters, and the target loss value is the average value of the loss values of the composite loss function corresponding to all sample audio data in the target training set in one round of iterative training.

[0049] In the technical solution provided in step S204, the watermark information is added to each sample audio data in the target training set according to the encoder of the initial reversible neural network. There are various implementation manners for obtaining the first sample audio data embedded with the watermark information, for example: taking any one sample audio data in the target training set as an example, the watermark information is added to the sample audio data in the target training set in the following manner to obtain the first sample audio data embedded with the watermark information: for the sample audio data spectrum graph corresponding to the third sample audio data in the target training set and the watermark information feature graph corresponding to the watermark information of the third sample audio data, the first reversible block of the encoder is used for starting encoding processing until the last reversible block is traversed, and the first sample audio data embedded with the watermark information corresponding to the third sample audio data is obtained, wherein the third sample audio data is any one sample audio data in the target training set, and the watermark information is a random binary vector with a preset length.

[0050] In some embodiments of the present application, the reversible neural network is applied to audio watermarking. The reversible neural network architecture regards encoding and decoding as reciprocal processes, and the encoder and the decoder share the same network parameters. This design enables the reversible neural network model to maintain better imperceptibility while greatly improving the encoding capacity and generating higher-quality watermarks. The framework of the trained target reversible neural network in the embodiments of the present application mainly includes an encoder, a decoder (the encoder and the decoder are reversible encoders / decoders), a shift module, and an attack simulator, and these modules are trained end-to-end. The initial reversible neural network and the target reversible neural network use single-channel audio with a sampling rate of 16 kHz. Each sample audio data is subdivided into consecutive sampling points, and each sampling point represents the instantaneous value of the audio signal on the time line. Under this setting, the encoding unit length (EUL) is 1 second, which means that the reversible neural network processes the audio signal in units of seconds. Each unit contains 16000 sampling points (16 kHz × 1 second = 16000 sampling points). This processing method ensures the accuracy and efficiency of watermark information embedding and facilitates subsequent feature extraction and encoding.

[0051] During the training process, the target training set is divided into multiple batches (the batch size is B, for example, B is 10), and each batch contains a preset number of sample audio data. During one round of iterative training, the sample audio data spectrum graph contained in each batch is compressed into a feature graph, and the feature graph is input into the encoder of the initial reversible neural network to obtain the first sample audio data embedded with the watermark information corresponding to the sample audio data spectrum graph. wherein R represents a real number set, C represents a channel number, for example, equal to 2, 2 channels respectively represent frequency and phase values; W and H respectively represent a time dimension and a frequency dimension, and a feature map input to the initial neural network in each batch contains a spectrum graph of all sample audio data. In actual training, according to the batch order, after training a batch, the next batch is trained, and until the training of all batches is completed, it is considered that one round of iteration training is completed. In the training of each batch, after the feature map is input to the initial reversible neural network, the initial reversible neural network concurrently encodes the spectrum graph of all sample audio data in the feature map and the watermark information feature map through the first reversible block of the encoder, and iterates to the last reversible block to obtain the first sample audio data corresponding to the embedded watermark information of the sample audio data in the batch.

[0052] Taking the third sample audio data as an example (the third sample audio data is any sample audio data in the target training set, which can belong to any batch of the target training set), the process of adding watermark information according to the encoder of the initial reversible neural network to obtain the first sample audio data corresponding to the embedded watermark information of the third sample audio data is displayed: the third sample audio data can be represented as a one-dimensional waveform vector of a preset length (for example, 16000, denoted as L) (the meaning is that under a sampling rate of 16 kHz, every 1 second of audio signal is converted into a vector composed of 16000 numerical values, which represent the audio amplitude in time sequence), and the one-dimensional waveform vector is represented as ), R represents a real number set. The sample audio data spectrum graph corresponding to the third sample audio data can be determined by the following formula:

[0053] ,

[0054] wherein, represents the sample audio data spectrum graph corresponding to the third sample audio data, represents a short-time Fourier transform.

[0055] Then, the watermark information corresponding to the third sample audio data is obtained, and the watermark information corresponding to the third sample audio data is converted into a feature map (i.e., the above watermark information feature map) using a short-time Fourier transform (STFT). The short-time Fourier transform is realized by the following formula:

[0056] ,

[0057] wherein, represents the feature map (i.e., the above watermark information feature map), represents watermark information, which can be represented as a random binary vector of length K (K is a predetermined integer) (denoted as represents, , is a random binary vector of length K composed of 0 or 1, and it is noted that is a linear layer used to expand it into a vector of the same size as the above one-dimensional waveform vector before short-time Fourier transform, represents a linear layer used for dimension transformation, and R represents a real number set.

[0058] The sample audio data spectrum corresponding to the third sample audio data and the watermark information feature map corresponding to the watermark information of the third sample audio data are processed by the encoder of the initial reversible neural network. The initial reversible neural network is composed of n (representing the total number of reversible blocks) stacked reversible blocks, the input and output dimensions of each reversible block remain unchanged, and the reversible block is the basic unit of the reversible neural network. Its core feature is that the forward propagation and the backward propagation are reversible, which means that there is a deterministic and reversible mapping relationship between the input and the output of the network, and the encoder and the decoder share the reversible block. The encoder converts the input into an encoded state through a series of reversible blocks, while the decoder uses the same reversible blocks but in reverse order to reversely convert the encoded state into the output. After inputting the sample audio data spectrum corresponding to the third sample audio data and the watermark information corresponding to the watermark of the third sample audio data into the encoder of the initial reversible neural network, the first reversible block of the encoder starts to encode, and the last reversible block is traversed to obtain the first sample audio data embedded with the watermark information corresponding to the third sample audio data.

[0059] Figure 3is a structural diagram of an audio watermarking network according to an embodiment of the present application; the structural diagram of the target reversible neural network in the embodiment of the present application is shown, and the whole process from original audio input to watermark information embedding, attack simulation, decoding and final watermark information recovery is shown by taking any one batch of sample audio data in the target training set as an example. Through the design of the reversible neural network, the encoding and decoding processes can maintain high efficiency and robustness, and at the same time, by introducing the discriminator and multiple loss functions, the model can learn how to embed sufficient robust watermark information while maintaining the quality of the audio. The original audio (any one batch of sample audio data in the target training set) corresponds to the input of the audio branch of the encoder, that is, the watermark message to be embedded, and the input of the watermark message branch of the encoder. The linear layer of the encoder is used to expand the watermark information to a vector of the same size as the audio input. Short-time Fourier transform is performed on the inputs of the audio branch and the watermark message branch to obtain two feature maps corresponding to the audio branch and the watermark message branch respectively (that is, the feature map of the sample audio data spectrum graph of all sample audio data in the batch, and the corresponding watermark information feature map, (B, 2, W, H) corresponds to the dimensions of the two feature maps, 2 is the channel number, and 2 channels represent frequency and phase values respectively, W and H represent time dimension and frequency dimension respectively, and B represents batch size). The encoder and the decoder use the same network parameters. In the first reversible block of the encoder or the first reversible block of the decoder, the first reversible block is any one reversible block. For all sample audio data spectrum graphs of sample audio data in the feature map and the corresponding watermark information feature map, concurrent encoding processing is performed through the first reversible block of the encoder until the last reversible block is traversed, to obtain the first sample audio data corresponding to the embedded watermark information of all sample audio data in the batch, and the reconstructed watermark audio data is the reconstructed watermark audio data corresponding to all sample audio data in the batch (that is, the first sample audio data corresponding to the embedded watermark information of all sample audio data in the batch). In the shift module, s represents the length of the offset time, and the shift module is used for shift processing. The shifted audio data (that is, the new first sample audio data corresponding to all sample audio data in the batch) is obtained, the attack simulator (attack methods include noise, resampling, compression into mp3, etc.), the attacked audio data (that is, the second sample audio data corresponding to all sample audio data in the batch) is obtained after attack simulation, and then is input into the decoder together with the randomly sampled features to finally obtain the restored watermark message.

[0060] ​​​The initial reversible neural network divides the data into two branches in the reversible block: an audio branch (for processing the sample audio data spectrogram corresponding to the third sample audio data) and a watermark message branch (for processing the watermark information feature map corresponding to the watermark information of the third sample audio data). For example, for the first reversible block in the reversible block Figure 3 , , in the encoding process, for the first reversible block , , the input of the audio branch of the first reversible block is denoted as , , the input of the watermark message branch of the first reversible block is denoted as , , and the output of the first reversible block is (the sample audio data spectrogram of all sample audio data in the batch at the output of the audio branch of the first reversible block) and (the output of the watermark message of the first reversible block corresponding to all watermark information feature maps in the batch) can be represented as:

[0061] ,

[0062] wherein denotes a sigmoid activation function, denotes element-wise multiplication, and the functions , and are functions defined using dense blocks, and exp denotes an exponential function.

[0063] Based on the above formula, from the first reversible block to the last reversible block, for the output of the last reversible block, in order to generate the final watermarked audio signal, the output from the watermark message branch in the last reversible block (denoted as , where n refers to the last reversible block) is discarded, and only the output from the audio branch in the last reversible block (the output of the audio branch of the sample audio data in the batch, containing the audio features of each sample audio data after watermark embedding, and the output contains the spectrogram representing the frequency domain of the sample audio data after embedding the watermark information) is retained. Subsequently, an Inverse Short-Time Fourier Transform (ISTFT) is performed on each spectrogram of the sample audio data after embedding the watermark information in to reconstruct the watermarked audio waveform (corresponding to Figure 3 ​​The reconstructed watermarked audio data of any one sample audio data in the batch (i.e., the first sample audio data corresponding to the embedded watermark information of the sample audio data in the batch, respectively), for example, can be determined by the following formula:

[0064] ,

[0065] wherein, represents the reconstructed watermarked audio waveform of any one sample audio data (i.e., the first sample audio data corresponding to the embedded watermark information of the third sample audio data), represents performing inverse short-time Fourier transform.

[0066] The above steps are repeated until each sample audio data in the target training set is traversed (i.e., all batches of sample audio data are traversed), obtaining a plurality of first sample audio data embedded with watermark information.

[0067] Before simulating attacks on the plurality of first sample audio data according to the weighted attack strategy, a shift module is introduced To ensure successful decoding in the case of decoding position offset, a shift module is added after the encoder to randomly shift the decoding window in the time direction by a time length s (where 0≤s<EUL, EUL refers to the length of the coding unit), a larger shift length will weaken the coding performance, therefore a preset shift rule limits the maximum value of s to 10% of EUL. In actual operation, the shift (i.e. shift) is realized by truncation and splicing: for example, the plurality of first sample audio data is shifted according to the preset shift rule, wherein the preset shift rule is used to indicate the shift degree of the audio (i.e. first sample audio data) embedded with the audio watermark: for each first sample audio data: determine the audio truncated segment (e.g. truncate an audio segment of s time length from the end of the audio segment with watermark information in the first sample audio data, for example, if EUL is 1 second, and s is randomly selected as 0.1 second, then the audio segment from 0.9 second to 1 second (i.e. the last 0.1 second is excluded) is truncated) and the audio splicing segment (e.g. the audio splicing segment is the sample audio segment of s time length in the first sample audio data after the sample segment with watermark information) according to the preset shift rule, wherein the audio truncated segment is the sample audio data segment in the first sample audio data for audio stage, the audio splicing segment is the sample audio data in the first sample audio data to fill the audio truncated segment, and the length of the audio truncated segment and the audio splicing segment is the same; truncate the audio truncated segment from the first sample audio data to obtain the truncated first sample audio data; splice the truncated first sample audio data with the audio splicing segment to obtain new first sample audio data. After the above operation, the position of the watermark information is shifted relative to the original audio (i.e. first sample audio data). This shift can be forward or backward, depending on the choice of s value and the starting position of the truncation. In this way, even if the audio signal suffers a small change or shift in time in the real environment, the decoder can still accurately detect and extract the watermark information, thereby enhancing the robustness. It should be noted that the above steps for shifting the plurality of first sample audio data are still batched, and the above operations are performed on all first sample audio data in a batch at a time to obtain a plurality of new first sample audio data for the batch.

[0068] In the technical solution provided in step S204, the implementation manner of simulating attacks on the plurality of first sample audio data according to the weighted attack strategy to obtain the plurality of second sample audio data is various, for example: for each new first sample audio data: according to the weight of each attack type in the preset attack type set indicated in the weighted attack strategy, determine a target attack type for the new first sample audio data from the preset attack type set (adopting a sample-by-sample sampling manner, so that different attack types can be contained in the same batch (the same target training set)), wherein the initial weights of all attack types in the preset attack type set are the same, and after each simulation attack, the initial weights of each attack type are updated according to the corresponding bit error rate; using the attack simulator corresponding to the target attack type to simulate the attack on the new first sample audio data to obtain the second sample audio data, wherein the attack simulator is used to simulate the interference that the new first sample audio data is subjected to in the transmission process according to the target attack type. It should be noted that the above step simulates the attack on the new first sample audio data according to the batch, and each time the above operation is performed on all new first sample audio data in a batch in parallel to obtain a plurality of second sample audio data in the batch.

[0069] In some embodiments of the present application, the preset attack type set indicated in the weighted attack strategy includes multiple audio attack types, such as random noise (RN for short), sample suppression (SS for short), low-pass filter (LP for short), median filter (MF for short), re-sampling (RS for short), amplitude scaling (AS for short), lossy compression (LC for short), quantization (QTZ for short), echo addition (EA for short), time stretch (TS for short), etc. The learning difficulty of multiple attacks is different, so the initial weight of each attack type is set to be the same in the initial stage of the weighted attack strategy, that is, the probability of each attack type being selected for simulation attack is equal. For each new first sample audio data (i.e. the first sample audio data after offset processing), an attack type is randomly selected as a target attack type according to the initial weight distribution of the attack type. Once the target attack type is determined, the corresponding attack simulator will process the new first sample audio data to simulate the influence of this type of attack on the audio signal. For example, if it is a random noise attack, random generated noise will be added to the audio signal of the new first sample audio data. After each simulation attack, the performance of the initial reversible neural network is evaluated on the validation set, the bit error rate of the attack type is calculated (determined by comparing the binary bit stream of the new first sample audio data and the binary bit stream of the new first sample audio data after attack, comparing the two bit streams, counting the number of different bits at the same position, i.e. the number of error bits, and the bit error rate is equal to the number of error bits divided by the total number of bits), so as to adjust the initial weight of each attack type. If the bit error rate caused by a certain attack type is high (i.e. the ability to decode the watermark information after suffering from the attack is weak), the weight of the attack type is increased, which means that in future training rounds, the probability of this attack type being selected will increase, thereby forcing the initial reversible neural network to learn more about how to resist this type of attack. The above process is repeated in each training round, a different first sample audio data is selected each time, and the latest attack type weight is used to determine which attack type will be applied.

[0070] In the technical solution provided in step S204, the implementation manner of obtaining the restored watermark information corresponding to each second sample audio data by decoding the plurality of second sample audio data according to the decoder of the initial reversible neural network is various, for example: for each second sample audio data: decoding starts from the last reversible block of the decoder and ends until the first reversible block is traversed, to obtain the restored watermark information feature map corresponding to the second sample audio data; performing inverse short-time Fourier transform on the restored watermark information feature map to obtain the restored watermark information.

[0071] In some embodiments of the present application, for any batch of second sample audio data, a random variable (denoted as z) is needed as the input (i.e. Figure 3 the random sampling feature in the watermark message branch) in the process of decoding from the last reversible block of the decoder in parallel. For example, a variable is sampled from a normal distribution (Gaussian distribution). The calculation process of the first reversible block module in the inverse direction can be represented as follows (for example, the first reversible block of the decoder): Figure 3

[0072] ,

[0073] wherein, represents a sigmoid activation function, represents element multiplication, and the functions , and are functions defined using dense blocks, here, represents the output of the audio branch corresponding to the batch of second sample audio data in the first reversible block, represents the output of the watermark message branch corresponding to the batch of second sample audio data in the first reversible block, represents the input of the audio branch corresponding to the batch of second sample audio data in the first reversible block, represents the input of the watermark message branch corresponding to the batch of second sample audio data in the first reversible block. After traversing from the last reversible block of the decoder to the first reversible block, only the output of the message branch of the first reversible block of the decoder is retained, and the feature map corresponding to any sample audio data of the batch output by the message branch of the first reversible block of the decoder is represented as

[0074] ​​​​​​(i.e. the restored watermark information feature map corresponding to the second sample audio data described above), after performing an inverse short-time Fourier transform to obtain a time-domain waveform, and then through a linear layer processing, the restored watermark information corresponding to the sample audio data can be recovered (i.e. the restored watermark information described above), for example, through the following formula:

[0075] ,

[0076] wherein, denotes an inverse short-time Fourier transform, denotes a linear layer of the decoder.

[0077] In the technical scheme provided in step S204, the composite loss function includes a first loss, a second loss, a third loss, and a fourth loss, the composite loss function includes a first loss, a second loss, a third loss, and a fourth loss (also referred to as a first loss function, a second loss function, a third loss function, and a fourth loss function), the first loss is used to quantify the difference between the watermark information corresponding to the sample audio data in the target training set and the restored watermark information through the initial reversible neural network, the second loss is used to quantify the difference between the sample audio data in the target training set before and after adding the watermark information, the third loss is used to control the auditory quality of the sample audio data after adding the watermark information, and the fourth loss is used to train the performance of the encoder of the initial reversible neural network in the process of adding the watermark information. For example, the first loss, the second loss, the third loss, and the fourth loss can be frequency domain loss, time domain loss, time-frequency loudness loss, and discriminant loss for confrontation, respectively.

[0078] After all the sample audio data in each batch completes the process from embedding watermark information through the encoder to restoring the watermark information through the decoder, the loss value of the composite loss function corresponding to each sample audio data is calculated, and after obtaining the loss values of the composite loss functions corresponding to all the sample audio data in all batches, the average value of the loss values corresponding to all the sample audio data is determined as the target loss value of the current round of iterative training. Repeat the iterative training for multiple rounds until the target loss value of a certain round of iterative training is less than a preset threshold, stop iteration, and obtain the target reversible neural network.

[0079] There are various implementation manners for calculating the loss value corresponding to each sample audio data. For example, for each sample audio data, the loss value corresponding to the first loss, the loss value corresponding to the second loss, the loss value corresponding to the third loss, and the loss value corresponding to the fourth loss are determined; and the loss value of the composite loss function is determined according to the loss value corresponding to the first loss, the loss value corresponding to the second loss, the loss value corresponding to the third loss, and the loss value corresponding to the fourth loss, and the first hyperparameter corresponding to the first loss, the second hyperparameter corresponding to the second loss, the third hyperparameter corresponding to the third loss, and the fourth hyperparameter corresponding to the fourth loss.

[0080] The loss value corresponding to the first loss, the loss value corresponding to the second loss, and the loss value corresponding to the fourth loss are determined in the following manner: the loss value corresponding to the first loss is determined according to the watermark information corresponding to the sample audio data and the restored watermark information corresponding to the sample audio data; the loss value corresponding to the second loss is determined according to the sample audio data and the first sample audio data corresponding to the sample audio data; and the loss value corresponding to the fourth loss is determined at least according to the discriminator, wherein the discriminator is used to classify the sample audio data as 0 and the first sample audio data corresponding to the sample audio data as 1.

[0081] The loss value corresponding to the first loss is determined according to the watermark message corresponding to the sample audio data and the restored watermark information corresponding to the sample audio data, and the loss (i.e., the above-mentioned first loss) can be represented by the following formula:

[0082]

[0083] wherein, represents the decoder, represents the attack simulator, represents the shift module, z represents a random variable, and is input as a watermark message branch, is the loss value corresponding to the first loss.

[0084] In order to maintain the quality of the listening experience, an L2 loss is introduced to constrain the distance between the original audio (i.e., the one-dimensional waveform vector, i.e., the sample audio data) and the reconstructed watermark audio (i.e., the first sample audio data corresponding to the sample audio data), i.e., the above-mentioned second loss, and the loss value corresponding to the second loss is determined according to the sample audio data and the first sample audio data corresponding to the sample audio data , which can be represented by the following formula:

[0085]

[0086] ​​In addition, in order to enhance the imperceptibility of the watermark information, a discriminator is introduced. The discriminator is trained to classify the original audio (i.e. the above-mentioned sample audio data) as 0 and the audio with watermark (i.e. the above-mentioned first sample audio data) as 1, and the loss of the discriminator (Ldiscriminatior) is represented by the following formula:

[0087] wherein, represents the discriminator function.

[0088] The encoder of the initial encoder network is trained to deceive this discriminator to improve the audio quality, and the adjustment of the encoder parameters is completed through adversarial training, that is, during the training process, the encoder attempts to minimize the fourth loss value to produce a watermark audio that is not easy to be perceived even under the strong detection ability of the discriminator, so that the audio with watermark is also classified as 0 by the discriminator, and the fourth loss value (L4) is determined by the following formula:

[0089] .

[0090] The loss value corresponding to the third loss is determined in the following manner: the audio signal of the sample audio data and the first sample audio data corresponding to the sample audio data are respectively divided into a plurality of sub-signals according to non-overlapping frequency bands; each sub-signal of the audio signal of the sample audio data and each sub-signal of the first sample audio data corresponding to the sample audio data are respectively subjected to frame processing to obtain a plurality of time-frequency windows, wherein each time-frequency window corresponds to a time window size and a frequency band; the loudness difference value of each time-frequency window corresponding to the sample audio data segment and the first sample audio data segment corresponding to the sample audio data is calculated; and the loss value corresponding to the third loss is determined according to the loudness difference values of all time-frequency windows.

[0091] The third loss is a time-frequency loudness loss (TF-Loudness) which operates completely in the waveform domain. Based on the psychoacoustic characteristic of "auditory masking": the human auditory system cannot perceive multiple sounds occurring at the same time and in the same frequency range. The calculation process is as follows: first, the original audio (i.e. the above-mentioned sample audio data. It can be an audio signal) and the reconstructed audio with watermark (i.e. the above-mentioned first sample audio data corresponding to the sample audio data) are divided into B (representing the total number of sub-signals) sub-signals according to non-overlapping frequency bands: ​​For each sub-signal, frame the signal according to a time window size W (W is a pre-set window size) and an overlap between frames (pre-set, denoted by r), to obtain a plurality of time-frequency windows. Each time-frequency window corresponds to a time window size and a frequency band, and each time-frequency window divides an original audio segment (sample audio segment) and a watermarked audio segment (first sample audio data segment corresponding to the sample audio data) in a time-frequency dimension, denoted as and (b represents a frequency band). For each time-frequency window, calculate the loudness difference value , for example, by the following formula:

[0092] ,

[0093] wherein the above formula measures the difference in loudness between the original audio segment and the watermarked audio segment in the time window w and the frequency band b, denotes a loudness function.

[0094] The final third loss value (L3) is a weighted sum of these loudness difference values, and the weighting uses a softmax activation function:

[0095] ,

[0096] The softmax activation function is used to prevent focusing on the low loudness region that is already inaudible, so as to avoid over-optimizing the meaningless region. Here is a multiplication sign.

[0097] The loss value (L) of the composite loss function is determined by the following formula:

[0098] ,

[0099] wherein , , and correspond to the first loss, the second loss, the third loss, and the fourth loss, respectively, which are pre-set hyperparameters (i.e., the first to fourth hyperparameters) for adjusting the trade-off between imperceptibility (audio quality) and robustness (watermark decoding ability). Meanwhile, L1, L2, L3, and L4 are optimized independently ​​The target loss value is calculated based on the initial reversible neural network. After all batches of training are completed in any iteration, the gradient of the target loss value with respect to the network parameters (e.g., the weights and bias terms of the encoder and the decoder, etc.) of the initial reversible neural network is calculated through backpropagation during the process of adjusting the network parameters. Because the encoder and the decoder share parameters, the gradient of the entire initial reversible neural network will be calculated to guide the update of the network parameters. The optimizer adjusts the network parameters according to the calculated gradient. The optimizer will use the gradient of each loss function and the learning rate to update the weights and bias terms to reduce the target loss value. The updated parameters are applied to the encoder and the decoder synchronously to maintain their reversibility and consistency. At the same time, the change trend of the loss function is monitored during the training process, and the learning rate, the weight of each loss function, or the structure of the network is adjusted as necessary to promote convergence or improve performance.

[0100] The method of the embodiments of the present application proposes an innovative audio watermarking framework (i.e., the target reversible neural network) that can embed up to 32 bits of watermark information in only 1 second of audio segment. The audio watermark is imperceptible to human perception and shows strong robustness when facing various attacks. Not only can it be used as an effective identifier to identify synthetic speech, but also has potential in more extensive applications such as audio copyright protection. The framework has high flexibility, supporting the combination of multiple watermark segments to improve robustness and watermark capacity. When using 10 to 15 seconds of audio as the host audio, the method shows an average bit error rate of only 1.28% under ten common attacks. The encoding and decoding are reciprocal processes and share the same network parameters. Not only does it effectively reduce the model (initial reversible neural network) parameter amount and training cost, but also significantly enhances the watermark capacity, while maintaining better imperceptibility, embedding the generated watermark information more efficiently and restoring it more accurately, greatly improving the overall watermark quality. The decoder of the embodiments of the present application can automatically locate the watermark position without the help of an external auxiliary positioning module or synchronization information. Multiple loss functions are introduced for collaborative optimization, which improves the robustness of the watermark while ensuring its imperceptibility to the human ear.

[0101] Figure 4 is a flowchart of an audio watermark processing method according to an embodiment of the present application; comprising:

[0102] Step S402, acquiring audio data.

[0103] Step S404, using the encoder of the target reversible neural network to embed watermark information into the audio data to obtain audio data embedding watermark information, wherein the target reversible neural network is obtained by training the initial reversible neural network using the target training set, the weighted attack strategy and the composite loss function, the target training set includes sample audio data, the composite loss function is used to quantify the performance difference of the initial reversible neural network before and after each training using the sample audio data from multiple dimensions, the composite loss function includes a first loss, a second loss, a third loss and a fourth loss, the first loss is used to quantify the difference between the watermark information corresponding to the sample audio data in the target training set and the watermark information restored by the initial reversible neural network, the second loss is used to quantify the difference between the sample audio data in the target training set before and after adding the watermark information, the third loss is used to control the auditory quality of the sample audio data after adding the watermark information, and the fourth loss is used to train the performance of the encoder of the initial reversible neural network in the process of adding the watermark information, and the weighted attack strategy is used to indicate the attack type when simulating attacks on the sample audio data embedding watermark information in the training process and the weight corresponding to each attack type.

[0104] It should be noted that the specific training process of the target reversible neural network of step S404 is obtained by training the initial reversible neural network using the target training set, the weighted attack strategy and the composite loss function. Figure 2 Steps S202-S204 in the above embodiment, which will not be repeated here. The process of using the encoder of the target reversible neural network to embed watermark information into the audio data to obtain audio data embedding watermark information is the same as the method of adding watermark information to the sample audio data in the target training set according to the encoder of the initial reversible neural network to obtain the first sample audio data embedding watermark information in step S204, which will not be repeated here.

[0105] Figure 5 is another flowchart of an audio watermark processing method provided by the embodiment of the present application: comprising:

[0106] Step S502, obtaining audio data embedding watermark information.

[0107] Step S504, using the decoder of the target reversible neural network to decode the audio data embedding watermark information, to obtain the restored watermark information corresponding to the audio data embedding watermark information, wherein the target reversible neural network is obtained by training the initial reversible neural network using the target training set, the weighted attack strategy and the composite loss function, the target training set includes sample audio data, the composite loss function is used to quantify the performance difference of the initial reversible neural network before and after each training using the sample audio data from multiple dimensions, the composite loss function includes a first loss, a second loss, a third loss and a fourth loss, the first loss is used to quantify the difference between the watermark information corresponding to the sample audio data in the target training set and the watermark information restored by the initial reversible neural network, the second loss is used to quantify the difference between the sample audio data in the target training set before and after adding the watermark information, the third loss is used to control the auditory quality of the sample audio data after adding the watermark information, and the fourth loss is used to train the performance of the encoder of the initial reversible neural network in the process of adding the watermark information, and the weighted attack strategy is used to indicate the attack type when simulating attacks on the sample audio data embedding watermark information in the training process and the weight corresponding to each attack type.

[0108] It should be noted that the specific training process of the target reversible neural network of step S504 obtained by training the initial reversible neural network using the target training set, the weighted attack strategy and the composite loss function is steps S202-S204 in Figure 2 , which will not be repeated here. The process of using the decoder of the target reversible neural network to decode the audio data embedding watermark information to obtain the restored watermark information corresponding to the audio data embedding watermark information is the same as the method of decoding the second sample audio data according to the decoder of the initial reversible neural network to obtain the restored watermark information of the second sample audio data in step S204, which will not be repeated here.

[0109] Figure 6 is a structural schematic diagram of a training device for a reversible neural network for audio watermark processing provided by an embodiment of the present application, comprising:

[0110] The acquisition module 602 is configured to acquire a sample data set, wherein the sample data set includes sample audio data.

[0111] The training module 604 is configured to repeatedly perform the following process until a target loss value is less than a preset threshold value, stop iteration, and obtain a target reversible neural network: randomly selecting a preset number of sample audio data from a sample data set as a target training set; adding watermark information to each sample audio data in the target training set according to an encoder of an initial reversible neural network to obtain a plurality of first sample audio data embedded with watermark information, wherein each first sample audio data corresponds to one piece of watermark information; performing simulated attacks on the plurality of first sample audio data according to a weighted attack strategy to obtain a plurality of second sample audio data, wherein the weighted attack strategy is used to indicate an attack type when each first sample audio data is subjected to a simulated attack and a weight corresponding to each attack type; decoding the plurality of second sample audio data according to a decoder of the initial reversible neural network to obtain restored watermark information of each second sample audio data; calculating a loss value of a composite loss function corresponding to each sample audio data in the target training set, determining a target loss value according to the loss values corresponding to all sample audio data, and adjusting network parameters of the initial reversible neural network according to the target loss value.

[0112] It should be noted that, Figure 6 The reversible neural network training device for audio watermark processing shown in the reversible neural network training device for audio watermark processing is configured to perform Figure 2 The reversible neural network training method for audio watermark processing shown in the reversible neural network training method for audio watermark processing, and therefore Figure 2 The reversible neural network training method for audio watermark processing in the reversible neural network training method for audio watermark processing is also applicable to the reversible neural network training device for audio watermark processing, and will not be described here.

[0113] It should be noted that each module in the reversible neural network training device for audio watermark processing described above can be a program module (for example, a set of program instructions that implement a certain specific function) or a hardware module. For the latter, it can be in the following form, but is not limited to this: the form of each module is a processor, or the functions of each module are implemented by a processor.

[0114] The embodiments of the present application also provide a non-volatile storage medium, which includes a stored program, wherein the non-volatile storage medium is configured to execute the reversible neural network training method for audio watermark processing or the audio watermark processing method described above when the program is running.

[0115] The embodiments of the present application also provide an electronic device, which includes a processor configured to execute the reversible neural network training method for audio watermark processing or the audio watermark processing method described above when a program is running.

[0116] According to another aspect of the embodiments of the present application, a computer program product is also provided, which comprises a computer program. When the computer program is executed by a processor, the above method for training a reversible neural network for audio watermark processing or the method for processing an audio watermark is implemented.

[0117] In the above-described embodiments of the present application, the description of each embodiment focuses on different aspects. The parts not described in detail in a certain embodiment can be referred to the relevant description of other embodiments.

[0118] In the several embodiments provided in the present application, it should be understood that the disclosed technology can be implemented in other ways. Of course, the embodiment described above is only illustrative. For example, the division of units can be a logical function division. In actual implementation, another division mode can be used, for example, a plurality of units or components can be combined or integrated into another system, or some features can be omitted or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some interfaces, units or modules, which can be electrical or other forms.

[0119] The units described as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, i.e., they can be located in one place or distributed on multiple units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.

[0120] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.

[0121] The integrated unit, if realized in the form of a software functional unit and sold or used as an independent product, can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application or the essential part or all or part of the related technology that make contributions can be embodied in the form of a software product. The computer software product is stored in a storage medium, including a plurality of instructions for causing a computer device (which can be a personal computer, a server or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: a U disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a mobile hard disk, a magnetic disk or an optical disk, and various media that can store program codes.

[0122] The above merely preferred embodiments of the present application, it should be noted that for those of ordinary skill in the art, without departing from the principles of the present application, can also make a number of improvements and refinements, these improvements and refinements should also be considered as the scope of protection of the present application.

Claims

1. A method for training a reversible neural network for audio watermarking, characterized in that, The method comprises: obtaining a sample data set, wherein the sample data set comprises sample audio data; repeating the following process until a target loss value is less than a preset threshold, stopping iteration, and obtaining a target reversible neural network: randomly selecting a preset number of sample audio data from the sample data set to determine a target training set; adding watermark information to each sample audio data in the target training set according to an encoder of an initial reversible neural network to obtain a plurality of first sample audio data embedded with watermark information, wherein each first sample audio data corresponds to one watermark information; performing simulated attacks on the plurality of first sample audio data according to a weighted attack strategy to obtain a plurality of second sample audio data, wherein the weighted attack strategy is used to indicate the attack type when performing simulated attacks on each first sample audio data and the weight corresponding to each attack type, the initial weights of all attack types are the same, and the initial weights of each attack type are updated according to the corresponding bit error rate after each simulated attack; Before performing simulated attacks on the plurality of first sample audio data according to the weighted attack strategy, the method further comprises: performing offset processing on the plurality of first sample audio data according to a preset offset rule, wherein the preset offset rule is used to indicate the offset degree of the offset processing on the first sample audio data; decoding the plurality of second sample audio data according to a decoder of the initial reversible neural network to obtain restored watermark information of each second sample audio data; calculating the loss value of a composite loss function corresponding to each sample audio data in the target training set, determining the target loss value according to the loss values corresponding to all sample audio data, and adjusting the network parameters of the initial reversible neural network according to the target loss value.

2. The method of claim 1, wherein, The composite loss function comprises a first loss, a second loss, a third loss, and a fourth loss, the first loss is used to quantify the difference between the watermark information corresponding to the sample audio data in the target training set and the restored watermark information through the initial reversible neural network, the second loss is used to quantify the difference between the sample audio data in the target training set before and after adding watermark information, the third loss is used to control the auditory quality of the sample audio data after adding watermark information, and the fourth loss is used to train the performance of the encoder of the initial reversible neural network in the process of adding watermark information.

3. The method of claim 1, wherein, The watermark information is added to any one of the sample audio data in the target training set in the following way to obtain the first sample audio data embedded with watermark information: For a sample audio data spectrum corresponding to third sample audio data in the target training set and a watermark information feature map corresponding to watermark information of the third sample audio data, encoding processing is started through a first reversible block of the encoder until the last reversible block is traversed, and a first sample audio data corresponding to the third sample audio data and embedding watermark information is obtained, wherein the third sample audio data is any one sample audio data in the target training set, and the watermark information is a random binary vector of a preset length.

4. The method of claim 1, wherein, The offset processing of the plurality of first sample audio data according to the preset offset rule comprises: For each first sample audio data, an audio truncation segment and an audio splicing segment are determined according to the preset offset rule, wherein the audio truncation segment is a sample audio data segment for audio truncation in the first sample audio data, and the audio splicing segment is a sample audio data segment for filling the audio truncation segment, and the length of the audio truncation segment is the same as that of the audio splicing segment; The audio truncation segment is cut from the first sample audio data to obtain a cut first sample audio data; The cut first sample audio data is spliced with the audio splicing segment to obtain a new first sample audio data.

5. The method of claim 4, wherein, The simulated attack of the plurality of first sample audio data according to the weighted attack strategy comprises: For each new first sample audio data, a target attack type is determined from a preset attack type set according to the weight of each attack type in the preset attack type set indicated in the weighted attack strategy; An attack simulator corresponding to the target attack type is used to simulate the attack on the new first sample audio data to obtain a second sample audio data, wherein the attack simulator is used to simulate the interference on the new first sample audio data in the transmission process according to the target attack type.

6. The method of claim 1, wherein, The decoding of the plurality of second sample audio data according to the decoder of the initial reversible neural network comprises: For each second sample audio data, decoding is started from the last reversible block of the decoder until the first reversible block is traversed to obtain a restored watermark information feature map of the second sample audio data; Inverse short-time Fourier transform is performed on the restored watermark information feature map to obtain the restored watermark information.

7. The method of claim 2, wherein, The calculation of the loss value of the composite loss function corresponding to each sample audio data in the target training set comprises: For each sample audio data in the target training set, a first loss value, a second loss value, a third loss value, and a fourth loss value are determined; The loss value of the composite loss function is determined based on the loss value corresponding to the first loss, the loss value corresponding to the second loss, the loss value corresponding to the third loss, and the loss value corresponding to the fourth loss, as well as the first hyperparameter corresponding to the first loss, the second hyperparameter corresponding to the second loss, the third hyperparameter corresponding to the third loss, and the fourth hyperparameter corresponding to the fourth loss.

8. The method of claim 7, wherein, The loss values ​​corresponding to the first loss, the second loss, and the fourth loss are determined in the following manner: The loss value corresponding to the first loss is determined based on the watermark information corresponding to the sample audio data and the restored watermark information corresponding to the sample audio data. The loss value corresponding to the second loss is determined based on the sample audio data and the first sample audio data corresponding to the sample audio data; The loss value corresponding to the fourth loss is determined at least based on the discriminator, wherein the discriminator is used to classify the sample audio data as 0 and classify the first sample audio data corresponding to the sample audio data as 1.

9. The method of claim 7, wherein, The loss value corresponding to the third loss is determined in the following manner: The audio signal of the sample audio data and the first sample audio data corresponding to the sample audio data are divided into multiple sub-signals according to non-overlapping frequency bands; Each sub-signal of the audio signal of the sample audio data and each sub-signal of the first sample audio data corresponding to the sample audio data are subjected to frame segmentation processing to obtain multiple time-frequency windows, wherein each time-frequency window corresponds to a time window size and a frequency band; Calculate the loudness difference between the sample audio data segment corresponding to each time-frequency window and the first sample audio data segment corresponding to the sample audio data; The loss value corresponding to the third loss is determined based on the loudness difference corresponding to all the time-frequency windows.

10. A method of processing an audio watermark, characterized by, include: Acquire audio data; The encoder of the target reversible neural network is used to embed watermark information in the audio data, obtaining audio data embedded with watermark information, wherein the target reversible neural network is obtained by training an initial reversible neural network using a target training set, a weighted attack strategy, and a composite loss function, the target training set includes sample audio data, the composite loss function is used to quantify the performance difference of the initial reversible neural network before and after each training using the sample audio data from multiple dimensions, the composite loss function includes a first loss, a second loss, a third loss, and a fourth loss, the first loss is used to quantify the difference between the watermark information corresponding to the sample audio data in the target training set and the watermark information restored by the initial reversible neural network, the second loss is used to quantify the difference between the sample audio data in the target training set before and after adding watermark information, the third loss is used to control the auditory quality of the sample audio data after adding watermark information, and the fourth loss is used to train the performance of the encoder of the initial reversible neural network during the adding of watermark information, the weighted attack strategy is used to indicate the attack type and the corresponding weight of each attack type when simulating attacks on the sample audio data embedded with watermark information during the training process, wherein the initial weights of all attack types are the same, and the initial weights of each attack type are updated according to the corresponding bit error rate after each simulation attack; before simulating attacks on the sample audio data embedded with watermark information, the method further includes: performing offset processing on a plurality of sample audio data embedded with watermark information according to a preset offset rule, wherein the preset offset rule is used to indicate the offset degree of the offset processing on the sample audio data embedded with watermark information.

11. A method of processing an audio watermark, characterized by, Comprise: Obtaining audio data embedded with watermark information; decoding the audio data with the embedded watermark information by using a decoder of a target reversible neural network, to obtain restored watermark information corresponding to the audio data with the embedded watermark information, wherein the target reversible neural network is obtained by training an initial reversible neural network by using a target training set, a weighted attack strategy and a composite loss function, the target training set includes sample audio data, the composite loss function is used to quantify performance differences of the initial reversible neural network before and after each training by using the sample audio data from multiple dimensions, the composite loss function includes a first loss, a second loss, a third loss and a fourth loss, the first loss is used to quantify differences between watermark information corresponding to the sample audio data in the target training set and restored watermark information by the initial reversible neural network, the second loss is used to quantify differences between the sample audio data in the target training set before and after adding watermark information, the third loss is used to control auditory quality of the sample audio data after adding watermark information, and the fourth loss is used to train performance of an encoder of the initial reversible neural network in the process of adding watermark information, the weighted attack strategy is used to indicate attack types and weights corresponding to each attack type when simulating attacks on the sample audio data with the embedded watermark information in the training process, wherein initial weights of all attack types are the same, and the initial weights of each attack type are updated according to a corresponding bit error rate after each simulation attack; before simulating attacks on the sample audio data with the embedded watermark information, the method further includes: performing offset processing on a plurality of the sample audio data with the embedded watermark information according to a preset offset rule, wherein the preset offset rule is used to indicate an offset degree of the offset processing on the sample audio data with the embedded watermark information.

12. A training device for a reversible neural network for audio watermarking processing, characterized in that, Comprise: an acquisition module, configured to acquire a sample data set, wherein the sample data set includes sample audio data; a training module, configured to repeatedly perform the following process until a target loss value is less than a preset threshold, stop iteration, and obtain a target reversible neural network: randomly select a preset number of sample audio data from the sample data set as a target training set; add watermark information to each sample audio data in the target training set according to an encoder of an initial reversible neural network, to obtain a plurality of first sample audio data with embedded watermark information, wherein each first sample audio data corresponds to one watermark information; According to a weighted attack strategy, the first sample audio data is simulated to obtain second sample audio data, wherein the weighted attack strategy is used to indicate the attack type when simulating each first sample audio data and the weight corresponding to each attack type, the initial weight of all attack types is the same, and the initial weight of each attack type is updated according to the corresponding bit error rate after each simulation; before simulating the first sample audio data according to the weighted attack strategy, the first sample audio data is offset according to a preset offset rule, wherein the preset offset rule is used to indicate the offset degree of the first sample audio data. According to the decoder of the initial reversible neural network, the second sample audio data is decoded to obtain the restored watermark information of each second sample audio data. The loss value of the composite loss function corresponding to each sample audio data in the target training set is calculated, the target loss value is determined according to the loss value corresponding to all sample audio data, and the network parameters of the initial reversible neural network are adjusted according to the target loss value.

13. An electronic device, comprising: Comprise: Memory and processor, the processor is used to run the program stored in the memory, wherein the program runs and executes the training method of the reversible neural network for audio watermark processing in any one of claims 1 to 9 or the audio watermark processing method in claim 10 or the audio watermark processing method in claim 11.

Citation Information

Patent Citations

  • Video watermarking method based on reversible neural network

    CN119996788A