Audio watermark embedding method and device, electronic equipment and storage medium

By dividing and encoding the audio watermarks attributes and embedding the audio spectrum, the problem that audio watermarks are susceptible to processing in the prior art is solved, and a more efficient and stable audio watermark embedding effect is achieved.

CN119152861AActive Publication Date: 2024-12-17PING AN TECH (SHENZHEN) CO LTD

Patent Information

Application Number
CN202411187782.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-27
Publication Date
2024-12-17
Estimated Expiration
2044-08-27

AI Technical Summary

Technical Problem

Existing audio watermark embedding methods are susceptible to the influence of audio processing operations, resulting in poor concealment of watermarks and poor results.

Method used

By dividing and encoding the watermark attribute data and content data, the target watermark data block is generated and embedded in the audio spectrum according to the preset encoding rate. Inverse discrete cosine transformation and band division are used to ensure that the watermark is in the audio signal concealment and recognizability in.

Benefits of technology

It improves the concealment and effect of audio watermark embedding, and can extract complete watermark information from the remaining audio when some watermarks are damaged or lost, enhancing the stability and reliability of audio watermarks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119152861A_ABST
    Figure CN119152861A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an audio watermark embedding method and device, electronic equipment and a storage medium, and belongs to the technical field of voice processing. The method comprises the following steps: carrying out attribute division on watermark attribute data to obtain watermark attribute blocks, and carrying out content division on watermark content data to obtain watermark content blocks; encoding the watermark attribute block, and combining the encoded attribute encoding sequence block and the watermark content block to obtain a target watermark data block; and embedding the target watermark data block into the target spectrum according to the coding rate to obtain a target audio. According to the embodiment of the invention, the watermark attribute block is coded, so that the watermark can be identified when the position of the watermark in the audio signal deviates; according to the audio watermark embedding method and device, the target watermark data block is embedded into the target frequency spectrum according to the coding rate, the audio watermark can be repeatedly embedded into the audio, when part of the audio watermark is damaged or lost, complete watermark information can still be extracted from the rest of the audio, and the audio watermark embedding effect is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of speech processing technology, and in particular to an audio watermark embedding method and device, an electronic device and a storage medium. Background Art

[0002] At present, the audio watermark embedding method usually directly modifies the sampling point data of the audio signal and embeds the audio watermark information into the least significant bit of each sampling point. For example, during the insurance claim process, the insurance company may receive multiple audio recordings from different channels. In order to confirm the source and authenticity of these audio recordings, a watermark containing timestamps, device numbers, key transaction information (such as transaction amounts, partial digits of account numbers), etc. will be embedded in the recording process. However, this method is easily affected by audio processing operations (such as compression, filtering, etc.), which makes the watermark concealment worse or even loses the watermark information, resulting in poor audio watermark embedding effect. Therefore, how to improve the effect of audio watermark embedding has become an urgent problem to be solved. Summary of the invention

[0003] The main purpose of the embodiments of the present application is to propose an audio watermark embedding method and device, an electronic device and a storage medium, aiming to improve the audio watermark embedding effect.

[0004] To achieve the above purpose, a first aspect of an embodiment of the present application proposes an audio watermark embedding method, the method comprising:

[0005] Acquire original watermark data; wherein the original watermark data includes watermark attribute data and watermark content data;

[0006] Performing attribute division on the watermark attribute data to obtain watermark attribute blocks, and performing content division on the watermark content data to obtain watermark content blocks;

[0007] Encoding the watermark attribute block to obtain an attribute coding sequence block;

[0008] Merging the attribute coding sequence block and the watermark content block to obtain a target watermark data block;

[0009] Obtaining original audio, and obtaining a frequency spectrum of the original audio to obtain a target frequency spectrum;

[0010] The target watermark data block is embedded into the target spectrum according to a preset coding rate to obtain the target audio.

[0011] In some embodiments, embedding the target watermark data block into the target spectrum to obtain the target audio according to a preset coding rate includes:

[0012] Selecting a target spectrum segment from the target spectrum; the target spectrum segment is used to represent the spectrum segment where the target watermark data block is to be embedded;

[0013] Performing frequency band division on the target spectrum segment to obtain a target spectrum band;

[0014] embedding the target watermark data block into the target spectrum band according to the coding rate to obtain an embedded watermark spectrum;

[0015] The embedded watermark spectrum is subjected to inverse discrete cosine transform to obtain the target audio.

[0016] In some embodiments, embedding the target watermark data block into the target spectrum band according to the coding rate to obtain an embedded watermark spectrum includes:

[0017] Acquire a first channel and a second channel; the first channel is used to indicate that the encoding result of the target watermark data block is zero, and the embedding of the target watermark data block is realized through an even-numbered channel; the second channel is used to indicate that the encoding result of the target watermark data block is not zero, and the embedding of the target watermark data block is realized through an odd-numbered channel;

[0018] The target watermark data block is embedded in the target spectrum band according to the coding rate and the first channel to obtain an embedded watermark spectrum; or the target watermark data block is embedded in the target spectrum band according to the coding rate and the second channel to obtain an embedded watermark spectrum.

[0019] In some embodiments, encoding the watermark attribute block to obtain an attribute coding sequence block includes:

[0020] Performing a flip operation on the watermark attribute block to obtain a flip sequence block;

[0021] splicing the flip sequence block with the corresponding watermark attribute block to obtain a palindrome sequence block;

[0022] The palindrome sequence block is encoded to obtain the attribute coding sequence block.

[0023] In some embodiments, the step of performing attribute division on the watermark attribute data to obtain watermark attribute blocks, and performing content division on the watermark content data to obtain watermark content blocks, comprises:

[0024] compressing the watermark attribute data to obtain compressed watermark attribute data; compressing the watermark content data to obtain compressed watermark content data;

[0025] The compressed watermark attribute data is binary-converted to obtain a binary watermark attribute sequence; the compressed watermark content data is binary-converted to obtain a binary watermark content sequence;

[0026] The binary watermark attribute sequence is divided into data length blocks according to a preset data length to obtain the watermark attribute block; the binary watermark content sequence is divided into data length blocks according to a preset data length to obtain the watermark content block.

[0027] In some embodiments, after embedding the target watermark data block into the target spectrum to obtain the target audio according to the preset coding rate, the method further includes:

[0028] Performing discrete cosine transform on the target audio to obtain the target spectrum;

[0029] Performing a decoding operation on the target spectrum to obtain a decoded watermark attribute block;

