Parallel music structure generation method and system based on semantic intention dynamic routing

CN122967607APending Publication Date: 2026-10-23CHANGSHA NORMAL UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610527092.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-04-21
Publication Date
2026-10-23

Smart Images

  • Figure CN122967607A_ABST
    Figure CN122967607A_ABST
Patent Text Reader

Abstract

The application relates to a parallel music structure generation method and system based on semantic intention dynamic routing. The method comprises the following steps: obtaining a natural language instruction and parsing task metadata; constructing a directed acyclic graph according to the task metadata and performing adaptive topological pruning to obtain an optimized execution computation graph; generating a global latent space tensor covering the whole song duration and broadcasting the global latent space tensor to all generation nodes through a publish-subscribe mechanism; parallel instantiating multiple lightweight expert models, each model using a feature linear modulation layer to take the global latent space tensor as a conditional constraint, and independently and in parallel generating an original audio waveform sequence; receiving multiple waveform sequences, identifying physical conflicts through frequency domain analysis, automatically optimizing frequency band gain parameters using a differentiable mixing reduction unit to eliminate conflicts, and fusing to output a final audio. The method can realize parallel efficient reasoning, elastic resource scheduling and long-range structure consistency, and improve the generation quality.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the fields of computer distributed data processing and artificial intelligence technology, and in particular to a parallel music structure generation method and system based on semantic intent dynamic routing. Background Technology

[0002] With the development of generative artificial intelligence (AIGC) technology, audio synthesis has evolved from rule-based symbol generation to end-to-end waveform generation based on deep neural networks. Currently, the mainstream technical architectures for audio / music generation are mainly divided into two categories: The first category is an autoregressive serial generation architecture based on large models, such as MusicGen and Jukebox. It uses a giant Transformer model to discretize the audio signal into a token sequence and predict the next token based on historical context. This is a strictly linear serial process. The second category is a global diffusion architecture based on single-unit models, such as the diffusion model based on U-Net. It uses a general network with a huge number of parameters to denoise and generate mixed audio across the entire frequency range and multiple parts in one go.

[0003] However, the aforementioned existing technologies suffer from significant computational architecture flaws and resource scheduling bottlenecks when handling multi-part, long-sequence, and highly complex structured audio generation tasks. Specifically, the serial computation mechanism of the autoregressive model prevents the generation process from being parallelized, resulting in high inference latency, poor real-time performance, and low throughput. Secondly, existing solutions tend to use a single general-purpose model to solve all problems, leading to rigid resource scheduling, severe waste of computing power for simple tasks, and difficulty in deploying on edge devices. Furthermore, in long-sequence generation, a single model struggles to balance microscopic waveform quality and macroscopic structural consistency, easily generating accumulated errors that cause multi-part temporal drift and physical frequency response conflicts, ultimately resulting in muddy audio. Summary of the Invention

[0004] Therefore, it is necessary to provide a parallel music structure generation method and system based on semantic intent dynamic routing to address the above-mentioned technical problems.

[0005] A parallel music structure generation method based on semantic intent dynamic routing, the method comprising:

[0006] The system acquires natural language commands input by the user and performs semantic intent parsing on the natural language commands to obtain task metadata; the task metadata includes style features, beat parameters, instrument activation masks, complexity coefficients, and target duration. Based on the task metadata, a directed acyclic graph (DAG) is constructed to describe the music structure generation task. Adaptive topology pruning is performed on the DAG based on the complexity coefficient to obtain an optimized execution computation graph. The DAG includes synchronization nodes, convergence nodes, and generation nodes corresponding to the instrument activation mask. Based on the task metadata, a global latent space tensor covering the entire duration of the song is generated, and the memory address pointer of the global latent space tensor is broadcast to all generating nodes in the execution computation graph through a publish-subscribe mechanism. According to the scheduling instructions of the execution computation graph, multiple lightweight expert models are instantiated in parallel. The lightweight expert models obtain the global latent space tensor by reading the memory address pointer, and use the feature linear modulation layer to use the global latent space tensor as a condition constraint to independently and in parallel generate their respective original audio waveform sequences. The system receives multiple original audio waveform sequences, identifies physical conflicts between different waveform sequences through frequency domain analysis, automatically optimizes the frequency band gain parameters of each waveform sequence through a differentiable mixing reduction unit to eliminate the physical conflicts, and then fuses and outputs the final structured stereo audio stream.

