Watermark processing method, apparatus, device, and storage medium
By embedding digital audio watermarks into the interval control parameters of MIDI audio data, the problems of MIDI audio data integrity verification and destination tracking are solved, achieving efficient integrity verification and tracking without affecting audio quality.
Patent Information
- Application Number
- CN202310369687.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-07
- Publication Date
- 2026-01-23
- Estimated Expiration
- 2043-04-07
AI Technical Summary
Existing technologies struggle to verify the integrity and trace the destination of MIDI audio data because MIDI audio data stores notes and control parameters rather than audio waveforms.
By embedding audio digital watermarks into the interval control parameters of MIDI audio data, the specific steps include determining the target interval control parameters and the corresponding watermark information, and updating these parameters to generate a target audio file with a watermark.
It achieves integrity verification and destination tracking of MIDI audio data, and the watermark embedding process has little impact on audio quality and is highly transparent and robust.
Smart Images

Figure CN116434761B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the technical field of computer, and particularly relates to a watermark processing method and device, equipment and storage medium. BACKGROUND
[0002] With the rapid development of network music and short video music, etc., the integrity verification and tracking of audio data, etc. also become increasingly important. Among various audio data, the musical instrument digital interface (MIDI) audio data is widely used due to its small size and easy editing.
[0003] In general technology, the audio digital watermark is mainly embedded in the audio waveform of the audio data to achieve the integrity verification and tracking, etc. However, the MIDI audio data stores the performance instructions of notes and control parameters, rather than the audio waveform. Therefore, the general technology is difficult to realize the integrity verification and tracking, etc. of the MIDI audio data, and a new solution needs to be explored to effectively realize the integrity verification and tracking, etc. of the MIDI audio data. SUMMARY
[0004] The present disclosure provides a watermark processing method, device, equipment and storage medium, which is used to solve the technical problem that the general technology is difficult to realize the integrity verification and tracking, etc. of the MIDI audio data.
[0005] The technical solutions of the embodiments of the present disclosure are as follows:
[0006] According to a first aspect of the embodiments of the present disclosure, a watermark processing method is provided, comprising: obtaining an original audio file; the original audio file comprising M interval control parameters; the interval control parameter is used to represent the performance interval between the notes associated with the interval control parameter in the original audio file; M is a positive integer; determining N target interval control parameters; N is a positive integer, and N is less than or equal to M; determining N watermark information corresponding to the N target interval control parameters; the N watermark information is used to obtain the audio digital watermark corresponding to the original audio file; updating each target interval control parameter based on each watermark information to obtain a target audio file with added audio digital watermark.
[0007] Optionally, the method for determining the N target interval control parameters comprises: sorting the M interval control parameters in descending order of the represented performance interval to obtain a parameter sorting result; and determining the first N interval control parameters in the parameter sorting result as the N target interval control parameters.
[0008] Optionally, the method for determining N pieces of watermark information corresponding to N target interval control parameters comprises: determining a first preset character as the watermark information corresponding to the target interval control parameter when the target interval control parameter is greater than a preset threshold; and determining a second preset character as the watermark information corresponding to the target interval control parameter when the target interval control parameter is less than or equal to the preset threshold.
[0009] Optionally, the method for updating each target interval control parameter based on the watermark information corresponding to the target interval control parameter comprises: updating the target interval control parameter according to a first updating mode when the watermark information corresponding to the target interval control parameter is the first preset character, so as to increase or decrease the performance interval represented by the target interval control parameter by a preset time length; and updating the target interval control parameter according to a second updating mode when the watermark information corresponding to the target interval control parameter is the second preset character, so as to decrease or increase the performance interval represented by the target interval control parameter by a preset time length, and the second updating mode is different from the first updating mode.
[0010] Optionally, the watermark processing method further comprises: sorting the N pieces of watermark information according to the time sequence of the N target interval control parameters in the original audio file, to obtain the audio digital watermark.
[0011] Optionally, the watermark processing method further comprises: comparing the interval control parameters in the original audio file and the audio to be detected, to obtain a plurality of comparison results; determining the watermark information corresponding to the comparison result as the first preset character when the comparison result is a first preset result; determining the watermark information corresponding to the comparison result as the second preset character when the comparison result is a second preset result; sorting the watermark information corresponding to each comparison result according to the time sequence of the interval control parameter corresponding to the comparison result in the original audio file, to obtain a detected watermark; determining a watermark detection result according to the audio digital watermark and the detected watermark; and using the watermark detection result to represent the consistency of the original audio file and the audio to be detected.
[0012] Optionally, the original audio file comprises a plurality of audio track data blocks; the audio track data blocks are used to represent the performance information of the audio corresponding to the original audio file; the audio track data blocks comprise interval control parameters; notes associated with the interval control parameters are located in a first audio track data block and a second audio track data block, respectively; the first audio track data block is an audio track data block to which the interval control parameter belongs; and the second audio track data block is adjacent to and located after the first audio track data block.
[0013] According to a second aspect of the embodiments of the present disclosure, a watermark processing apparatus is provided, comprising: an obtaining unit and a processing unit; the obtaining unit is configured to perform obtaining an original audio file; the original audio file comprises M interval control parameters; the interval control parameter is used to represent a performance interval between notes associated with the interval control parameter in the original audio file; M is a positive integer; the processing unit is configured to perform determining N target interval control parameters; N is a positive integer, and N is less than or equal to M; the processing unit is configured to perform determining N watermark information corresponding to the N target interval control parameters; the N watermark information is used to obtain an audio digital watermark corresponding to the original audio file; the processing unit is configured to perform updating each target interval control parameter based on the corresponding watermark information to obtain a target audio file with the added audio digital watermark.
[0014] Optionally, the processing unit is specifically configured to perform: sorting the M interval control parameters in a descending order of the represented performance intervals to obtain a parameter sorting result; and determining the first N interval control parameters in the parameter sorting result as the N target interval control parameters.
[0015] Optionally, the processing unit is specifically configured to perform: determining a first preset character as the watermark information corresponding to the target interval control parameter when the target interval control parameter is greater than a preset threshold; and determining a second preset character as the watermark information corresponding to the target interval control parameter when the target interval control parameter is less than or equal to the preset threshold.
[0016] Optionally, the processing unit is specifically configured to perform: updating the target interval control parameter in a first updating mode to increase or decrease the performance interval represented by the target interval control parameter by a preset time length when the watermark information corresponding to the target interval control parameter is the first preset character; and updating the target interval control parameter in a second updating mode to decrease or increase the performance interval represented by the target interval control parameter by the preset time length when the watermark information corresponding to the target interval control parameter is the second preset character, and the second updating mode is different from the first updating mode.
[0017] Optionally, the processing unit is further configured to perform: sorting the N watermark information in a time sequence of the N target interval control parameters in the original audio file to obtain the audio digital watermark.
[0018] Optionally, the processing unit is further configured to perform: comparing the interval control parameters in the original audio file and the audio to be detected, to obtain a plurality of comparison results; when the comparison result is a first preset result, determining the watermark information corresponding to the comparison result as a first preset character; when the comparison result is a second preset result, determining the watermark information corresponding to the comparison result as a second preset character; sorting the watermark information corresponding to each comparison result according to the time sequence of the interval control parameters corresponding to each comparison result in the original audio file, to obtain a watermark to be detected; determining a watermark detection result according to the audio digital watermark and the watermark to be detected; and the watermark detection result is used to represent the consistency of the original audio file and the audio to be detected.
[0019] Optionally, the original audio file includes a plurality of audio track data blocks; the audio track data blocks are used to represent the performance information of the audio corresponding to the original audio file; the audio track data blocks include interval control parameters; the notes associated with the interval control parameters are located in the first audio track data block and the second audio track data block, respectively; the first audio track data block is the audio track data block to which the interval control parameters belong; and the second audio track data block is adjacent to and located after the first audio track data block.
[0020] According to a third aspect of the embodiments of the present disclosure, an electronic device is provided, including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to execute the instructions to implement any one of the optional watermark processing methods in the first aspect.
[0021] According to a fourth aspect of the embodiments of the present disclosure, a computer-readable storage medium is provided, and the computer-readable storage medium stores instructions, when the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device can execute any one of the optional watermark processing methods in the first aspect.
[0022] According to a fifth aspect of the embodiments of the present disclosure, a computer program product is provided, including instructions, when the instructions are executed on a processor of an electronic device, the electronic device executes any one of the optional watermark processing methods in the first aspect.
[0023] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present disclosure.
[0024] The technical solutions provided by the embodiments of the present disclosure at least bring the following beneficial effects:
[0025] In the watermark processing method provided by the present disclosure, after obtaining the original audio file, N target interval control parameters can be determined from the M interval control parameters included in the original audio file, and N watermark information corresponding to the N target interval control parameters can be determined, so as to update each target interval control parameter based on the corresponding watermark information, and obtain a target audio file with audio digital watermark added.
[0026] Based on the above, when facing the MIDI audio data composed of performance instructions such as notes and control parameters instead of audio waveforms, the present disclosure can obtain the MIDI audio data with audio digital watermark by updating the interval control parameters included in the MIDI audio data, so as to achieve the purposes of integrity verification and tracking of the MIDI audio data. Therefore, the present disclosure can effectively achieve the purposes of integrity verification and tracking of the MIDI audio data. BRIEF DESCRIPTION OF DRAWINGS
[0027] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments consistent with the present disclosure and serve to explain the principles of the present disclosure, and do not constitute an undue limitation on the present disclosure.
[0028] Figure 1 FIG. 1 shows a structural schematic diagram of a watermark processing system provided by an embodiment of the present disclosure;
[0029] Figure 2 FIG. 2 shows a flowchart of a watermark processing method provided by an embodiment of the present disclosure; Figure 1 ;
[0030] Figure 3 FIG. 3 shows a flowchart of a watermark processing method provided by an embodiment of the present disclosure; Figure 2 ;
[0031] Figure 4 FIG. 4 shows a flowchart of a watermark processing method provided by an embodiment of the present disclosure; Figure 3 ;
[0032] Figure 4 FIG. 5 shows a flowchart of a watermark processing method provided by an embodiment of the present disclosure; Figure 6 ;
[0033] Figure 5 FIG. 6 shows a flowchart of a watermark processing method provided by an embodiment of the present disclosure; Figure 7 ;
[0034] Figure 6 FIG. 7 shows a flowchart of a watermark processing method provided by an embodiment of the present disclosure; Figure 8 ;
[0035] Figure 7 A flowchart of a watermark processing method is shown Figure 9 ;
[0036] Figure 8 A flowchart of a watermark processing method is shown Figure 10 ;
[0037] Figure 11 A structural diagram of a watermark processing device is shown
[0038] Figure 12 A structural diagram of a terminal is shown
[0039] Figure 1 A structural diagram of a server is shown DETAILED DESCRIPTION
[0040] In order to make the ordinary person in the art better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be described clearly and completely below in conjunction with the drawings.
[0041] It should be noted that the terms "first", "second" and the like in the specification and claims of the present disclosure and the above-described drawings are used to distinguish similar objects, and do not necessarily indicate a specific order or a chronological sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present disclosure described herein can be implemented in an order other than that illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all the embodiments consistent with the present disclosure. Rather, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0042] It should also be understood that the term "comprising" indicates the presence of the described features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, and / or components.
[0043] The data involved in the present disclosure can be data authorized by the user or sufficiently authorized by all parties.
[0044] In general technology, audio digital watermark is mainly embedded in the audio waveform of audio data to achieve integrity verification and tracking, etc. However, MIDI audio data stores performance instructions such as notes and control parameters, rather than audio waveform. Therefore, general technology is difficult to achieve integrity verification and tracking, etc. for MIDI audio data, and new solutions need to be explored to effectively achieve integrity verification and tracking, etc. for MIDI audio data.
[0045] Based on this, the embodiment of the present disclosure provides a watermark processing method. After obtaining an original audio file, N target interval control parameters can be determined from M interval control parameters included in the original audio file, and N watermark information corresponding to the N target interval control parameters can be determined. Each target interval control parameter can be updated based on the corresponding watermark information to obtain a target audio file with audio digital watermark added.
[0046] Based on this, when facing MIDI audio data composed of performance instructions such as notes and control parameters, rather than audio waveform, the present disclosure can obtain MIDI audio data with audio digital watermark by updating the interval control parameters included in the MIDI audio data, to achieve the purpose of integrity verification and tracking, etc. for MIDI audio data. Therefore, the present disclosure can effectively achieve the purpose of integrity verification and tracking, etc. for MIDI audio data.
[0047] Figure 1 A watermark processing system provided by the embodiment of the present disclosure is shown in FIG. 1. As shown in FIG. 1, the watermark processing system 100 can include a watermark processing device 101 and an audio control device 102. The watermark processing device 101 and the audio control device 102 can be connected through wired network or wireless network. Figure 1
[0048] Optionally, the watermark processing device 101 and the audio control device 102 in FIG. 1 can be functional modules integrated in the same device, or two devices independently arranged. The embodiment of the present disclosure does not limit this. Figure 1
[0049] It is easy to understand that when the watermark processing device 101 and the audio control device 102 are functional modules integrated in the same device, the communication mode between the watermark processing device 101 and the audio control device 102 is the communication between internal modules of the device. In this case, the communication process between the two is the same as the communication process between the watermark processing device 101 and the audio control device 102 when they are independently arranged.
[0050] For the convenience of understanding, the present application mainly takes the example of the watermark processing device 101 and the audio control device 102 being independently arranged as an example for illustration.
[0051] Figure 1 The watermark processing device 101 in the above can be configured with a resource file of the preset extraction rule, the first preset character and the second preset character, etc., for providing services such as watermark processing service, watermark extraction service and watermark detection service.
[0052] In a possible manner, the watermark processing device 101 can further include or be connected with a database. The resource file of the preset extraction rule, the first preset character and the second preset character, etc. can be stored in the database.
[0053] Optionally, Figure 1 An example of the watermark processing device 101 provided by the embodiments of the present application. The watermark processing device 101 can be a terminal, a server, or other electronic devices with watermark processing function.
[0054] Figure 1 The audio control device 102 in the above can be used to realize various functions such as collection, playing and editing of audio files. Further, the audio control device 102 can also be used to send various audio files to the watermark processing device 101.
[0055] Optionally, Figure 1 An example of the audio control device 102 provided by the embodiments of the present application. The audio control device 102 can be a terminal, a server, or other electronic devices with audio control function.
[0056] When the watermark processing device 101 and the audio control device 102 are terminals, the terminals can be mobile phones, tablet computers, desktop computers, laptop computers, handheld computers, notebook computers, ultra-mobile personal computers (UMPC), netbooks, and devices such as cellular phones, personal digital assistants (PDA), augmented reality (AR) \ virtual reality (VR) devices that can install and use network live broadcast applications, and the present application does not specially limit the specific form of the terminal. It can interact with the user through one or more ways such as keyboard, touchpad, touch screen, remote control, voice interaction or handwriting device.
[0057] When the watermarking device 101 and the audio control device 102 are servers, the server can be a single server or a server cluster consisting of multiple servers. In some embodiments, the server cluster can also be a distributed cluster. This disclosure does not limit the specific implementation of the server.
[0058] Optionally, the above Figure 1 In the watermarking system 100 shown, the watermarking device 101 can be connected to at least one audio control device 102. This disclosure does not limit the number or type of audio control devices 102. The watermarking method provided in this disclosure can be applied to… Figure 2 The watermarking device 101 in the watermarking system 100 shown.
[0059] It should be noted that both the watermark processing device 101 and the audio control device 102 mentioned above can be referred to as electronic devices.
[0060] The watermarking method provided in the embodiments of this disclosure will be described in detail below with reference to the accompanying drawings.
[0061] like Figure 2 As shown, the watermarking method may include: S201-S204.
[0062] S201, The watermarking processing device obtains the original audio file.
[0063] The original audio file may include M interval control parameters. These interval control parameters characterize the playing interval between notes associated with them in the original audio file. M is a positive integer. The notes associated with the interval control parameters are located in the first track data block and the second track data block, respectively. The first track data block is the track data block to which the interval control parameters belong. The second track data block is adjacent to the first track data block and follows it.
[0064] In one possible approach, the original audio file can be MIDI audio. MIDI audio typically consists of several data blocks. These data blocks generally include a header data block and multiple track data blocks. Each track data block contains note instructions and interval control parameters, used to characterize the performance information of the audio corresponding to the original audio file.
[0065] Note commands are used to indicate the notes to be played and their order of play; they can also be called MIDI events. Executing a MIDI event within a track data block means playing the notes corresponding to that track data block.
[0066] The interval control parameter can be used to represent a performance interval between notes associated with the interval control parameter. That is, the interval control parameter can be used to control the execution interval of MIDI events in two adjacent track data blocks. Specifically, when the execution of the MIDI events in one track data block is completed, the execution of the MIDI events in the next track data block adjacent to the one track data block is started after waiting for the performance interval indicated by the interval control parameter in the one track data block. That is, when the performance of a note corresponding to one track data block is completed, the performance of a note corresponding to the next track data block adjacent to the one track data block is started after waiting for the performance interval indicated by the interval control parameter in the one track data block.
[0067] In a possible manner, in order to generate an audio digital watermark corresponding to the original audio file to protect the copyright of the original audio file, the watermark processing device can obtain the original audio file from the audio control device.
[0068] Specifically, the audio control device can be a terminal. The terminal can be configured with a storage module, an input module (such as a mouse or a keyboard, etc.), and a sending module (such as a transceiver, etc.). And the user can pre-store the original audio file in the storage module configured by the terminal. Based on this, the user can perform a watermark processing operation (such as clicking an add button) through the input module configured by the audio control device. In response to the watermark processing operation performed by the user, the audio control device can send a watermark processing request carrying the original audio file to the watermark processing device through the configured sending module. Correspondingly, the watermark processing device can receive the watermark processing request from the audio control device and obtain the original audio file by analyzing the watermark processing request.
[0069] S202, the watermark processing device determines N target interval control parameters.
[0070] Wherein, N is a positive integer, and N is less than or equal to M.
[0071] In a possible manner, N can be pre-set in the watermark processing device by the staff according to experience, and is generally less than M. For example, N can be 10 or 20, etc.
[0072] In a possible manner, after obtaining the original audio file, the watermark processing device can analyze the original audio file to obtain the M interval control parameters included in the original audio file. Then, the watermark processing device can extract the M interval control parameters according to a preset extraction rule to obtain the N target interval control parameters.
[0073] Optionally, the preset extraction rule can be random extraction, or extraction according to size order, or extraction according to sequence order, etc. The embodiments of the present disclosure do not make any limitation in this regard.
[0074] Specifically, the watermark processing device can randomly extract N interval control parameters from the M interval control parameters, and determine the extracted N interval control parameters as the N target interval control parameters.
[0075] Alternatively, the watermark processing device can also extract the N interval control parameters in sequence according to the order of the M interval control parameters in the original audio file, and determine the extracted N interval control parameters as the N target interval control parameters.
[0076] S203, the watermark processing device determines N watermark information corresponding to the N target interval control parameters.
[0077] The N watermark information is used to obtain an audio digital watermark corresponding to the original audio file. The audio digital watermark can be used to uniquely identify the original audio file, so as to achieve the purposes of labeling, identity recognition, copyright protection, and tamper-proofing of the original audio file.
[0078] In one possible manner, the watermark information can be a character corresponding to the feature information (such as size information) of the target interval control parameter. In this case, after extracting the N target interval control parameters, the watermark processing device can compare each target interval control parameter with a preset threshold, and determine the watermark information corresponding to each target interval control parameter based on the comparison result of each target interval control parameter and the preset threshold. The preset threshold can be pre-set in the watermark processing device by the staff. For specific description of the process, please refer to S401-S402 below, which will not be described here.
[0079] S204, the watermark processing device updates each target interval control parameter based on the corresponding watermark information, and obtains a target audio file with added audio digital watermark.
[0080] In one possible manner, the target audio file is usually an audio publicly disclosed, i.e., an audio with open use rights to the public. The original audio file and the audio data watermark usually need to be kept secret to protect the rights and interests of the original audio file creator.
[0081] In one possible manner, after determining the N watermark information corresponding to the N target interval control parameters, the watermark processing device can update the value of each target interval control parameter based on the corresponding watermark information, and obtain the target audio file after completing the update of the N target interval control parameters. In this way, the watermark processing device can embed the audio data watermark in the original audio file to obtain the target audio file with added audio digital watermark.
[0082] It should be noted that the interval control parameter is usually a large positive integer (for example, 100 or 1000, etc.), and the unit is TICK. TICK is a relative time unit, which can also be referred to as a time base. One TICK can be understood as one interruption of a timer, and the specific time length corresponding to a TICK can be adjusted arbitrarily. For example, one TICK can be 2 milliseconds or 10 milliseconds, etc.
[0083] Based on this, since the value of the interval control parameter is usually large, and the specific time length corresponding to the TICK is usually small, after the target interval control parameter is updated, only the performance interval indicated by the target interval control parameter is increased or shortened by a very small time length (for example, 2 milliseconds), which hardly affects the original sound quality of the original audio file, and the human ear cannot feel the difference between the original audio file and the target audio file. Therefore, the present disclosure can effectively combine the audio digital watermark with the original audio file and hide it therein, and does not destroy the appreciation value and use value of the original audio file, and has high transparency.
[0084] Further, since the present disclosure realizes the embedding of the audio digital watermark by updating the interval control parameter, even if the target audio file is subjected to conventional processing operations such as lossy compression, recording, printing, scanning, rotation, and translation, the watermark processing device can still extract the audio data watermark embedded in the target audio file. Therefore, the audio digital watermark realized by the present disclosure has high robustness.
[0085] The technical solutions provided by the above embodiments at least have the following beneficial effects: as can be seen from S201-S204, after the watermark processing device obtains the original audio file, it can determine N target interval control parameters from the M interval control parameters included in the original audio file, and can determine N watermark information corresponding to the N target interval control parameters. The target interval control parameters are updated based on each watermark information to obtain a target audio file with the added audio digital watermark.
[0086] Based on this, when facing the MIDI audio data composed of performance instructions such as notes and control parameters, rather than audio waveforms, the present disclosure can obtain MIDI audio data with audio digital watermark by updating the interval control parameters included in the MIDI audio data, to realize the purposes of integrity verification and tracking of the MIDI audio data. Therefore, the present disclosure can effectively realize the purposes of integrity verification and tracking of the MIDI audio data.
[0087] In one embodiment, in combination with Figure 3 In the above S202, when the watermark processing device determines the N target interval control parameters, for example, Figure 2As shown, the embodiment of the present disclosure provides an optional implementation, comprising: S301-S302.
[0088] S301, the watermark processing device sorts the M interval control parameters in descending order of the represented performance intervals, to obtain a parameter sorting result.
[0089] It should be noted that, in order to reduce the impact on the original sound quality of the original audio file, it can be considered to update the interval control parameters with larger values to better ensure the appreciation value and use value of the original audio file. Based on this, after obtaining the M interval control parameters included in the original audio file, the watermark processing device can sort the M interval control parameters in descending order of the represented performance intervals to obtain a parameter sorting result.
[0090] Further, in the process of sorting by the watermark processing device in descending order, if the values of two or more interval control parameters are the same, the watermark processing device can sort them according to their execution order.
[0091] S302, the watermark processing device determines the first N interval control parameters in the parameter sorting result as N target interval control parameters.
[0092] In one implementation, after obtaining the parameter sorting result of the M interval control parameters, the watermark processing device can extract the first N interval control parameters in the parameter sorting result, and determine the extracted first N interval control parameters as N target interval control parameters, thereby ensuring that the target interval control parameters have larger values and reducing the impact of updating the target interval control parameters on the original audio file.
[0093] The above embodiment provides a technical solution that at least brings the following beneficial effects: as can be seen from S301-S302, a specific implementation of a watermark processing device extracting M interval control parameters according to a preset extraction rule to obtain N target interval control parameters is given. The watermark processing device can sort the M interval control parameters in descending order to obtain a parameter sorting result, and further determine the first N interval control parameters in the parameter sorting result as N target interval control parameters, thereby ensuring that the target interval control parameters have larger values and reducing the impact of updating the target interval control parameters on the original audio file, and ensuring that the audio digital watermark of the original audio file has high transparency.
[0094] In one embodiment, in combination with Figure 4 In the above S203, that is, when the watermark processing device determines N watermark information corresponding to N target interval control parameters, for example, Figure 2As shown, the embodiment of the present disclosure provides an optional implementation, comprising: S401-S402.
[0095] S401, the watermark processing device determines the first preset character as the watermark information corresponding to the target interval control parameter when the target interval control parameter is greater than the preset threshold.
[0096] In a possible manner, the first preset character can be pre-set in the watermark processing device by the staff. For example, the first preset character can be 1 or a, etc.
[0097] In an implementable manner, in order to improve the complexity of the audio digital watermark and ensure the effectiveness of the audio digital watermark, the N target interval control parameters can be classified, and different watermark information can be determined for different types of target interval control parameters.
[0098] Based on this, the watermark processing device can compare the N target interval control parameters with the preset threshold. If the target interval control parameter is greater than the preset threshold, the watermark processing device can determine the first preset character as the watermark information corresponding to the target interval control parameter.
[0099] S402, the watermark processing device determines the second preset character as the watermark information corresponding to the target interval control parameter when the target interval control parameter is less than or equal to the preset threshold.
[0100] In a possible manner, the second preset character can be pre-set in the watermark processing device by the staff. For example, the second preset character can be 0 or b, etc.
[0101] It should be noted that, in order to improve the complexity of the audio digital watermark and ensure the effectiveness of the audio digital watermark, the first preset character and the second preset character can be different. Based on this, the watermark processing device can determine the second preset character as the watermark information corresponding to the target interval control parameter when the target interval control parameter is less than or equal to the preset threshold.
[0102] The above embodiment provides a technical scheme which at least brings the following beneficial effects: as can be seen from S401-S402, a specific implementation manner of the watermark processing device determining N watermark information corresponding to N target interval control parameters is given. The watermark processing device can determine the first preset character as the watermark information corresponding to the target interval control parameter when the target interval control parameter is greater than the preset threshold, or determine the second preset character as the watermark information corresponding to the target interval control parameter when the target interval control parameter is less than or equal to the preset threshold. Based on this, the present disclosure can determine different watermark information for different types of target interval control parameters, thereby improving the complexity of the audio digital watermark and ensuring the effectiveness of the audio digital watermark.
[0103] In an embodiment, in combination with Figure 5 In the above S204, i.e., the watermark processing device updates each target interval control parameter based on the corresponding watermark information, as shown in the following table, the embodiment of the present disclosure provides an optional implementation, comprising: S501-S502. Figure 6
[0104] S501, when the watermark information corresponding to the target interval control parameter is a first preset character, the watermark processing device updates the target interval control parameter according to a first update mode, so as to increase or decrease the performance interval represented by the target interval control parameter by a preset time length.
[0105] In a possible manner, the resource file of the first update mode can be pre-set in the watermark processing device by the staff.
[0106] In a possible manner, the preset time length can be pre-set in the watermark processing device by the staff. For example, the preset time length can be 1 TICK.
[0107] It should be noted that, since the embedding of the audio digital watermark is realized by updating the interval control parameter in the present disclosure, in order to minimize the influence on the original sound quality of the original audio file, it can be considered to minimize the update amplitude of the target interval control parameter. Based on this, the first update mode can be to add one to the value of the target interval control parameter, or to subtract one from the value of the target interval control parameter, etc.
[0108] In a possible manner, the watermark processing device can update the target interval control parameter according to the first update mode when the watermark information corresponding to the target interval control parameter is the first preset character, i.e., add one to or subtract one from the value of the target interval control parameter, so as to reduce the influence on the original sound quality of the original audio file.
[0109] S502, when the watermark information corresponding to the target interval control parameter is a second preset character, the watermark processing device updates the target interval control parameter according to a second update mode, so as to decrease or increase the performance interval represented by the target interval control parameter by a preset time length.
[0110] In a possible manner, the resource file of the second update mode can be pre-set in the watermark processing device by the staff, and the second update mode is different from the first update mode.
[0111] It should be noted that, in order to embed different watermark information in the original audio file, the first updating manner and the second updating manner can be different. That is, when the first updating manner is to add one to the value of the target interval control parameter, the second updating manner can be to subtract one from the value of the target interval control parameter. When the first updating manner is to subtract one from the value of the target interval control parameter, the second updating manner can be to add one to the value of the target interval control parameter.
[0112] In an implementable manner, the watermark processing device can update the target interval control parameter according to the second updating manner when the watermark information corresponding to the target interval control parameter is the second preset character, that is, add one or subtract one to the value of the target interval control parameter, so as to reduce the influence on the original sound quality of the original audio file.
[0113] Based on this, after the watermark processing device adds one or subtracts one to each target interval control parameter, since the specific time length corresponding to the TICK is usually small, only a very small time length (for example, 2 milliseconds) of the performance interval indicated by the target interval control parameter is increased or shortened, which almost does not affect the original sound quality of the original audio file, and the human ear cannot feel the difference between the original audio file and the target audio file. Therefore, the present disclosure can effectively combine the audio digital watermark with the original audio file and hide it in the original audio file, and does not destroy the appreciation value and use value of the original audio file, and has high transparency.
[0114] The above embodiment provides a technical solution which at least brings the following beneficial effects: as can be seen from S501-S502, a specific implementation manner of a watermark processing device for updating each target interval control parameter based on each watermark information is given. The watermark processing device can update the target interval control parameter according to the first updating manner when the watermark information corresponding to the target interval control parameter is the first preset character, or update the target interval control parameter according to the second updating manner when the watermark information corresponding to the target interval control parameter is the second preset character. Based on this, the present disclosure can embed different watermark information in the original audio file while ensuring a low updating range, thereby reducing the influence on the original sound quality of the original audio file.
[0115] In an embodiment, the watermark processing method provided by the present disclosure further includes S601.
[0116] S601, the watermark processing device sorts N watermark information according to the time sequence of the N target interval control parameters in the original audio file, to obtain an audio digital watermark.
[0117] In an implementable manner, after determining the N pieces of watermark information corresponding to the N target interval control parameters, the watermark processing device can first determine the execution order of the N target interval control parameters in the original audio file. Then, the watermark processing device can sort the N pieces of watermark information corresponding to the N target interval control parameters according to the execution order of the N target interval control parameters from front to back, to obtain a watermark sequence (i.e., an audio digital watermark) composed of watermark information.
[0118] Alternatively, the watermark processing device can also sort the N pieces of watermark information corresponding to the N target interval control parameters according to the execution order of the N target interval control parameters from back to front, to obtain a watermark sequence (i.e., an audio digital watermark) composed of watermark information.
[0119] The above embodiment provides the technical scheme with at least the following beneficial effects: as known from S601, the watermark processing device can sort the N pieces of watermark information according to the execution order of the N target interval control parameters in the original audio file, to obtain an audio digital watermark. Subsequently, the watermark processing device can detect the consistency between the target audio file and the original audio file through the audio digital watermark, to effectively protect the copyright of the original audio file.
[0120] In an embodiment, as shown in FIG. 7, Figure 6 The watermark processing method provided by the embodiment of the present disclosure further includes S701-S705.
[0121] S701, the watermark processing device compares the interval control parameters in the original audio file and the to-be-detected audio, to obtain a plurality of comparison results.
[0122] In a possible manner, in order to prove that the author owns the copyright of the target audio file, the target audio file can be taken as the to-be-detected audio for watermark detection. Specifically, the watermark processing device can obtain the to-be-detected audio from the audio control device, and parse the to-be-detected audio to obtain the interval control parameters in the to-be-detected audio. Then, the watermark processing device can compare each interval control parameter in the original audio file and the to-be-detected audio one by one according to the execution order from front to back, to obtain a plurality of comparison results.
[0123] It should be understood that the specific implementation manner of the watermark processing device obtaining the to-be-detected audio from the audio control device can refer to the description of the watermark processing device obtaining the original audio file from the audio control device in S201, which will not be described herein again.
[0124] In a possible manner, the comparison result can be that the value of the interval control parameter at the position in the original audio file is 1 greater than the value of the interval control parameter at the corresponding position in the audio to be detected. Alternatively, the comparison result can also be that the value of the interval control parameter at the position in the original audio file is the same as the value of the interval control parameter at the corresponding position in the audio to be detected. Alternatively, the comparison result can also be that the value of the interval control parameter at the position in the original audio file is 1 less than the value of the interval control parameter at the corresponding position in the audio to be detected.
[0125] S702, when the comparison result is the first preset result, the watermark processing device determines the watermark information corresponding to the comparison result as the first preset character.
[0126] In a possible manner, the first preset result can be preset in the watermark processing device by a staff member.
[0127] It should be noted that, since the first preset result corresponds to the first preset character, the first preset result corresponds to the first updating manner. That is, when the first updating manner is to add 1 to the value of the target interval control parameter, the first preset result is that the value of the interval control parameter at the position in the original audio file is 1 greater than the value of the interval control parameter at the corresponding position in the audio to be detected. When the first updating manner is to subtract 1 from the value of the target interval control parameter, the first preset result is that the value of the interval control parameter at the position in the original audio file is 1 less than the value of the interval control parameter at the corresponding position in the audio to be detected.
[0128] In a possible manner, if one comparison result is the first preset result, it can be indicated that the target interval control parameter corresponding to the one comparison result is correct based on the first updating manner. In this case, the watermark processing device can determine the watermark information corresponding to the one comparison result as the first preset character corresponding to the first updating manner.
[0129] S703, when the comparison result is the second preset result, the watermark processing device determines the watermark information corresponding to the comparison result as the second preset character.
[0130] In a possible manner, the second preset result can be preset in the watermark processing device by a staff member.
[0131] It should be noted that, since the second preset result corresponds to the second preset character, the second preset result corresponds to the second updating manner. That is, when the second updating manner is to add 1 to the value of the target interval control parameter, the second preset result is that the value of the interval control parameter at the position in the original audio file is 1 greater than the value of the interval control parameter at the corresponding position in the audio to be detected. When the second updating manner is to subtract 1 from the value of the target interval control parameter, the second preset result is that the value of the interval control parameter at the position in the original audio file is 1 less than the value of the interval control parameter at the corresponding position in the audio to be detected.
[0132] In a possible implementation, if one comparison result is the second preset result, it can be indicated that the target interval control parameter corresponding to the two comparison results is appropriate based on the second updating manner. In this case, the watermark processing device can determine the watermark information corresponding to the one comparison result as the second preset character corresponding to the second updating manner.
[0133] It should be noted that if one comparison result is other than the first preset result and the second preset result, it can be indicated that the one comparison result does not have corresponding watermark information. In this case, the watermark processing device can skip the processing of the one comparison result.
[0134] S704, the watermark processing device sorts the watermark information corresponding to each comparison result in the order of the interval control parameters corresponding to the comparison results in the original audio file, to obtain the watermark to be detected.
[0135] In a possible implementation, after the watermark processing device completes the determination between the M comparison results and the first preset result and the second preset result, the watermark processing device can sort the obtained watermark information in the order of the interval control parameters corresponding to the comparison results in the original audio file, to obtain the watermark to be detected.
[0136] S705, the watermark processing device determines a watermark detection result according to the audio digital watermark and the watermark to be detected.
[0137] The watermark detection result can be used to represent the consistency of the original audio file and the audio to be detected.
[0138] In a possible implementation, after the watermark processing device obtains the watermark to be detected, the watermark processing device can compare the audio digital watermark and the watermark to be detected, to determine the watermark detection result, thereby verifying the consistency of the original audio file and the audio to be detected.
[0139] The technical solutions provided by the above embodiments at least have the following beneficial effects: as can be known from S701-S705, the watermark processing device can compare the interval control parameters in the original audio file and the audio to be detected, to obtain M comparison results, and when the comparison result is the first preset result, determine the watermark information corresponding to the comparison result as the first preset character, or when the comparison result is the second preset result, determine the watermark information corresponding to the comparison result as the second preset character. Then, the watermark processing device can sort the watermark information corresponding to each comparison result in the order of the interval control parameters corresponding to the comparison results in the original audio file, to obtain the watermark to be detected, so as to further determine a watermark detection result according to the audio digital watermark and the watermark to be detected. Based on this, the present disclosure can realize the extraction and detection of the audio digital watermark, to effectively protect the copyright of the original audio file.
[0140] In an embodiment, in combination with Figure 7 In the above S705, when the watermark processing device determines the watermark detection result according to the audio digital watermark and the to-be-detected watermark, as shown in the following table, the present embodiment provides an optional implementation, including S801-S802. Figure 8
[0141] S801, when the audio digital watermark and the to-be-detected watermark are the same, the watermark processing device determines the watermark detection result as consistent between the original audio file and the to-be-detected audio.
[0142] In a possible manner, if the audio digital watermark and the to-be-detected watermark are the same, it can be indicated that the to-be-detected audio is the target audio file. In this case, the watermark processing device can determine the watermark detection result as consistent between the original audio file and the to-be-detected audio, thereby proving that the creator owns the copyright of the to-be-detected audio.
[0143] S802, when the audio digital watermark and the to-be-detected watermark are different, the watermark processing device determines the watermark detection result as inconsistent between the original audio file and the to-be-detected audio.
[0144] In a possible manner, if the audio digital watermark and the to-be-detected watermark are different, it can be indicated that the to-be-detected audio is not the target audio file. In this case, the watermark processing device can determine the watermark detection result as inconsistent between the original audio file and the to-be-detected audio.
[0145] The above embodiment provides a technical solution which at least brings the following beneficial effects: as can be seen from S801-S802, a specific implementation manner is given in which the watermark processing device determines the watermark detection result according to the audio digital watermark and the to-be-detected watermark. The watermark processing device can determine the watermark detection result as consistent between the original audio file and the to-be-detected audio when the audio digital watermark and the to-be-detected watermark are the same. Alternatively, the watermark processing device can determine the watermark detection result as inconsistent between the original audio file and the to-be-detected audio when the audio digital watermark and the to-be-detected watermark are different. Therefore, the audio digital watermark generated in the present disclosure can be used to prove the copyright of the original audio file by the creator, and has good identification.
[0146] In an embodiment, as shown in the following table, Figure 8 As shown, a flowchart of a watermark processing method is provided. After obtaining an original audio file, the watermark processing device can parse the original audio file to obtain M audio track data blocks. Then, the watermark processing device can parse the M audio track data blocks to obtain M interval control parameters corresponding to the M audio track data blocks. Then, the watermark processing device can sort the M interval control parameters in descending order to obtain a parameter sorting result, and further determine the first N interval control parameters in the parameter sorting result as N target interval control parameters. Then, the watermark processing device can determine whether the N target interval control parameters are greater than a preset threshold. If the target interval control parameter is greater than the preset threshold (i.e. Figure 8 Yes), the watermark processing device can determine a first preset character as the watermark information corresponding to the target interval control parameter. If the target interval control parameter is less than or equal to the preset threshold (i.e. Figure 9 No), the watermark processing device can determine a second preset character as the watermark information corresponding to the target interval control parameter.
[0147] Based on this, the watermark processing device can determine N watermark information corresponding to the N target interval control parameters. Then, the watermark processing device can determine the execution order of the N target interval control parameters in the original audio file, and sort the N watermark information corresponding to the N target interval control parameters according to the execution order of the N target interval control parameters from front to back to obtain an audio digital watermark. For example, the order of the N watermark information (referred to as "B" for short) after sorting can be B1, B2,..., Bn. That is, the audio digital watermark can be a watermark sequence composed of B1, B2,..., Bn.
[0148] In one possible manner, if the first preset character is 0 and the second preset character is 1, the audio digital watermark can be a 01 sequence with a length of N.
[0149] In one embodiment, as Figure 9As shown in FIG. 1, a flowchart of a watermark processing method provided by an embodiment of the present disclosure is shown. The watermark processing device can parse an original audio file and a target audio file, and determine M audio track data blocks included in the original audio file and M audio track data blocks included in the target audio file. Then, the watermark processing device can subtract interval control parameters in the audio track data blocks at corresponding positions in the original audio file and the target audio file to obtain M difference values. In a case where the first update manner is subtracting one from the target interval control parameter, and the second update manner is adding one to the target interval control parameter, the watermark processing device can extract difference values of "1" and "-1" from the M difference values to obtain N target difference values. Then, the watermark processing device can sort the N target difference values according to an execution order of interval control parameters corresponding to the N target difference values from front to back to obtain a difference value sequence. That is Figure 10 The difference value sequence composed of D1, D2,..., Dn shown in FIG. 1.
[0150] Then, the watermark processing device can map each difference value in the difference value sequence to obtain an audio digital watermark. Specifically, based on a condition that the first update manner (i.e., "1") corresponds to a first preset character, and the second update manner (i.e., "-1") corresponds to a second preset character, the watermark processing device can map "1" to the first preset character, and map "-1" to the second preset character.
[0151] It can be understood that, in actual implementation, the watermark processing device described in the embodiment of the present disclosure can include one or more hardware structures and / or software modules for implementing the foregoing corresponding watermark processing method, and these execution hardware structures and / or software modules can constitute an electronic device. Those skilled in the art should easily realize that, in combination with the algorithm steps of each example described in the embodiments disclosed herein, the present disclosure can be realized in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present disclosure.
[0152] Based on such understanding, the embodiment of the present disclosure also correspondingly provides a watermark processing apparatus. Figure 10 As shown in FIG. 2, a structural diagram of a watermark processing apparatus provided by an embodiment of the present disclosure is shown. As shown in FIG. 2, the watermark processing apparatus can include an acquisition unit 901 and a processing unit 902. Figure 11 As shown in FIG. 2, a structural diagram of a watermark processing apparatus provided by an embodiment of the present disclosure is shown. As shown in FIG. 2, the watermark processing apparatus can include an acquisition unit 901 and a processing unit 902.
[0153] The acquisition unit 901 is configured to acquire an original audio file; the original audio file includes M interval control parameters; the interval control parameter is used to represent the performance interval between notes associated with the interval control parameter in the original audio file; M is a positive integer; the processing unit 902 is configured to determine N target interval control parameters; N is a positive integer, and N is less than or equal to M; the processing unit 902 is configured to determine N watermark information corresponding to the N target interval control parameters; the N watermark information is used to obtain an audio digital watermark corresponding to the original audio file; the processing unit 902 is configured to update each target interval control parameter based on the corresponding watermark information to obtain a target audio file with an added audio digital watermark.
[0154] Optionally, the processing unit 902 is specifically configured to perform: sorting the M interval control parameters in descending order of the represented performance interval to obtain a parameter sorting result; and determining the first N interval control parameters in the parameter sorting result as the N target interval control parameters.
[0155] Optionally, the processing unit 902 is specifically configured to perform: when the target interval control parameter is greater than a preset threshold, determining a first preset character as the watermark information corresponding to the target interval control parameter; and when the target interval control parameter is less than or equal to the preset threshold, determining a second preset character as the watermark information corresponding to the target interval control parameter.
[0156] Optionally, the processing unit 902 is specifically configured to perform: when the watermark information corresponding to the target interval control parameter is the first preset character, updating the target interval control parameter in a first updating mode to increase or decrease the performance interval represented by the target interval control parameter by a preset time length; and when the watermark information corresponding to the target interval control parameter is the second preset character, updating the target interval control parameter in a second updating mode to decrease or increase the performance interval represented by the target interval control parameter by a preset time length, and the second updating mode is different from the first updating mode.
[0157] Optionally, the processing unit 902 is further configured to perform: sorting the N watermark information in the time sequence of the N target interval control parameters in the original audio file to obtain the audio digital watermark.
[0158] Optionally, the processing unit 902 is further configured to perform: comparing the interval control parameters in the original audio file and the audio to be detected, to obtain a plurality of comparison results; when the comparison result is a first preset result, determining the watermark information corresponding to the comparison result as a first preset character; when the comparison result is a second preset result, determining the watermark information corresponding to the comparison result as a second preset character; sorting the watermark information corresponding to each comparison result according to the time sequence of the interval control parameters corresponding to each comparison result in the original audio file, to obtain a watermark to be detected; determining a watermark detection result according to the audio digital watermark and the watermark to be detected; and the watermark detection result is used to represent the consistency of the original audio file and the audio to be detected.
[0159] Optionally, the original audio file includes a plurality of audio track data blocks; the audio track data block is used to represent the performance information of the audio corresponding to the original audio file; the audio track data block includes an interval control parameter; the notes associated with the interval control parameter are located in the first audio track data block and the second audio track data block, respectively; the first audio track data block is the audio track data block to which the interval control parameter belongs; and the second audio track data block is adjacent to and located after the first audio track data block.
[0160] As described above, the embodiments of the present disclosure can divide the terminal into functional modules according to the above method examples. The integrated modules described above can be implemented in the form of hardware or in the form of software functional modules. In addition, it should be noted that the division of modules in the embodiments of the present disclosure is illustrative, and is only a logical functional division. Actual implementation can have another division manner. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing module.
[0161] As for the watermark processing device in the above embodiments, the specific manner in which each module performs operations and the beneficial effects possessed have been described in detail in the foregoing method embodiments, and will not be described here again.
[0162] The embodiments of the present disclosure also provide a terminal. The terminal can be a mobile phone, a computer, or the like. Figure 11 A structure schematic diagram of a terminal provided by the embodiments of the present disclosure is shown. The terminal can be a watermark processing device, which can include at least one processor 61, a communication bus 62, a memory 63, and at least one communication interface 64.
[0163] The processor 61 can be a central processing unit (CPU), a micro processing unit, an ASIC, or one or more integrated circuits for controlling the execution of programs of the present disclosure scheme.
[0164] The communication bus 62 may include a path for transmitting information between the aforementioned components.
[0165] Communication interface 64 uses any transceiver-like device for communicating with other devices or communication networks, such as servers, Ethernet, radio access networks (RAN), wireless local area networks (WLAN), etc.
[0166] The memory 63 may be a read-only memory (ROM) or other type of static storage device capable of storing static information and instructions, random access memory (RAM) or other type of dynamic storage device capable of storing information and instructions, or electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital versatile optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but not limited thereto. The memory may exist independently and be connected to the processing unit via a bus. The memory may also be integrated with the processing unit.
[0167] The memory 63 stores the application code that executes the present invention, and its execution is controlled by the processor 61. The processor 61 executes the application code stored in the memory 63 to implement the functions of the method of the present invention.
[0168] In a specific implementation, as one example, processor 61 may include one or more CPUs, for example... Figure 11 CPU0 and CPU1 in the CPU.
[0169] In a specific implementation, as one example, the terminal may include multiple processors, for example... Figure 11 Processors 61 and 65 are included. Each of these processors may be a single-core (single-CPU) processor or a multi-core (multi-CPU) processor. A processor here may refer to one or more devices, circuits, and / or processing cores used to process data (e.g., computer program instructions).
[0170] In a specific implementation, as an embodiment, the terminal can further include an input device 66 and an output device 67. The input device 66 and the output device 67 are in communication, and can accept user input in various ways. For example, the input device 66 can be a mouse, a keyboard, a touch screen device, a sensor device, or the like. The output device 67 is in communication with the processor 61, and can display information in various ways. For example, the output device 61 can be a liquid crystal display (LCD), a light emitting diode (LED) display device, or the like.
[0171] Those skilled in the art can understand that Figure 12 The structure shown in the foregoing embodiments of the terminal does not constitute a limitation on the terminal, and the terminal can include more or fewer components than those shown in the figure, or combine certain components, or adopt a different component arrangement.
[0172] The embodiments of the present disclosure also provide a server. Figures 2-9 A structure diagram of a server provided by the embodiments of the present disclosure is shown. The server can be a watermark processing device. The server can have a large difference due to different configurations or performances, and can include one or more processors 71 and one or more memories 72. The memory 72 stores at least one instruction, and the at least one instruction is loaded and executed by the processor 71 to implement the watermark processing method provided by the above-mentioned various method embodiments. Of course, the server can also have a wired or wireless network interface, a keyboard, and an input and output interface, and the like, so as to perform input and output. The server can also include other components for implementing device functions, which are not described herein.
[0173] The present disclosure also provides a computer readable storage medium including instructions, the computer readable storage medium storing the instructions, and when the instructions in the computer readable storage medium are executed by a processor of a computer device, the computer is enabled to perform the watermark processing method provided by the above-mentioned embodiments. For example, the computer readable storage medium can be a memory 63 including instructions, and the above-mentioned instructions can be executed by the processor 61 of the terminal to complete the above-mentioned method. For another example, the computer readable storage medium can be a memory 72 including instructions, and the above-mentioned instructions can be executed by the processor 71 of the server to complete the above-mentioned method. Alternatively, the computer readable storage medium can be a non-transitory computer readable storage medium, for example, the non-transitory computer readable storage medium can be a ROM, a RAM, a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device, or the like.
[0174] The present disclosure also provides a computer program product, the computer program product including computer instructions, and when the computer instructions run on an electronic device, the electronic device performs the above-mentioned The watermarking method as claimed in any one of the accompanying drawings.
[0175] Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the concepts disclosed herein. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
[0176] It is to be understood that the disclosure is not limited to the precise structures hereinabove described and as shown in the accompanying drawings, which can be modified in various ways and substituted for others without departing from the scope of the present disclosure. The scope of the present disclosure is limited only by the claims appended hereto.
Claims
1. A watermark processing method, characterized in that, include: Obtain the original audio file; the original audio file includes M interval control parameters; The interval control parameter is used to characterize the playing interval between notes associated with the interval control parameter in the original audio file; M is a positive integer; Determine N target interval control parameters; N is a positive integer, and N is less than or equal to M; Determine N watermark information that correspond one-to-one with the N target interval control parameters; According to the time sequence of the N target interval control parameters in the original audio file, sort the N watermark information to obtain the audio digital watermark corresponding to the original audio file; Based on the watermark information, update the target interval control parameters accordingly, increase or decrease the performance interval represented by the target interval control parameters by a preset duration, and obtain the target audio file with the audio digital watermark added.
2. The watermark processing method according to claim 1, characterized in that, The determination of the N target interval control parameters includes: The M interval control parameters are sorted in descending order of their represented performance intervals to obtain the parameter sorting result. The first N interval control parameters in the parameter sorting result are determined as the N target interval control parameters.
3. The watermark processing method according to claim 1, characterized in that, The determination of the N watermark information corresponding one-to-one with the N target interval control parameters includes: When the target interval control parameter is greater than the preset threshold, the first preset character is determined as the watermark information corresponding to the target interval control parameter; When the target interval control parameter is less than or equal to the preset threshold, the second preset character is determined as the watermark information corresponding to the target interval control parameter.
4. The watermark processing method according to claim 1, characterized in that, The step of updating the target interval control parameters based on the watermark information includes: When the watermark information corresponding to the target interval control parameter is a first preset character, the target interval control parameter is updated according to the first update method to increase or decrease the performance interval represented by the target interval control parameter by a preset duration. When the watermark information corresponding to the target interval control parameter is a second preset character, the target interval control parameter is updated according to the second update method to reduce or increase the preset duration of the performance interval represented by the target interval control parameter, and the second update method is different from the first update method.
5. The watermarking method according to any one of claims 1-4, characterized in that, Also includes: The interval control parameters in the original audio file and the audio to be detected are compared accordingly to obtain multiple comparison results; When the comparison result is a first preset result, the watermark information corresponding to the comparison result is determined as a first preset character; When the comparison result is the second preset result, the watermark information corresponding to the comparison result is determined as the second preset character; According to the time sequence of the interval control parameters corresponding to each comparison result in the original audio file, the watermark information corresponding to each comparison result is sorted to obtain the watermark to be detected. The watermark detection result is determined based on the audio digital watermark and the watermark to be detected; the watermark detection result is used to characterize the consistency between the original audio file and the audio to be detected.
6. The watermarking method according to any one of claims 1-4, characterized in that, The original audio file includes multiple track data blocks; the track data blocks are used to characterize the performance information of the audio corresponding to the original audio file; the track data blocks include the interval control parameters; the notes associated with the interval control parameters are located in the first track data block and the second track data block, respectively. The first audio track data block is the audio track data block to which the interval control parameter belongs; the second audio track data block is adjacent to the first audio track data block and is located after the first audio track data block.
7. A watermark processing device, characterized in that, include: Acquisition unit and processing unit; The acquisition unit is configured to acquire an original audio file; the original audio file includes M interval control parameters; The interval control parameter is used to characterize the playing interval between notes associated with the interval control parameter in the original audio file; M is a positive integer; The processing unit is configured to determine N target interval control parameters; N is a positive integer, and N is less than or equal to M; The processing unit is further configured to determine N watermark information that correspond one-to-one with the N target interval control parameters; The processing unit is further configured to sort the N watermark information according to the time sequence of the N target interval control parameters in the original audio file, so as to obtain an audio digital watermark corresponding to the original audio file. The processing unit is further configured to update the target interval control parameters based on the watermark information, increase or decrease the performance interval represented by the target interval control parameters by a preset duration, and obtain a target audio file with the audio digital watermark added.
8. An electronic device, characterized in that, include: processor; Memory used to store the processor's executable instructions; The processor is configured to execute the instructions to implement the watermarking method as described in any one of claims 1-6.
9. A computer-readable storage medium storing instructions thereon, characterized in that, When the instructions in the computer-readable storage medium are executed by the processor of the electronic device, the electronic device is able to perform the watermarking method as described in any one of claims 1-6.
Citation Information
Patent Citations
Audio watermarking technique for motion picture presentations
CN101490747A
Audio watermark adding method and related equipment
CN114373468A