[0030] Searching for the corresponding watermark content block according to the decoded watermark attribute block;

[0031] splicing the watermark content blocks to obtain a binary audio watermark block;

[0032] The binary audio watermark block is decompressed to obtain the original watermark data.

[0033] In some embodiments, the decoding operation on the target spectrum to obtain a decoded watermark attribute block includes:

[0034] Performing attribute watermark detection on the target spectrum to obtain a detected watermark attribute block;

[0035] Performing palindrome recognition on the detection watermark attribute block to obtain a palindrome watermark attribute block;

[0036] Performing position detection on the palindrome watermark attribute block to obtain the palindrome watermark attribute block position;

[0037] Acquire the encoding order of the palindrome watermark attribute block according to the position of the palindrome watermark attribute block;

[0038] The detected watermark attribute block is decoded according to the encoding order to obtain the decoded watermark attribute block.

[0039] To achieve the above-mentioned purpose, a second aspect of an embodiment of the present application proposes an audio watermark embedding device, the device comprising:

[0040] A watermark data acquisition module, used to acquire original watermark data; wherein the original watermark data includes watermark attribute data and watermark content data;

[0041] An attribute and content division module, used to perform attribute division on the watermark attribute data to obtain watermark attribute blocks, and to perform content division on the watermark content data to obtain watermark content blocks;

[0042] A watermark encoding module, used for encoding the watermark attribute block to obtain an attribute encoding sequence block;

[0043] A watermark merging module, used for merging the attribute coding sequence block and the watermark content block to obtain a target watermark data block;

[0044] An audio spectrum acquisition module is used to acquire original audio, and acquire the spectrum of the original audio to obtain a target spectrum;

[0045] The watermark embedding module is used to embed the target watermark data block into the target spectrum according to a preset coding rate to obtain the target audio.

[0046] To achieve the above objectives, a third aspect of an embodiment of the present application proposes an electronic device, which includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the method described in the first aspect is implemented.

[0047] To achieve the above-mentioned purpose, the fourth aspect of an embodiment of the present application proposes a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described in the first aspect is implemented.

[0048] The audio watermark embedding method and device, electronic device and storage medium proposed in the present application obtain original watermark data; wherein the original watermark data includes watermark attribute data and watermark content data; attribute division is performed on the watermark attribute data to obtain watermark attribute blocks, and content division is performed on the watermark content data to obtain watermark content blocks; encoding is performed on the watermark attribute blocks to obtain attribute coding sequence blocks; the attribute coding sequence blocks and the watermark content blocks are merged to obtain target watermark data blocks; original audio is obtained, and the spectrum of the original audio is obtained to obtain a target spectrum; the target watermark data block is embedded in the target spectrum according to a preset coding rate to obtain the target audio. The present application firstly performs attribute division on watermark attribute data and content division on watermark content data, thereby helping to standardize the subsequent audio watermark embedding process and simplifying the embedding of audio watermarks; secondly, by encoding the watermark attribute block, the audio watermark can be identified even when its position in the audio signal is offset, thereby improving the concealment of the audio watermark embedding; the attribute coding sequence block is merged with the watermark content block to generate the audio watermark to be embedded; finally, the target watermark data block is embedded into the target spectrum according to the coding rate to obtain the target audio, and the audio watermark can be repeatedly embedded into the audio. When part of the audio watermark is damaged or lost, the complete watermark information can still be extracted from the remaining audio, thereby further improving the effect of audio watermark embedding. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] Figure 1 is a flow chart of the audio watermark embedding method provided by an embodiment of the present application;

[0050] Figure 2 yes Figure 1 Flow chart of step S102 in FIG.

[0051] Figure 3 yes Figure 1 Flow chart of step S103 in FIG.

[0052] Figure 4 yes Figure 1 Flow chart of step S106 in FIG.

[0053] Figure 5 yes Figure 4 Flow chart of step S403 in FIG.

[0054] Figure 6 is another flow chart of the audio watermark embedding method provided by an embodiment of the present application;

[0055] Figure 7 yes Figure 6 Flowchart of step S602 in FIG.

[0056] Figure 8It is a structural diagram of an audio watermark embedding device provided in an embodiment of the present application;

[0057] Fig. 9 It is a schematic diagram of the hardware structure of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION

[0058] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0059] It should be noted that, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first", "second", etc. in the specification, claims and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0060] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0061] Based on this, the embodiments of the present application provide an audio watermark embedding method and device, an electronic device and a storage medium, aiming to improve the audio watermark embedding effect.

[0062] The audio watermark embedding method and device, electronic device and storage medium provided in the embodiments of the present application are specifically explained through the following embodiments. First, the audio watermark embedding method in the embodiments of the present application is described.

[0063] The audio watermark embedding method provided in the embodiment of the present application relates to the field of speech processing technology. The audio watermark embedding method provided in the embodiment of the present application can be applied to a terminal, can be applied to a server side, or can be software running in a terminal or a server side. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc.; the server side can be configured as an independent physical server, or a server cluster or a distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application that implements the audio watermark embedding method, etc., but is not limited to the above forms.

[0064] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.

[0065] Figure 1 is an optional flow chart of the audio watermark embedding method provided in the embodiment of the present application. Figure 1 The method may include but is not limited to steps S101 to S106.

[0066] Step S101, obtaining original watermark data; wherein the original watermark data includes watermark attribute data and watermark content data.

[0067] Step S102, performing attribute division on the watermark attribute data to obtain watermark attribute blocks, and performing content division on the watermark content data to obtain watermark content blocks.

[0068] Step S103: Encode the watermark attribute block to obtain an attribute coding sequence block.

[0069] Step S104: merge the attribute coding sequence block and the watermark content block to obtain a target watermark data block.

[0070] Step S105, obtaining the original audio, and obtaining the spectrum of the original audio to obtain a target spectrum.

[0071] Step S106: embed the target watermark data block into the target spectrum according to a preset coding rate to obtain the target audio.