[0007] In one embodiment, the method further includes: mapping the natural language instruction into a high-dimensional semantic vector using a pre-set natural language encoder; A multi-head attention mechanism is used to decode the high-dimensional semantic vector and extract key generation parameters; the key generation parameters include style tags, speed parameters, and instrument configuration lists; If any preset parameter is missing from the key generation parameters, the default value is filled in by querying the preset style knowledge base based on the extracted style tags.

[0008] In one embodiment, it further includes: instantiating synchronization nodes and convergence nodes as the basic framework of the directed acyclic graph; Traverse the instrument activation mask vectors, and for each activated instrument type, retrieve the corresponding lightweight expert model from the preset intelligent agent model library and instantiate it as a generator node. An edge set is established based on the data flow direction, so that all generating nodes receive broadcasts from the synchronization node and direct the broadcast output to the aggregation node.

[0009] In one embodiment, the method further includes: when the complexity coefficient is lower than a first preset threshold, identifying and removing the generation nodes marked as decorative notes or embellishments in the directed acyclic graph; When the complexity coefficient is higher than the second preset threshold, a secondary modification node is inserted between the generated nodes of the directed acyclic graph.

[0010] In one embodiment, the method further includes: initializing a time grid based on the target duration and a preset potential spatial sampling rate, and determining the total number of time steps; The task metadata is input into a pre-trained recurrent neural network or a small Transformer, and a three-dimensional global latent space tensor is output. The feature channels of the global latent space tensor include: a harmonic flow for encoding chord root tones and attributes that vary over time, an energy flow for encoding loudness and density envelopes that vary over time, and a rhythmic flow for marking the positions of strong and weak beats.

[0011] In one embodiment, the lightweight expert model includes a rhythm agent for generating percussion waveforms, a low-frequency agent for generating low-frequency waveforms, and a harmony agent for generating polyphonic harmonies.

[0012] In one embodiment, it further includes: in the feature linear modulation layer inside each lightweight expert model, the global latent space tensor is mapped to scaling and bias coefficients for the features of the current layer using a projection layer; An affine transformation is performed on the local hidden features generated by the lightweight expert model during inference to achieve forced synchronization; wherein the calculation formula for the affine transformation is:

[0013] in, Let be the hidden layer feature vector of the network generated by the k-th agent at time step t. Let the global potential space tensor be... The scaling factor is... The bias coefficient is... It represents the Hadamardi (or Hadama) stack.

[0014] A parallel music structure generation system based on semantic intent dynamic routing, characterized in that the system comprises: The task orchestration and routing module is used to acquire natural language commands input by the user and perform semantic intent parsing on the natural language commands to obtain task metadata. The task metadata includes style features, beat parameters, instrument activation masks, complexity coefficients, and target duration. Based on the task metadata, a directed acyclic graph (DAG) is constructed to describe the music structure generation task. Adaptive topology pruning is performed on the DAG based on the complexity coefficients to obtain an optimized execution computation graph. The DAG includes synchronization nodes, convergence nodes, and generation nodes corresponding to the instrument activation masks. The global state synchronization module is used to generate a global potential space tensor covering the entire duration of the song based on the task metadata, and broadcast the memory address pointer of the global potential space tensor to all generating nodes in the execution computation graph through a publish-subscribe mechanism; The parallel proxy execution module is used to instantiate multiple lightweight expert models in parallel according to the scheduling instructions of the execution computation graph. The lightweight expert models obtain the global latent space tensor by reading the memory address pointer, and use the feature linear modulation layer to use the global latent space tensor as a condition constraint to independently and in parallel generate their respective original audio waveform sequences. The result reduction and fusion module is used to receive multiple original audio waveform sequences, identify physical conflicts between different waveform sequences through frequency domain analysis, automatically optimize the frequency band gain parameters of each waveform sequence through a differentiable mixing reduction unit to eliminate the physical conflicts, and fuse and output the final structured stereo audio stream.

