A data processing method and related device
Patent Information
- Application Number
- CN202310363676.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-31
- Publication Date
- 2026-10-30
- Estimated Expiration
- 2043-03-31
AI Technical Summary
[0004]在进行音乐识别时,通常基于训练好的神经网络实现,然而,由于曲库很大且更新速度很快,每首歌可能有多个翻唱,在训练时无法使用全部翻唱版本上训练模型,只能利用部分翻唱版本进行训练,因此,训练得到的模型在未知的翻唱版本上的精度较差
Smart Images

Figure CN116521931B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence, and more particularly to a data processing method and related equipment. Background Technology
[0002] Artificial intelligence (AI) is the theory, methods, technology, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results. In other words, AI is a branch of computer science that attempts to understand the essence of intelligence and produce a new kind of intelligent machine that can react in a way similar to human intelligence. AI studies the design principles and implementation methods of various intelligent machines, enabling them to have perception, reasoning, and decision-making capabilities. Research in the field of AI includes robotics, natural language processing, computer vision, decision-making and reasoning, human-computer interaction, recommendation and search, and fundamental AI theories.
[0003] Music platforms have revolutionized the way people listen to songs. They are not only portable music libraries but also powerful music search tools. When users hear a song they are interested in but don't know its name, they can use the music platform's cover song recognition function (or music recognition function) to find the closest candidate song.
[0004] Music recognition is usually based on a pre-trained neural network. However, due to the large size and rapid update speed of the music library, each song may have multiple covers. It is impossible to train the model using all cover versions. Only a portion of the cover versions can be used for training. Therefore, the trained model has poor accuracy on unknown cover versions. Summary of the Invention
[0005] This application provides a data processing method and related equipment that can improve the accuracy of the model when performing music recognition (e.g., cover song recognition).
[0006] In a first aspect, this application provides a data processing method, the method comprising: acquiring first audio data of a first song; obtaining a first feature representation based on the first audio data; the first feature representation being used to represent accompaniment information unrelated to melody or vocal features of a person in the first song; obtaining a second feature representation based on the first audio data through a first network, the second feature representation being used when recognizing the first song; predicting an upper bound of mutual information between the first feature representation and the second feature representation through a second network based on the first feature representation and the second feature representation; the mutual information being used to determine a first loss, the first loss being used to minimize the upper bound; and updating the first network based on the first loss.
[0007] Among them, accompaniment information unrelated to melody can include information in the accompaniment that is unrelated to melody, such as the type of musical instrument. Usually, different cover versions of the same song have the same melody, but the accompaniment information unrelated to melody (such as the type of musical instrument, style, loudness, etc.) are different.
[0008] On the one hand, processing song features (second feature representation) based on prior knowledge (first feature representation) decouples cover song information unrelated to audio representation, making the feature representation closer to the essence of the song (such as the melody features of the song), thereby improving the model's recognition accuracy when performing music recognition.
[0009] Melody is the primary element of music, generally referring to an organized and rhythmic sequence of musical notes formed through artistic conception. It is a monophonic movement with logical elements, constructed according to certain pitch, duration, and volume.
[0010] On the other hand, since the loss is determined solely by mutual information without modifying the process of song recognition based on feature representations or the process of generating those feature representations, the existing training framework can be maintained during training. In other words, it can be plugged into existing models to achieve better training results.
[0011] In one possible implementation, updating the first network based on the first loss includes updating both the first network and the second network based on the first loss.
[0012] In one possible implementation, the method further includes: determining a clustering result of the first song by clustering based on the first feature representation; the clustering result is used to determine a second loss; and updating the first network based on the first loss includes: updating the first network based on the first loss and the second loss.
[0013] The method for estimating the upper bound of mutual information is essentially a self-supervised algorithm, which may be at risk of model collapse. Secondly, the pre-extracted audio features and timbre representations rely on the feature extractor. Considering the performance of existing feature extractors, essential information about the song (such as melody features) may still remain in the audio features and timbre representations. Clustering models (such as K-Means) can be used to assign pseudo-labels to the meta-knowledge, and then supervised by a recognition task.
[0014] In one possible implementation, the method further includes: obtaining the recognition result of the first song based on the second feature representation (for example, calculating the similarity between the features of the song and the features of the song in the music library directly based on the second feature representation using a neural network or by calculating the Euclidean distance, and recognizing the song based on the similarity); determining a third loss based on the recognition result and the ground truth value corresponding to the first song; and updating the first network based on the first loss includes: updating the first network based on the first loss and the third loss.
[0015] In one possible implementation, obtaining the recognition result of the first song based on the second feature representation includes: acquiring the intermediate layer output of the first network when processing the first audio data; and obtaining the recognition result of the first song based on the fusion result of the second feature representation and the intermediate layer output.
[0016] The method for estimating the upper bound of mutual information is essentially a self-supervised algorithm, which may be at risk of model collapse. Secondly, the pre-extracted audio features and timbre representations rely on the feature extractor. Considering the performance of existing feature extractors, essential information about the song (such as the melody features) may still remain in the audio features and timbre representations. Meta-knowledge (such as the intermediate layer output of the first network in this embodiment when processing the first audio data) can be provided to the song recognizer. This not only utilizes the small amount of effective information that may exist in the cover song's meta-information but also further reduces the representation's dependence on meta-knowledge, thereby reducing the possibility of pattern collapse.
[0017] In one possible implementation, the method further includes: acquiring second audio data of a second song; the second song and the first song are different cover versions of the same song; obtaining a third feature representation through the first network based on the second audio data, the third feature representation being used for recognizing the second song; determining a target mask based on the relationship between the second feature representation and the third feature representation, the target mask representing the degree of influence of each feature position in the feature representation on causing the difference between the second feature representation and the third feature representation; adjusting the second feature representation according to the target mask to obtain an adjusted second feature representation; the second feature representation and the adjusted second feature representation being used to determine a fourth loss; and updating the first network according to the first loss including: updating the first network according to the first loss and the fourth loss.
[0018] By utilizing the gradient differences between positive sample cover versions, the irrelevant information locations of the representation vector are identified, thereby decoupling the representation and obtaining a robust representation vector.
[0019] In one possible implementation, determining the target mask based on the relationship between the second feature representation and the third feature representation includes: The fifth loss is determined based on the difference between the second feature representation and the third feature representation; Based on the fifth loss, the gradient corresponding to each feature position in the second feature representation is determined; the target mask is obtained based on the gradient.
[0020] In one possible implementation, the method further includes: The fifth loss is determined based on the difference between the second feature representation and the third feature representation; The step of updating the first network based on the first loss includes: The first network is updated based on the first loss and the fifth loss.
[0021] In one possible implementation, updating the first network based on the first loss and the fourth loss includes: The third feature representation is used as a positive sample, the second feature representation is used as a negative sample, and the first network is updated through adversarial learning based on the fourth loss.
[0022] Secondly, this application provides a data processing method, the method comprising: Obtain the target audio data of the target song; Based on the target audio data, the updated first network obtained through any of the methods in the first aspect is used to obtain the target feature representation; The identification result of the target song is obtained based on the target feature representation.
[0023] Thirdly, this application provides a data processing apparatus, the apparatus comprising: The acquisition module is used to acquire the first audio data of the first song; The processing module is used to obtain a first feature representation based on the first audio data; the first feature representation is used to represent accompaniment information or vocal features of the characters in the first song that are unrelated to the melody. Based on the first audio data, a second feature representation is obtained through a first network, and the second feature representation is used when recognizing the first song; Based on the first feature representation and the second feature representation, an upper bound of the mutual information between the first feature representation and the second feature representation is predicted through a second network; the mutual information is used to determine a first loss, and the first loss is used to minimize the upper bound; Update the first network based on the first loss.
[0024] In one possible implementation, the processing module is specifically used for: Update the first network and the second network based on the first loss.
[0025] In one possible implementation, the processing module is further configured to: Based on the first feature representation, the clustering result of the first song is determined by clustering; the clustering result is used to determine the second loss; The processing module is specifically used for: Update the first network based on the first loss and the second loss.
[0026] In one possible implementation, the processing module is further configured to: Based on the second feature representation, the recognition result of the first song is obtained; Based on the recognition results and the truth value corresponding to the first song, a third loss is determined; The processing module is specifically used for: The first network is updated based on the first loss and the third loss.
[0027] In one possible implementation, the processing module is specifically used for: Obtain the intermediate layer output of the first network when processing the first audio data; The recognition result of the first song is obtained based on the fusion result of the second feature representation and the output of the intermediate layer.
[0028] In one possible implementation, the acquisition module is further configured to: Obtain the second audio data of the second song; the second song and the first song are different cover versions of the same song; The processing module is further configured to: Based on the second audio data, a third feature representation is obtained through the first network, and the third feature representation is used to identify the second song; Based on the relationship between the second feature representation and the third feature representation, a target mask is determined, wherein the target mask represents the degree of influence of each feature position in the feature representation on the difference between the second feature representation and the third feature representation; Based on the target mask, the second feature representation is adjusted to obtain an adjusted second feature representation; the second feature representation and the adjusted second feature representation are used to determine the fourth loss; The processing module is specifically used for: The first network is updated based on the first loss and the fourth loss.
[0029] In one possible implementation, the processing module is specifically used for: The fifth loss is determined based on the difference between the second feature representation and the third feature representation; Based on the fifth loss, the gradient corresponding to each feature position in the second feature representation is determined; the target mask is obtained based on the gradient.
[0030] In one possible implementation, the processing module is further configured to: The fifth loss is determined based on the difference between the second feature representation and the third feature representation; The processing module is specifically used for: The first network is updated based on the first loss and the fifth loss.
[0031] In one possible implementation, the processing module is specifically used for: The third feature representation is used as a positive sample, the second feature representation is used as a negative sample, and the first network is updated through adversarial learning based on the fourth loss.
[0032] Fourthly, this application provides a data processing apparatus, the apparatus comprising: The acquisition module is used to acquire the target audio data of the target song; The processing module is configured to obtain a target feature representation based on the target audio data through the updated first network obtained according to claims 1 to 9; The identification result of the target song is obtained based on the target feature representation.
[0033] The fifth aspect of this application provides a data processing apparatus that performs the method in the first aspect or any possible implementation thereof, or performs the method in the second aspect or any possible implementation thereof.
[0034] A sixth aspect of this application provides a data processing apparatus, comprising: a processor coupled to a memory for storing programs or instructions, wherein when the programs or instructions are executed by the processor, the data processing apparatus implements the method of the first aspect or any possible implementation thereof, or implements the method of the second aspect or any possible implementation thereof.
[0035] The seventh aspect of this application provides a computer-readable medium having a computer program or instructions stored thereon, which, when executed on a computer, cause the computer to perform the method of the first aspect or any possible implementation thereof, or to implement the method of the second aspect or any possible implementation thereof.
[0036] The eighth aspect of this application provides a computer program product that, when executed on a computer, causes the computer to perform the method in the first aspect or any possible implementation thereof, or to implement the method in the second aspect or any possible implementation thereof.
[0037] Ninthly, this application provides a chip system including a processor for supporting a data processing device in implementing the functions involved in the foregoing aspects, such as transmitting or processing data involved in the foregoing methods; or, information. In one possible design, the chip system further includes a memory for storing program instructions and data necessary for executing or training the device. The chip system may be composed of chips or may include chips and other discrete devices. Attached Figure Description
[0038] Figure 1A A schematic diagram of a system architecture provided in this application; Figure 1B A schematic diagram of a data processing method provided in this application; Figure 2 A schematic diagram of a data processing method provided in this application; Figure 3 A schematic diagram of a terminal device provided in this application; Figure 4 A schematic diagram of a server structure is provided for this application; Figure 5 A system illustration provided for this application; Figure 6 A cloud service illustration provided for this application; Figure 7 A network diagram provided for this application; Figure 8 A flowchart illustrating the data processing method provided in this application; Figure 9 A flowchart illustrating the data processing method provided in this application; Figure 10 A flowchart illustrating the data processing method provided in this application; Figure 11 A flowchart illustrating the data processing method provided in this application; Figure 12 A flowchart illustrating the data processing method provided in this application; Figure 13 A flowchart illustrating the data processing method provided in this application; Figure 14 A schematic diagram of the data processing apparatus provided in this application; Figure 15 A schematic diagram of the execution device provided in this application; Figure 16 A schematic diagram of the structure of the training equipment provided in this application; Figure 17 This is a schematic diagram of the chip structure provided in this application. Detailed Implementation
[0039] The embodiments of the present invention will now be described with reference to the accompanying drawings. The terminology used in the embodiments section is for illustrative purposes only and is not intended to limit the scope of the invention.
[0040] The embodiments of this application will now be described with reference to the accompanying drawings. Those skilled in the art will recognize that, with technological advancements and the emergence of new scenarios, the technical solutions provided in the embodiments of this application are equally applicable to similar technical problems.
[0041] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such terms are interchangeable where appropriate; this is merely a way of distinguishing objects with the same attributes in the embodiments of this application. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion, so that a process, method, system, product, or apparatus that comprises a series of elements is not necessarily limited to those elements, but may include other elements not explicitly listed or inherent to those processes, methods, products, or apparatuses.
[0042] The terms “substantially,” “about,” and similar terms used herein are used as approximations rather than as terms of degree, and are intended to take into account the inherent biases of measurements or calculations known to those skilled in the art. Furthermore, the use of “may” in describing embodiments of the invention refers to “one or more possible embodiments.” The terms “use,” “using,” and “used” used herein are to be considered synonymous with the terms “utilize,” “utilizing,” and “utilized,” respectively. Additionally, the term “exemplary” is intended to refer to an instance or illustration.
[0043] First, the overall workflow of the artificial intelligence system is described; please refer to [link / reference]. Figure 1A , Figure 1A The diagram illustrates a structural framework for artificial intelligence (AI). The framework is further elaborated below along two dimensions: the "Intelligent Information Chain" (horizontal axis) and the "IT Value Chain" (vertical axis). The "Intelligent Information Chain" reflects a series of processes from data acquisition to processing. For example, it could be the general process of intelligent information perception, intelligent information representation and formation, intelligent reasoning, intelligent decision-making, and intelligent execution and output. In this process, data undergoes a condensation process of "data—information—knowledge—wisdom." The "IT Value Chain" reflects the value that AI brings to the information technology industry, from the underlying infrastructure of human intelligence and information (provided and processed by technology) to the industrial ecosystem of the system.
[0044] (1) Infrastructure
[0045] Infrastructure provides computing power to support artificial intelligence systems, enabling communication with the external world and providing support through a basic platform. This communication occurs through sensors; computing power is provided by intelligent chips (hardware acceleration chips such as CPUs, NPUs, GPUs, ASICs, and FPGAs); and the basic platform includes distributed computing frameworks and related platform guarantees and support, which may include cloud storage and computing, interconnected networks, etc. For example, sensors communicate with the outside world to acquire data, and this data is provided to intelligent chips in the distributed computing system provided by the basic platform for computation.
[0046] (2) Data
[0047] The data at the next layer of infrastructure is used to represent the data sources in the field of artificial intelligence. The data involves graphics, images, voice, text, and IoT data from traditional devices, including business data from existing systems and sensor data such as force, displacement, liquid level, temperature, and humidity.
[0048] (3) Data processing
[0049] Data processing typically includes methods such as data training, machine learning, deep learning, search, reasoning, and decision-making.
[0050] Among them, machine learning and deep learning can perform intelligent information modeling, extraction, preprocessing, and training on data, including symbolization and formalization.
[0051] Reasoning refers to the process in which, in a computer or intelligent system, the machine thinks and solves problems by simulating human intelligent reasoning, based on reasoning control strategies and using formalized information. Typical functions include search and matching.
[0052] Decision-making refers to the process of making decisions based on intelligent information after reasoning, and it typically provides functions such as classification, sorting, and prediction.
[0053] (4) General ability
[0054] After the data processing mentioned above, the results of the data processing can be used to form some general capabilities, such as algorithms or a general system, for example, translation, text analysis, computer vision processing, speech recognition, image recognition, etc.
[0055] (5) Smart products and industry applications
[0056] Intelligent products and industry applications refer to products and applications of artificial intelligence systems in various fields. They are the encapsulation of overall artificial intelligence solutions, productizing intelligent information decision-making and realizing practical applications. Their application areas mainly include: intelligent terminals, intelligent transportation, intelligent healthcare, autonomous driving, smart cities, etc.
[0057] First, we will introduce the application scenarios of this application. This application can be applied, but is not limited to, to applications with music recognition functions (such as song recognition by listening, song recognition by humming, etc.) (hereinafter referred to as music applications), cloud services provided by cloud-side servers, and the construction of music databases, etc., which will be introduced in detail below: I. Music Applications The product form of this application embodiment can be a music application. Music applications can run on terminal devices or cloud servers.
[0058] In one possible implementation, music applications can perform music recognition (also known as music retrieval, such as song recognition by listening or humming). The specific task of music recognition can be: based on the processing of the audio data of the music, determine the recognition result of the music (such as the song title or other information that can indicate the music).
[0059] In one possible implementation, a user can open a music application installed on a terminal device and input audio data (which may be collected by an audio sensor on the terminal device). The music application can determine the music recognition result based on the audio data using the method provided in the embodiments of this application, and present the recognition result to the user (the presentation method may include, but is not limited to, displaying, saving, uploading to the cloud, etc.).
[0060] In one possible implementation, a user can open a music application installed on a terminal device and input audio data (which may be collected by an audio sensor on the terminal device). The music application can send the audio data to a cloud-based server. The cloud-based server generates a music recognition result based on the audio data using the method provided in this application embodiment and sends the music recognition result back to the terminal device. The terminal device can then present the music recognition result to the user (the presentation method may include, but is not limited to, displaying, saving, uploading to the cloud, etc.).
[0061] The music application in this application will be described in the following sections, focusing on its functional architecture and the product architecture that implements its functions.
[0062] Reference Figure 1B , Figure 1B This is a schematic diagram of the functional architecture of a music application in this application embodiment: In one possible implementation, such as Figure 1B As shown, music applications ( Figure 2The illustrated music recognition application 102 can receive input parameters 101 (e.g., audio data) and generate a music recognition result 103. The music application 102 can execute on at least one computer system (for example) and includes computer code that, when executed by one or more computers, causes the computers to perform data processing methods described herein.
[0063] Reference Figure 2 , Figure 2 This is a schematic diagram of the entity architecture for running music applications in this application embodiment: See Figure 2 , Figure 2 A schematic diagram of a system architecture is shown. The system may include a terminal 100 and a server 200. The server 200 may include one or more servers (…). Figure 2 (The example includes a server.) Server 200 can provide music recognition services for one or more terminals.
[0064] The terminal 100 may have a music application installed or a webpage related to music recognition open. The application or webpage can provide an interface. The terminal 100 can receive relevant parameters input by the user on the music recognition interface and send the parameters to the server 200. The server 200 can obtain the processing result based on the received parameters and return the processing result to the terminal 100.
[0065] It should be understood that in some optional implementations, the terminal 100 can also complete the action of obtaining the data processing result based on the received parameters on its own, without the need for the server to cooperate. This application embodiment is not limited to this.
[0066] The following description Figure 2 The product form of the mid-terminal 100; The terminal 100 in this application embodiment can be a mobile phone, tablet computer, wearable device, vehicle device, augmented reality (AR) / virtual reality (VR) device, laptop computer, ultra-mobile personal computer (UMPC), netbook, personal digital assistant (PDA), etc., and this application embodiment does not impose any restrictions on it.
[0067] Figure 3 A schematic diagram of an optional hardware structure for terminal 100 is shown.
[0068] refer to Figure 3 As shown, the terminal 100 may include a radio frequency unit 110, a memory 120, an input unit 130, a display unit 140, a camera 150 (optional), an audio circuit 160 (optional), a speaker 161 (optional), a microphone 162 (optional), a processor 170, an external interface 180, a power supply 190, and other components. Those skilled in the art will understand that... Figure 3 These are merely examples of terminals or multi-functional devices and do not constitute a limitation on terminals or multi-functional devices. They may include more or fewer components than shown in the illustration, or combine certain components, or use different components.
[0069] The input unit 130 can be used to receive input numerical or character information, and to generate key signal inputs related to user settings and function control of the portable multi-functional device. Specifically, the input unit 130 may include a touchscreen 131 (optional) and / or other input devices 132. The touchscreen 131 can collect touch operations performed by the user on or near it (such as operations performed by the user using fingers, knuckles, styluses, or any suitable object on or near the touchscreen), and drive the corresponding connection devices according to a pre-set program. The touchscreen can detect the user's touch actions, convert the touch actions into touch signals and send them to the processor 170, and can receive and execute commands sent by the processor 170; the touch signal includes at least touch point coordinate information. The touchscreen 131 can provide an input interface and an output interface between the terminal 100 and the user. In addition, various types of touchscreens, such as resistive, capacitive, infrared, and surface acoustic wave, can be used to implement the touchscreen. Besides the touchscreen 131, the input unit 130 may also include other input devices. Specifically, other input devices 132 may include, but are not limited to, one or more of the following: physical keyboard, function keys (such as volume control buttons 132, power buttons 133, etc.), trackball, mouse, joystick, etc.
[0070] The input device 132 can receive input audio data, etc.
[0071] The display unit 140 can be used to display information input by the user or information provided to the user, various menus of the terminal 100, interactive interfaces, file display, and / or playback of any multimedia file. In this embodiment, the display unit 140 can be used to display the interface of a music application, etc.
[0072] The memory 120 can be used to store instructions and data. The memory 120 may primarily include an instruction storage area and a data storage area. The data storage area can store various types of data, such as multimedia files and text. The instruction storage area can store software units such as operating systems, applications, and instructions required for at least one function, or subsets or extended sets thereof. It may also include non-volatile random access memory. It provides the processor 170 with hardware, software, and data resources for managing the computing device, supporting control software and applications. It is also used for storing multimedia files, as well as storing running programs and applications.
[0073] The processor 170 is the control center of the terminal 100. It connects various parts of the terminal 100 via various interfaces and lines. By running or executing instructions stored in the memory 120 and calling data stored in the memory 120, it performs various functions and processes data of the terminal 100, thereby controlling the terminal device as a whole. Optionally, the processor 170 may include one or more processing units; preferably, the processor 170 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 170. In some embodiments, the processor and memory can be implemented on a single chip; in some embodiments, they can also be implemented separately on independent chips. The processor 170 can also be used to generate corresponding operation control signals, send them to the corresponding components of the computing processing device, read and process data in the software, especially read and process data and programs in the memory 120, so that the various functional modules therein perform corresponding functions, thereby controlling the corresponding components to act according to the instructions.
[0074] The memory 120 can be used to store software code related to the data processing method, and the processor 170 can execute the steps of the chip's data processing method, and can also schedule other units (such as the above-mentioned input unit 130 and display unit 140) to achieve the corresponding functions.
[0075] The radio frequency unit 110 (optional) can be used for receiving and transmitting signals during information transmission or calls. For example, it can receive downlink information from the base station and process it for the processor 170; additionally, it can transmit uplink data to the base station. Typically, the RF circuit includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low-noise amplifier (LNA), a duplexer, etc. Furthermore, the radio frequency unit 110 can also communicate wirelessly with network devices and other devices. This wireless communication can use any communication standard or protocol, including but not limited to Global System for Mobile communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Messaging Service (SMS), etc.
[0076] In this embodiment of the application, the radio frequency unit 110 can send audio data to the server 200 and receive the music recognition result sent by the server 200.
[0077] It should be understood that the radio frequency unit 110 is optional and can be replaced with other communication interfaces, such as a network port.
[0078] The terminal 100 also includes a power supply 190 (such as a battery) that supplies power to various components. Preferably, the power supply can be logically connected to the processor 170 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system.
[0079] Terminal 100 also includes an external interface 180, which can be a standard Micro USB interface or a multi-pin connector, which can be used to connect terminal 100 to other devices for communication or to connect a charger to charge terminal 100.
[0080] Although not shown, terminal 100 may also include a flash, a wireless fidelity (WiFi) module, a Bluetooth module, sensors with various functions, etc., which will not be described in detail here. Some or all of the methods described below can be applied to, for example... Figure 3 In the terminal 100 shown.
[0081] The following description Figure 2 The product form of the mid-range server 200; Figure 4 A structural diagram of a server 200 is provided, as follows: Figure 4 As shown, server 200 includes bus 201, processor 202, communication interface 203, and memory 204. Processor 202, memory 204, and communication interface 203 communicate with each other via bus 201.
[0082] Bus 201 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of representation, Figure 4 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0083] The processor 202 can be any one or more of the following processors: central processing unit (CPU), graphics processing unit (GPU), microprocessor (MP), or digital signal processor (DSP).
[0084] Memory 204 may include volatile memory, such as random access memory (RAM). Memory 204 may also include non-volatile memory, such as read-only memory (ROM), flash memory, hard drive (HDD), or solid state drive (SSD).
[0085] The memory 204 can be used to store software code related to the data processing method, and the processor 202 can execute the steps of the chip's data processing method, and can also schedule other units to achieve corresponding functions.
[0086] It should be understood that the aforementioned terminal 100 and server 200 can be centralized or distributed devices. The processors (e.g., processor 170 and processor 202) in the aforementioned terminal 100 and server 200 can be hardware circuits (such as application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), general-purpose processors, digital signal processors (DSPs), microprocessors or microcontrollers, etc.) or combinations of these hardware circuits. For example, the processor can be a hardware system with instruction execution capabilities, such as a CPU or DSP, or a hardware system without instruction execution capabilities, such as an ASIC or FPGA, or a combination of the aforementioned hardware systems without instruction execution capabilities and hardware systems with instruction execution capabilities.
[0087] It should be understood that the steps related to the model inference process in the embodiments of this application involve AI-related operations. When performing AI operations, the instruction execution architecture of the terminal device and server is not limited to the processor-memory architecture described above. The following section will further explain... Figure 5 The system architecture provided in the embodiments of this application will be described in detail.
[0088] Figure 5 This is a schematic diagram of the system architecture provided for an embodiment of this application. Figure 5 As shown, the system architecture 500 includes an execution device 510, a training device 520, a database 530, a client device 540, a data storage system 550, and a data acquisition device 560.
[0089] The execution device 510 includes a calculation module 511, an I / O interface 512, a preprocessing module 513, and a preprocessing module 514. The calculation module 511 may include a target model / rule 501, while the preprocessing modules 513 and 514 are optional.
[0090] Among them, the execution device 510 can be a terminal device or a server that runs the aforementioned character music application.
[0091] The data acquisition device 560 is used to collect training samples. The training samples can be audio data, and the ground truth values for the music described in the audio data (which can be simply referred to as ground truth values in this embodiment). After collecting the training samples, the data acquisition device 560 stores these training samples in the database 530.
[0092] The training device 520 can maintain training samples in the database 530 and obtain the target model / rule 501 from the neural network to be trained (such as the first network, the second network, etc. in the embodiments of this application).
[0093] It should be noted that in practical applications, the training samples maintained in database 530 may not all come from the data acquisition device 560; they may also be received from other devices. Furthermore, it should be noted that training device 520 may not necessarily train the target model / rule 501 entirely based on the training samples maintained in database 530; it may also obtain training samples from the cloud or other sources for model training. The above description should not be construed as limiting the embodiments of this application.
[0094] The target model / rule 501 trained using training device 520 can be applied to different systems or devices, such as... Figure 5 The execution device 510 shown can be a terminal, such as a mobile phone terminal, tablet computer, laptop computer, augmented reality (AR) / virtual reality (VR) device, vehicle terminal, etc., or it can be a server, etc.
[0095] Specifically, the training device 520 can transfer the trained model to the execution device 510.
[0096] exist Figure 5 In the execution device 510, an input / output (I / O) interface 512 is configured for data interaction with external devices. Users can input data (such as audio data in this embodiment) into the I / O interface 512 through the client device 540.
[0097] Preprocessing modules 513 and 514 are used to preprocess the input data received from the I / O interface 512. It should be understood that preprocessing modules 513 and 514 may be absent, or only one preprocessing module may be used. When preprocessing modules 513 and 514 are absent, the calculation module 511 can be used directly to process the input data.
[0098] During the preprocessing of input data by the execution device 510, or during the calculation module 511 of the execution device 510 performing calculations and other related processes, the execution device 510 can call data, code, etc. in the data storage system 550 for corresponding processing, or store the data, instructions, etc. obtained from the corresponding processing into the data storage system 550.
[0099] Finally, the I / O interface 512 provides the processing results (such as music recognition results) to the client device 540, thereby providing them to the user.
[0100] exist Figure 5 In the illustrated scenario, the user can manually provide input data, which can be done through the interface provided by I / O interface 512. Alternatively, the client device 540 can automatically send input data to I / O interface 512. If user authorization is required for the client device 540 to automatically send input data, the user can set the corresponding permissions in the client device 540. The user can view the output results of the execution device 510 on the client device 540, which can be presented in various forms such as display, sound, or animation. The client device 540 can also act as a data acquisition terminal, collecting the input data and output results of the input I / O interface 512 as shown in the figure, and storing them as new sample data in database 530. Alternatively, data can be collected directly from the I / O interface 512 without going through the client device 540, using the input data and output results of the input I / O interface 512 as shown in the figure, and storing them as new sample data in database 530.
[0101] It is worth noting that, Figure 5 This is merely a schematic diagram of a system architecture provided in an embodiment of this application. The positional relationships between the devices, components, modules, etc., shown in the diagram do not constitute any limitation. For example, in Figure 5 In this context, the data storage system 550 is an external storage device relative to the execution device 510. However, in other cases, the data storage system 550 may also be placed within the execution device 510. It should be understood that the aforementioned execution device 510 may be deployed within the client device 540.
[0102] From the inference side of the model: In this embodiment, the computing module 511 of the execution device 510 can obtain the code stored in the data storage system 550 to implement the steps related to the model reasoning process in this embodiment.
[0103] In this embodiment of the application, the computing module 511 of the execution device 510 may include hardware circuits (such as application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), general-purpose processors, digital signal processors (DSPs), microprocessors or microcontrollers, etc.) or combinations of these hardware circuits. For example, the training device 520 may be a hardware system with instruction execution capabilities, such as a CPU or DSP, or a hardware system without instruction execution capabilities, such as an ASIC or FPGA, or a combination of the aforementioned hardware systems without instruction execution capabilities and hardware systems with instruction execution capabilities.
[0104] Specifically, the computing module 511 of the execution device 510 can be a hardware system with the function of executing instructions. The steps related to the model inference process provided in this application embodiment can be software code stored in the memory. The computing module 511 of the execution device 510 can obtain the software code from the memory and execute the obtained software code to implement the steps related to the model inference process provided in this application embodiment.
[0105] It should be understood that the computing module 511 of the execution device 510 can be a combination of a hardware system without the function of executing instructions and a hardware system with the function of executing instructions. Some steps related to the model reasoning process provided in the embodiments of this application can also be implemented by the hardware system in the computing module 511 of the execution device 510 without the function of executing instructions, which is not limited here.
[0106] From the training side of the model: In this embodiment of the application, the training device 520 can access the memory ( Figure 5 (Not shown in the diagram, but can be integrated into the training device 520 or deployed separately from the training device 520) The code stored in the diagram implements the steps related to model training in the embodiments of this application.
[0107] In this embodiment of the application, the training device 520 may include hardware circuits (such as application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), general-purpose processors, digital signal processors (DSPs), microprocessors or microcontrollers, etc.) or combinations of these hardware circuits. For example, the training device 520 may be a hardware system with instruction execution capabilities, such as a CPU or DSP, or a hardware system without instruction execution capabilities, such as an ASIC or FPGA, or a combination of the aforementioned hardware systems without instruction execution capabilities and hardware systems with instruction execution capabilities.
[0108] It should be understood that the training device 520 can be a combination of a hardware system without the function of executing instructions and a hardware system with the function of executing instructions. Some steps related to the training of the neutralization model provided in the embodiments of this application can also be implemented by the hardware system in the training device 520 without the function of executing instructions, which is not limited here.
[0109] II. Music recognition cloud service provided by the server: In one possible implementation, the server can provide music recognition services to the client side through an application programming interface (API).
[0110] In this process, the terminal device can send relevant parameters (such as audio data) to the server through the API provided by the cloud. The server can obtain the processing result (such as the music recognition result) based on the received parameters and return the processing result to the terminal.
[0111] The description of the terminal and server can be found in the above embodiments, and will not be repeated here.
[0112] like Figure 6 The process of using a music recognition cloud service provided by a cloud platform is shown.
[0113] 1. Activate and purchase content moderation services.
[0114] 2. Users can download the software development kit (SDK) corresponding to the content moderation service. Cloud platforms usually provide multiple development versions of the SDK for users to choose from according to their development environment needs, such as JAVA version SDK, Python version SDK, PHP version SDK, Android version SDK, etc.
[0115] 3. After downloading the corresponding version of the SDK to their local machine according to their needs, users can import the SDK project into their local development environment, configure and debug it in the local development environment, and develop other functions in the local development environment to form an application that integrates music recognition capabilities.
[0116] 4. When a music recognition application is used, it can trigger a music recognition API call when music recognition is required. When the application triggers the music recognition function, it initiates an API request to the running instance of the music recognition service in the cloud environment. The API request carries audio data, which is processed by the running instance in the cloud environment to obtain the processing result (such as the music recognition result).
[0117] 5. The cloud environment returns the processing result to the application, thus completing a music recognition service call.
[0118] III. Music Library Construction.
[0119] When building a music library, it is necessary to establish a correspondence between music files and music recognition results, which can then be used in subsequent scenarios such as music recommendation.
[0120] Since the embodiments of this application involve a large number of neural network applications, for ease of understanding, the relevant terms and concepts such as neural networks involved in the embodiments of this application will be introduced below.
[0121] (1) Neural Network
[0122] A neural network can be composed of neural units, which can be operational units that take xs and an intercept of 1 as inputs, and whose output can be: (1-1) Where s = 1, 2, ..., n, where n is a natural number greater than 1, Ws is the weight of xs, and b is the bias of the neural unit. f is the activation function of the neural unit, used to introduce nonlinear characteristics into the neural network to convert the input signal in the neural unit into the output signal. The output signal of this activation function can be used as the input of the next convolutional layer. The activation function can be the sigmoid function. A neural network is a network formed by connecting many of the above-mentioned individual neural units together, that is, the output of one neural unit can be the input of another neural unit. The input of each neural unit can be connected to the local receptive field of the previous layer to extract the features of the local receptive field, which can be a region composed of several neural units.
[0123] (2) Deep Neural Networks
[0124] A Deep Neural Network (DNN) can be understood as a neural network with many hidden layers. There's no specific metric for "many" layers; the commonly used terms "multi-layer neural network" and "deep neural network" are essentially the same thing. DNNs can be categorized into three layers based on their position: input layers, hidden layers, and output layers. Generally, the first layer is the input layer, the last layer is the output layer, and the layers in between are hidden layers. All layers are fully connected, meaning that any neuron in the i-th layer is connected to any neuron in the (i+1)-th layer. Although DNNs seem complex, the operation of each layer is actually quite simple, resembling a linear relationship as follows: ,in, It is the input vector. It is the output vector. It is an offset vector. It is the weight matrix (also called coefficients). It's an activation function. Each layer simply applies the input vector... The output vector is obtained through such a simple operation. Because DNNs have many layers, the coefficients... and offset vector The number is quite large. So, how are the specific parameters defined in a DNN? Let's first look at the coefficients. The definition of linearity. Taking a three-layer DNN as an example, the linear coefficient from the 4th neuron in the second layer to the 2nd neuron in the third layer is defined as follows: The superscript 3 represents the coefficient. The index corresponds to the layer number, specifically the output layer 3 index 2 and the input layer 2 index 4. In summary, the coefficients from the k-th neuron in layer L-1 to the j-th neuron in layer L are defined as... Note that the input layer does not have... In deep neural networks, more hidden layers allow the network to better depict complex real-world situations. Theoretically, the more parameters a model has, the higher its complexity and "capacity," meaning it can accomplish more complex learning tasks.
[0125] (3) A Convolutional Neural Network (CNN) is a deep neural network with a convolutional structure. A CNN contains a feature extractor consisting of convolutional layers and subsampling layers. This feature extractor can be viewed as a filter, and the convolution process can be seen as using a trainable filter to convolve with an input image or a convolutional feature map. A convolutional layer refers to the neuron layer in a CNN that performs convolution processing on the input signal. In a convolutional layer of a CNN, a neuron can be connected only to some of the neurons in neighboring layers. A convolutional layer typically contains several feature planes, each of which can be composed of some rectangularly arranged neural units. Neural units on the same feature plane share weights, which are the convolutional kernels. Shared weights can be understood as the way image information is extracted regardless of location. The underlying principle is that the statistical information of a certain part of the image is the same as that of other parts. This means that image information learned in one part can also be used in another part. Therefore, the same learned image information can be used for all locations on the image. In the same convolutional layer, multiple convolutional kernels can be used to extract different image information. Generally, the more convolutional kernels there are, the richer the image information reflected by the convolution operation.
[0126] Convolutional kernels can be initialized as matrices of random size, and during the training of a convolutional neural network, they can learn appropriate weights. Furthermore, sharing weights directly reduces the number of connections between layers in the convolutional neural network, while also lowering the risk of overfitting.
[0127] (4) Backpropagation algorithm
[0128] Convolutional neural networks can employ backpropagation (BP) to correct the parameters in the initial super-resolution model during training, thereby reducing the reconstruction error loss. Specifically, forward propagation of the input signal to the output generates an error loss; this error loss information is then propagated back to update the parameters in the initial super-resolution model, leading to convergence of the error loss. The backpropagation algorithm is an error-loss-driven backpropagation process aimed at obtaining the optimal parameters of the super-resolution model, such as the weight matrix.
[0129] (5) Loss Function
[0130] In training a deep neural network, to ensure the output closely approximates the desired predicted value, we compare the network's prediction with the target value. Based on the difference, we update the weight vector of each layer (usually pre-configuring parameters before the initial update). For example, if the prediction is too high, the weight vector is adjusted to predict a lower value. This adjustment continues until the deep neural network predicts the target value or a value very close to it. Therefore, we need to predefine "how to compare the difference between the predicted and target values," which is the loss function or objective function. These are important equations used to measure the difference between the predicted and target values. Taking the loss function as an example, a higher output value (loss) indicates a greater difference, and training the deep neural network becomes a process of minimizing this loss.
[0131] (6) Backpropagation algorithm
[0132] Neural networks can employ backpropagation (BP) to correct the parameters of the initial neural network model during training, thereby reducing the reconstruction error loss. Specifically, forward propagation of the input signal to the output generates error loss; this error loss information is then propagated back to update the parameters of the initial neural network model, leading to convergence of the error loss. The backpropagation algorithm is an error-loss-driven backpropagation process aimed at obtaining the optimal parameters of the neural network model, such as the weight matrix.
[0133] (7) Transformer layer
[0134] Reference Figure 7 , Figure 7 This is a schematic diagram of a transformer layer architecture, such as Figure 7As shown, the neural network includes an embedding layer and at least one transformer layer. The at least one transformer layer can be N transformer layers (N being an integer greater than 0). Each transformer layer includes sequentially adjacent attention layers, add and normalize layers, feed-forward layers, and add and normalize layers. In the embedding layer, the current input is embedded to obtain multiple embedding vectors. In the attention layer, P input vectors are obtained from the layer above the first transformer layer. Using any first input vector among the P input vectors as the center, based on the correlation between each input vector within a preset attention window and the first input vector, an intermediate vector corresponding to the first input vector is obtained. This process determines P intermediate vectors corresponding to the P input vectors. In the pooling layer, the P intermediate vectors are merged into Q output vectors, where the multiple output vectors obtained from the last transformer layer are used as feature representations of the current input.
[0135] (8) Attention mechanism
[0136] Attention mechanisms mimic the internal processes of biological observation—aligning internal experience with external senses to increase the precision of observation in specific areas. They enable the rapid sifting of high-value information from a large volume of data using limited attentional resources. Attention mechanisms can quickly extract important features from sparse data and are therefore widely used in natural language processing tasks, particularly machine translation. Self-attention mechanisms, an improvement on attention mechanisms, reduce reliance on external information and are better at capturing the internal correlations of data or features. The core idea of attention mechanisms can be rewritten as follows: In this formula, Lx = ||Source|| represents the length of the Source. The meaning is that the elements in the Source are imagined as a series of data pairs. Given a Query element in the Target, the similarity or relevance between the Query and each Key is calculated to obtain the weight coefficient of the Value corresponding to each Key. Then, the Values are weighted and summed to obtain the final Attention value. Therefore, the Attention mechanism essentially performs a weighted sum of the Values of the elements in the Source, while the Query and Key are used to calculate the weight coefficients of their corresponding Values. Conceptually, Attention can be understood as selectively filtering a small amount of important information from a large amount of information and focusing on this important information, ignoring most of the unimportant information. The focusing process is reflected in the calculation of the weight coefficients; the larger the weight, the more focused it is on its corresponding Value. That is, the weight represents the importance of the information, and the Value is the corresponding information. Self-attention can be understood as intra attention. The attention mechanism occurs between the elements of the Target (Query) and all elements of the Source. Self-attention refers to the attention mechanism that occurs between elements within the Source or between elements within the Target. It can also be understood as the attention calculation mechanism in the special case where Target = Source. The specific calculation process is the same, only the calculation object changes.
[0137] Music platforms have revolutionized the way people listen to songs. They are not only portable music libraries but also powerful music search tools. When users hear a song they are interested in but don't know its name, they can use the music platform's cover song recognition function (or music recognition function) to find the closest candidate song.
[0138] Music recognition is usually based on a pre-trained neural network. However, due to the large size and rapid update speed of the music library, each song may have multiple covers. It is impossible to train the model using all cover versions. Only a portion of the cover versions can be used for training. Therefore, the trained model has poor accuracy on unknown cover versions.
[0139] To address the aforementioned problems, embodiments of this application provide a data processing method. The data processing method of this application embodiment will be described in detail below with reference to the accompanying drawings.
[0140] Reference Figure 8 , Figure 8This is a flowchart illustrating a data processing method provided in an embodiment of this application, such as... Figure 8 As shown in the embodiment of this application, a data processing method may include steps 801 to 804, which are described in detail below.
[0141] 801. Obtain the first audio data of the first song.
[0142] In one possible implementation, training samples can be obtained during model training. These samples may include the first audio data of a first song (and possibly the second audio data of a second song, which is a different cover version of the same song). Since long audio tracks are difficult to train, the audio can be compressed. Optionally, a constant Q-transform can be used to convert the time-domain signal into a spectrogram, and average pooling can be performed on the temporal dimension of the spectrogram to achieve compression.
[0143] 802. Based on the first audio data, a first feature representation is obtained; the first feature representation is used to represent accompaniment information or vocal features of the characters in the first song that are unrelated to the melody.
[0144] The first feature representation can also be called meta-knowledge (or prior meta-knowledge). Meta-knowledge involves extracting the necessary information from audio data using digital signal processing methods or pre-trained models (e.g., meta-knowledge extractors). For different cover versions of the same song, differences in singers or accompaniment styles often lead to different cover information (cover information can be accompaniment information unrelated to the melody or vocal characteristics of the singer, also known as timbre). In this embodiment, a first feature representation (i.e., cover information) can be extracted from the audio data to represent the accompaniment information unrelated to the melody or vocal characteristics of the singer in the first song. This cover information is then removed from the song representation at a coarse-grained level, thereby preserving the essential information of the song (e.g., the melody features).
[0145] Reference Figure 9 , Figure 9This diagram illustrates a meta-knowledge-based decoupling module. The goal of this module is to remove cover song information from song representations at a coarse-grained level, thereby preserving the essential information of the song (e.g., its melodic features). To this end, meta-knowledge of cover songs is introduced (e.g., timbre information, accompaniment information unrelated to melody, and fundamental frequency signals), representing redundant information at the subjective level. Essentially, it provides the model with prior knowledge of a specific domain, aiming to make the learned representation as unrelated as possible to the given prior redundant information. Therefore, the optimization objective of this module is to reduce an upper bound on the mutual information between the song's encoded representation and its corresponding meta-knowledge, thereby achieving decoupling.
[0146] 803. Based on the first audio data, a second feature representation is obtained through the first network, and the second feature representation is used when recognizing the first song.
[0147] In one possible implementation, a second feature representation can be obtained from the first audio data through a first network, where the first network can be an encoder model used in subsequent model inference. The second feature representation is a song representation, which may include essential information about the song (e.g., melody features) and cover song information.
[0148] 804. Based on the first feature representation and the second feature representation, a second network is used to predict an upper bound of the mutual information between the first feature representation and the second feature representation; the mutual information is used to determine a first loss, and the first loss is used to minimize the upper bound.
[0149] Specifically, given a pre-extracted timbre representation of a song and encoding representation The timbre representation can be estimated using the following formula. and encoding representation Upper bound of mutual information: ; in, Representative timbre characteristics and encoding representation Variational estimation network between them This represents a linear transformation with bias. Similarly, given the pre-extracted fundamental frequency features of a song... and the encoded representation of songs .
[0150] Similarly, the fundamental frequency characteristics can be estimated using the following formula. and encoding representation Upper bound of mutual information: ; in, Representative fundamental frequency characteristics and encoding representation Variational estimation network between them This represents a linear transformation with a bias.
[0151] The method for estimating the upper bound of mutual information is essentially a self-supervised algorithm, which may be at risk of model collapse. Secondly, the pre-extracted audio features and timbre representations rely on the feature extractor. Considering the performance of existing feature extractors, essential information about the song (such as melody features) may still remain in the audio features and timbre representations. To address these two issues, embodiments of this application provide two solutions.
[0152] In one possible implementation, clustering models (such as K-Means) can be used to assign pseudo-labels to meta-knowledge, and the task of recognition can be used for supervision. Specifically, the following are possible implementations:
[0153] in, This represents the pseudo-label corresponding to meta-knowledge. This represents the output of the meta-knowledge recognition network.
[0154] In one possible implementation, based on the first feature representation, the clustering result of the first song can be determined by clustering; the clustering result is used to determine the second loss; the second loss can be used to update the first network.
[0155] In one possible implementation, meta-knowledge (e.g., the intermediate layer output of the first network in this embodiment when processing the first audio data) can be provided to the song recognizer (e.g., the recognition network in this embodiment, or the similarity calculation module). This further reduces the representation's dependence on meta-knowledge, in addition to utilizing the limited effective information that may exist in the cover song's meta-information, thereby reducing the possibility of pattern collapse. Specifically, given a coded representation that has undergone timbre decoupling and fundamental frequency decoupling... Meta-knowledge characteristics The following are included: ; in, This represents a linear transformation with a bias. The temperature coefficient represents the degree to which meta-knowledge represents the influence of encoding representation. Since fundamental frequency features are artificially selected redundant information, their influence on encoding representation needs to be controlled through the temperature coefficient; otherwise, they may become noise and negatively impact model performance.
[0156] In one possible implementation, the intermediate layer output of the first network when processing the first audio data can be obtained, and the recognition result of the first song can be obtained based on the fusion result of the second feature representation and the intermediate layer output.
[0157] 805. Update the first network based on the first loss.
[0158] In one possible implementation, the first network and the second network can be updated based on the first loss.
[0159] In one possible implementation, the recognition result of the first song can be obtained based on the second feature representation; a third loss can be determined based on the recognition result and the ground truth value corresponding to the first song; and then the first network can be updated based on the first loss and the third loss.
[0160] In one possible implementation, the loss can also be constructed using audio data of a second song, which is a different cover version of the same song as the first song. Specifically, the second audio data of the second song can be obtained; the second song and the first song are different cover versions of the same song; based on the second audio data, a third feature representation is obtained through the first network, and the third feature representation is used to identify the second song; based on the relationship between the second feature representation and the third feature representation, a target mask is determined, and the target mask represents the degree of influence of each feature position in the feature representation on the difference between the second feature representation and the third feature representation; based on the target mask, the second feature representation is adjusted to obtain an adjusted second feature representation; the second feature representation and the adjusted second feature representation are used to determine a fourth loss; and then, the first network can be updated based on the first loss and the fourth loss.
[0161] Reference Figure 10 , Figure 10 As an illustration of the above process, in one possible implementation, determining the target mask based on the relationship between the second feature representation and the third feature representation includes: determining a fifth loss based on the difference between the second feature representation and the third feature representation; determining the gradient corresponding to each feature position in the second feature representation according to the fifth loss; and the target mask is obtained based on the gradient.
[0162] In one possible implementation, when updating the first network according to the first loss and the fourth loss, the third feature representation can be used as a positive sample and the second feature representation as a negative sample, and the first network can be updated through adversarial learning according to the fourth loss.
[0163] This application embodiment can use a gradient-based decoupling module to decouple representations at a finer granular level. From the perspective of representation dimensions, it aims to find and weaken positions strongly correlated with cover song information, and through model training, enable the recognition network to achieve good recognition results. Optionally, it can be divided into three steps: quantization, decoupling, and alignment.
[0164] The purpose of quantization is to locate the positions in the representation that are strongly correlated with cover song information. It is assumed that the differences in cover song information are reflected in the distance between the representations of positive samples (different versions within the same song group). Therefore, a distance loss function is used to calculate the distance between different positive samples. Furthermore, by calculating the gradient of the distance loss function with respect to the encoded representation, the positions in the encoded representation that have a significant impact on distance are found. Specifically, given two positive sample encoded representations... and The gradient vector corresponding to the encoded representation will be calculated using the following formula: ; in, express The corresponding gradient vector, Represents the distance function.
[0165] The goal of decoupling is to force the representation to be unrelated to the cover song information by suppressing locations in the encoded representation that have a significant impact on distance (i.e., locations strongly correlated with cover song information). To achieve this, gradients are used... Generate the corresponding mask vector, and then perform a bitwise multiplication. Specifically, given the gradient vector... The corresponding mask vector will be constructed and interacted with using the following formula:
[0166]
[0167] in, Representation of encoding representation The corresponding mask, This indicates a bitwise multiplication operation. express The j-th largest value in the matrix. Alignment aims to make the backbone network move closer to the decoupled representation. To achieve this, the undecoupled representation is treated as a negative sample, and the decoupled representation as a positive sample. Adversarial learning forces the backbone network's encoded representation to move closer to the decoupled representation. Specifically, given the undecoupled encoded representation... and decoupled coding representation Alignment is achieved using the following formula: ; in, This represents the discriminator network. This indicates the encoder.
[0168] By utilizing the gradient differences between positive sample cover versions, the location of irrelevant information in the representation vector is identified, thereby decoupling the representation and obtaining a robust representation vector.
[0169] In one possible implementation, a fifth loss can also be determined based on the difference between the second feature representation and the third feature representation; then, the first network can be updated based on the first loss and the fifth loss.
[0170] This application provides a data processing method, the method comprising: acquiring first audio data of a first song; obtaining a first feature representation based on the first audio data; the first feature representation being used to represent accompaniment information unrelated to melody or vocal features of a person in the first song; obtaining a second feature representation based on the first audio data through a first network, the second feature representation being used when recognizing the first song; predicting an upper bound of mutual information between the first feature representation and the second feature representation through a second network based on the first feature representation and the second feature representation; the mutual information being used to determine a first loss, the first loss being used to minimize the upper bound; and updating the first network based on the first loss.
[0171] On the one hand, processing song features (second feature representation) based on prior knowledge (first feature representation) decouples cover song information unrelated to audio representation, making the feature representation closer to the essence of the song (such as the melody features of the song), thereby improving the model's recognition accuracy when performing music recognition.
[0172] On the other hand, since the loss is determined solely by mutual information without modifying the process of song recognition based on feature representations or the process of generating those feature representations, the existing training framework can be maintained during training. In other words, it can be plugged into existing models to achieve better training results.
[0173] System architecture such as Figure 11 As shown, Figure 11This paper demonstrates the overall process of a cover song recognition task. Different versions of cover songs exhibit significant differences (e.g., different timbre and melody), which can lead to different cover versions of the same song. Their data may also be non-independent and identically distributed, and existing model architectures clearly lack this transfer capability. Therefore, this paper utilizes the meta-knowledge of cover songs as prior information and combines it with the idea of gradients to design an algorithm framework for cover song recognition. Specifically, this application's embodiments design a cover song recognition algorithm framework based on hierarchical decoupling, abbreviated as DisCover. DisCover consists of a meta-knowledge-based decoupling module and a gradient-based decoupling module. The former performs coarse-grained decoupling from the overall semantic perspective of the representation, removing some manually selected irrelevant information (such as fundamental frequency f0 and timbre). The latter, from the perspective of the representation dimension, identifies positions related to the cover song information for fine-grained decoupling.
[0174] like Figure 12 As shown, one implementation step of this application embodiment is illustrated below: Step 1: Perform feature preprocessing on the given cover song audio data and metadata.
[0175] 1.1) Audio data preprocessing: The CQT method in the librosa library is used to convert the cover audio signal into a spectrogram, and mean pooling is performed every 20 steps.
[0176] 1.2) Meta-knowledge preprocessing: The to_pitch_ac method in the parslmouth library and the pre-trained vocoder in resemblyzer are used to extract the corresponding F0 features (length is related to the audio length) and timbre representation (256 dimensions).
[0177] Step 2: Connect the meta-knowledge decoupling module and gradient decoupling module of the DisCover framework to the base model, taking the extension of CQTNet as an example: 2.1) Meta-knowledge decoupling module: This module is placed after the input and output of the basic model encoder. Assume the fundamental frequency feature of a song is... timbre is characterized as and encoding representation as The encoded representation can be estimated using the following formula. Tonal characterization and fundamental frequency characteristics Upper bound of mutual information: ; ; ; ; in Representative timbre characteristics and encoding representation Variational estimation network between them This represents a linear transformation with bias. Similarly, Representative fundamental frequency characteristics and encoding representation Variational estimation network between them This represents a linear transformation with a bias.
[0178] Furthermore, let the characterization after coarse-grained and fine-grained decoupling be as follows: The fundamental frequency characteristics are The following are included: ; in, This represents a linear transformation with a bias. The temperature coefficient represents the degree to which the fundamental frequency feature influences the coding representation. This represents the characteristics used by the cover song recognition system. Additionally, timbre features are... The following are included: ; in, The timbre characteristics are The corresponding pseudo-tags, This represents the output of the meta-knowledge recognition network.
[0179] 2.2) Gradient Decoupling Module: This module is placed after the output of the meta-knowledge decoupling module. Given two positive sample encoding representations... and The gradient vector corresponding to the encoded representation will be calculated using the following formula: ; in express The corresponding gradient vector, This represents the distance function. Next, the corresponding mask vector will be constructed using the following formula, and interaction will be performed: ; ; in Representation of encoding representation The corresponding mask, This indicates a bitwise multiplication operation.
[0180] Finally, given the coded representation before decoupling and decoupled coding representation Alignment is achieved using the following adversarial loss function: ; ; in, Represents batch size, Represents the discriminator network. This represents the backbone encoder.
[0181] 2.3) Constructing the model loss function: Given a cover song, first use an encoder to convert it into a dense vector. ,set up It is the representation after decoupling, and will Indicates the model output, Representing the recognizer network, using Indicates the true category, This represents the training set. Cross-entropy loss is used to optimize the model for the recognition task. ; Therefore, the total loss function is divided into two parts, which are updated separately: ; ; Step 3: Model Training 3.1) After the network is built, feedforward calculation and backpropagation can be performed to calculate gradients and update network parameters. The model is implemented based on PyTorch. The entire system is trained by the Adam optimizer with a learning rate of 1e-4 and a batch size of 32.
[0182] The beneficial effects of the embodiments of this application will be described below in conjunction with experimental results: We selected two commonly used cover song datasets, SHS100K and Covers80, to evaluate DisCover. DisCover was applied to baseline models TPPNet, CQTNet, and PICKiNet, respectively, extending them to TPPNet-Dis, CQTNet-Dis, and PICKiNet-Dis. These models were then compared with existing state-of-the-art baseline models such as 2DFM, Ki-CNN, TPPNet, PICKiNet, and CQTNet.
[0183] Table 1
[0184]
[0185] Table 1 shows the overall performance comparison with existing cover song algorithms. As can be seen from Table 1, DisCover effectively improves the generalization performance of the baseline model in scenario 1 (where the test set contains unknown song groups), with the CQTNet-Dis model achieving the best accuracy. Furthermore, when the above model is applied to scenario 2 (where the test set contains known song groups), the algorithm framework remains effective, demonstrating its good generalization performance. The CQTNet-Dis model again achieves the best accuracy in this scenario.
[0186] Table 2
[0187] Then, ablation experiments were conducted on the two components of DisCover, both of which significantly improved performance. Table 2 shows the results of the ablation experiments. Removing either the meta-knowledge decoupling module or the gradient decoupling module led to a performance degradation, with removing both (degrading to the baseline) resulting in the worst performance. These results demonstrate the effectiveness of the two proposed modules. Removing the gradient decoupling module resulted in a greater performance degradation. This means that coarse-grained decoupling alone is insufficient to remove redundant cover information, and cover information is more sensitive to gradients and representation distances. These results are consistent across the two baselines, indicating that the two proposed modules are not only plug-and-play but also model-independent.
[0188] Table 3
[0189] Finally, to evaluate the impact of decoupling F0 and decoupling timbre on the model, Table 3 shows the effect of the selected meta-knowledge type on model performance. It is easy to see that adding either F0 features or timbre information leads to improved performance, with both yielding the best results. These results demonstrate the effectiveness of introducing meta-knowledge. The table shows that the impact of decoupling F0 and decoupling timbre differs for different models, thus requiring a trade-off between the weighting of different meta-knowledge types during training. These results are consistent across the two baselines, indicating that introducing meta-knowledge is beneficial and independent of the model.
[0190] Reference Figure 13 , Figure 13 A flowchart illustrating a data processing method provided in this application embodiment, wherein the method includes: 1301. Obtain the target audio data of the target song; 1302. Based on the target audio data, through... Figure 8 The updated first network obtained through training yields the target feature representation; 1303. Based on the target feature representation, the recognition result of the target song is obtained.
[0191] The data processing method in the embodiments of this application has been described above. The data processing apparatus in the embodiments of this application is described below. Please refer to [link / reference]. Figure 14 One embodiment of the data processing apparatus 1400 in this application includes: The acquisition module 1401 is used to acquire the first audio data of the first song; The specific description of the acquisition module 1401 can be found in the description of step 801 in the above embodiments, and will not be repeated here.
[0192] Processing module 1402 is used to obtain a first feature representation based on the first audio data; the first feature representation is used to represent accompaniment information or vocal features of the characters in the first song that are unrelated to the melody. Based on the first audio data, a second feature representation is obtained through a first network, and the second feature representation is used when recognizing the first song; Based on the first feature representation and the second feature representation, an upper bound of the mutual information between the first feature representation and the second feature representation is predicted through a second network; the mutual information is used to determine a first loss, and the first loss is used to minimize the upper bound; Update the first network based on the first loss.
[0193] The specific description of the processing module 1402 can be found in the description of steps 802 to 805 in the above embodiments, and will not be repeated here.
[0194] In one possible implementation, the processing module is specifically used for: Update the first network and the second network based on the first loss.
[0195] In one possible implementation, the processing module is further configured to: Based on the first feature representation, the clustering result of the first song is determined by clustering; the clustering result is used to determine the second loss; The processing module is specifically used for: Update the first network based on the first loss and the second loss.
[0196] In one possible implementation, the processing module is further configured to: Based on the second feature representation, the recognition result of the first song is obtained; Based on the recognition results and the truth value corresponding to the first song, a third loss is determined; The processing module is specifically used for: The first network is updated based on the first loss and the third loss.
[0197] In one possible implementation, the processing module is specifically used for: Obtain the intermediate layer output of the first network when processing the first audio data; The recognition result of the first song is obtained based on the fusion result of the second feature representation and the output of the intermediate layer.
[0198] In one possible implementation, the acquisition module is further configured to: Obtain the second audio data of the second song; the second song and the first song are different cover versions of the same song; The processing module is further configured to: Based on the second audio data, a third feature representation is obtained through the first network, and the third feature representation is used to identify the second song; Based on the relationship between the second feature representation and the third feature representation, a target mask is determined, wherein the target mask represents the degree of influence of each feature position in the feature representation on the difference between the second feature representation and the third feature representation; Based on the target mask, the second feature representation is adjusted to obtain an adjusted second feature representation; the second feature representation and the adjusted second feature representation are used to determine the fourth loss; The processing module is specifically used for: The first network is updated based on the first loss and the fourth loss.
[0199] In one possible implementation, the processing module is specifically used for: The fifth loss is determined based on the difference between the second feature representation and the third feature representation; Based on the fifth loss, the gradient corresponding to each feature position in the second feature representation is determined; the target mask is obtained based on the gradient.
[0200] In one possible implementation, the processing module is further configured to: The fifth loss is determined based on the difference between the second feature representation and the third feature representation; The processing module is specifically used for: The first network is updated based on the first loss and the fifth loss.
[0201] In one possible implementation, the processing module is specifically used for: The third feature representation is used as a positive sample, the second feature representation is used as a negative sample, and the first network is updated through adversarial learning based on the fourth loss.
[0202] The following describes an execution device provided in an embodiment of this application. Please refer to [link / reference]. Figure 15 , Figure 15 This is a schematic diagram of an execution device provided in an embodiment of this application. The execution device 1500 can specifically be a mobile phone, tablet, laptop, smart wearable device, server, etc., and is not limited thereto. Specifically, the execution device 1500 includes: a receiver 1501, a transmitter 1502, a processor 1503, and a memory 1504 (wherein the execution device 1500 may have one or more processors 1503). The processor 1503 may include an application processor 15031 and a communication processor 15032. In some embodiments of this application, the receiver 1501, transmitter 1502, processor 1503, and memory 1504 can be connected via a bus or other means.
[0203] Memory 1504 may include read-only memory and random access memory, and provides instructions and data to processor 1503. A portion of memory 1504 may also include non-volatile random access memory (NVRAM). Memory 1504 stores processor and operation instructions, executable modules, or data structures, or subsets thereof, or extended sets thereof, wherein the operation instructions may include various operation instructions for implementing various operations.
[0204] Processor 1503 controls the operation of the execution device. In specific applications, the various components of the execution device are coupled together through a bus system, which may include not only the data bus, but also power buses, control buses, and status signal buses. However, for clarity, all buses in the diagram are referred to as the bus system.
[0205] The methods disclosed in the embodiments of this application can be applied to or implemented by processor 1503. Processor 1503 can be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above methods can be completed by integrated logic circuits in the hardware of processor 1503 or by instructions in software form. Processor 1503 can be a general-purpose processor, digital signal processor (DSP), microprocessor or microcontroller, as well as a vision processing unit (VPU), tensor processing unit (TPU), or other processors suitable for AI computation. It may further include application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. Processor 1503 can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the embodiments of this application can be directly manifested as being executed by a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory 1504. Processor 1503 reads information from memory 1504 and, in conjunction with its hardware, runs the network trained based on steps 801 to 805 in the above embodiments.
[0206] Receiver 1501 can be used to receive input digital or character information, and to generate signal inputs related to the settings and function control of the execution device. Transmitter 1502 can be used to output digital or character information through the first interface; transmitter 1502 can also be used to send instructions to the disk group through the first interface to modify the data in the disk group; transmitter 1502 may also include a display device such as a display screen.
[0207] This application also provides a training device; please refer to [link / reference]. Figure 16 , Figure 16This is a schematic diagram of a training device provided in an embodiment of this application. Specifically, the training device 1600 is implemented by one or more servers. The training device 1600 can vary significantly due to different configurations or performance. It may include one or more central processing units (CPUs) 1616 (e.g., one or more processors) and memory 1632, and one or more storage media 1630 (e.g., one or more mass storage devices) for storing application programs 1642 or data 1644. The memory 1632 and storage media 1630 can be temporary or persistent storage. The program stored in the storage media 1630 may include one or more modules (not shown in the diagram), each module may include a series of instruction operations on the training device. Furthermore, the CPU 1616 may be configured to communicate with the storage media 1630 and execute the series of instruction operations in the storage media 1630 on the training device 1600.
[0208] The training device 1600 may also include one or more power supplies 1626, one or more wired or wireless network interfaces 1650, one or more input / output interfaces 1658; or, one or more operating systems 1641, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.
[0209] Specifically, the training device can perform steps 801 to 805 in the above embodiments.
[0210] This application also provides a computer program product that, when run on a computer, causes the computer to perform steps as performed by the aforementioned execution device, or causes the computer to perform steps as performed by the aforementioned training device.
[0211] This application also provides a computer-readable storage medium storing a program for signal processing, which, when run on a computer, causes the computer to perform steps as performed by the aforementioned execution device, or causes the computer to perform steps as performed by the aforementioned training device.
[0212] The execution device, training device, or terminal device provided in this application embodiment can specifically be a chip. The chip includes a processing unit and a communication unit. The processing unit can be, for example, a processor, and the communication unit can be, for example, an input / output interface, pins, or circuits. The processing unit can execute computer execution instructions stored in the storage unit to cause the chip within the execution device to execute the data processing method described in the above embodiments, or to cause the chip within the training device to execute the data processing method described in the above embodiments. Optionally, the storage unit can be a storage unit within the chip, such as a register or cache. Alternatively, the storage unit can be a storage unit located outside the chip within the wireless access device, such as a read-only memory (ROM) or other types of static storage devices capable of storing static information and instructions, such as random access memory (RAM).
[0213] For details, please refer to Figure 17 , Figure 17 This is a schematic diagram of a chip provided in an embodiment of this application. The chip can be represented as a neural network processor NPU1700. The NPU1700 is mounted as a coprocessor on the host CPU, and tasks are assigned by the host CPU. The core part of the NPU is the arithmetic circuit 1703, which is controlled by the controller 1704 to extract matrix data from the memory and perform multiplication operations.
[0214] The NPU 1700 achieves this through the cooperation of its various internal components. Figure 5 The data processing method provided in the described embodiments.
[0215] More specifically, in some implementations, the arithmetic circuitry 1703 within the NPU 1700 includes multiple Process Engines (PEs). In some implementations, the arithmetic circuitry 1703 is a two-dimensional systolic array. The arithmetic circuitry 1703 can also be a one-dimensional systolic array or other electronic circuitry capable of performing mathematical operations such as multiplication and addition. In some implementations, the arithmetic circuitry 1703 is a general-purpose matrix processor.
[0216] For example, suppose we have an input matrix A, a weight matrix B, and an output matrix C. The arithmetic circuit retrieves the corresponding data of matrix B from the weight memory 1702 and caches it in each PE of the arithmetic circuit. The arithmetic circuit retrieves the data of matrix A from the input memory 1701 and performs matrix operations with matrix B. The partial result or the final result of the obtained matrix is stored in the accumulator 1708.
[0217] Unified memory 1706 is used to store input and output data. Weight data is directly transferred to weight memory 1702 via Direct Memory Access Controller (DMAC) 1705. Input data is also transferred to unified memory 1706 via DMAC.
[0218] BIU stands for Bus Interface Unit, which is used for interaction between the AXI bus and the DMAC and the Instruction Fetch Buffer (IFB) 1709.
[0219] The Bus Interface Unit (BIU) 1710 is used by the instruction fetch memory 1709 to fetch instructions from external memory, and also by the memory access controller 1705 to fetch the original data of the input matrix A or the weight matrix B from external memory.
[0220] The DMAC is mainly used to move input data from external memory DDR to unified memory 1706, or to weight data to weight memory 1702, or to input data to input memory 1701.
[0221] The vector computation unit 1707 includes multiple processing units that further process the output of the computation circuit 1703 when necessary, such as vector multiplication, vector addition, exponential operations, logarithmic operations, size comparisons, etc. It is mainly used for computation in non-convolutional / fully connected layers of neural networks, such as batch normalization, pixel-level summation, and upsampling of feature planes.
[0222] In some implementations, the vector computation unit 1707 can store the processed output vector in the unified memory 1706. For example, the vector computation unit 1707 can apply a linear function, or a nonlinear function, to the output of the computation circuit 1703, such as performing linear interpolation on feature planes extracted by a convolutional layer, or, for example, accumulating a vector of values to generate activation values. In some implementations, the vector computation unit 1707 generates normalized values, pixel-level summed values, or both. In some implementations, the processed output vector can be used as an activation input to the computation circuit 1703, for example, for use in subsequent layers of the neural network.
[0223] The instruction fetch buffer 1709 connected to the controller 1704 is used to store the instructions used by the controller 1704; The unified memory 1706, input memory 1701, weighted memory 1702, and instruction fetch memory 1709 are all on-chip memories. External memory is proprietary to this NPU hardware architecture.
[0224] The processor mentioned above can be a general-purpose central processing unit, a microprocessor, an ASIC, or one or more integrated circuits used to control the execution of the above program.
[0225] It should also be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. In addition, in the device embodiment drawings provided in this application, the connection relationship between modules indicates that they have a communication connection, which can be implemented as one or more communication buses or signal lines.
[0226] Through the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware, or it can be implemented by special-purpose hardware including application-specific integrated circuits, special-purpose CPUs, special-purpose memory, special-purpose components, etc. Generally, any function performed by a computer program can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be diverse, such as analog circuits, digital circuits, or special-purpose circuits. However, for this application, software program implementation is more often a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a readable storage medium, such as a computer floppy disk, USB flash drive, mobile hard disk, ROM, RAM, magnetic disk, or optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, training equipment, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0227] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product.
[0228] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, training device, or data center to another website, computer, training device, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device or data center that integrates one or more available media. The available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state drives (SSDs)).
[0229] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such terms are interchangeable where appropriate; this is merely a way of distinguishing objects with the same attributes in the embodiments of this application. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion, so that a process, method, system, product, or apparatus that comprises a series of elements is not necessarily limited to those elements, but may include other elements not explicitly listed or inherent to those processes, methods, products, or apparatuses.
Claims
1. A data processing method, characterized in that, The method includes: Get the first audio data of the first song; Based on the first audio data, a first feature representation is obtained; the first feature representation is used to represent accompaniment information or vocal features of characters that are unrelated to the melody in the first song, and the first feature representation is prior knowledge; Based on the first audio data, a second feature representation is obtained through a first network. The second feature representation is used when recognizing the first song, and the second feature representation is a song representation. Based on the first feature representation and the second feature representation, an upper bound of the mutual information between the first feature representation and the second feature representation is predicted through a second network; the mutual information is used to determine a first loss, and the first loss is used to minimize the upper bound; Update the first network based on the first loss.
2. The method according to claim 1, characterized in that, The step of updating the first network based on the first loss includes: Update the first network and the second network based on the first loss.
3. The method according to claim 1, characterized in that, The method further includes: Based on the second feature representation, the recognition result of the first song is obtained; Based on the recognition results and the truth value corresponding to the first song, a third loss is determined; The step of updating the first network based on the first loss includes: The first network is updated based on the first loss and the third loss.
4. The method according to claim 1, characterized in that, The method further includes: Obtain the second audio data of the second song; the second song and the first song are different cover versions of the same song; Based on the second audio data, a third feature representation is obtained through the first network, and the third feature representation is used to identify the second song; Based on the relationship between the second feature representation and the third feature representation, a target mask is determined, wherein the target mask represents the degree of influence of each feature position in the feature representation on the difference between the second feature representation and the third feature representation; Based on the target mask, the second feature representation is adjusted to obtain an adjusted second feature representation; the second feature representation and the adjusted second feature representation are used to determine the fourth loss; The step of updating the first network based on the first loss includes: The first network is updated based on the first loss and the fourth loss.
5. The method according to claim 4, characterized in that, Determining the target mask based on the relationship between the second feature representation and the third feature representation includes: The fifth loss is determined based on the difference between the second feature representation and the third feature representation; Based on the fifth loss, the gradient corresponding to each feature position in the second feature representation is determined; the target mask is obtained based on the gradient.
6. The method according to claim 4, characterized in that, The method further includes: The fifth loss is determined based on the difference between the second feature representation and the third feature representation; The step of updating the first network based on the first loss includes: The first network is updated based on the first loss and the fifth loss.
7. The method according to any one of claims 4 to 6, characterized in that, The step of updating the first network based on the first loss and the fourth loss includes: The third feature representation is used as a positive sample, the second feature representation is used as a negative sample, and the first network is updated through adversarial learning based on the fourth loss.
8. A data processing method, characterized in that, The method includes: Obtain the target audio data of the target song; Based on the target audio data, the updated first network obtained by any one of the methods of claims 1 to 7 is used to obtain the target feature representation; The identification result of the target song is obtained based on the target feature representation.
9. A data processing apparatus, characterized in that, The device includes: The acquisition module is used to acquire the first audio data of the first song; The processing module is used to obtain a first feature representation based on the first audio data; the first feature representation is used to represent accompaniment information or vocal features of the characters in the first song that are unrelated to the melody, and the first feature representation is prior knowledge; Based on the first audio data, a second feature representation is obtained through a first network. The second feature representation is used when recognizing the first song, and the second feature representation is a song representation. Based on the first feature representation and the second feature representation, an upper bound of the mutual information between the first feature representation and the second feature representation is predicted through a second network; the mutual information is used to determine a first loss, and the first loss is used to minimize the upper bound; Update the first network based on the first loss.
10. The apparatus according to claim 9, characterized in that, The processing module is specifically used for: Update the first network and the second network based on the first loss.
11. The apparatus according to claim 9, characterized in that, The processing module is further configured to: Based on the second feature representation, the recognition result of the first song is obtained; Based on the recognition results and the truth value corresponding to the first song, a third loss is determined; The processing module is specifically used for: The first network is updated based on the first loss and the third loss.
12. The apparatus according to claim 9, characterized in that, The acquisition module is also used for: Obtain the second audio data of the second song; the second song and the first song are different cover versions of the same song; The processing module is further configured to: Based on the second audio data, a third feature representation is obtained through the first network, and the third feature representation is used to identify the second song; Based on the relationship between the second feature representation and the third feature representation, a target mask is determined, wherein the target mask represents the degree of influence of each feature position in the feature representation on the difference between the second feature representation and the third feature representation; Based on the target mask, the second feature representation is adjusted to obtain an adjusted second feature representation; the second feature representation and the adjusted second feature representation are used to determine the fourth loss; The processing module is specifically used for: The first network is updated based on the first loss and the fourth loss.
13. The apparatus according to claim 12, characterized in that, The processing module is specifically used for: The fifth loss is determined based on the difference between the second feature representation and the third feature representation; Based on the fifth loss, the gradient corresponding to each feature position in the second feature representation is determined; the target mask is obtained based on the gradient.
14. The apparatus according to claim 12, characterized in that, The processing module is further configured to: The fifth loss is determined based on the difference between the second feature representation and the third feature representation; The processing module is specifically used for: The first network is updated based on the first loss and the fifth loss.
15. The apparatus according to any one of claims 12 to 14, characterized in that, The processing module is specifically used for: The third feature representation is used as a positive sample, the second feature representation is used as a negative sample, and the first network is updated through adversarial learning based on the fourth loss.
16. A data processing apparatus, characterized in that, The device includes: The acquisition module is used to acquire the target audio data of the target song; The processing module is configured to obtain a target feature representation based on the target audio data and through the updated first network obtained by any one of the methods of claims 1 to 7; The identification result of the target song is obtained based on the target feature representation.
17. A data processing device, characterized in that, include: A processor coupled to a memory for storing programs or instructions that, when executed by the processor, cause the data processing device to perform the method as described in any one of claims 1 to 8.
18. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions that, when executed on a computer, cause the computer to perform the method as described in any one of claims 1 to 8.
19. A computer program product, characterized in that, When the computer program product is executed on a computer, it causes the computer to perform the method as described in any one of claims 1 to 8.
Citation Information
Patent Citations
Audio melody recognition model training method, audio processing method and related equipment
CN115691511A