[0072] Steps S101 to S106 shown in the embodiment of the present application are performed by obtaining original watermark data; wherein the original watermark data includes watermark attribute data and watermark content data; performing attribute division on the watermark attribute data to obtain watermark attribute blocks, and performing content division on the watermark content data to obtain watermark content blocks; encoding the watermark attribute blocks to obtain attribute coding sequence blocks; merging the attribute coding sequence blocks and the watermark content blocks to obtain target watermark data blocks; obtaining original audio, and obtaining the spectrum of the original audio to obtain the target spectrum; and embedding the target watermark data block into the target spectrum according to a preset coding rate to obtain the target audio. The present application firstly performs attribute division on watermark attribute data and content division on watermark content data, thereby helping to standardize the subsequent audio watermark embedding process and simplifying the embedding of audio watermarks; secondly, by encoding the watermark attribute block, the audio watermark can be identified even when its position in the audio signal is offset, thereby improving the concealment of the audio watermark embedding; the attribute coding sequence block is merged with the watermark content block to generate the audio watermark to be embedded; finally, the target watermark data block is embedded into the target spectrum according to the coding rate to obtain the target audio, and the audio watermark can be repeatedly embedded into the audio. When part of the audio watermark is damaged or lost, the complete watermark information can still be extracted from the remaining audio, thereby further improving the effect of audio watermark embedding.

[0073] In step S101 of some embodiments, specifically, the original watermark data refers to the watermark data that needs to be embedded in the original audio, including watermark attribute data and watermark content data; wherein the watermark attribute data refers to the indication data that needs to be embedded in the watermark; and the watermark content data refers to the watermark data that actually needs to be embedded in the audio.

[0074] For example, in insurance claims, the watermark content data may include the user identity information, timestamp, transaction amount, and partial digits of the transaction account number of the user using the insurance claim recording; the watermark attribute data may include the embedding length and embedding strength indicating the claim content.

[0075] Furthermore, the source of the claim request can be ensured by checking the user identity information, the timestamp can accurately record the time when the insurance claim recording occurred, which helps to determine the chronological order of events and prevent claim fraud, the watermark of the transaction amount can ensure the accuracy of the claim amount and prevent the amount from being tampered with during transmission, and the transaction account number can partially hide the account information while providing sufficient data for identity authentication and transaction tracking.

[0076] Specifically, the original watermark data can be obtained from a database, and the database can be a backend database of an enterprise.

[0077] See also Figure 2In some embodiments, step S102 may include but is not limited to steps S201 to S203:

[0078] Step S201, compressing watermark attribute data to obtain compressed watermark attribute data; compressing watermark content data to obtain compressed watermark content data.

[0079] Step S202, performing binary conversion on the compressed watermark attribute data to obtain a binary watermark attribute sequence; performing binary conversion on the compressed watermark content data to obtain a binary watermark content sequence.

[0080] Step S203, dividing the binary watermark attribute sequence into data length blocks according to the preset data length to obtain watermark attribute blocks; dividing the binary watermark content sequence into data length blocks according to the preset data length to obtain watermark content blocks.

[0081] In step S201 of some embodiments, specifically, a compressor is defined, and the watermark attribute data is transmitted to the compressor to perform a compression operation to obtain compressed watermark attribute data.

[0082] Specifically, the compressor can be initialized, the compression level, compression method, window size and compression strategy of the compressor after initialization can be defined, and the compressor can be generated according to the defined parameters. The compression level ranges from 0 to 9, indicating that the compression degree ranges from no compression to maximum compression; the compression method indicates that the DEFLATE compression algorithm is used for compression; the window size usually ranges from -15 to -8, where -15 indicates the use of the default window size (i.e., maximum compression), and other values ​​can be used to specify a custom window size; the compression strategy includes the default strategy and the filter strategy.

[0083] Furthermore, by using a compressor pointer to point to the watermark attribute data, the data to be compressed is passed to the compressor, and the compression size of the watermark attribute data is determined; based on the compression size, compression level, compression method, window size, compression strategy and compressor, a compression operation is performed to obtain compressed watermark attribute data.

[0084] Among them, the compressor initialization can be implemented through the deflateInit2 function, the compressor pointer can be the zs.next_i n function, the zs.next_i n function can determine the starting data of the watermark attribute data that needs to be compressed, and the zs.avai l_i n function can determine the size of the watermark attribute data that needs to be compressed; further, the zs.next_out function is used to point to the starting position of the buffer used to store the compressed data, that is, the compressed data is written into the buffer, and the compressed data stored in the buffer is written to the output file or output stream, and finally the compressed watermark attribute data is output.

[0085] Specifically, the method of compressing the watermark content data to obtain the compressed watermark content data is the same as the method of compressing the watermark attribute data to obtain the compressed watermark attribute data, which will not be described in detail here.

[0086] In this embodiment, by compressing the watermark attribute data and the watermark content data, the data volume of the watermark attribute data and the watermark content data can be reduced, which helps to improve the data transmission efficiency. The compression level, compression method, window size and compression strategy can also be configured in the compression process, which helps to improve the compression effect of data compression, thereby facilitating the improvement of the efficiency and effect of subsequent audio embedding.

[0087] In step S202 of some embodiments, the binary watermark attribute sequence refers to a watermark attribute sequence described in binary; the binary watermark content sequence refers to a watermark content sequence described in binary.

[0088] Specifically, each byte sequence may be converted into a binary representation by traversing the byte sequence of the compressed watermark attribute data and binary encoding each byte sequence using a preset tool.

[0089] Specifically, the preset tool may be a binary encoding conversion tool such as utf-8, utf-32, Punycode or Base64.

[0090] For example, you can convert each byte to an octal binary string or a hexadecimal binary string.

[0091] Specifically, the method of performing binary conversion on the compressed watermark content data to obtain the binary watermark content sequence is consistent with the method of performing binary conversion on the compressed watermark attribute data to obtain the binary watermark attribute sequence, which will not be described in detail here.

[0092] In this embodiment, the compressed watermark attribute data is converted into binary, and the compressed watermark content data is converted into binary. Since the data can be represented in a standardized manner, it helps to improve the efficiency of subsequent encoding and can also reduce data transmission errors during the data transmission process.

[0093] In step S203 of some embodiments, a watermark attribute block refers to a data block obtained by encapsulating watermark attribute data after dividing it according to the attribute data length; a watermark content block refers to a data block obtained by encapsulating watermark content data after dividing it according to the content data length; and each watermark attribute block has a corresponding watermark content block.

[0094] Specifically, the preset data length is used to represent the length of each data block when the data is divided into multiple data blocks, and the data length of each data block is equal.

[0095] Specifically, the binary watermark attribute sequence is divided into data length blocks according to the data length to obtain a plurality of watermark attribute blocks.