[0015] A computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program performing the following steps: The system acquires natural language commands input by the user and performs semantic intent parsing on the natural language commands to obtain task metadata; the task metadata includes style features, beat parameters, instrument activation masks, complexity coefficients, and target duration. Based on the task metadata, a directed acyclic graph (DAG) is constructed to describe the music structure generation task. Adaptive topology pruning is performed on the DAG based on the complexity coefficient to obtain an optimized execution computation graph. The DAG includes synchronization nodes, convergence nodes, and generation nodes corresponding to the instrument activation mask. Based on the task metadata, a global latent space tensor covering the entire duration of the song is generated, and the memory address pointer of the global latent space tensor is broadcast to all generating nodes in the execution computation graph through a publish-subscribe mechanism. According to the scheduling instructions of the execution computation graph, multiple lightweight expert models are instantiated in parallel. The lightweight expert models obtain the global latent space tensor by reading the memory address pointer, and use the feature linear modulation layer to use the global latent space tensor as a condition constraint to independently and in parallel generate their respective original audio waveform sequences. The system receives multiple original audio waveform sequences, identifies physical conflicts between different waveform sequences through frequency domain analysis, automatically optimizes the frequency band gain parameters of each waveform sequence through a differentiable mixing reduction unit to eliminate the physical conflicts, and then fuses and outputs the final structured stereo audio stream.

[0016] A computer-readable storage medium having a computer program stored thereon, the computer program performing the following steps when executed by a processor: The system acquires natural language commands input by the user and performs semantic intent parsing on the natural language commands to obtain task metadata; the task metadata includes style features, beat parameters, instrument activation masks, complexity coefficients, and target duration. Based on the task metadata, a directed acyclic graph (DAG) is constructed to describe the music structure generation task. Adaptive topology pruning is performed on the DAG based on the complexity coefficient to obtain an optimized execution computation graph. The DAG includes synchronization nodes, convergence nodes, and generation nodes corresponding to the instrument activation mask. Based on the task metadata, a global latent space tensor covering the entire duration of the song is generated, and the memory address pointer of the global latent space tensor is broadcast to all generating nodes in the execution computation graph through a publish-subscribe mechanism. According to the scheduling instructions of the execution computation graph, multiple lightweight expert models are instantiated in parallel. The lightweight expert models obtain the global latent space tensor by reading the memory address pointer, and use the feature linear modulation layer to use the global latent space tensor as a condition constraint to independently and in parallel generate their respective original audio waveform sequences. The system receives multiple original audio waveform sequences, identifies physical conflicts between different waveform sequences through frequency domain analysis, automatically optimizes the frequency band gain parameters of each waveform sequence through a differentiable mixing reduction unit to eliminate the physical conflicts, and then fuses and outputs the final structured stereo audio stream.

[0017] The aforementioned parallel music structure generation method and system based on semantic intent dynamic routing, by introducing an intent-driven dynamic routing mechanism, can parse unstructured user instructions into structured directed acyclic graphs (DAGs). It dynamically prunes or expands computational nodes according to task complexity, achieving elastic on-demand allocation of computing resources. A unified spatiotemporal skeleton is generated as a global latent space tensor through a global state synchronization module, and this skeleton is broadcast as a strong constraint to all parallel lightweight expert models using characteristic linear modulation technology. This fundamentally solves the problems of long-range dependency failure and timing drift in multi-part parallel generation, ensuring the consistency of macroscopic structure and the physical compatibility of microscopic waveforms. A differentiable mixing reduction unit based on physical conflict resolution automatically identifies and repairs signal conflicts in the frequency domain, significantly improving the final audio synthesis quality. Compared to traditional serial generation or single-model large-scale schemes, this invention achieves significant improvements in inference efficiency, resource utilization, and generation quality. Attached Figure Description

[0018] Figure 1This is an application scenario diagram of a parallel music structure generation method based on semantic intent dynamic routing in one embodiment; Figure 2 This is a flowchart illustrating a parallel music structure generation method based on semantic intent dynamic routing in one embodiment. Figure 3 This is a block diagram of a parallel music structure generation system based on semantic intent dynamic routing in one embodiment; Figure 4 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0019] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0020] The parallel music structure generation method based on semantic intent dynamic routing provided in this application can be applied to, for example... Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. The user inputs natural language commands through terminal 102, such as "generate a fast-paced cyberpunk-style soundtrack." Upon receiving the command, server 104 executes the method of this application, parsing the unstructured command into an executable computation graph, generating multi-track audio through a parallel intelligent agent cluster, performing intelligent mixing, and finally returning the generated structured stereo audio stream to terminal 102 for playback or storage. Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, and portable wearable devices, and server 104 can be implemented using a standalone server or a server cluster consisting of multiple servers.

[0021] In one embodiment, such as Figure 2 As shown, a parallelized music structure generation method based on semantic intent dynamic routing is provided, which is then applied to... Figure 1 Taking the server in the example, the following steps are included: Step 202: Obtain the natural language instructions input by the user, and perform semantic intent parsing on the natural language instructions to obtain task metadata.