[0096] For example, if the watermark attribute sequence contains 19 byte sequences and the data length is 2 byte sequence length, the watermark attribute sequence is divided into 10 watermark attribute blocks. Since the 10th watermark attribute block has only 1 byte sequence, which is less than 2 byte sequence length, zeros can be added to the end until the 2-byte sequence length is reached (the 19th byte sequence is 01101100, and the full byte sequence is 00000000).

[0097] Specifically, the method of dividing the binary watermark content sequence into data length blocks according to the preset data length to obtain the watermark content block is consistent with the method of dividing the binary watermark attribute sequence into data length blocks according to the preset data length to obtain the watermark attribute block, which will not be repeated here.

[0098] In this embodiment, the binary watermark attribute sequence is divided into data length blocks according to the preset data length, and the binary watermark content sequence is divided into data length blocks according to the preset data length, so that the data is divided into equal-length data blocks. When the length of the data block is insufficient, zero padding can be performed to ensure the alignment and completeness of the data block during transmission, improve the data transmission rate, and divide the data into multiple data blocks, so that the data blocks can be batch processed, which helps to improve the efficiency of subsequent audio encoding.

[0099] See also Figure 3 In some embodiments, step S103 may include but is not limited to steps S301 to S303:

[0100] Step S301, performing a flip operation on the watermark attribute block to obtain a flip sequence block.

[0101] Step S302, concatenating the flip sequence block and its corresponding watermark attribute block to obtain a palindrome sequence block;

[0102] Step S303: Encode the palindrome sequence block to obtain an attribute coding sequence block.

[0103] In step S301 of some embodiments, specifically, the reversed sequence block refers to a sequence block after the watermark attribute block is reversed.

[0104] For example, if the watermark attribute block is 01010011, the flip sequence block after flipping is 11001010.

[0105] In step S302 of some embodiments, the palindrome sequence block refers to a sequence block formed by splicing a watermark attribute block and a flip sequence block.

[0106] For example, the watermark attribute block is 01010011, the flip sequence block is 11001010, and the palindrome sequence block is 0101001111001010.

[0107] In step S303 of some embodiments, specifically, the watermark attribute block is encoded in a binary palindrome manner, that is, the palindrome sequence is encoded, wherein the encoding length of the watermark attribute block is L1, and the total encoding length of the palindrome sequence is 2*L1; and L1 can be determined based on the length of the binary string, which can generally be 8, 16, 32 or 64, etc.

[0108] For example, the binary representation of the first palindrome sequence block is H1, the binary representation of the second palindrome sequence block is H2, and the binary representation of the third palindrome sequence block is H3. Then the attribute coding sequence block can be:

[0109] H1=10...0000|0000...01; H2=01...0000|0000...10; H3=11...0000|0000...11, wherein 10...0000 is a watermark coding block with a length of L1; 0000...01 is a flip sequence block with a length of L1; H1=10...0000|0000...01 is a palindrome sequence block with a length of 2*L1.

[0110] In this embodiment, by encoding the palindrome sequence block, it is possible to encode the palindrome sequence block so that in the subsequent audio watermark embedding, even if the position of the watermark in the audio signal is offset, it can be accurately identified, thereby improving the concealment of the audio watermark embedding.

[0111] In step S104 of some embodiments, the target watermark data block is used to represent a data block obtained by merging the attribute coding sequence block and the watermark content block.

[0112] For example, in insurance claims, the watermark content block includes data such as the user identity information, timestamp, transaction amount, and partial digits of the transaction account number of the user using the insurance claim recording; the watermark attribute data includes data such as the embedding length and embedding method (such as periodic embedding) indicating the claim content, and the target watermark data block includes the user identity information, timestamp, transaction amount, and partial digits of the transaction account number of the user using the insurance claim recording embedded through a periodic embedding method and a 6-character sequence embedding length.

[0113] For example, since the watermark data block and the attribute coding sequence block are both represented in binary, the target watermark data block can be Ha=H1|h1=10...0000|0000...01|10...1100; wherein h1 represents the watermark content block corresponding to H1; Hb=H2|h2=01...0000|0000...10|10...0011; wherein h2 represents the watermark content block corresponding to H2; Hc=H3|h3=11...0000|0000...11|10...1001; wherein h3 represents the watermark content block corresponding to H3, and the lengths of these watermark content blocks are all L1.

[0114] In step S105 of some embodiments, the original audio refers to the audio data that needs to be embedded with a watermark, which can be specifically determined based on actual business and is not limited here.

[0115] For example, in the financial field, the original audio can be insurance claim recordings from different channels or transaction audio of users consulting and purchasing financial products.

[0116] Specifically, the original audio may also be obtained from a database, and the database may be a backend database of an enterprise.

[0117] Specifically, the target spectrum is a frequency spectrum representing the original audio.

[0118] Specifically, since the audio signal of the original audio is continuous, before obtaining the spectrum of the original audio, it is usually necessary to divide it into multiple shorter frames for processing, and each frame contains a certain number of sampling points, and there may be overlaps between frames. Therefore, by pre-emphasis processing on the original audio, the audio signal of the original audio is divided into frames according to a set time length to obtain the audio frame signal of each frame of the original audio, and the audio frame signal is windowed to increase the connectivity between the left end and the right end of the frame in the audio frame signal, so that the connection between the audio frame signals is more continuous, and a more accurate spectrum can be obtained.

[0119] For example, the original audio data can be intercepted according to the starting position of the original audio with a window length of 0.025s per frame, and after each interception, the audio frame is moved forward by a frame shift of 0.01s until the end position of the original audio is reached, thereby determining that the original audio processing is completed.

[0120] Furthermore, discrete cosine transform processing is performed on the windowed audio frame signal to generate a target spectrum corresponding to the original audio.

[0121] Specifically, the discrete cosine transform operation can be performed on the original audio by the following formula:

[0122]

[0123] Among them, X(u) represents the target spectrum of the u-th frame; u represents the number of frames of the target spectrum; n represents the number of frames of the original audio; N represents the frame size in the original audio; x(n) represents the original audio of the n-th frame.

[0124] In this embodiment, by acquiring the spectrum of the original audio to obtain the target spectrum, lossless compression of the audio can be achieved, and the transformation of the audio can be accurately represented to maintain the original audio quality, so that the effect of audio watermark embedding can still be guaranteed when the audio watermark is subsequently embedded.

[0125] See also Figure 4 In some embodiments, step S106 may include but is not limited to steps S401 to S404:

[0126] Step S401, selecting a target spectrum segment from a target spectrum; the target spectrum segment is used to represent a spectrum segment where a target watermark data block is to be embedded.

[0127] Step S402: divide the target spectrum segment into frequency bands to obtain the target spectrum bands.

[0128] Step S403: embed the target watermark data block into the target spectrum band according to the coding rate to obtain an embedded watermark spectrum.

[0129] Step S404: perform inverse discrete cosine transform on the embedded watermark spectrum to obtain the target audio.

[0130] In step S401 of some embodiments, the target spectrum segment is used to indicate the spectrum segment into which the target watermark data block is to be embedded.

[0131] Specifically, the spectrum segment may be determined according to actual scenarios.

[0132] For example, in order not to affect the sound quality of the original audio, a spectrum segment in the region of 2000 Hz to 3000 Hz may be selected as the target spectrum segment, which covers the intersection of vowels and consonants. This is because the human ear is least sensitive to the spectrum segment in this region and has the least impact on the sound quality of the original audio.

[0133] In this embodiment, by selecting the target spectrum segment from the target spectrum, it is possible to determine the spectrum segment covering the intersection of vowels and consonants, which helps to retain the basic characteristics of the original audio, thereby maintaining the recognizability of the original audio during the audio watermark embedding process. Moreover, since this spectrum segment is not the most sensitive area of ​​the human ear, embedding a speech watermark in this spectrum segment can achieve a higher compression rate without significantly affecting the auditory experience, which helps to retain the naturalness and intelligibility of the original audio, and further improves the effect of audio watermark embedding.

[0134] In step S402 of some embodiments, the target spectrum band refers to a spectrum band obtained by dividing the target spectrum segment.

[0135] Specifically, the target spectrum band may be determined based on frequency resolution requirements.

[0136] For example, if the target spectrum band is 2000 Hz to 3000 Hz and the required frequency resolution is 50 Hz, then the target spectrum band 3000 Hz-2000 Hz is divided by the frequency resolution 50 Hz to obtain 20, which means that the target spectrum band is divided into 20 spectrum bands of equal width, and the width of each spectrum band is 50 Hz.

[0137] Specifically, the larger the spectrum bandwidth, the finer the target spectrum segment is divided and the better the hearing experience is, but the recognition difficulty increases; and the smaller the spectrum bandwidth, the coarser the division is and the worse the hearing experience is, but the recognition difficulty decreases. In order to avoid the above situation, 50Hz can be selected as the spectrum bandwidth in this case.

[0138] In step S403 of some embodiments, the coding rate is used to indicate the period of embedding the watermark into the target spectrum. The watermark-embedded spectrum refers to the spectrum containing the watermark data.

[0139] For example, the coding rate for embedding the target watermark data block into the target spectrum band is 0.15s, which means that the watermark coding and embedding operation is performed every 0.15s; and the frame shift during the watermark embedding process is 0.01s. The coding rate of 0.15s is divided by the frame shift of 0.01s, and the watermark to be embedded is 15 frames, which means that the target watermark data block is coded and embedded once every 15 frames.

[0140] See also Figure 5 In some embodiments, step S403 may also include but is not limited to steps S501 to S502:

[0141] Step S501, obtaining a first channel and a second channel; the first channel is used to indicate that the encoding result of the target watermark data block is zero, and the embedding of the target watermark data block is achieved through the even-numbered channel; the second channel is used to indicate that the encoding result of the target watermark data block is not zero, and the embedding of the target watermark data block is achieved through the odd-numbered channel.

[0142] Step S502, embedding the target watermark data block into the target spectrum band according to the coding rate and the first channel to obtain an embedded watermark spectrum; or embedding the target watermark data block into the target spectrum band according to the coding rate and the second channel to obtain an embedded watermark spectrum.

[0143] In step S501 of some embodiments, the first channel is used to indicate that the encoding result of the target watermark data block is zero, and the embedding of the target watermark data block is achieved through the even channel; the second channel is used to indicate that the encoding result of the target watermark data block is not zero, and the embedding of the target watermark data block is achieved through the odd channel, and both the first channel and the second channel include odd channels and even channels.

[0144] For example, in the process of coding and embedding the watermark, a method combining the first channel and the second channel can be used for coding and embedding; for the first channel, when the coding result of the target watermark data block is zero, the spectral characteristics of all odd channels of the first channel are set to zero, and the even channels in the first channel remain unchanged; for the second channel, when the coding result of the target watermark data block is not zero, the general coding result is 1, and the spectral characteristics of all even channels of the second channel are set to zero, and the odd channels in the second channel remain unchanged.

[0145] In this embodiment, by combining the first channel and the second channel to embed the target watermark data block, the encoding of the target watermark data block can be dispersed into different channels (odd channels or even channels), which helps to significantly reduce the perceptual impact of the embedded watermark on the original audio signal, improve the concealment of the audio watermark embedding, and increase the redundancy of the watermark, so that even if part of the watermark information is lost or damaged during transmission or processing, the remaining watermark information can still be correctly decoded. The use of a combination of negative and positive embedding methods can also increase the complexity of the watermark, making it more difficult to attempt to remove or tamper with the watermark without authorization, thereby improving the effect of audio watermark embedding.

[0146] In step S502 of some embodiments, watermark embedding may be implemented by the following formula:

[0147] b(i)=2000+i*(1000 / M)

[0148] Wherein, b(i) represents the coding frequency of the i-th channel; i represents the first channel or the second channel; and M represents the number of target spectrum bands.

[0149] Specifically, the coding frequency represented by b(i) can also be used to represent the vertical coordinate value of the spectrum, and each target spectrum band M corresponds to a channel i.

[0150] For example, when the coding rate is 0.15s, the number of target spectrum bands is 20, and the width of each target spectrum band is 50Hz; when the coding result of the target watermark data block is zero, at 0.15s, it is necessary to set the target spectrum of 15 frames in the odd channels of the first channel to 0, and the even channels of the first channel remain unchanged; when the coding result of the target watermark data block is 1, at 0.3s, it is necessary to set the target spectrum of 15 frames in the even channels of the second channel to 0, and the odd channels of the second channel remain unchanged.

[0151] In this embodiment, the target watermark data block is embedded in the target spectrum band according to the coding rate and the first channel or the second channel. The target watermark data block can be periodically and repeatedly embedded in combination with the coding rate, thereby reducing the number of encoding times and improving the efficiency of audio watermark embedding; and a suitable watermark coding embedding position is selected in combination with the first channel or the second channel, thereby improving the effect of audio watermark embedding.