[0022] Task metadata forms the foundation for all subsequent generation steps, including key information such as style features, beat parameters (BPM), instrument activation masks, complexity coefficients, and target duration. Specifically, a pre-built natural language encoder first maps the user input text into a high-dimensional semantic vector. Then, a multi-head attention mechanism is used to decode this vector, performing slot filling to extract key generation parameters such as style tags, tempo parameters, and instrument configuration lists. If some parameters are missing in the user's command, the system will query a pre-built style knowledge base based on the extracted style tags to automatically fill in the missing values. Finally, a structured task metadata vector is output, containing a style feature embedding vector, a target beat scalar, an instrument activation mask vector, a structural complexity coefficient, and a target generation duration. Through this method, this embodiment can accurately and robustly transform ambiguous user intentions into structured task definitions, providing precise input for subsequent dynamic routing.

[0023] Step 204: Based on the task metadata, construct a directed acyclic graph (DAG) to describe the music structure generation task, and perform adaptive topology pruning on the DAG according to the complexity coefficient to obtain an optimized execution computation graph.

[0024] This step aims to transform abstract task metadata into precise mathematical definitions and task topologies executable by a computer cluster. First, a synchronization node and a sink node are instantiated as the basic framework. Then, the instrument activation mask vectors are traversed. For each activated instrument, the corresponding model ID is retrieved from a pre-defined agent model library and instantiated as a generator node. Subsequently, data flow edges are established, requiring all generator nodes to receive broadcasts from the synchronization node and output to the sink node, thus constructing the initial computation graph. Finally, adaptive topology pruning is performed based on the complexity coefficient: if the complexity coefficient is below a first preset threshold, such as 0.3, it is determined to be a simple task, and generator nodes marked as ornaments or high-frequency embellishments are identified and removed to free up resources; if the complexity coefficient is above a second preset threshold, such as 0.8, it is determined to be a complex task, and secondary embellishment nodes are inserted between existing generator nodes (e.g., a humanized micro-biased node is chained after the drum generator node) to improve generation quality. Finally, an optimized execution computation graph is output, existing in the form of an adjacency matrix or a JSON topology description file.

[0025] Step 206: Based on the task metadata, generate a global latent space tensor covering the entire duration of the song, and broadcast the memory address pointer of the global latent space tensor to all generating nodes in the execution computation graph through a publish-subscribe mechanism.

[0026] This step aims to establish an immutable spatiotemporal skeleton spanning the entire piece, serving as a mandatory constraint for all parallel generation tasks. The time grid is initialized based on the target duration and a preset latent space sampling rate, determining the total number of time steps. The latent space sampling rate refers to the frequency at which the audio signal is sampled in the latent space, controlling the temporal resolution. Then, the task metadata vector is input into a pre-trained lightweight recurrent neural network or a small Transformer, outputting a three-dimensional global latent space tensor. This tensor contains multiple feature channels, such as: harmonic flow encoding chord root tones and attributes over time, energy flow encoding loudness and density envelopes over time, and rhythmic flow marking strong and weak beats. To support high-concurrency reads and reduce memory overhead, a zero-copy shared memory mechanism is employed, writing the large tensor to a shared region of main memory and obtaining its memory address pointer. Then, the computation graph is traversed, and the memory address pointer is broadcast to every generation node in an active state via a publish-subscribe link. In this way, regardless of the number of parallel agents downstream, the GPU / memory overhead remains at a constant level of O(1). Through the above method, this embodiment generates a spatiotemporal skeleton containing three-dimensional information of harmony, energy, and rhythm using a lightweight network, providing powerful and information-rich global constraints for subsequent parallel generation.

[0027] Step 208: According to the scheduling instructions of the execution computation graph, multiple lightweight expert models are instantiated in parallel. The lightweight expert models obtain the global latent space tensor by reading the memory address pointer, and use the feature linear modulation layer to use the global latent space tensor as a condition constraint to independently and in parallel generate their respective original audio waveform sequences.

[0028] This step corresponds to the Map phase of the workflow and is the core of parallel inference. An independent computation thread or GPU stream is allocated to each generation node in the computation graph. All agents start inference in parallel at the same time, without blocking each other. These lightweight expert models typically have fewer than 100 megabytes of parameters and specialize in generating specific frequency bands or timbres, such as rhythm agents for generating percussion waveforms, low-frequency agents for generating low-frequency waveforms, and harmony agents for generating polyphonic harmonies. During inference, each agent obtains the global latent space tensor by reading previously received memory address pointers. To inject global constraints into local generation, a Feature Linear Modulation (FiLM) layer is embedded in the neural network layer of each agent. This layer uses an internal projection layer to map the global tensor to scaling and bias coefficients for the current layer's features and performs an affine transformation on the local hidden layer features, thereby forcing synchronous computation. The formula for this transformation is:

[0029] in, Let be the hidden layer feature vector of the network generated by the k-th agent at time step t. Let the global potential space tensor be... The scaling factor is... The bias coefficient is... This represents the Hadamard Product, which is element-wise multiplication. Through this modulation, the harmonic flow encoded in the global tensor forcibly corrects the pitch of the Bass agent, the rhythmic flow forcibly aligns with the strike points of the Rhythm agent, and the energy flow unifies the velocity envelopes of all agents. In this way, this embodiment uses FiLM technology to inject global constraints into each independent parallel model in an efficient and differentiable manner, which is a key technical means to achieve global consistency.

[0030] Step 210: Receive multiple original audio waveform sequences, identify physical conflicts between different waveform sequences through frequency domain analysis, automatically optimize the frequency band gain parameters of each waveform sequence through a differentiable mixing reduction unit to eliminate physical conflicts, and fuse and output the final structured stereo audio stream.

[0031] This step corresponds to the "Reduce" phase of the workflow, aiming to resolve physical signal conflicts and achieve high-quality mixing. The reduction module receives multiple raw audio waveforms from the parallel agent execution module. Then, a short-time Fourier transform is performed on each waveform to obtain the corresponding complex spectrogram. The short-time Fourier transform is a mathematical transformation that converts a time-domain signal into a frequency-domain representation, used to analyze the frequency components of the signal at different time points. Based on these spectrograms, a global frequency-domain overlap masking matrix is ​​calculated to identify regions where different voices experience intense energy collisions at the same time and frequency. To resolve these conflicts, the system abandons traditional manual mixing rules and employs a differentiable mixing reduction unit. This unit maintains a set of learnable frequency band gain parameters, effectively forming a dynamic equalizer (EQ). By weighted summing of the spectrograms in the frequency domain, the total mixed spectrum is obtained, and a mixing loss function containing a fidelity term and a conflict penalty term is defined. Through a small number of gradient descent iterations, these gain parameters are automatically updated to minimize the loss function, thereby automatically attenuating the gain of conflicting frequency bands. Finally, the optimized parameters are used to calculate the final spectrum, and the waveform is restored to the time domain using the inverse short-time Fourier transform (iSTFT), outputting the final structured stereo audio stream. In this way, this embodiment transforms the artistic process of mixing into a mathematically optimizable problem of resolving physical conflicts, automatically achieving a clear and transparent mixing effect and significantly improving the auditory quality of the final audio.

[0032] The aforementioned parallel music structure generation method based on semantic intent dynamic routing introduces an intent-driven dynamic routing mechanism, which parses unstructured user instructions into a structured directed acyclic graph (DAG). It then dynamically prunes or expands computational nodes based on task complexity, achieving flexible on-demand allocation of computing resources. A unified spatiotemporal skeleton is generated as a global latent space tensor through a global state synchronization module. This skeleton is then broadcast as a strong constraint to all parallel lightweight expert models using characteristic linear modulation technology. This fundamentally solves the problems of long-range dependency failure and temporal drift in multi-part parallel generation, ensuring the consistency of the macroscopic structure and the physical compatibility of the microscopic waveform. A differentiable mixing reduction unit based on physical conflict resolution automatically identifies and repairs signal conflicts in the frequency domain, significantly improving the final audio synthesis quality. Compared to traditional serial generation or single-model large-scale schemes, this invention achieves significant improvements in inference efficiency, resource utilization, and generation quality.

[0033] In one embodiment, step 202 above involves semantic intent parsing of the natural language instruction to obtain task metadata. Specifically, this includes: mapping the natural language instruction into a high-dimensional semantic vector using a pre-set natural language encoder; decoding the high-dimensional semantic vector using a multi-head attention mechanism to extract key generation parameters; these key generation parameters include style tags, speed parameters, and a list of instrument configurations; if any preset parameters are missing from the key generation parameters, a preset style knowledge base is queried based on the extracted style tags to fill in the missing values. This embodiment, by combining a deep learning model and a knowledge base, can accurately and robustly transform fuzzy user intent into a structured task definition, providing precise input for subsequent dynamic routing.