[0152] In step S404 of some embodiments, the target audio refers to converting the frequency domain audio embedded with the watermark into the time domain audio.

[0153] For example, in insurance claims, the watermark of the user identity information, timestamp, transaction amount and transaction account number of the car insurance claim recording is embedded in the car insurance claim recording, and a recording containing the watermark data is obtained. The recording is decoded, and the target audio obtained is also a recording of the watermark data containing the user identity information, timestamp, transaction amount and transaction account number.

[0154] Specifically, the inverse discrete cosine transform can be performed by the following formula:

[0155]

[0156] Wherein, X′(u) represents the embedded watermark spectrum of the u-th frame; u represents the number of frames of the embedded watermark spectrum; n represents the number of time domain signal frames of the target audio; N represents the time domain signal frame size in the target audio; x′(n) represents the target audio of the n-th frame time domain signal.

[0157] In this embodiment, the embedded watermark spectrum is subjected to inverse discrete cosine transform, which can ensure that the information of the original audio signal is retained as completely as possible during the conversion process from frequency domain to time domain, thereby ensuring the consistency of the audio signal during the conversion process.

[0158] See also Figure 6 In some embodiments, after step S106, the audio watermark embedding method further includes steps S601 to S605:

[0159] Step S601, performing discrete cosine transform on the target audio to obtain a target spectrum.

[0160] Step S602: Decode the target spectrum to obtain a decoded watermark attribute block.

[0161] Step S603: searching for a corresponding watermark content block according to the decoded watermark attribute block.

[0162] Step S604: splice the watermark content blocks to obtain a binary audio watermark.

[0163] Step S605, decompress the binary audio watermark to obtain original watermark data.

[0164] In step S601 of some embodiments, the target spectrum is a frequency spectrum representing the original audio.

[0165] Specifically, the method of performing discrete cosine transform on the target audio to obtain the target spectrum is consistent with the method of performing discrete cosine transform on the original audio through the following formula in S105, which will not be repeated here.

[0166] In step S602 of some embodiments, the decoded watermark attribute block refers to the watermark data block obtained after decoding the encoded watermark block, which also includes watermark attribute data. Since the watermark attribute block includes the identification information of the watermark content block, the watermark content block corresponding to each watermark attribute block can be found through the decoded watermark attribute block obtained by decoding.

[0167] See also Figure 7 In some embodiments, step S602 may include but is not limited to steps S701 to S705:

[0168] Step S701: Perform attribute watermark detection on the target spectrum to obtain a detected watermark attribute block.

[0169] Step S702: perform palindrome recognition on the detection watermark attribute block to obtain a palindrome watermark attribute block.

[0170] Step S703: perform position detection on the palindrome watermark attribute block to obtain the position of the palindrome watermark attribute block.

[0171] Step S704: Obtain the coding order of the palindrome watermark attribute block according to the position of the palindrome watermark attribute block.

[0172] Step S705: decode the detected watermark attribute block according to the coding order to obtain a decoded watermark attribute block.

[0173] In step S701 of some embodiments, the detected watermark attribute block refers to a watermark attribute block detected in the target spectrum.

[0174] Specifically, the extracted frequency band features may be decoded, that is, spectrum features may be extracted from the 2000 Hz to 3000 Hz spectrum band to obtain watermark attribute features, and feature extraction may be performed on the watermark attribute features to obtain a detected watermark attribute block.

[0175] In step S702 of some embodiments, the palindrome watermark attribute block refers to a palindrome sequence block detected from the detection watermark attribute block, and the palindrome sequence block should be consistent with the palindrome sequence block of the watermark attribute block when it is encoded.

[0176] Specifically, the target spectrum is detected from the first frame, and the palindrome sequence contained in the first detected detection watermark attribute block is compared with the palindrome sequence block. If the detected palindrome sequence is consistent with the palindrome sequence block, the palindrome information in the detection watermark attribute block is extracted as the palindrome watermark attribute block; if the detected palindrome sequence is inconsistent with the palindrome sequence block, the next frame of the target spectrum is entered to search for a new detection watermark attribute block until the detected palindrome sequence is consistent with the palindrome sequence block.

[0177] In this embodiment, by performing palindrome recognition on the detection watermark attribute block, it can be ensured that the parameters used for watermark embedding have not been tampered with, thereby improving the security of audio watermark embedding.

[0178] In step S703 of some embodiments, the palindrome watermark attribute block position includes the start position and the end position of each palindrome watermark attribute block, and the length of the palindrome watermark attribute block can be determined according to the start position and the end position.

[0179] Specifically, since the watermark attribute blocks are divided according to the same length, the length of each palindrome sequence watermark attribute block should also be equal. By comparing the length of the palindrome watermark attribute block with the length of the previously detected palindrome watermark attribute block, if the length of the palindrome watermark attribute block is consistent with the length of the previously detected palindrome watermark attribute block, the starting position and the ending position are determined according to the length of the palindrome watermark attribute block; if the length of the palindrome watermark attribute block is inconsistent with the length of the previously detected palindrome watermark attribute block, enter the next frame target spectrum to search for a new detection watermark attribute block until the length of the detected palindrome watermark attribute block is consistent with the length of the previously detected palindrome watermark attribute block.

[0180] In this embodiment, by performing position detection on the palindrome watermark attribute block, it is possible to promptly discover when an abnormality occurs in the palindrome watermark attribute block, and the abnormal palindrome watermark attribute block cannot be extracted, which can further ensure the security of watermark embedding. Moreover, since the watermark is periodically embedded according to the encoding rate when the audio watermark is embedded, even if an abnormal palindrome watermark attribute block is found, the watermark content corresponding to the attribute block will not be lost, and the integrity of the watermark can still be guaranteed.

[0181] In step S704 of some embodiments, the encoding order refers to the order in which the watermark attribute blocks are encoded.

[0182] Specifically, by comparing the sequential relationship between the decoded watermark attribute blocks with the sequential relationship between the watermark attribute blocks, if the sequential relationship between the decoded watermark attribute blocks is consistent with the sequential relationship between the watermark attribute blocks, it means that the encoding position of the palindrome watermark attribute block is correct; if the sequential relationship between the decoded watermark attribute blocks is inconsistent with the sequential relationship between the watermark attribute blocks, enter the next frame target spectrum to search for a new detection watermark attribute block until the sequential relationship between the decoded watermark attribute blocks is consistent with the sequential relationship between the watermark attribute blocks.

[0183] For example, if the encoding order of the watermark attribute block is Y1, Y2, Y3, then the encoding order of the palindrome watermark attribute block should also be Y1, Y2, Y3.

[0184] In step S705 of some embodiments, specifically, the detection watermark attribute block is decoded according to the coding sequence Y1, Y2, Y3 to obtain a Y1 decoded watermark attribute block, a Y2 decoded watermark attribute block and a Y3 decoded watermark attribute block.

[0185] In step S603 of some embodiments, specifically, since the decoded watermark attribute block contains the identifier of the corresponding watermark content block, the corresponding watermark content block can be found by decoding the watermark attribute block identifier.

[0186] For example, the decoded watermark attribute block identifier is consistent with the encoding order. If the decoded watermark attribute block identifier is G1, the watermark content block is g1. By detecting each frame spectrum in the target spectrum, the watermark content blocks corresponding to all decoded watermark attribute blocks can be found.

[0187] In this embodiment, by searching for the corresponding watermark content block according to the decoded watermark attribute block, it is possible to closely cooperate with the watermark embedding process, ensure consistency with the parameters and encoding rules used in watermark embedding, and maintain consistency in watermark encoding and decoding.

[0188] In step S604 of some embodiments, the binary audio watermark block should include a binary watermark attribute sequence and a binary watermark content sequence.

[0189] Specifically, since the decoded watermark attribute module is obtained based on the encoding order, each decoded watermark attribute block is spliced ​​with its corresponding watermark content block according to the encoding order of the watermark attribute block to obtain a binary audio watermark.

[0190] For example, according to the encoding order of Y1, Y2, Y3, the binary watermark attribute sequence is T1, T2, T3, and the binary watermark content sequence corresponding to the binary watermark attribute sequence is t1, t2, t3, then the binary audio watermark block is T1t1T2t2T3t3.

[0191] In step S605 of some embodiments, the original watermark data refers to the decompressed watermark data, and also includes watermark attribute data and watermark content data.

[0192] Specifically, the decoded binary audio watermark is still compressed data. In order to obtain the original audio information, the compressed data needs to be decompressed. The compressed data can be decompressed through zlib to obtain the original watermark data.

[0193] The embodiment of the present application obtains original watermark data; wherein the original watermark data includes watermark attribute data and watermark content data; attributes are divided into watermark attribute data to obtain watermark attribute blocks, and contents are divided into watermark content data to obtain watermark content blocks; the watermark attribute blocks are encoded to obtain attribute coding sequence blocks; the attribute coding sequence blocks and the watermark content blocks are merged to obtain target watermark data blocks; original audio is obtained, and the spectrum of the original audio is obtained to obtain a target spectrum; the target watermark data block is embedded into the target spectrum according to a preset encoding rate to obtain target audio. The present application firstly performs attribute division on watermark attribute data and content division on watermark content data, thereby helping to standardize the subsequent audio watermark embedding process and simplifying the embedding of audio watermarks; secondly, by encoding the watermark attribute block, the audio watermark can be identified even when its position in the audio signal is offset, thereby improving the concealment of the audio watermark embedding; the attribute coding sequence block is merged with the watermark content block to generate the audio watermark to be embedded; finally, the target watermark data block is embedded into the target spectrum according to the coding rate to obtain the target audio, and the audio watermark can be repeatedly embedded into the audio. When part of the audio watermark is damaged or lost, the complete watermark information can still be extracted from the remaining audio, thereby further improving the effect of audio watermark embedding.

[0194] See also Figure 8 The embodiment of the present application also provides an audio watermark embedding device, which can implement the above audio watermark embedding method, and the device includes:

[0195] A watermark data acquisition module, used to acquire original watermark data; wherein the original watermark data includes watermark attribute data and watermark content data;

[0196] The attribute and content division module is used to perform attribute division on the watermark attribute data to obtain watermark attribute blocks, and to perform content division on the watermark content data to obtain watermark content blocks;

[0197] A watermark encoding module is used to encode the watermark attribute block to obtain an attribute encoding sequence block;

[0198] A watermark merging module is used to merge the attribute coding sequence block and the watermark content block to obtain a target watermark data block;

[0199] The audio spectrum acquisition module is used to acquire the original audio and obtain the spectrum of the original audio to obtain the target spectrum;

[0200] The watermark embedding module is used to embed the target watermark data block into the target spectrum according to a preset coding rate to obtain the target audio.

[0201] The specific implementation of the audio watermark embedding device is basically the same as the specific implementation of the above-mentioned audio watermark embedding method, and will not be repeated here.

[0202] The embodiment of the present application also provides an electronic device, the electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the above audio watermark embedding method when executing the computer program. The electronic device can be any intelligent terminal including a tablet computer, a car computer, etc.

[0203] See also Fig. 9 , Fig. 9 The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes:

[0204] The processor 901 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application.

[0205] The memory 902 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 902 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 902, and the processor 901 calls and executes the audio watermark embedding method of the embodiment of this application;

[0206] Input / output interface 903, used to implement information input and output;

[0207] Communication interface 904, used to realize communication interaction between the device and other devices, which can be realized through wired mode (such as USB, network cable, etc.) or wireless mode (such as mobile network, WI FI, Bluetooth, etc.);

[0208] A bus 905 that transmits information between the various components of the device (e.g., the processor 901, the memory 902, the input / output interface 903, and the communication interface 904);

[0209] The processor 901 , the memory 902 , the input / output interface 903 and the communication interface 904 are connected to each other in communication within the device via a bus 905 .

[0210] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned audio watermark embedding method is implemented.

[0211] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0212] The audio watermark embedding method, audio watermark embedding device, electronic device and storage medium provided by the embodiments of the present application obtain original watermark data; wherein the original watermark data includes watermark attribute data and watermark content data; attribute division is performed on the watermark attribute data to obtain watermark attribute blocks, and content division is performed on the watermark content data to obtain watermark content blocks; encoding is performed on the watermark attribute blocks to obtain attribute coding sequence blocks; the attribute coding sequence blocks and the watermark content blocks are merged to obtain target watermark data blocks; original audio is obtained, and the spectrum of the original audio is obtained to obtain a target spectrum; the target watermark data block is embedded in the target spectrum according to a preset coding rate to obtain the target audio. The present application firstly performs attribute division on watermark attribute data and content division on watermark content data, thereby helping to standardize the subsequent audio watermark embedding process and simplifying the embedding of audio watermarks; secondly, by encoding the watermark attribute block, the audio watermark can be identified even when its position in the audio signal is offset, thereby improving the concealment of the audio watermark embedding; the attribute coding sequence block is merged with the watermark content block to generate the audio watermark to be embedded; finally, the target watermark data block is embedded into the target spectrum according to the coding rate to obtain the target audio, and the audio watermark can be repeatedly embedded into the audio. When part of the audio watermark is damaged or lost, the complete watermark information can still be extracted from the remaining audio, thereby further improving the effect of audio watermark embedding.