[0034] In one embodiment, step 204 above, which constructs a directed acyclic graph (DAG) to describe the music structure generation task, specifically includes: instantiating synchronization nodes and a convergence node as the basic framework of the DAG; traversing the instrument activation mask vectors, and for each activated instrument type, retrieving the corresponding lightweight expert model from a preset intelligent agent model library and instantiating it as a generation node; establishing an edge set according to the data flow direction, so that all generation nodes receive broadcasts from the synchronization nodes and direct the broadcast output to the convergence node. This embodiment provides a standardized graph construction process, ensuring the integrity and executability of the generation task topology.

[0035] In one embodiment, step 204 above involves adaptive topology pruning of the directed acyclic graph (DAG) based on the complexity coefficient to obtain an optimized execution computation graph. Specifically, this includes: when the complexity coefficient is below a first preset threshold, identifying and removing generation nodes marked as decorative or embellished attributes in the DAG; and when the complexity coefficient is above a second preset threshold, inserting secondary embellishment nodes between the generation nodes in the DAG. The first preset threshold can be 0.3, and the second preset threshold can be 0.8; the specific values ​​can be adjusted according to the actual application scenario. This embodiment achieves elastic scheduling of computing resources, improving efficiency for simple tasks and enhancing quality for complex tasks.

[0036] In one embodiment, step 206 above, which generates a global latent space tensor covering the entire duration of the piece, specifically includes: initializing a time grid based on the target duration and a preset latent space sampling rate to determine the total number of time steps; inputting task metadata into a pre-trained recurrent neural network or a small Transformer to output a three-dimensional global latent space tensor; wherein the feature channels of the global latent space tensor include: a harmonic flow for encoding chord root tones and attributes that vary over time, an energy flow for encoding loudness and density envelopes that vary over time, and a rhythmic flow for marking the positions of strong and weak beats. This embodiment generates a spatiotemporal skeleton containing three-dimensional information of harmony, energy, and rhythm through a lightweight network, providing a powerful and information-rich global constraint for subsequent parallel generation.

[0037] In one embodiment, the lightweight expert model in step 208 includes a rhythm agent for generating percussion waveforms, a low-frequency agent for generating low-frequency waveforms, and a harmony agent for generating polyphonic harmonies. The rhythm agent can employ a diffusion model or a one-dimensional convolutional network (1D-CNN) specifically for generating percussion waveforms with high transient response (such as Kick, Snare, Hi-hat); the low-frequency agent can employ a wavetable network specifically for generating monophonic low-frequency waveforms, focusing on the stability of the sub-bass; and the harmony agent can employ an autoregressive model (such as a small Transformer) specifically for generating harmonic pads or piano accompaniment with polyphonic structures. This embodiment decouples the functionality of a general-purpose large model into multiple domain-specific lightweight models, laying the foundation for parallel execution and resource optimization.

[0038] In one embodiment, step 208 above utilizes a feature linear modulation layer to use the global latent space tensor as a conditional constraint, independently and in parallel generating their respective original audio waveform sequences. Specifically, this includes: within the feature linear modulation layer of each lightweight expert model, a projection layer is used to map the global latent space tensor to scaling and bias coefficients specific to the current layer's features; affine transformations are performed on the local hidden layer features generated by the lightweight expert model during inference to achieve forced synchronous computation. This embodiment, through FiLM technology, injects global constraints into each independently parallel model in an efficient and differentiable manner, which is a key technical means to achieve global consistency.

[0039] In one embodiment, step 210 above identifies physical conflicts between different waveform sequences through frequency domain analysis and automatically optimizes the frequency band gain parameters of each waveform sequence using a differentiable mixing reduction unit to eliminate physical conflicts. Specifically, this includes: performing a short-time Fourier transform on each original audio waveform sequence to obtain the corresponding complex spectrum; calculating a global frequency domain overlap masking matrix to identify time-frequency regions where energy collisions occur; performing a weighted summation of each spectrum in the frequency domain based on learnable frequency band gain parameters to obtain the mixed total spectrum; iteratively updating the learnable frequency band gain parameters through gradient descent to minimize a preset mixing loss function; calculating the final spectrum using the optimized frequency band gain parameters and restoring it to a time-domain waveform through an inverse short-time Fourier transform. The formula for calculating the frequency domain overlap masking matrix is:

[0040] in, and The complex spectrum diagrams for the i-th and j-th voice parts are shown below. The preset auditory masking threshold is used, and ReLU is a linear rectified function. The formula for calculating the total spectrum after mixing is:

[0041] in, This is a learnable frequency band gain parameter. This embodiment transforms the art of mixing into a mathematically optimizable physical conflict resolution problem, automatically achieving a clear and transparent mixing effect and significantly improving the auditory quality of the final audio.

[0042] It should be understood that, although Figure 2 The steps in the flowchart are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order in which these steps are executed, and they can be performed in other orders. Figure 2At least some of the steps in the process may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least some of the sub-steps or stages of other steps.

[0043] In one embodiment, such as Figure 3 As shown, a parallel music structure generation system based on semantic intent dynamic routing is provided, including: a task orchestration and routing module 302, a global state synchronization module 304, a parallel agent execution module 306, and a result reduction and fusion module 308, wherein: The task orchestration and routing module 302 is used to acquire natural language commands input by the user and perform semantic intent parsing on the natural language commands to obtain task metadata. The task metadata includes style features, beat parameters, instrument activation masks, complexity coefficients, and target duration. Based on the task metadata, a directed acyclic graph (DAG) is constructed to describe the music structure generation task. Adaptive topology pruning is performed on the DAG based on the complexity coefficients to obtain an optimized execution computation graph. The DAG includes synchronization nodes, convergence nodes, and generation nodes corresponding to the instrument activation masks. The global state synchronization module 304 is used to generate a global potential space tensor covering the entire duration of the song based on the task metadata, and broadcast the memory address pointer of the global potential space tensor to all generating nodes in the execution computation graph through a publish-subscribe mechanism; The parallel proxy execution module 306 is used to instantiate multiple lightweight expert models in parallel according to the scheduling instructions of the execution computation graph. The lightweight expert models obtain the global latent space tensor by reading the memory address pointer, and use the feature linear modulation layer to use the global latent space tensor as a condition constraint to independently and in parallel generate their respective original audio waveform sequences. The result reduction and fusion module 308 is used to receive multiple original audio waveform sequences, identify physical conflicts between different waveform sequences through frequency domain analysis, automatically optimize the frequency band gain parameters of each waveform sequence through a differentiable mixing reduction unit to eliminate the physical conflicts, and fuse and output the final structured stereo audio stream.

[0044] Specific limitations regarding the parallel music structure generation system based on semantic intent dynamic routing can be found in the limitations of the parallel music structure generation method based on semantic intent dynamic routing mentioned above, and will not be repeated here. Each module in the aforementioned parallel music structure generation system based on semantic intent dynamic routing can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device in software form, so that the processor can call and execute the corresponding operations of each module.

[0045] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 4 As shown, the computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and the database. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores task metadata, model parameters, and other data. The network interface communicates with external terminals via a network connection. When executed by the processor, the computer program implements a parallel music structure generation method based on semantic intent dynamic routing.

[0046] Those skilled in the art will understand that Figure 4 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0047] In one embodiment, a computer device is provided, including a memory and a processor, the memory storing a computer program, the processor executing the computer program to implement the steps in the above-described method embodiments.

[0048] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps in the above method embodiments.

[0049] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0050] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0051] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A parallel music structure generation method based on semantic intent dynamic routing, characterized in that, The method includes: The system acquires natural language commands input by the user and performs semantic intent parsing on the natural language commands to obtain task metadata; the task metadata includes style features, beat parameters, instrument activation masks, complexity coefficients, and target duration. Based on the task metadata, a directed acyclic graph (DAG) is constructed to describe the music structure generation task. Adaptive topology pruning is performed on the DAG based on the complexity coefficient to obtain an optimized execution computation graph. The DAG includes synchronization nodes, convergence nodes, and generation nodes corresponding to the instrument activation mask. Based on the task metadata, a global latent space tensor covering the entire duration of the song is generated, and the memory address pointer of the global latent space tensor is broadcast to all generating nodes in the execution computation graph through a publish-subscribe mechanism. According to the scheduling instructions of the execution computation graph, multiple lightweight expert models are instantiated in parallel. The lightweight expert models obtain the global latent space tensor by reading the memory address pointer, and use the feature linear modulation layer to use the global latent space tensor as a condition constraint to independently and in parallel generate their respective original audio waveform sequences. The system receives multiple original audio waveform sequences, identifies physical conflicts between different waveform sequences through frequency domain analysis, automatically optimizes the frequency band gain parameters of each waveform sequence through a differentiable mixing reduction unit to eliminate the physical conflicts, and then fuses and outputs the final structured stereo audio stream.