[0213] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0214] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.

[0215] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0216] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.

[0217] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, 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 "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0218] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0219] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. The mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0220] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0221] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0222] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.

[0223] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.

Claims

1. An audio watermark embedding method, It is characterized in that The method comprises: Acquire original watermark data; wherein the original watermark data includes watermark attribute data and watermark content data; Performing attribute division on the watermark attribute data to obtain watermark attribute blocks, and performing content division on the watermark content data to obtain watermark content blocks; Encoding the watermark attribute block to obtain an attribute coding sequence block; Merging the attribute coding sequence block and the watermark content block to obtain a target watermark data block; Obtaining original audio, and obtaining a frequency spectrum of the original audio to obtain a target frequency spectrum; The target watermark data block is embedded into the target spectrum according to a preset coding rate to obtain the target audio.

2. The method according to claim 1, It is characterized in that The step of embedding the target watermark data block into the target spectrum to obtain the target audio according to a preset coding rate includes: Selecting a target spectrum segment from the target spectrum; the target spectrum segment is used to represent the spectrum segment where the target watermark data block is to be embedded; Performing frequency band division on the target spectrum segment to obtain a target spectrum band; embedding the target watermark data block into the target spectrum band according to the coding rate to obtain an embedded watermark spectrum; The embedded watermark spectrum is subjected to inverse discrete cosine transform to obtain the target audio.

3. The method according to claim 2, It is characterized in that The step of embedding the target watermark data block into the target spectrum band according to the coding rate to obtain an embedded watermark spectrum comprises: Acquire a first channel and a second channel; the first channel is used to indicate that the encoding result of the target watermark data block is zero, and the embedding of the target watermark data block is realized through an even-numbered channel; the second channel is used to indicate that the encoding result of the target watermark data block is not zero, and the embedding of the target watermark data block is realized through an odd-numbered channel; The target watermark data block is embedded in the target spectrum band according to the coding rate and the first channel to obtain an embedded watermark spectrum; or the target watermark data block is embedded in the target spectrum band according to the coding rate and the second channel to obtain an embedded watermark spectrum.

4. The method according to claim 1, It is characterized in that The encoding process of the watermark attribute block to obtain an attribute encoding sequence block includes: Performing a flip operation on the watermark attribute block to obtain a flip sequence block; splicing the flip sequence block with the corresponding watermark attribute block to obtain a palindrome sequence block; The palindrome sequence block is encoded to obtain the attribute coding sequence block.

5. The method according to any one of claims 1 to 4, It is characterized in that The step of dividing the watermark attribute data into attribute blocks to obtain watermark attribute blocks and dividing the watermark content data into content blocks to obtain watermark content blocks comprises: compressing the watermark attribute data to obtain compressed watermark attribute data; compressing the watermark content data to obtain compressed watermark content data; The compressed watermark attribute data is binary-converted to obtain a binary watermark attribute sequence; the compressed watermark content data is binary-converted to obtain a binary watermark content sequence; The binary watermark attribute sequence is divided into data length blocks according to a preset data length to obtain the watermark attribute block; the binary watermark content sequence is divided into data length blocks according to a preset data length to obtain the watermark content block.

6. The method according to claim 5, It is characterized in that After embedding the target watermark data block into the target spectrum to obtain the target audio according to the preset coding rate, the method further includes: Performing discrete cosine transform on the target audio to obtain the target spectrum; Performing a decoding operation on the target spectrum to obtain a decoded watermark attribute block; Searching for the corresponding watermark content block according to the decoded watermark attribute block; splicing the watermark content blocks to obtain a binary audio watermark block; The binary audio watermark block is decompressed to obtain the original watermark data.

7. The method according to claim 6, It is characterized in that The decoding operation is performed on the target spectrum to obtain a decoded watermark attribute block, including: Performing attribute watermark detection on the target spectrum to obtain a detected watermark attribute block; Performing palindrome recognition on the detection watermark attribute block to obtain a palindrome watermark attribute block; Performing position detection on the palindrome watermark attribute block to obtain the palindrome watermark attribute block position; Acquire the encoding order of the palindrome watermark attribute block according to the position of the palindrome watermark attribute block; The detected watermark attribute block is decoded according to the encoding order to obtain the decoded watermark attribute block.

8. An audio watermark embedding device, It is characterized in that The device comprises: A watermark data acquisition module, used to acquire original watermark data; wherein the original watermark data includes watermark attribute data and watermark content data; An attribute and content division module, used to perform attribute division on the watermark attribute data to obtain watermark attribute blocks, and to perform content division on the watermark content data to obtain watermark content blocks; A watermark encoding module, used for encoding the watermark attribute block to obtain an attribute encoding sequence block; A watermark merging module, used for merging the attribute coding sequence block and the watermark content block to obtain a target watermark data block; An audio spectrum acquisition module is used to acquire original audio, and acquire the spectrum of the original audio to obtain a target spectrum; The watermark embedding module is used to embed the target watermark data block into the target spectrum according to a preset coding rate to obtain the target audio.

9. An electronic device, It is characterized in that The electronic device comprises a memory and a processor, the memory stores a computer program, and the processor implements the audio watermark embedding method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium storing a computer program. It is characterized in that When the computer program is executed by a processor, the audio watermark embedding method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Adding and extracting method of audio watermark and terminal equipment

    CN109493875A

  • Digital video watermarking method and device, equipment and storage medium

    CN116471362A

  • Audio watermark embedding method, audio watermark extraction method and audio detection method

    CN117275494A

  • Audio and video data processing method and system and electronic equipment

    CN117750157A

  • Providing a watermarked decoded audio or video signal derived from a watermarked audio or video signal that was low bit rate encoded and decoded

    US20130070960A1

Cited By

  • Robust audio watermarking method with sound source separation resistance

    CN120526781A

  • Voice watermark encoding and decoding method, device, equipment and medium

    CN120708628A