2. The method according to claim 1, characterized in that, Semantic intent parsing is performed on the natural language instructions to obtain task metadata, including: The natural language instructions are mapped into high-dimensional semantic vectors using a pre-set natural language encoder; A multi-head attention mechanism is used to decode the high-dimensional semantic vector and extract key generation parameters; the key generation parameters include style tags, speed parameters, and instrument configuration lists; If any preset parameter is missing from the key generation parameters, the default value is filled in by querying the preset style knowledge base based on the extracted style tags.

3. The method according to claim 1, characterized in that, Construct a directed acyclic graph to describe the music structure generation task, including: Instantiated synchronization nodes and convergence nodes serve as the basic framework of the directed acyclic graph; Traverse the instrument activation mask vectors, and for each activated instrument type, retrieve the corresponding lightweight expert model from the preset intelligent agent model library and instantiate it as a generator node. An edge set is established based on the data flow direction, so that all generating nodes receive broadcasts from the synchronization node and direct the broadcast output to the aggregation node.

4. The method according to claim 1, characterized in that, Adaptive topology pruning is performed on the directed acyclic graph based on the complexity coefficient to obtain an optimized execution computation graph, including: When the complexity coefficient is lower than the first preset threshold, identify and remove the generated nodes marked as decorative notes or embellishments in the directed acyclic graph; When the complexity coefficient is higher than the second preset threshold, a secondary modification node is inserted between the generated nodes of the directed acyclic graph.

5. The method according to claim 1, characterized in that, Generate a global latent space tensor covering the entire duration of the song, including: The time grid is initialized based on the target duration and the preset potential spatial sampling rate, and the total number of time steps is determined. The task metadata is input into a pre-trained recurrent neural network or a small Transformer, and a three-dimensional global latent space tensor is output. The feature channels of the global latent space tensor include: a harmonic flow for encoding chord root tones and attributes that vary over time, an energy flow for encoding loudness and density envelopes that vary over time, and a rhythmic flow for marking the positions of strong and weak beats.

6. The method according to claim 1, characterized in that, The lightweight expert model includes a rhythm agent for generating percussion waveforms, a low-frequency agent for generating low-frequency waveforms, and a harmony agent for generating polyphonic harmonies.

7. The method according to claim 1, characterized in that, Using the global latent space tensor as a conditional constraint, the characteristic linear modulation layer independently and in parallel generates corresponding original audio waveform sequences, including: Each lightweight expert model uses a projection layer in its internal feature linear modulation layer to map the global latent space tensor into scaling and bias coefficients for the features of the current layer. An affine transformation is performed on the local hidden features generated by the lightweight expert model during inference to achieve forced synchronization; wherein the calculation formula for the affine transformation is: in, Let be the hidden layer feature vector of the network generated by the k-th agent at time step t. Let the global potential space tensor be... The scaling factor is... The bias coefficient is... It represents the Hadamardi (or Hadama) stack.

8. A parallel music structure generation system based on semantic intent dynamic routing, characterized in that, The system includes: The task orchestration and routing module is used to acquire natural language commands input by the user and perform semantic intent parsing on the natural language commands to obtain task metadata. The task metadata includes style features, beat parameters, instrument activation masks, complexity coefficients, and target duration. Based on the task metadata, a directed acyclic graph (DAG) is constructed to describe the music structure generation task. Adaptive topology pruning is performed on the DAG based on the complexity coefficients to obtain an optimized execution computation graph. The DAG includes synchronization nodes, convergence nodes, and generation nodes corresponding to the instrument activation masks. The global state synchronization module is used to generate a global potential space tensor covering the entire duration of the song based on the task metadata, and broadcast the memory address pointer of the global potential space tensor to all generating nodes in the execution computation graph through a publish-subscribe mechanism; The parallel proxy execution module is used to instantiate multiple lightweight expert models in parallel according to the scheduling instructions of the execution computation graph. The lightweight expert models obtain the global latent space tensor by reading the memory address pointer, and use the feature linear modulation layer to use the global latent space tensor as a condition constraint to independently and in parallel generate their respective original audio waveform sequences. The result reduction and fusion module is used to receive multiple original audio waveform sequences, identify physical conflicts between different waveform sequences through frequency domain analysis, automatically optimize the frequency band gain parameters of each waveform sequence through a differentiable mixing reduction unit to eliminate the physical conflicts, and fuse and output the final structured stereo audio stream.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.