Non-autoregressive optimized data sequence processing method, device, equipment and medium

By employing a non-autoregressive optimized data sequence processing method, this paper addresses the issues of low generation efficiency and insufficient naturalness of speech in existing TTS technologies in the fintech and healthcare fields, achieving efficient and coherent speech generation suitable for fintech and healthcare business scenarios.

CN120808746BActive Publication Date: 2026-11-27PING AN TECH (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510952773.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-10
Publication Date
2026-11-27
Estimated Expiration
2045-07-10

AI Technical Summary

Technical Problem

Existing TTS technology suffers from low generation efficiency, insufficient naturalness and coherence of speech in the fintech and healthcare fields, especially in high-concurrency and multilingual environments where it struggles to meet the demands of real-time speech synthesis.

Method used

A non-autoregressive optimization data sequence processing method is adopted. It generates a hidden representation by receiving the input sequence, initializes the time step value, determines the dynamic length span, generates predicted values ​​in parallel, identifies the leftmost position index, and accumulates and optimizes the predicted values ​​to generate the target sequence data.

Benefits of technology

It improves the efficiency and naturalness of speech generation, enhances the coherence of speech, and meets the requirements of the fintech and healthcare sectors for high-quality, continuous speech output.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120808746B_ABST
    Figure CN120808746B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of speech processing, can be applied to business scenes such as financial technology and medical health, and discloses a non-self-recurrent optimized data sequence processing method, device, equipment and medium, which comprises the following steps: receiving input sequence coding to generate hidden representation, determining a dynamic length span based on a time step value and the hidden representation, generating prediction values in parallel within the dynamic length span, identifying the leftmost position index and reserving the corresponding prediction value, judging whether the sequence is completed, and when the sequence is not completed, repeatedly updating the time step value to determine a new dynamic length span to reserve the prediction value corresponding to the leftmost position index, accumulating the reserved prediction values to form initial sequence data, and optimizing the initial sequence data by using a non-self-recurrent process to generate target sequence data. By combining time step dynamic updating and dynamic length span control, cooperating with parallel prediction and a non-self-recurrent optimization process, the application improves the speech sequence generation efficiency, and enhances the naturalness and coherence of the speech.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of speech processing technology, and in particular to a non-autoregressive optimized data sequence processing method, apparatus, device, and storage medium. Background Technology

[0002] With the rapid development of speech generation technology, text-to-speech (TTS) systems have been widely applied in fintech, healthcare, and various intelligent voice interaction systems. However, existing TTS technologies still face a series of bottlenecks that hinder their widespread application and high-quality development.

[0003] In the fintech sector, intelligent voice services have become an important component for customer authentication, risk alerts, and information broadcasting. However, most mainstream TTS systems currently rely on autoregressive (AR) models for speech generation. These models recursively generate speech frame-by-frame or segment-by-segment. While they offer advantages in sound quality reproduction, their low inference efficiency and slow response speed make them unsuitable for real-time speech synthesis, especially in high-concurrency financial systems, severely impacting the availability and user experience of voice services. Meanwhile, some systems have attempted to improve generation efficiency using non-autoregressive (NAR) models. Although overall inference speed has improved, the lack of an effective temporal structure modeling mechanism means that the generated speech segments still suffer from significant deficiencies in naturalness, coherence, and semantic completeness, failing to meet the stringent requirements of the financial sector for high-quality, continuous speech output.

[0004] In the healthcare sector, Text-to-Speech (TTS) systems are widely used in scenarios such as intelligent triage, health monitoring, and voice broadcasting. Especially when dealing with the elderly, special patients, or in multilingual environments, these systems demand higher levels of naturalness, accuracy, and real-time performance. However, existing TTS systems generally suffer from insufficient speech fluency, lack of contextual understanding, and fragmented generated content when processing complex semantics, long texts, or multi-speaker corpora. This severely impacts the reliability and practicality of speech synthesis systems in healthcare scenarios. Furthermore, current technologies lack a unified and efficient generation strategy for multilingual and multi-task adaptation, often requiring the separate construction or optimization of models for different languages, speakers, or business needs. This results in complex system structures, high deployment costs, and poor scalability. Summary of the Invention

[0005] The main objective of this invention is to provide a non-autoregressive optimized data sequence processing method, apparatus, device, and storage medium, aiming to solve the technical problem in the prior art that the lack of a mechanism combining dynamic adjustment of time step and parallel prediction of dynamic span makes it difficult to balance generation efficiency and speech naturalness during speech generation.

[0006] To achieve the above objectives, the present invention provides a non-autoregressive optimized data sequence processing method, comprising:

[0007] Receive an input sequence and encode the input sequence to generate a hidden representation;

[0008] Initialize the current time step value, and determine the dynamic length span based on the current time step value and the hidden representation;

[0009] Predictions for all locations are generated in parallel within the dynamic length span;

[0010] Identify the leftmost position index within the dynamic length span and retain the predicted value corresponding to the leftmost position index;

[0011] Determine whether sequence generation is complete;

[0012] When sequence generation is incomplete, repeat the steps of updating the current time step value, determining the updated dynamic length span based on the updated current time step value, generating predicted values ​​for all positions within the updated dynamic length span, and identifying and retaining the predicted value corresponding to the leftmost position index within the updated dynamic length span, until sequence generation is complete.

[0013] Accumulate all retained predictions to form the initial sequence data;

[0014] The initial sequence data is optimized through a non-autoregressive process to generate the target sequence data.

[0015] Furthermore, to achieve the above objectives, the present invention provides a non-autoregressive optimized data sequence processing apparatus, comprising:

[0016] An encoder module is used to receive an input sequence and encode the input sequence to generate a hidden representation;

[0017] The span decision module is used to initialize the current time step value and determine the dynamic length span based on the current time step value and the hidden representation;

[0018] A parallel prediction module is used to generate prediction values ​​for all locations in parallel within the dynamic length span;

[0019] The location filtering module is used to identify the leftmost location index within the dynamic length span and retain the predicted value corresponding to the leftmost location index;

[0020] The generation completion determination module is used to determine whether sequence generation is complete.

[0021] The iterative execution module is used to repeatedly execute the following steps when sequence generation is not complete: updating the current time step value, determining the updated dynamic length span based on the updated current time step value, generating predicted values ​​for all positions within the updated dynamic length span, and identifying and retaining the predicted value corresponding to the leftmost position index within the updated dynamic length span, until sequence generation is complete.

[0022] The sequence accumulation module is used to accumulate all retained prediction values ​​to form the initial sequence data;

[0023] The sequence optimization module is used to optimize the initial sequence data through a non-autoregressive process to generate target sequence data.

[0024] Furthermore, to achieve the above objectives, the present invention also provides a computer device, the computer device including a memory, a processor, and a non-autoregressive optimized data sequence processing program stored in the memory and executable on the processor, wherein when the non-autoregressive optimized data sequence processing program is executed by the processor, it implements the steps of the non-autoregressive optimized data sequence processing method as described above.

[0025] Furthermore, to achieve the above objectives, the present invention also provides a computer-readable storage medium storing a non-autoregressive optimized data sequence processing program, wherein when the non-autoregressive optimized data sequence processing program is executed by a processor, it implements the steps of the non-autoregressive optimized data sequence processing method described above.

[0026] Beneficial Effects: This invention relates to the field of speech processing technology and can be applied to business scenarios such as fintech and healthcare. It discloses a non-autoregressive optimized data sequence processing method, apparatus, device, and medium, comprising: receiving an input sequence and encoding it to generate a hidden representation; initializing the current time step value; determining a dynamic length span based on the current time step value and the hidden representation; generating predicted values ​​for all positions in parallel within the dynamic length span; identifying the leftmost position index within the dynamic length span and retaining the corresponding predicted value; determining whether sequence generation is complete; if sequence generation is incomplete, repeatedly performing the operations of updating the current time step value, determining the updated dynamic length span based on the updated current time step value and the hidden representation, and retaining the predicted value corresponding to the leftmost position index within the updated dynamic length span; accumulating all retained predicted values ​​to form initial sequence data; and optimizing the initial sequence data through a non-autoregressive process to generate target sequence data. This invention, by combining dynamic time step updates and dynamic length span control with parallel prediction and non-autoregressive optimization processes, improves the efficiency of speech sequence generation while enhancing the naturalness and coherence of the speech. Attached Figure Description

[0027] The present invention will be further described below with reference to the accompanying drawings and embodiments. In the accompanying drawings:

[0028] Figure 1 This is a schematic diagram of an application environment for a non-autoregressive optimized data sequence processing method according to an embodiment of the present invention;

[0029] Figure 2 This is a flowchart illustrating an embodiment of the non-autoregressive optimization data sequence processing method of the present invention;

[0030] Figure 3 This is a schematic diagram of the functional modules of a preferred embodiment of the non-autoregressive optimized data sequence processing device of the present invention;

[0031] Figure 4 This is a schematic diagram of the structure of a computer device according to an embodiment of the present invention;

[0032] Figure 5 This is another structural schematic diagram of a computer device according to one embodiment of the present invention. Detailed Implementation

[0033] It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of the invention.

[0034] The non-autoregressive optimized data sequence processing method provided in this invention can be applied to, for example... Figure 1In this application environment, the user terminal communicates with the server via a network. The server receives the input sequence from the user terminal, encodes it to generate a hidden representation, initializes the current time step value, determines the dynamic length span based on the current time step value and the hidden representation, generates predicted values ​​for all positions in parallel within the dynamic length span, identifies the leftmost position index within the dynamic length span and retains the corresponding predicted value, determines whether sequence generation is complete, and if not, repeats the operations of updating the current time step value, determining the updated dynamic length span based on the updated current time step value and the hidden representation, and retaining the predicted value corresponding to the leftmost position index within the updated dynamic length span. All retained predicted values ​​are accumulated to form initial sequence data, and the initial sequence data is optimized through a non-autoregressive process to generate target sequence data. This invention, by combining dynamic time step updates and dynamic length span control with parallel prediction and non-autoregressive optimization processes, improves the efficiency of speech sequence generation while enhancing the naturalness and coherence of the speech. The user terminal can be, but is not limited to, various personal computers, laptops, smartphones, tablets, and portable wearable devices. The server can be implemented using a standalone server or a server cluster consisting of multiple servers. The present invention will now be described in detail through specific embodiments.

[0035] Please see Figure 2 , Figure 2 This is a flowchart illustrating an embodiment of the non-autoregressive optimized data sequence processing method provided by the present invention. It should be noted that although the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than that shown here.

[0036] like Figure 2 As shown, the non-autoregressive optimization data sequence processing method proposed in this invention includes the following steps:

[0037] S10, Receive the input sequence and encode the input sequence to generate a hidden representation;

[0038] In this embodiment, an input sequence is received. The input sequence can be any form of data set, including but not limited to text sequences, speech symbol sequences, phoneme sequences, tag sequences, or other symbol sequences used for data representation. Each symbol or element in the input sequence corresponds to a specific discrete information unit and has a clear sequence position identifier. Different types of input sequences are adapted to different application requirements. For example, elements in a text sequence can be words, subwords, or characters, while elements in a speech symbol sequence can be phonemes, syllables, or other audio representation units.

[0039] Encoding the input sequence to generate a hidden representation involves processing the input sequence through segmentation, grouping, or continuous extraction to form a data structure suitable for subsequent modeling. The encoding process can be based on deep neural network structures, with common implementations including, but not limited to, self-attention mechanisms, recurrent neural networks, convolutional networks, or combinations thereof. Self-attention mechanisms capture global dependencies within the sequence by calculating the relationships between different positions, improving the ability to represent long-range information. Recurrent neural networks are suitable for sequential data with strong sequential information, enabling the gradual transmission of contextual information, while convolutional structures offer high computational efficiency in low-latency scenarios.

[0040] Generate hidden representations, which are continuous numerical representations of an input sequence in a high-dimensional space after model transformation. These representations are typically vector or tensor structures used to preserve the content information, contextual dependencies, and positional structure information of the input sequence. Hidden representations possess information compression and fusion capabilities, achieving a structured representation of the input sequence through an encoding process. They not only retain the data information of the input sequence itself but also integrate temporal relationships, semantic structure, and other contextual information captured by the model. The structure of hidden representations can be a fixed-length matrix, a variable-length sequence, or other forms, dynamically adjusting the representation dimension and structure according to different task requirements.

[0041] The process of receiving input sequences can be accomplished through the input interface module. This module parses the input data according to the data format provided by the external system or user, converting it into an internally unified data structure. The input interface can be configured with different parsing rules to adapt to text, speech, tags, or other types of input data. For example, in text processing scenarios, the input interface parses natural language text into sequences of characters, words, or sub-words, and further converts them into a standard sequence structure. In speech symbol processing scenarios, the input interface arranges acoustic symbols, phonemes, or other representation units in chronological order to generate a symbol sequence input.

[0042] The process of encoding the input sequence is executed through a deep network structure. A self-attention network can be used, where each element at each sequence position calculates its relational weights with elements at other positions through an attention mechanism, forming an expression that integrates overall information. Network parameters are optimized during model training using backpropagation, enabling the encoder to extract sequence information and contextual structure. The hidden representation is generated based on the output of the encoding network. The output structure is a multi-dimensional matrix, where the number of rows corresponds to the length of the input sequence, and the number of columns corresponds to the feature dimension. The hidden representation can be output in real-time or cached, adapting to different data processing workflows.

[0043] Example Explanation: In the healthcare field, the input sequence can be a patient's medical record text, diagnostic report, or vital sign data sequence. By encoding the input sequence into a hidden representation, the system can extract disease-related information and temporal features, providing foundational data support for the subsequent generation of structured medical records or health risk alerts, thereby improving the efficiency and accuracy of medical information processing.

[0044] In the fintech business, the input sequence can be a user transaction behavior sequence, a financial text description, or a credit score label sequence. The process of encoding and generating hidden representations can integrate historical transaction information and account characteristics to form a high-dimensional expression, supporting risk assessment, fraud detection, or personalized financial product recommendations, and enhancing the intelligence and predictive capabilities of financial data processing.

[0045] This embodiment effectively preserves the content and structural information of the input sequence by receiving the input sequence and generating a hidden representation. Furthermore, the encoding process enhances the semantic connections and global dependencies within the sequence, improving the efficiency and accuracy of subsequent data processing and information reasoning. The hidden representation provides a stable, continuous, and controllable data foundation for subsequent operations such as sequence structure analysis, temporal relationship modeling, and parallel prediction. This facilitates the generation, optimization, and adjustment of complex sequences, thereby improving the overall expressive power and output quality of the system.

[0046] S20, initialize the current time step value, and determine the dynamic length span based on the current time step value and the hidden representation;

[0047] In this embodiment, the current time step value is initialized. The time step value is a numerical value used to identify the current processing position in the sequence data processing process. It is usually expressed in non-negative integer form and is used to indicate the specific time position or sequence index position in the sequence. The process of initializing the time step value is to set the initial time position. A common implementation is to set the time step value to zero, indicating that data processing starts from the beginning of the sequence. The initialization operation of the time step value ensures that the sequence processing process has a clear starting point, which facilitates position tracking and data positioning in subsequent operations.

[0048] The dynamic length span is determined based on the current time step value and the hidden representation. In sequence data processing, the dynamic length span refers to a continuous sequence segment jointly determined by the current time step value and the hidden representation. Its length is not fixed but dynamically adjusted according to the data characteristics in the hidden representation to adapt to changes in the sequence content. The time step value determines the starting position of the dynamic length span, while the content and structural information contained in the hidden representation provides data support for determining the length of the dynamic length span. By analyzing the contextual structure, local features, or internal sequence correlation information in the hidden representation, the appropriate span length for the current time position can be dynamically estimated.

[0049] Determining the dynamic span typically involves the following steps: First, based on the current time step, the corresponding sequence segment is located in the hidden representation. This segment reflects the local data features and contextual information of the current location. Second, key features of the sequence segment are extracted, such as temporal features, structural features, or other data representations reflecting the internal patterns of the sequence, and the span length parameter is further calculated. The span length parameter reflects the range of continuous sequences required for data processing at the current location. A corresponding dynamic length threshold can be generated based on a specific parameter mapping relationship. The dynamic length threshold controls the range limits of the span. Based on this threshold, the minimum and maximum span boundary values ​​are determined, ultimately determining the dynamic span. The starting point of the dynamic span is determined by the current time step, and the ending point is dynamically calculated based on the boundary values. The overall span range is flexibly adjusted according to the characteristics of the sequence data.

[0050] Initializing the time step value can be achieved by assigning a variable value, setting the time step value to zero, and marking the start position of the sequence. This operation is performed before the sequence data is processed for the first time to ensure the consistency and accuracy of the position counting logic.

[0051] Determining the dynamic span length can be achieved through the following technical path. First, the corresponding segment is located from the hidden representation structure based on the time step value. The data range of this segment is obtained through index calculation, avoiding traversal data retrieval and improving processing efficiency. Then, a feature extraction network or computation module is used to analyze the segment, obtaining temporal feature vectors or other feature representations. Through feature mapping relationships, a span length parameter is calculated, reflecting the continuity requirement or data density of the current position in the sequence. Combined with parameter adjustment rules, a dynamic length threshold is generated. This threshold can be set as a floating value within a controlled range, supporting flexible adjustment of the span range. Based on the dynamic length threshold, the minimum and maximum span boundary values ​​are calculated respectively, ensuring that the span length has clear lower and upper limits, avoiding excessively small or large span ranges from affecting the stability of data processing. Finally, the dynamic span length is determined based on the boundary values, and the start and end positions are output as the input data range for subsequent sequence segment processing.

[0052] Example explanation: In the field of healthcare, time step values ​​are used to mark the time series position of patient health data. By determining the dynamic length span, continuous vital sign data of patients in different time periods can be extracted flexibly, which facilitates subsequent health trend analysis and abnormal state detection, and improves the timeliness and accuracy of medical data processing.

[0053] In the fintech business, the time step value corresponds to the specific transaction position in the user behavior sequence. The flexible adjustment of the dynamic length span supports the dynamic division of transaction segments according to transaction density or risk changes, optimizes credit assessment, risk warning or transaction behavior analysis processes, and improves the real-time response capability and prediction accuracy of financial data analysis.

[0054] This embodiment accurately identifies the current position of the sequence data by initializing the time step value, facilitating position tracking and continuous processing throughout the overall process and avoiding data offset issues caused by sequence position confusion. By determining the dynamic length span based on the current time step value and hidden representation, the sequence processing range can be dynamically adjusted according to the data content and structure, avoiding information loss or redundancy caused by fixed-length segments, improving the processing efficiency and information utilization of sequence data, and enhancing the system's adaptability and flexibility.

[0055] S30, generate predicted values ​​for all locations in parallel within the dynamic length span;

[0056] In this embodiment, the dynamic length span refers to a continuous sequence range dynamically determined based on the current time step value and the hidden representation during sequence data processing. The start and end positions of this range are flexibly adjusted based on the data content, reflecting the dynamic changes in local features within the sequence. The existence of the dynamic length span enables adaptive processing strategies to be adopted for different data regions during sequence data processing.

[0057] Parallel generation of predicted values ​​for all positions within a dynamic length span refers to simultaneously performing prediction operations for each position within a defined dynamic length span, generating corresponding predicted values. These predicted values ​​typically represent the next inference result, feature output, or data representation required for subsequent processing of the sequence data. This parallel generation process differs from the traditional position-by-position sequential processing mode, enabling simultaneous execution of prediction tasks for all positions within the dynamic length span, effectively improving data processing efficiency and reducing information lag issues caused by temporal dependencies.

[0058] Parallel generation of predicted values ​​for all locations typically involves the following steps: First, obtain the start and end position indices for a dynamic length span, and generate a position index sequence based on this range. This sequence lists all specific positions within the span. Second, for each position in the position index sequence, extract the corresponding position encoding information. This information reflects the sequence attributes or spatial information of the position; common implementations include using position encoding algorithms or mapping matrices. Simultaneously, extract hidden feature fragments corresponding to the position index sequence from the hidden representation. These fragments contain the feature representation and structural information of the current position in the global sequence. Then, concatenate the position encoding information and the hidden feature fragments to generate enhanced position features. These features integrate positional and data representation information, enhancing data correlation and contextual understanding during the prediction process. The enhanced position features are then fed into a parallel prediction network, which can employ deep learning structures such as self-attention networks, convolutional networks, or feedforward networks. This network uses the enhanced position features to generate the original prediction distribution. Finally, by performing a sampling operation from the original prediction distribution, the predicted values ​​for all locations within the dynamic length span are obtained. The output format of the predicted values ​​can be set according to specific business needs, supporting multiple formats such as classification probability, regression values, or symbolic labels.

[0059] The start and end indexes of a dynamic length span can be obtained through index calculation. Combined with the subscript system of the sequence structure, the span range can be quickly located. The position index sequence is generated using an incremental calculation method to avoid traversal operations and improve computational efficiency. The extraction of position encoding information can be achieved by combining sine and cosine encoding, absolute position embedding, or learnable position vectors to ensure the completeness of position information representation and consistency with the data structure. The acquisition of hidden feature fragments can be achieved by locating the corresponding region in the hidden representation through the sequence structure index, and matrix slicing operations are used to efficiently extract the target data range.

[0060] In the process of enhancing location feature generation, matrix concatenation, vector concatenation, or feature fusion modules are used to jointly express location encoding information and hidden feature fragments, ensuring that the input features contain both location and content information. The design of the parallel prediction network is selected based on specific business needs and system performance requirements. It can adopt multi-layer feedforward networks, self-attention networks with attention mechanisms, or efficient inference modules based on convolutional structures, supporting batch input, parallel computing, and high-throughput data processing modes.

[0061] The generation of the original prediction distribution is based on probabilistic modeling methods. By using parameterized distribution representation or neural network output probability space, the prediction results are expressed probabilistically and interpretably. During the sampling process, maximum probability selection, random sampling, or temperature-controlled sampling strategies are adopted in combination with distribution characteristics to ensure a balance between the diversity of representation and the stability of results. Finally, the predicted values ​​for all positions within a dynamic length span are output.

[0062] Example: In the healthcare business, by generating predicted values ​​for all locations in parallel over a dynamic length span, it is possible to quickly predict patients' vital signs over different time periods, such as inferring heart rate, blood pressure, and blood oxygen levels at multiple time points in parallel. This helps with real-time health monitoring and early disease warning, improving the response speed of medical services and the efficiency of data utilization.

[0063] In the fintech business sector, this approach enables the parallel prediction of risk indicators, credit scores, or market behavior trends across multiple transaction nodes within a dynamic length span. It is suitable for high-frequency data analysis and risk management in financial transaction systems, effectively enhancing the real-time predictive capabilities and decision-making efficiency of financial data processing systems.

[0064] This embodiment overcomes the time dependency limitations of traditional sequence processing modes by generating predicted values ​​for all positions in parallel over a dynamic length span, significantly improving data processing efficiency, reducing sequence inference latency, and enhancing the system's parallel processing capabilities. Simultaneously, by combining positional encoding information with the joint representation of hidden feature fragments, it enhances the prediction results' understanding of sequence position and contextual information, optimizing the prediction accuracy and representational completeness of sequence data, and meeting the requirements for efficient and accurate sequence data processing.

[0065] S40, identify the leftmost position index within the dynamic length span, and retain the predicted value corresponding to the leftmost position index;

[0066] In this embodiment, the dynamic length span is a sequence range determined based on the current time step value and the hidden representation. This range contains multiple position indices, which are used to identify each specific data position in the sequence structure. These indices are typically represented by integer or relative position codes to ensure the distinguishability and orderliness of each position within the sequence. Identifying the leftmost position index within the dynamic length span refers to determining the earliest physical position index in the sequence structure within that span by sorting or comparing the position index values. The determination of the leftmost position index is based on the sequence indexing system, typically using the index value as a reference standard. The smaller the index value, the earlier the position, reflecting the temporal, spatial, or structural order of the sequence.

[0067] The process of identifying the leftmost position index involves first extracting all position indices within a dynamic length span to construct a position index set, which comprehensively lists the index values ​​corresponding to each position within the span. Then, a scanning operation is performed on each index value in the position index set. This scanning operation can employ methods such as traversal, sorting, and comparison to systematically obtain the specific numerical representation of each index value. Based on the scanning results, further numerical comparisons are performed to identify the smallest index value in the set; the specific position corresponding to this index value is the leftmost position index.

[0068] Retaining the predicted value corresponding to the leftmost index means extracting and storing the predicted value generated at that index position separately from the entire set of predicted values. This retention operation can be implemented through memory writes, data structure updates, or persistent storage, ensuring the availability and stability of the predicted value in subsequent data processing. This process emphasizes retaining only the predicted value corresponding to the leftmost index to avoid data redundancy and resource waste, while providing the necessary data foundation for the recursion, accumulation, and output of sequence data.

[0069] Extracting all location indices for a dynamic length span can be achieved by traversing the index sequence or calculating the start and end indices of the span, combined with an incremental calculation method, to quickly form a set of location indices. During the scanning of the location index set, sequential scanning, minimum value search, or sorting optimization strategies are employed to improve the efficiency and accuracy of index comparison. The determination of the minimum index value can be based on standard numerical comparison operations to ensure the uniqueness and stability of the identification results.

[0070] In retaining the predicted value corresponding to the leftmost index, the system first locates the specific position of that index within the entire set of predicted values. Then, combining this location with the mapping relationship or index table structure, it accurately extracts the corresponding predicted value. The retention operation supports various data structures, including arrays, linked lists, hash tables, or database tables, allowing for the selection of an appropriate storage structure based on system performance requirements. The retained predicted values ​​can be stored in a dedicated dataset, cache, or output buffer, ensuring data orderliness, traceability, and efficient retrieval capabilities.

[0071] Example description: In the field of healthcare, the system identifies the leftmost position index within a dynamic length span and retains the predicted value corresponding to that position. This is suitable for multi-time period vital sign monitoring scenarios. The system can accurately extract key physiological indicators at the earliest time point, assisting doctors or the system in real-time diagnosis, early intervention, or data trend analysis, and ensuring the timeliness and reliability of patient health management.

[0072] In the fintech business, this approach can accurately retain the prediction results of the earliest node in the time series after predicting risk data or market indicators of multiple trading nodes in parallel. This facilitates the financial risk control system to quickly capture market anomalies, deploy risk control measures in advance, and improve the real-time response capability of the financial data processing system and the timeliness of the prediction data.

[0073] This embodiment identifies the leftmost position index within a dynamic length span and retains the corresponding predicted value, ensuring the orderliness and structural integrity of the output data in sequence data processing, effectively avoiding the risk of sequence position disorder or data duplication. This process combines positional information in the sequence structure with predicted value representation, improving the accuracy of sequence inference and data utilization efficiency. It helps to build an efficient and stable sequence generation and recursion mechanism, optimizing the overall sequence data generation logic and quality control capabilities.

[0074] S50, determine whether sequence generation is complete;

[0075] In this embodiment, determining whether sequence generation is complete means that after retaining the leftmost position index within the current dynamic length span each time, the system needs to check the overall generation status of the sequence data to confirm whether the set termination conditions or data integrity standards have been met. The judgment criteria include comparing the time step value with the maximum sequence length. If the current time step value reaches or exceeds the set maximum sequence length, it indicates that the sequence generation process is complete. Alternatively, data content checks can be combined, such as monitoring whether specific termination markers, boundary symbols, or structural features appear in the generated data, as criteria for determining the completion of sequence generation.

[0076] During the process of determining whether sequence generation is complete, the current time step value is first read and compared with the system's preset maximum sequence length parameter. If the current time step value is less than the maximum length, it indicates that sequence generation has not yet ended; if the time step value reaches or exceeds the maximum length, it indicates that sequence generation has met the termination condition. Furthermore, the system can be designed with a termination marker detection mechanism, introducing special termination symbols or end markers into the data structure. Through data parsing and structure checks, the system determines whether a valid termination signal appears in the sequence, assisting in the comprehensive judgment of the sequence generation status.

[0077] Example: In the healthcare field, determining whether sequence generation is complete can be used in real-time health monitoring systems to progressively collect and generate physiological data according to a time sequence. This ensures that the health data structure at each time point is complete and the order is clear, which helps to continuously monitor the patient's condition, detect abnormal trends in advance, and achieve intelligent health management and medical early warning.

[0078] In the fintech business sector, by combining this approach, financial systems can gradually generate market trends, risk indicators, or transaction forecast data based on the recursion of time step values, dynamically judge the progress of sequence generation, ensure the temporal continuity and logical integrity of forecast results, help financial decision-making systems respond to market changes in real time, and improve the accuracy and timeliness of risk identification and data forecasting.

[0079] This embodiment achieves strict time control and progress management of the sequence data generation process by determining whether sequence generation is complete, ensuring the orderliness of data position recursion and the integrity of the sequence structure. This process improves the efficiency and accuracy of data generation by dynamically advancing the time step and monitoring the sequence status in real time, reducing the risk of sequence structure disorder, data generation interruption, or position overwriting. This helps to build a stable, efficient, and controllable sequence data generation mechanism, improving the overall system's data processing capabilities and output reliability.

[0080] S60, when the sequence generation is not complete, repeat the steps of updating the current time step value, determining the updated dynamic length span based on the updated current time step value, generating the predicted value of all positions within the updated dynamic length span, and identifying and retaining the predicted value corresponding to the leftmost position index within the updated dynamic length span, until the sequence generation is complete;

[0081] In this embodiment, the incomplete sequence generation indicates that, based on the preceding judgment process, the current time step value has not yet reached the maximum length limit of the entire sequence, or no marker satisfying the termination condition has been detected in the data structure, and the system needs to continue to advance the sequence data generation process.

[0082] The process of repeatedly updating the current time step value is performed. The current time step value represents the time progression parameter during the generation or inference of sequence data, used to control the generation rhythm and processing progress of each data position within the sequence structure. Updating the current time step value means generating a new time step value after each data processing loop, based on the existing time step value, through addition, increment, or dynamic adjustment, for use as a time reference for the next data processing. Updating the time step value ensures that the sequence data generation process has the characteristics of linear progression, structural increment, and positional order, avoiding time chaos or positional duplication during data generation.

[0083] The current time step value can be updated through simple numerical addition. By setting a fixed increment parameter, the existing time step value is added to the increment to generate a new time step value. If a dynamic adjustment method is adopted, it can be combined with the system's real-time monitoring module to adjust the specific value of the increment parameter according to the data quality, system load, or external control signals during the sequence generation process, thereby achieving flexible time step management.

[0084] Repeated execution determines the updated dynamic length span based on the updated current time step value and the hidden representation. This means that during the sequence generation process, the system combines the latest time step value and the hidden representation to recalculate the range of data that should be generated. The dynamic length span corresponds to a specific location segment in the data sequence and is usually defined by the minimum span boundary value and the maximum span boundary value.

[0085] The updated current time step value is obtained through the preceding time progression process. Its hidden representation is the overall feature abstraction result of the sequence data, including the input sequence structure, contextual information, and data representation features. These two elements together determine the specific range of the updated dynamic length span. The process of determining the dynamic length span involves data location, structural feature extraction, and interval boundary calculations, ensuring that each data-generated interval is adaptive and specific, avoiding positional overlap or data loss.

[0086] Repeatedly generating predicted values ​​for all positions within the updated dynamic length span in parallel refers to the system synchronously generating predicted values ​​for all data positions within a defined interval, based on hidden representations and positional encoding information, using a parallel computing mechanism to improve the overall efficiency and coverage of data generation. Identifying the leftmost position index within the updated dynamic length span refers to the system determining the specific position with the smallest position index value within the current interval through scanning, comparison, and sorting. This position typically corresponds to the logically leading structural unit in the data sequence.

[0087] Repeatedly identifying and retaining the predicted value corresponding to the leftmost position index within the updated dynamic length span means that the system extracts the corresponding predicted value for the identified leftmost position index and includes it in the retained predicted value set. This serves as an important component for subsequent data structure generation, sequence assembly, and overall output. Through this process, the system can continuously and recursively generate data segments even before sequence generation is complete, gradually expanding the generated sequence content until the conditions for overall generation completion are met.

[0088] In practical applications, the system first monitors the sequence generation status and determines the relationship between the time step value and the maximum sequence length. If the time step value has not reached the upper limit, or if no termination marker appears in the sequence structure, the system enters a repetitive execution process. The system updates the current time step value, and then, through the combination of the time step value and the hidden representation, uses position mapping, feature decoding, and interval boundary calculation algorithms to dynamically determine the current interval span to be generated. The interval boundary value can be calculated using methods such as fixed step increment, dynamic adaptation adjustment, or inference based on the sequence structure to ensure that the dynamic length span reasonably covers the position to be generated.

[0089] Based on the interval range, the system extracts location encoding information and hidden representation features. Employing parallel inference and batch processing mechanisms, it synchronously generates predicted values ​​for all locations within the dynamic length span. The generated results are temporarily stored in a built-in data structure caching module for easy subsequent location and retention operations. The system scans the predicted value set, compares the location indices within the interval, and identifies the leftmost location index based on its location number or logical order, locating its corresponding predicted value data.

[0090] The retention operation is implemented through the data set management module. The system stores the predicted value corresponding to the leftmost index into the retained predicted value set and updates the data cache status for use in subsequent sequence data assembly, structure synthesis, and overall output. This process is executed cyclically until the system detects that the sequence generation meets the completion conditions, then exits the loop and enters the next stage of data structure processing or sequence optimization.

[0091] Example Description: In the healthcare business field, intelligent voice systems, targeting health consultation, remote diagnosis, or assisted diagnosis scenarios, dynamically determine the speech content generation interval by combining the updated time step value and hidden representation. The system controls the generation range of each round of speech segments through this interval, and synchronously generates predicted values ​​for all positions within the interval based on a parallel generation strategy. Combining the identified leftmost position index, only the prediction results with the highest semantic integrity and positional priority in this round of generation are retained, avoiding duplicate output or logical misalignment issues. This ensures that health speech content is generated gradually, clearly, and orderly until it meets the requirements of speech data structure integrity, thereby improving the accuracy and efficiency of medical information transmission.

[0092] In the fintech business field, for investment advisory systems using intelligent speech synthesis, the system dynamically divides financial information broadcast intervals using updated time step values ​​and hidden representations, controls the data output position in each round, obtains all candidate predicted values ​​within the interval through a parallel generation process, and then, combined with leftmost position index recognition, selects the first highest priority effective information within the current interval, retains the predicted value corresponding to this information and incorporates it into the overall speech sequence. The system executes this process cyclically until the overall broadcast sequence is generated, ensuring that the financial data broadcast content generation process has positional continuity, information integrity and output efficiency, meeting the strict requirements for voice data stability and generation rhythm in high-frequency financial business scenarios.

[0093] This embodiment, by repeatedly executing the operation of determining the updated dynamic length span based on the updated current time step value and hidden representation until the predicted value corresponding to the leftmost position index within the updated dynamic length span is retained while the sequence generation is incomplete, can achieve dynamic expansion, progressive generation, and structural optimization of sequence data. This improves the continuity, positional order, and structural integrity of the data generation process, avoids problems such as missing data positions, sequence breaks, or redundant overlaps, and enhances the reliability, accuracy, and efficiency of the system's data output. It is suitable for large-scale, highly complex sequence data generation tasks and meets the comprehensive requirements for data structure integrity and generation efficiency in different scenarios.

[0094] S70, accumulate all retained predictions to form the initial sequence data;

[0095] In this embodiment, all retained predicted values ​​are accumulated to form initial sequence data. This involves combining the retained predicted values ​​from the previous generation process into a complete dataset in a structured and temporally ordered manner, serving as the foundational information source for subsequent data optimization and generation steps. Accumulation means forming a continuous set of data content by aggregating stored predicted values. This process ensures the consistency and continuity of data in terms of positional order, time step, and semantic structure. The retained predicted values ​​are data units determined by dynamic length span and filtered and stored by the leftmost position index during the previous generation process. They are typically expressed as vectors, tags, symbols, or other structured numerical values, representing the content information at each time position in the generated sequence. During the accumulation process, the system sorts each predicted value according to the time step value or position index value, ensuring that the internal order of the dataset corresponds to the original input sequence or the time logic set by the system. After sorting, all predicted values ​​are uniformly converted into a specific sequence data expression form to form initial sequence data. This data can be an encoded sequence, a semantically labeled sequence, a structurally labeled sequence, or other sequence information set with continuity and scalability, facilitating subsequent parallel optimization, structural reconstruction, or high-level information generation operations based on this sequence. The entire process emphasizes the consistency, temporality, and structural integrity of data accumulation, ensuring the complete output of initial sequence data in terms of logical links, information expression, and format standards.

[0096] In the specific implementation process, all retained predicted values ​​can be sorted and aggregated based on the time step value order, position index sequence, or semantic relevance order, improving the structural integrity and logical clarity of the sequence data. Each retained predicted value can be stored using a hash mapping structure, dynamically constructing an ordered set according to the time step or position index to avoid position duplication or omission, ensuring consistency between the accumulated sequence structure and the generation logic. In different production environments, if the predicted value data type is a numerical symbolic sequence, an array structure can be used to directly accumulate and generate the initial sequence data. If the predicted value contains high-dimensional semantic features or contextual structure information, data transformation and combination can be performed using structured lists, tensor matrices, or encoded mapping sequences to ensure that the initial sequence data has good structural expressiveness and compatibility with subsequent operations. Furthermore, marker verification logic can be embedded during the sequence accumulation process to detect sequence continuity, structural integrity, and the validity of predicted values, preventing data loss or erroneous accumulation from affecting the subsequent generation process.

[0097] Through the above steps, this embodiment can fully accumulate all retained prediction values ​​without destroying the data structure and logical order, forming initial sequence data with continuity, temporal order and structural integrity. This provides a unified and accurate data foundation for subsequent parallel optimization and overall sequence generation, effectively improving the stability and structural expressiveness of the overall data generation process.

[0098] S80, the initial sequence data is optimized through a non-autoregressive process to generate the target sequence data.

[0099] In this embodiment, the initial sequence data is optimized through a non-autoregressive process to generate the target sequence data. This involves performing parallel updates, batch optimizations, and overall reconstruction operations on uncertain or low-quality parts of the initial sequence data, based on overall structural information, contextual features, and global data consistency requirements, without relying on single-step recursive reasoning. The non-autoregressive process refers to the system's approach during sequence generation or optimization. Instead of sequentially iterating the output of individual positions according to time steps, it utilizes the global features, contextual structural information, and latent semantic relationships of the overall sequence data to directly compute and optimize the content of multiple positions in parallel, improving generation efficiency and overall data quality. The initial sequence data is a continuous data sequence accumulated in previous generation steps, typically including labels, symbols, encoding vectors, or other structural information to express the basic content and structural framework of the sequence data. During optimization, the system first scans the content of each position in the initial sequence data, combining global contextual features and internal sequence structural information to identify parts with low confidence, unclear semantic logic, or incomplete structural expression, forming a low-confidence label set. Based on the overall sequence structure and contextual features, the system optimizes and updates the content in the low-confidence marker set. This optimization includes operations such as replacement, reconstruction, adjustment, and enhancement, ensuring the consistency and integrity of the optimized sequence in terms of structural logic, information expression, and overall quality. After optimization, the system merges the updated content with the high-confidence portion of the initial sequence data to form optimized sequence data. Finally, the optimized sequence data undergoes structural integration, format conversion, and standard output to generate the target sequence data. The target sequence data possesses a complete sequence structure, clear semantic expression, and stable content quality, and can serve as the foundation data for subsequent data output, speech generation, or other system function calls.

[0100] In different production environments, non-autoregressive processes can optimize the overall sequence based on parallel neural network architectures, graph structure computations, or fully connected models. For short-structured initial sequence data, matrix operations can be used to batch process low-confidence markers at all positions, improving overall optimization efficiency. For initial sequence data containing complex contextual information or strong cross-positional correlations, the system can introduce self-attention mechanisms or global context-aware units to dynamically capture deep correlation information between different positions in the sequence, ensuring data consistency and logical accuracy during the optimization process. During the identification of low-confidence marker sets, confidence thresholds, content verification rules, or semantic consistency standards can be set to dynamically filter out the content at positions requiring optimization, avoiding unnecessary redundant calculations. During optimization, the system can choose different techniques such as parameter updates, semantic completion, structural enhancement, or numerical reconstruction according to specific business needs, ensuring that the optimized sequence data fully meets the requirements in terms of semantic expression, structural logic, and system standards, generating stable and complete target sequence data.

[0101] Example Description: In the healthcare business field, for the initial sequence data in a multi-turn voice interaction system, overall parallel optimization is achieved through a non-autoregressive process. Specifically, the system acquires continuous voice or text data input by the patient, combines contextual information and sequence structure features, automatically identifies locations where information is unclear, logically incoherent, or incomplete, and directly optimizes uncertain content through a parallel update mechanism. This ensures that the optimized sequence has stable expression logic and accurate health information output, effectively improving the data quality and interaction efficiency of the voice question-and-answer system in medical consultation, health monitoring, or assisted diagnosis scenarios.

[0102] In the fintech business, for real-time speech synthesis or intelligent broadcasting systems, the initial sequence data is optimized as a whole through a non-autoregressive process. Specifically, when the system processes multiple financial data broadcasts in parallel, it quickly filters out the positions in the data sequence with low confidence or ambiguous expressions, and directly corrects the inaccurate parts by combining global context information. This avoids the broadcast delay and content loss caused by traditional single-step recursive reasoning, and ensures stable output of the optimized sequence in terms of structural integrity and logical consistency. This meets the needs of efficient data generation and high-quality information delivery in high-frequency trading information broadcasting, financial data interpretation, or multilingual simultaneous release.

[0103] Through the above steps, this embodiment can optimize the initial sequence data in parallel based on a non-autoregressive mechanism without damaging the overall data structure. This effectively improves the sequence generation efficiency, enhances the overall data quality and clarity of expression, avoids the efficiency bottleneck and structural discontinuity problems in traditional recursive optimization, and finally generates target sequence data with complete structure, stable logic and high-quality content, meeting the stringent requirements of subsequent high-standard data output and system function calls.

[0104] This invention relates to the field of speech processing technology and can be applied to business scenarios such as fintech and healthcare. It discloses a non-autoregressive optimized data sequence processing method, apparatus, device, and medium, comprising: receiving an input sequence and encoding it to generate a hidden representation; initializing the current time step value; determining a dynamic length span based on the current time step value and the hidden representation; generating predicted values ​​for all positions within the dynamic length span in parallel; identifying the leftmost position index within the dynamic length span and retaining the corresponding predicted value; determining whether sequence generation is complete; if sequence generation is incomplete, repeatedly performing the operations of updating the current time step value, determining the updated dynamic length span based on the updated current time step value and the hidden representation, and retaining the predicted value corresponding to the leftmost position index within the updated dynamic length span; accumulating all retained predicted values ​​to form initial sequence data; and optimizing the initial sequence data through a non-autoregressive process to generate target sequence data. This invention, by combining dynamic time step updates and dynamic length span control with parallel prediction and non-autoregressive optimization processes, improves the efficiency of speech sequence generation while enhancing the naturalness and coherence of the speech.

[0105] In one embodiment, step S10 includes:

[0106] S101, Receive the input sequence and divide the input sequence into multiple consecutive word units to form a word unit sequence;

[0107] S102, map each lexical unit to the embedding space to generate an initial embedding vector;

[0108] S103, Add positional encoding to each initial embedding vector to form a position-enhanced embedding vector;

[0109] S104, The position-enhanced embedding vector is input into the encoder network to generate the first layer of encoder hidden states;

[0110] S105, input the hidden state of the first layer encoder into the subsequent encoder layer to generate the hidden state of the multi-layer encoder;

[0111] S106, aggregate hidden states are generated by aggregating the hidden states of the multilayer encoder through residual connections, and the aggregate hidden states are subjected to layer normalization processing to generate hidden representations.

[0112] In this embodiment, an input sequence is received. The input sequence can be any type of symbol sequence, specifically including text information, speech-to-text content, tag data, semantic encoding results, or other structured and unstructured information sets. Each unit in the input sequence can be a character, subword, phoneme, word, or other semantic unit. The input sequence is divided into multiple consecutive word units. A word unit represents a basic component in the input sequence that has independent encoded meaning. The division process can be based on predefined rules, subword segmentation algorithms, or word segmentation models to decompose the original input sequence into a continuous and complete sequence of word units, ensuring that subsequent mapping steps have clear boundaries.

[0113] Each lexical unit is mapped to an embedding space to generate an initial embedding vector. The embedding space is a low-dimensional continuous space. The mapping process converts discrete symbolic information into a fixed-length numerical vector by looking up the vocabulary, parameter matrix indexing, or other transformation methods. The initial embedding vector contains the basic semantics of the lexical unit and some contextual information. The number of dimensions is flexibly set according to system configuration and application requirements. Positional encoding is added to each initial embedding vector. Positional encoding is used to introduce the positional information of each lexical unit in the sequence. Common methods include sine and cosine function encoding, learnable positional parameters, or relative positional encoding. The positional information is combined with semantic information to form a position-enhanced embedding vector, ensuring that the encoder has sequence order awareness capabilities.

[0114] The location-enhanced embedding vector is input into the encoder network to generate the first layer of encoder hidden states. The encoder network typically employs a self-attention structure or other deep learning network architecture. The first layer of encoder hidden states contains local contextual information and basic feature extraction results. The first layer of encoder hidden states is then input into subsequent encoder layers to generate multi-layer encoder hidden states. Subsequent encoder layers process these hidden states sequentially in a stacked structure, extracting deeper sequence features and global contextual information layer by layer. The multi-layer encoder hidden states integrate sequence representation capabilities from different levels. Residual connections are used to aggregate the multi-layer encoder hidden states to generate aggregated hidden states. Residual connections introduce skip paths in each layer, mitigating the gradient vanishing problem and enhancing the deep feature fusion effect. The aggregated hidden states integrate multi-layer feature information and possess stable expressive power. Layer normalization is applied to the aggregated hidden states to generate hidden representations. Layer normalization eliminates scale differences between different dimensions by standardizing the values ​​of each unit, improving the stability of sequence features and the overall expressive power of the model. The hidden representation serves as a high-order semantic representation of the sequence, used by subsequent modules.

[0115] This embodiment divides the input sequence into continuous lexical units, ensuring clear semantic unit boundaries and avoiding information confusion in subsequent mapping processes. Combined with embedding space mapping and positional encoding, the system further introduces sequence positional information while preserving the semantic information of lexical units, enhancing sequential modeling capabilities. The encoder network, with its multi-layer stacked structure and residual connection design, improves the depth of sequence feature extraction and the level of contextual information fusion. Layer normalization effectively enhances the model's stability and adaptability to different sequence inputs. Overall, it achieves a stable, continuous, and high-quality hidden representation of the input sequence, providing an accurate and reliable sequence representation foundation for subsequent processing and ensuring the integrity and structural expressiveness of sequence information.

[0116] In one embodiment, step S20 above includes:

[0117] S201, initialize the current time step value to zero;

[0118] S202, locate the corresponding segment in the hidden representation according to the current time step value, and form a time step corresponding hidden segment;

[0119] S203, extract the time feature vector of the hidden segment corresponding to the time step;

[0120] S204, determine the span length parameter of the time feature vector, and generate a dynamic length threshold based on the span length parameter;

[0121] S205, determine the minimum span boundary value and the maximum span boundary value based on the dynamic length threshold;

[0122] S206, determine the dynamic length span based on the minimum span boundary value and the maximum span boundary value.

[0123] In this embodiment, the current time step value is initialized to zero. This process is completed through the system's built-in variable initialization operation. Specifically, the preset time step value variable is stored in the cache or register of the control module. When the system starts the sequence generation task, this variable is directly assigned the value of zero. The initialization action is completed in the task scheduling unit through software instructions or hardware control logic, ensuring that all subsequent positioning and calculations based on the time step value start from zero, thus avoiding accumulated errors.

[0124] The system locates the corresponding segment in the hidden representation based on the current time step value. The hidden representation is typically stored as a multi-dimensional matrix structure, with dimensions including sequence length and the number of hidden layer channels. The time step value corresponds to the time index of the sequence. The location operation extracts the continuous segment corresponding to the time step value from the matrix using a matrix indexing function. In the implementation, the starting position of the extraction window is set to the current time step value, and the window size is dynamically set according to system parameters or sequence structure. Memory slicing operations are called to directly obtain the hidden segment corresponding to the time step, avoiding redundant calculations and multiple memory reads.

[0125] Extracting the temporal feature vector of the hidden segment corresponding to the time step can be achieved in ways including but not limited to the following: global average pooling can be used to calculate the mean of all feature channels of the hidden segment corresponding to the time step, compressing it into a fixed-dimensional temporal feature vector; alternatively, a one-dimensional convolutional or feedforward neural network module can be used to learn and extract key temporal patterns in the segment to form a temporal feature vector; if the sequence has multi-scale characteristics, multiple layers of pooling or transformation operations can be superimposed to enhance the temporal feature representation capability.

[0126] The span length parameter of the temporal feature vector is determined, and a dynamic length threshold is generated. In the specific implementation, the temporal feature vector is input to a dedicated length prediction subnetwork, which can be composed of a multilayer perceptron (MLP), an attention mechanism, or a graph neural network, and outputs a scalar span length parameter. During the generation of the dynamic length threshold, lookup table mapping, normalization transformation, or nonlinear activation functions are typically used to map the span length parameter to a dynamic length threshold that conforms to the constraints of the actual sequence structure, preventing the span from exceeding the sequence boundaries or falling below the system-set minimum value.

[0127] The minimum span boundary value and the maximum span boundary value are determined based on a dynamic length threshold. Specifically, the minimum span boundary value is determined by subtracting a portion of the dynamic length threshold from the current time step value, and the maximum span boundary value is determined by adding another portion of the dynamic length threshold to the current time step value. The implementation path can be as follows:

[0128] First, the dynamic length threshold can be divided into upper and lower bound components, for example, allocated to the minimum span adjustment amount and the maximum span adjustment amount respectively according to a fixed ratio or dynamic weight;

[0129] Second, considering sequence boundary constraints, the minimum span boundary value is calculated using the following expression:

[0130] Minimum span boundary value = max(0, current time step value - floor(dynamic length threshold × α));

[0131] Maximum span boundary value = min(maximum index of sequence, current time step value + ceil(dynamic length threshold × β))

[0132] Here, α and β are system-preset or dynamically calculated scaling factors to ensure that the flexible adjustment of the span boundary meets the sequence boundary conditions, and the max and min operations prevent exceeding the sequence index range.

[0133] The dynamic length span is determined based on the minimum and maximum span boundary values. Specifically, the difference between these two values ​​plus one (considering interval closure) is used as the dynamic length span value. Simultaneously, the interval range is recorded for subsequent sequence segment extraction and parallel processing. This ensures that each sequence processing operation is flexibly adjusted based on the latest dynamic span range, adapting to changes in sequence structure at different time points. The entire process is implemented through efficient matrix operations or indexing operations, ensuring the system's computational efficiency and response speed in actual operation.

[0134] This embodiment ensures that the sequence processing starts from a unified position by initializing the time step value. Combined with location-based hidden representation, extraction of temporal feature vectors, and a dynamic length adjustment mechanism, it can adaptively adjust the sequence processing range based on the actual information density and contextual features of the sequence content, avoiding information redundancy or omissions caused by fixed-length strategies. The dynamic length span is flexibly generated based on semantic features, effectively improving the efficiency of sequence processing and the completeness of contextual information coverage. It ensures the rationality of the data processing range at different time positions, enhancing the system's adaptability and information expression effect in complex sequence scenarios.

[0135] In one embodiment, step S30 above includes:

[0136] S301, determine the start position index and end position index of the dynamic length span, and generate a position index sequence based on the start position index and end position index;

[0137] S302, extract the location encoding vector of each location index in the location index sequence, and extract the location feature fragment corresponding to the location index sequence from the hidden representation;

[0138] S303, concatenate the position encoding vector and the position feature fragment to generate enhanced position features;

[0139] S304, The enhanced location features are input into the parallel prediction network to generate the original prediction distribution;

[0140] S305, Sample from the original prediction distribution to generate predicted values ​​for all locations within the dynamic length span.

[0141] In this embodiment, the start and end position indices of the dynamic length span are determined. The dynamic length span originates from the interval range information generated in the preceding steps. The start position index is the starting point of the dynamic length span interval, typically the minimum span boundary value after boundary constraints. The end position index is the ending point of the dynamic length span interval, derived from the corresponding maximum span boundary value. Both are represented using standard integer indices, and their range is limited to the valid position indices of the input sequence. Based on these start and end position indices, a position index sequence is formed through sequential traversal or index interval generation. Specifically, this sequence is a set of continuous or partially sparse discrete integer indices that completely covers all positions corresponding to the dynamic length span, avoiding position omissions or out-of-bounds errors.

[0142] The system extracts the position encoding vector for each position index in the position index sequence. This vector provides relative or absolute position information for each position in the sequence. Common implementations include, but are not limited to, sine and cosine function encoding, learnable position embedding vectors, or hybrid position encoding structures. The dimension of the position encoding vector is consistent with the feature dimension of the hidden representation or matched through a linear mapping transformation to ensure dimensionality consistency in subsequent feature concatenation operations. Each position index in the position index sequence is associated with a predefined position encoding matrix through a mapping function, quickly obtaining the corresponding position encoding vector, avoiding multiple calculations, and improving the overall system efficiency.

[0143] Positional feature fragments corresponding to the position index sequence are extracted from the hidden representation. The hidden representation is generally a multi-dimensional matrix structure that records the deep feature representation of the sequence input. The extraction process of positional feature fragments adopts a matrix index slicing method. Based on each index position recorded in the position index sequence, the corresponding feature vector is extracted from the hidden representation one by one to form a set of positional feature fragments. The dimensional structure of the positional feature fragments is compatible with the position encoding vector to ensure that the two can be effectively fused.

[0144] Enhanced positional features are generated by concatenating positional encoding vectors and positional feature fragments. The concatenation operation is typically based on the feature channel dimension. Specifically, it involves cascading the individual positional encoding vector corresponding to each position index with the corresponding positional feature fragment along the feature dimension to form the enhanced positional feature after dimensional expansion. This enhanced positional feature simultaneously incorporates sequence positional information and deep feature representation, possessing stronger spatial adaptability and contextual awareness, thus providing richer input feature support for subsequent parallel prediction.

[0145] The enhanced location features are input into a parallel prediction network to generate the original prediction distribution. The parallel prediction network structure can be designed using a one-dimensional convolutional network, a feedforward neural network, an attention mechanism network, or a combination thereof. The overall structure has the ability to process multiple sequence location data simultaneously. The input is a complete set of enhanced location features, and the output is the original prediction distribution corresponding to the number of locations within a dynamic length span. The structural form of the original prediction distribution depends on the specific task requirements. For example, for classification tasks, the original prediction distribution can be represented as probability values ​​for each category; in continuous numerical prediction tasks, the original prediction distribution can be represented as a parameterized probability density distribution or confidence interval.

[0146] The system samples predicted values ​​for all positions within a dynamic length span from the original prediction distribution. The sampling process can employ diverse strategies, including random sampling, deterministic sampling, maximum probability selection, or temperature-controlled sampling. The generated predicted values ​​correspond to the final output results for each position within the dynamic length span, possessing controllable randomness and expressive flexibility that conform to the statistical characteristics of the original prediction distribution. The generated set of all positional predicted values ​​is directly used for subsequent sequence updates, optimal position selection, or final output, ensuring the continuity and efficiency of the parallel prediction process.

[0147] The entire process, through the sequential execution of the above steps, ensures that all positions within the dynamic length span can generate predicted values ​​synchronously during a single inference process, significantly improving sequence generation efficiency and system inference speed, while providing basic data support for the local flexibility and global consistency of the sequence.

[0148] This embodiment utilizes a parallel generation mechanism within a dynamic length span, combining the collaborative processing of position index sequences, position encoding vectors, and position feature fragments. This enables simultaneous generation of predicted values ​​for all positions within the dynamic length span, avoiding the efficiency bottleneck of traditional step-by-step sequence generation methods. The introduction of position encoding vectors enhances the spatial representation of the prediction results, strengthens the concatenation of positional features, ensures the effective fusion of sequence positional information and deep feature representation, and optimizes the completeness of input feature representation. The parallel prediction network design significantly shortens the overall sequence generation time. The flexible sampling strategy of the original prediction distribution balances the accuracy and diversity of the prediction results, further improving the system's generation efficiency and prediction quality, meeting the application requirements of scenarios needing rapid, batch generation of sequence data.

[0149] In one embodiment, step S40 above includes:

[0150] S401, Extract all position indices within the dynamic length span to form a position index set;

[0151] S402, Scan the location index values ​​in the location index set and compare the numerical values ​​of the location index values ​​to determine the minimum index value;

[0152] S403, identify the position index corresponding to the minimum index value as the leftmost position index;

[0153] S404, locate the predicted value corresponding to the leftmost position index as the target predicted value, and add the target predicted value to the set of retained predicted values.

[0154] In this embodiment, extracting all position indices within a dynamic length span to form a position index set means obtaining a unique position index value corresponding to each position within a defined dynamic length span. These position index values ​​are numbered according to their physical location or sequence location. The composition of the set ensures that it covers all positions within the current dynamic length span, forming a structured index set. The position index set can be organized using various data structures such as arrays, linked lists, and tensors to ensure efficient execution of subsequent scanning and comparison operations.

[0155] The minimum index value is determined by scanning the location index set and comparing the numerical values. This is done by traversing all location indices in the set, reading each index value sequentially, comparing each pair of values, and retaining the index value with the smallest value. The comparison operation typically employs linear traversal or parallel computation to improve the efficiency of finding the minimum value with large-scale location index sets and ensure real-time requirements.

[0156] Identifying the position index corresponding to the minimum index value as the leftmost position index means locating the position index that matches the determined minimum index value in the set of position indices, and confirming it as the leftmost position index within the dynamic length span. The determination of the leftmost position index is strictly based on the principle of minimum index value, ensuring that the corresponding position is located at the logical starting position within the dynamic length span.

[0157] The prediction value corresponding to the leftmost position index is selected as the target prediction value and added to the reserved prediction value set. This is done by retrieving the prediction value data corresponding to the previously generated prediction value set or prediction value mapping table based on the leftmost position index. The retrieved target prediction value is then stored in the reserved prediction value set. The reserved prediction value set can adopt various data structures such as linked structures, dynamic arrays, or pre-allocated caches, supporting high-frequency data append operations and ensuring that the accumulated reserved prediction values ​​are used for subsequent sequence data construction.

[0158] This embodiment, through the above steps, can accurately and efficiently identify the leftmost position index within a dynamic length span, ensuring that the predicted value at the corresponding position is retained in a timely manner, avoiding information omissions or sequence errors. The location of the leftmost position index combines the position index set with a minimum value criterion, possessing rigorous logical determinism. The dynamic update mechanism for retaining the predicted value set effectively accumulates generated data, improving the completeness and accuracy of the overall sequence data construction, and optimizing data storage and indexing efficiency in the sequence generation task.

[0159] In one embodiment, step S70 above includes:

[0160] S701, Obtain all retained predicted values ​​to form a predicted value set;

[0161] S702, sort the predicted values ​​in the predicted value set according to the time step to form a sorted predicted value sequence;

[0162] S703, the sorting prediction value sequence is converted into sequence tags to form a sequence tag set;

[0163] S704, Add a sequence termination marker to the sequence marker set to form a complete sequence marker set;

[0164] S705, combine the complete sequence marker set to form a sequence data block, and convert the sequence data block into initial sequence data.

[0165] In this embodiment, obtaining all retained predicted values ​​to form a predicted value set refers to centrally organizing all predicted values ​​retained within each dynamic length span according to a data storage structure to form a unified data set. The predicted value set can take the form of an array, linked list, mapping structure, or tensor, ensuring that the set contains all retained predicted values, and that each predicted value has associated time step information or position index information for subsequent sorting and serialization operations.

[0166] Sorting the predicted values ​​in the predicted value set according to their time steps forms a sorted predicted value sequence. This is done by reading the time step information of each predicted value in the predicted value set and sorting them according to the numerical value of the time step. The sorting method can be quicksort, stable sort, or distributed sorting, ensuring that each predicted value in the sorted predicted value sequence is strictly arranged in ascending order of time step or logical position. This operation eliminates the temporal disorder caused by batch retention of predicted values, ensuring the logical coherence and structural integrity of the sequence data.

[0167] Converting a sorted sequence of predicted values ​​into sequence tags, forming a sequence tag set, refers to transforming each predicted value in the sorted sequence into a sequence tag that conforms to the sequence representation standard, based on preset mapping rules, encoding rules, or tag templates. Sequence tags can be numerical codes, character codes, discrete symbols, or structured data units. The formation of the sequence tag set provides a unified representation format for the predicted values, facilitating the subsequent construction and parsing of the sequence data.

[0168] Adding a sequence termination marker to the sequence marker set to form a complete sequence marker set is a special marker added to the end of the sequence marker set or at a specified position, based on the logical requirements of the sequence generation task. The sequence termination marker can be a predefined symbol, a special code, or a structured control field. Adding a termination marker ensures that subsequent data processing systems can accurately determine the boundaries of the sequence, preventing parsing errors or abnormal behavior caused by incomplete data.

[0169] The process of combining complete sequence tag sets into sequence data blocks and converting these blocks into initial sequence data involves assembling all sequence tags from the complete sequence tag set according to the data block organization method. This generates structured, continuous sequence data blocks, which can use fixed-length or variable-length formats to support efficient data access and storage. Subsequently, the sequence data blocks undergo necessary format conversions, encoding adjustments, or structural encapsulation to finally generate initial sequence data. This initial sequence data serves as input data for subsequent optimization, inference, or synthesis processes, possessing a clear logical structure and a stable representation.

[0170] This embodiment, through the above steps, can systematically and efficiently integrate scattered predicted values ​​into ordered and standardized initial sequence data, ensuring that the sequence data possesses logical coherence, structural integrity, and consistent expression. The sorting operation eliminates the problem of out-of-order time steps, the sequence label transformation and the addition of termination labels improve the standardization level of data expression, and the data block combination and format conversion operations optimize the data organization efficiency and ease of use. Overall, this enhances the reliability and applicability of the sequence data in subsequent generation, optimization, and inference processes.

[0171] In one embodiment, step S80 above includes:

[0172] S801, Scan all tags in the initial sequence data and determine the confidence value of each tag;

[0173] S802, identify markers with confidence values ​​lower than a preset threshold as low-confidence markers, and form a low-confidence marker set;

[0174] S803, Extract the global context features of the initial sequence data;

[0175] S804, Modify each tag value in the low-confidence tag set based on the global context features to generate an optimized tag set;

[0176] S805, replace the low confidence markers in the initial sequence data with the corresponding optimization markers in the optimization marker set to form optimized sequence data, and use the optimized sequence data as the target sequence data;

[0177] S806, The target sequence data is input into the vocoder to generate a speech waveform signal.

[0178] In this embodiment, when scanning all markers in the initial sequence data and calculating the confidence value of each marker, the complete initial sequence data is first parsed, and marker information is extracted one by one for each position in the sequence. The marker information includes position index, content encoding, and context-related parameters. For each marker, the confidence value of the marker in its current state is calculated based on the probability distribution generated by the non-autoregressive prediction network. The confidence value can be calculated based on the predicted probability at the time of sequence generation, the confidence interval of cross-validation, the residual score of the model prediction, or a confidence score function generated based on context aggregation information. The calculation process can obtain the average confidence value through multiple forward inferences, or the reliability level of the marker can be determined by jointly using the statistical results of probability prediction and attention distribution.

[0179] To identify tags with confidence values ​​below a preset threshold as low-confidence tags and form a low-confidence tag set, a numerical threshold must first be set. This threshold can be statically defined as a fixed probability lower bound or dynamically adjusted based on the length of the current input sequence, its content complexity, the distribution of generated tags, or the confidence statistics during model training. During the calculation, the confidence value of each tag is compared with this threshold, and all tags with confidence values ​​below the threshold are selected and these tags are used to construct the low-confidence tag set. This set can be sorted by sequence position index or by confidence value for subsequent targeted optimization.

[0180] When extracting global contextual features from initial sequence data, feature modeling of the entire initial sequence data is required. This can be achieved by calculating the global dependencies between labels within the sequence using a multi-head attention mechanism, obtaining the contextual feature matrix of the entire sequence. Alternatively, a global context-aware layer can be added after a non-autoregressive model to summarize the global dynamic relationships between the input sequence and the currently generated sequences, extracting contextual features containing global attributes such as temporal dependencies, semantic continuity, and structural coherence. Global contextual features can include high-dimensional continuous vectors, probability distribution structures, or multi-layer encoded contextual state sets, providing global information support for subsequent label optimization.

[0181] To generate an optimized label set, each label value in the low-confidence label set can be modified based on global context features. This can be achieved by using a context-conditional generation network to re-predict each low-confidence label, or by using a residual adjustment mechanism to fine-tune the prediction results of the original labels based on the joint features of the global context features and the positions of the low-confidence labels. Specifically, the current global context features can be input for each low-confidence label, and a single-step prediction can be performed to generate optimized labels. Alternatively, a parallel optimization module under context constraints can be used to process multiple low-confidence labels simultaneously, generating an optimized label set. The optimized result can be used to select labels based on the maximum predicted probability, or the updated label values ​​can be determined through a joint optimization loss function.

[0182] The process involves replacing low-confidence markers in the initial sequence data with corresponding optimized markers from the optimized marker set to form optimized sequence data. When using this optimized sequence data as the target sequence data, the positions and contents of high-confidence markers must be preserved in the original initial sequence data. Only low-confidence markers are replaced according to their position indices to ensure that the sequence structure and order remain unchanged. During the replacement process, the original markers can be directly overwritten, or a version control strategy can be used to align the optimized markers with the original markers before updating. The optimized sequence data obtained after the replacement is the target sequence data, which contains a complete marker sequence that has undergone confidence correction, context re-prediction, and structure preservation.

[0183] Target sequence data refers to the intermediate sequence representation generated after optimizing initial sequence data through a non-autoregressive process. This data is essentially structured sequence information, typically existing in the form of multi-dimensional vector sequences or feature matrices. Its content originates from a comprehensive screening of predicted values ​​at various positions in the initial sequence data, global context analysis, and local correction operations targeting low-confidence regions. Target sequence data retains the overall structure of the initial sequence data while systematically improving data coherence, prediction accuracy, and contextual consistency. In specific applications, the form of target sequence data is closely related to domain requirements. In speech synthesis tasks, target sequence data is typically represented as an optimized acoustic feature sequence, such as a Mel spectrogram or other audio feature parameter sequences, which serve as input to a vocoder to further generate speech waveform signals. In the healthcare field, target sequence data can be a sequence of medical information that has undergone structural optimization and context supplementation, facilitating the subsequent generation of standardized electronic medical records or voice broadcast content. In the fintech field, target sequence data can be a compliantly verified business data encoding sequence, ensuring the accuracy, completeness, and compliance with regulatory requirements of information during subsequent voice prompts or automatic text generation. Overall, target sequence data may not be the final output, but rather an important intermediate data form in the sequence task execution chain of the system. It has the characteristics of clear data structure, high expression accuracy, and adaptability to various downstream modules, and is widely used in sequence-related scenarios such as speech generation, text output, and multimodal information synthesis.

[0184] When a target sequence data is input into a vocoder to generate a speech waveform signal, the target sequence data is used as the input to the vocoder. The vocoder can include a generative adversarial network-based vocoder, an autoregressive vocoder, or a neural network vocoder based on a stream model. After receiving the target sequence data, the vocoder performs acoustic feature transformation and temporal domain reconstruction operations, generating a continuous audio waveform signal through the parameter mapping relationship obtained through training. The vocoder can support multi-speaker modeling, multi-language parameter configuration, or sound quality optimization for specific application scenarios to ensure that the final generated speech waveform signal meets application requirements in terms of naturalness, semantic accuracy, and auditory comfort. The generated speech waveform signal can be played directly on the terminal device or used as input to subsequent audio processing modules.

[0185] Example Description: In a healthcare scenario, a voice follow-up system for chronic disease patients receives a voice input sequence describing the patient's condition. This input sequence is transcribed in real-time into a text sequence, which is then divided into multiple consecutive lexical units. These lexical units include symptom words, frequency words, and drug names described by the patient. Each lexical unit is mapped to generate an initial embedding vector, and positional encoding is added to each initial embedding vector to form a position-enhanced embedding vector. This position-enhanced embedding vector is input into an encoder network to generate the first layer of encoder hidden states. These first-layer encoder hidden states are then input into subsequent encoder layers, resulting in multi-layer encoder hidden states. These multi-layer encoder hidden states are aggregated using residual connections, and then subjected to layer normalization to obtain the hidden representation, which is used for subsequent analysis and prediction.

[0186] The system initializes the current time step to zero. At the current time step, it locates the hidden segment corresponding to that time step from the hidden representation. This hidden segment contains local features from the patient's speech description, such as related words describing their current physical state. For the extracted hidden segment, the system generates a temporal feature vector, calculates a span length parameter based on the temporal feature vector, and uses this parameter to generate a dynamic length threshold. Based on the dynamic length threshold, the system determines the minimum and maximum span boundary values ​​at the current step, and uses these boundary values ​​to determine the current dynamic length span. This span represents the range of the currently analyzed word segment within the time series.

[0187] Within the current dynamic length span, the system determines the start and end position indices and generates a position index sequence based on these two indices. For each index in the position index sequence, a position encoding vector is extracted, and feature fragments for the corresponding position are extracted from the hidden representation. By concatenating the position encoding vector and the position feature fragments, the system generates enhanced position features containing temporal and content information. These enhanced position features are input into a parallel prediction network to generate the original prediction distribution for all positions within the current dynamic length span. The prediction distribution generates predicted values ​​for all positions through sampling. The predicted values ​​can include standardized labels describing patient symptoms or commonly used medical terminology.

[0188] The system further scans all position indices within the current dynamic length span, compares the position index values ​​one by one, identifies the smallest index value, marks the position corresponding to the index as the current leftmost position index, extracts the predicted value corresponding to the position as the target predicted value, and adds the target predicted value to the reserved predicted value set to gradually build a complete semantic sequence.

[0189] After completing processing at the current time step, the system reads the current time step value, obtains a fixed increment value, and adds the current time step value to the fixed increment value to obtain the updated time step value. The updated time step value replaces the existing record. The system loads the preset maximum sequence length, compares the updated time step value with the maximum sequence length to determine if the sequence generation boundary has been reached, and simultaneously scans the retained prediction value set to check if a medical term end marker has appeared. If the system determines that the sequence is not yet complete, it uses the updated current time step value and the hidden representation as input, and repeats the operations of determining the dynamic length span, generating prediction values, extracting the leftmost position index, and retaining prediction values, continuously performing iterations.

[0190] After generation, the system acquires all retained predicted values, forming a predicted value set. These predicted values ​​are then sorted according to their time step. The sorted predicted value sequence is mapped and converted into sequence tags specific to the healthcare field, such as symptom labels, disease course descriptions, and drug name labels, forming a sequence tag set. The system adds end tags to the sequence tag set to ensure the sequence structure is closed, forming a complete sequence tag set. This complete sequence tag set is further combined to form structured sequence data blocks, which are then mapped to form initial sequence data, used as input for subsequent speech optimization.

[0191] Based on the initial sequence data, the system scans all markers and calculates the confidence value for each marker. Low-confidence markers are typically concentrated in segments where the patient's description is vague, the speech rate is abnormal, or there is significant background noise interference. The system automatically identifies markers with confidence values ​​below a preset threshold, forming a low-confidence marker set. It extracts global contextual features from the initial sequence data, integrating the semantic flow, temporal sequence, and medical context of the patient's entire description. Based on these global contextual features, the system performs re-prediction or adjustment operations on the low-confidence markers, generating an optimized marker set. The optimized markers are then used to replace the low-confidence markers in the initial sequence data, resulting in optimized sequence data, which forms the target sequence data.

[0192] The system inputs the target sequence data into a vocoder to generate a continuous speech waveform signal. This signal is then used by a synthesized speech system to broadcast intelligent diagnostic results in real time or automatically generate patient follow-up speech reports, ensuring that the output speech meets application requirements in terms of naturalness, coherence, and accuracy of medical terminology. This process is widely used in healthcare scenarios such as remote follow-up, health consultation, and voice intervention for chronic diseases.

[0193] In the fintech sector, intelligent voice interaction systems for banks, securities firms, and insurance companies can effectively improve the quality and efficiency of voice synthesis in areas such as financial product explanations, contract element confirmation, and risk warnings. Taking an intelligent wealth management terminal as an example, when a customer requests detailed information about a structured deposit product, the system automatically generates high-quality voice prompts through the following workflow:

[0194] First, the system receives an input sequence, which is standardized text content for structured deposit products, specifically including the product name, term, expected return range, investment currency, liquidity description, and risk warnings. The system divides this input sequence into a continuous sequence of lexical units, which can be financial terms, monetary figures, time expressions, technical abbreviations, or natural language phrases. Then, each lexical unit is converted into a corresponding initial embedding vector through embedding space mapping. To enhance the temporal information in the sequence, the system adds positional encoding to the initial embedding vectors, forming a set of position-enhanced embedding vectors.

[0195] Next, the system inputs the position-enhanced embedding vector into the encoder network to generate the first layer of encoder hidden states. By stacking multiple encoders, deeper semantic information is further extracted to form multi-layer encoder hidden states. Finally, with the help of residual connections and layer normalization operations, the multi-layer encoder hidden states are aggregated into a hidden representation, which comprehensively reflects the structural information and semantic features in the financial product text.

[0196] During sequence generation, the system initializes the current time step to zero. Combining the current time step with the hidden representation, it determines the dynamic length span. This dynamic span is adaptively adjusted based on text characteristics to avoid information omissions caused by a fixed window. Within the dynamic length span, the system generates predicted values ​​for all positions in parallel. These predicted values ​​reflect the probability distribution of words or financial terms at different positions within the text interval. By scanning the set of position indices within the dynamic length span, the system determines the leftmost position index and prioritizes retaining the predicted value corresponding to that position, ensuring that key information such as financial terms and monetary expressions are output first.

[0197] Subsequently, the system updates the current time step value and determines whether sequence generation is complete. If not all financial product information is covered, the system repeats the parallel prediction and leftmost position retention operations within the dynamic length span based on the updated current time step value and hidden representation, until all retained prediction values ​​are obtained.

[0198] All retained predictions are sorted according to time step order to form a sequence of ordered predictions, which is then converted into a set of sequence tags. The sequence tags correspond to standardized semantic units in the product text, such as "the minimum subscription amount for this product is RMB 10,000", "the investment period is six months", "this product does not guarantee principal", etc. The system adds a sequence termination tag, and the complete tag set is combined into a sequence data block, which is finally converted into the initial sequence data.

[0199] To further optimize the accuracy and naturalness of the expression, the system performs batch optimization of the initial sequence data through a non-autoregressive process. The system scans all markers, calculates confidence values, and identifies low-confidence markers with confidence scores below a set threshold, such as unclear monetary amounts or contradictory terminology. For these markers, the system regenerates optimized markers based on global contextual features, combined with professional semantics and contextual logic from the financial field, ensuring that key information is expressed rigorously, coherently, and in a standardized manner.

[0200] The optimized target sequence data is input into the vocoder, and the system generates a natural and fluent speech waveform signal, which is then pushed to the terminal device to provide customers with a detailed explanation of the structured deposit product in real time. Customers can clearly hear a complete set of information, including product type, return structure, risk disclosure, and liquidity arrangements. The speech content is clear, the terminology is accurate, and the tone is natural. The overall process meets the needs of efficient voice interaction in fintech businesses, significantly reducing the cost of manual explanations and improving the efficiency and accuracy of financial product information delivery.

[0201] This embodiment, through the above steps, can effectively identify and optimize low-confidence markers in the initial sequence data. Combined with global context information, it achieves sequence-level non-autoregressive optimization, improving the accuracy of sequence representation and internal logical consistency. Furthermore, a vocoder converts the optimized sequence data into a high-quality speech waveform signal, achieving an overall improvement in the naturalness, clarity, and fluency of the speech output, meeting the application requirements of high-quality speech synthesis.

[0202] In one embodiment, a non-autoregressive optimized data sequence processing apparatus is provided, which corresponds one-to-one with the non-autoregressive optimized data sequence processing method described in the above embodiments. (Refer to...) Figure 3 , Figure 3 This is a schematic diagram of the functional modules of a preferred embodiment of the non-autoregressive optimized data sequence processing device of the present invention. The modules include an encoder module 10, a span decision module 20, a parallel prediction module 30, a position filtering module 40, a generation completion determination module 50, an iterative execution module 60, a sequence accumulation module 70, and a sequence optimization module 80. Detailed descriptions of each functional module are as follows:

[0203] Encoder module 10 is used to receive an input sequence and encode the input sequence to generate a hidden representation;

[0204] The span decision module 20 is used to initialize the current time step value and determine the dynamic length span based on the current time step value and the hidden representation;

[0205] Parallel prediction module 30 is used to generate prediction values ​​for all positions in parallel within the dynamic length span;

[0206] The location filtering module 40 is used to identify the leftmost location index within the dynamic length span and retain the predicted value corresponding to the leftmost location index;

[0207] The generation completion determination module 50 is used to determine whether sequence generation is complete;

[0208] The iterative execution module 60 is used to repeatedly execute the following steps when the sequence generation is not completed: updating the current time step value, determining the updated dynamic length span based on the updated current time step value, generating the predicted value of all positions within the updated dynamic length span, and identifying and retaining the predicted value corresponding to the leftmost position index within the updated dynamic length span, until the sequence generation is completed.

[0209] The sequence accumulation module 70 is used to accumulate all retained prediction values ​​to form the initial sequence data;

[0210] The sequence optimization module 80 is used to optimize the initial sequence data through a non-autoregressive process to generate target sequence data.

[0211] In one embodiment, the encoder module 10 is specifically used for:

[0212] Receive an input sequence and divide the input sequence into multiple consecutive word units to form a word unit sequence;

[0213] Each lexical unit is mapped to the embedding space to generate an initial embedding vector;

[0214] Add positional encoding to each initial embedding vector to form a position-enhanced embedding vector;

[0215] The position-enhanced embedding vector is input into the encoder network to generate the first layer of encoder hidden states;

[0216] The hidden state of the first layer encoder is input into the subsequent encoder layers to generate the hidden state of the multi-layer encoder;

[0217] The hidden states of the multilayer encoder are aggregated by residual connection to generate aggregated hidden states, and the aggregated hidden states are then subjected to layer normalization to generate hidden representations.

[0218] In one embodiment, the span decision module 20 is specifically used for:

[0219] Initialize the current time step to zero;

[0220] Locate the corresponding segment in the hidden representation based on the current time step value to form a time step-corresponding hidden segment;

[0221] Extract the temporal feature vector of the hidden segment corresponding to the time step;

[0222] Determine the span length parameter of the time feature vector, and generate a dynamic length threshold based on the span length parameter;

[0223] The minimum span boundary value and the maximum span boundary value are determined based on the dynamic length threshold.

[0224] The dynamic length span is determined based on the minimum span boundary value and the maximum span boundary value.

[0225] In one embodiment, the parallel prediction module 30 is specifically used for:

[0226] Determine the start and end position indices of the dynamic length span, and generate a position index sequence based on the start and end position indices;

[0227] Extract the location encoding vector for each location index in the location index sequence, and extract the location feature fragment corresponding to the location index sequence from the hidden representation;

[0228] The location encoding vector and the location feature fragment are concatenated to generate enhanced location features;

[0229] The enhanced location features are input into a parallel prediction network to generate the original prediction distribution;

[0230] Sample from the original prediction distribution to generate predicted values ​​for all locations within the dynamic length span.

[0231] In one embodiment, the location filtering module 40 is specifically used for:

[0232] Extract all location indices within the dynamic length span to form a location index set;

[0233] Scan the location index values ​​in the location index set and compare the numerical values ​​of the location index values ​​to determine the minimum index value;

[0234] Identify the position index corresponding to the minimum index value as the leftmost position index;

[0235] The predicted value corresponding to the leftmost position index is located as the target predicted value, and the target predicted value is added to the set of retained predicted values.

[0236] In one embodiment, the sequence accumulation module 70 is specifically used for:

[0237] Obtain all retained prediction values ​​to form a prediction value set;

[0238] The predicted values ​​in the predicted value set are sorted according to the time step to form a sorted predicted value sequence;

[0239] The sequence of ordered predicted values ​​is converted into sequence tags to form a sequence tag set;

[0240] Add a sequence termination marker to the sequence marker set to form a complete sequence marker set;

[0241] The complete set of sequence markers is combined to form a sequence data block, and the sequence data block is converted into initial sequence data.

[0242] In one embodiment, the sequence optimization module 80 is specifically used for:

[0243] Scan all tags in the initial sequence data and determine the confidence value for each tag;

[0244] Labels with confidence values ​​below a preset threshold are identified as low-confidence labels, forming a low-confidence label set;

[0245] Extract the global context features of the initial sequence data;

[0246] Based on the global context features, each tag value in the low-confidence tag set is modified to generate an optimized tag set;

[0247] The low-confidence markers in the initial sequence data are replaced with the corresponding optimized markers in the optimized marker set to form optimized sequence data, and the optimized sequence data is used as the target sequence data;

[0248] The target sequence data is input into a vocoder to generate a speech waveform signal.

[0249] 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 deterministic and control capabilities. The memory includes non-volatile and / or volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface is used for communication with external user terminals via a network connection. When the computer program is executed by the processor, it implements the functions or steps of a non-autoregressive optimized data sequence processing method on the server side.

[0250] In one embodiment, a computer device is provided, which may be a user terminal, and its internal structure diagram may be as follows: Figure 5As shown, the computer device includes a processor, memory, network interface, display screen, and input devices connected via a system bus. The processor provides determination and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The network interface is used to communicate with an external server via a network connection. When the computer program is executed by the processor, it implements the user-side functions or steps of a non-autoregressive optimized data sequence processing method.

[0251] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform the following steps:

[0252] Receive an input sequence and encode the input sequence to generate a hidden representation;

[0253] Initialize the current time step value, and determine the dynamic length span based on the current time step value and the hidden representation;

[0254] Predictions for all locations are generated in parallel within the dynamic length span;

[0255] Identify the leftmost position index within the dynamic length span and retain the predicted value corresponding to the leftmost position index;

[0256] Determine whether sequence generation is complete;

[0257] When sequence generation is incomplete, repeat the steps of updating the current time step value, determining the updated dynamic length span based on the updated current time step value, generating predicted values ​​for all positions within the updated dynamic length span, and identifying and retaining the predicted value corresponding to the leftmost position index within the updated dynamic length span, until sequence generation is complete.

[0258] Accumulate all retained predictions to form the initial sequence data;

[0259] The initial sequence data is optimized through a non-autoregressive process to generate the target sequence data.

[0260] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor:

[0261] Receive an input sequence and encode the input sequence to generate a hidden representation;

[0262] Initialize the current time step value, and determine the dynamic length span based on the current time step value and the hidden representation;

[0263] Predictions for all locations are generated in parallel within the dynamic length span;

[0264] Identify the leftmost position index within the dynamic length span and retain the predicted value corresponding to the leftmost position index;

[0265] Determine whether sequence generation is complete;

[0266] When sequence generation is incomplete, repeat the steps of updating the current time step value, determining the updated dynamic length span based on the updated current time step value, generating predicted values ​​for all positions within the updated dynamic length span, and identifying and retaining the predicted value corresponding to the leftmost position index within the updated dynamic length span, until sequence generation is complete.

[0267] Accumulate all retained predictions to form the initial sequence data;

[0268] The initial sequence data is optimized through a non-autoregressive process to generate the target sequence data.

[0269] It should be noted that the functions or steps that can be implemented by the computer-readable storage medium or computer device described above can be referred to the relevant descriptions on the server side and user side in the foregoing method embodiments. To avoid repetition, they will not be described one by one here.

[0270] 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, and when executed, it 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 can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various 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.

[0271] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.

[0272] It should be noted that if any software tools or components not belonging to this company appear in the embodiments of this application, they are merely illustrative examples and do not represent actual use. The embodiments described above are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.

Claims

1. A non-autoregressive optimization data sequence processing method, characterized in that, Includes the following steps: Receive an input sequence and encode the input sequence to generate a hidden representation; The input sequence is a data set, including a text sequence or a speech symbol sequence. The elements in the text sequence can be words, subwords, or characters, and the elements in the speech symbol sequence can be phonemes, syllables, or other audio expression units. Initialize the current time step value, and determine the dynamic length span based on the current time step value and the hidden representation; The time step value is a numerical value used to identify the current processing position in the sequence data processing process. It is expressed in the form of a non-negative integer and is used to indicate the specific time position or sequence index position in the sequence. The dynamic length span refers to a continuous sequence segment determined jointly by the current time step value and the hidden representation in sequence data processing, the length of which is dynamically adjusted according to the data characteristics in the hidden representation; The initialization of the current time step value and the determination of the dynamic length span based on the current time step value and the hidden representation include: Initialize the current time step to zero; Locate the corresponding segment in the hidden representation based on the current time step value to form a time step-corresponding hidden segment; Extract the temporal feature vector of the hidden segment corresponding to the time step; Determine the span length parameter of the time feature vector, and generate a dynamic length threshold based on the span length parameter; The minimum span boundary value and the maximum span boundary value are determined based on the dynamic length threshold. The dynamic length span is determined based on the minimum span boundary value and the maximum span boundary value; Wherein, the minimum span boundary value = max(0, current time step value - floor(dynamic length threshold × α)), the maximum span boundary value = min(sequence maximum index, current time step value + ceil(dynamic length threshold × β)), and α and β are preset scaling factors; Predictions for all locations are generated in parallel within the dynamic length span; Identify the leftmost position index within the dynamic length span and retain the predicted value corresponding to the leftmost position index; Determine whether sequence generation is complete; When sequence generation is incomplete, repeat the steps of updating the current time step value, determining the updated dynamic length span based on the updated current time step value, generating predicted values ​​for all positions within the updated dynamic length span, and identifying and retaining the predicted value corresponding to the leftmost position index within the updated dynamic length span, until sequence generation is complete. Accumulate all retained predictions to form the initial sequence data; The initial sequence data is optimized through a non-autoregressive process to generate the target sequence data.

2. The non-autoregressive optimized data sequence processing method as described in claim 1, characterized in that, Receiving an input sequence and encoding the input sequence to generate a hidden representation includes: Receive an input sequence and divide the input sequence into multiple consecutive word units to form a word unit sequence; Each lexical unit is mapped to the embedding space to generate an initial embedding vector; Add positional encoding to each initial embedding vector to form a position-enhanced embedding vector; The position-enhanced embedding vector is input into the encoder network to generate the first layer of encoder hidden states; The hidden state of the first layer encoder is input into the subsequent encoder layers to generate the hidden state of the multi-layer encoder; The hidden states of the multilayer encoder are aggregated by residual connection to generate aggregated hidden states, and the aggregated hidden states are then subjected to layer normalization to generate hidden representations.

3. The non-autoregressive optimized data sequence processing method as described in claim 1, characterized in that, The prediction values ​​for all locations are generated in parallel within the dynamic length span, including: Determine the start and end position indices of the dynamic length span, and generate a position index sequence based on the start and end position indices; Extract the location encoding vector for each location index in the location index sequence, and extract the location feature fragment corresponding to the location index sequence from the hidden representation; The location encoding vector and the location feature fragment are concatenated to generate enhanced location features; The enhanced location features are input into a parallel prediction network to generate the original prediction distribution; Sample from the original prediction distribution to generate predicted values ​​for all locations within the dynamic length span.

4. The non-autoregressive optimized data sequence processing method as described in claim 1, characterized in that, Identifying the leftmost position index within the dynamic length span and retaining the predicted value corresponding to the leftmost position index includes: Extract all location indices within the dynamic length span to form a location index set; Scan the location index values ​​in the location index set and compare the numerical values ​​of the location index values ​​to determine the minimum index value; Identify the position index corresponding to the minimum index value as the leftmost position index; The predicted value corresponding to the leftmost position index is located as the target predicted value, and the target predicted value is added to the set of retained predicted values.

5. The non-autoregressive optimized data sequence processing method as described in claim 1, characterized in that, While sequence generation is incomplete, the steps of updating the current time step value, determining the updated dynamic length span based on the updated current time step value, generating predicted values ​​for all positions within the updated dynamic length span, and identifying and retaining the predicted value corresponding to the leftmost position index within the updated dynamic length span are repeated until sequence generation is complete, including: After each data processing cycle, a new time step value is generated based on the existing time step value through addition, increment, or dynamic adjustment, which is used as a time reference for the next data processing cycle. During sequence generation, the range of data intervals that should be generated is recalculated by combining the latest time step value and the hidden representation. The dynamic length span corresponds to the specific location segment in the data sequence and is defined by the minimum span boundary value and the maximum span boundary value. Within a defined interval, based on the hidden representation and positional encoding information, a parallel computing mechanism is used to synchronously generate predicted values ​​for all data positions within the interval. For the identified leftmost position index, extract its corresponding predicted value and include it in the set of retained predicted values.

6. The non-autoregressive optimized data sequence processing method as described in claim 1, characterized in that, All retained predictions are accumulated to form the initial sequence data, including: Obtain all retained prediction values ​​to form a prediction value set; The predicted values ​​in the predicted value set are sorted according to the time step to form a sorted predicted value sequence; The sequence of ordered predicted values ​​is converted into sequence tags to form a sequence tag set; Add a sequence termination marker to the sequence marker set to form a complete sequence marker set; The complete set of sequence markers is combined to form a sequence data block, and the sequence data block is converted into initial sequence data.

7. The non-autoregressive optimized data sequence processing method as described in claim 1, characterized in that, The initial sequence data is optimized through a non-autoregressive process to generate target sequence data, including: Scan all tags in the initial sequence data and determine the confidence value for each tag; Labels with confidence values ​​below a preset threshold are identified as low-confidence labels, forming a low-confidence label set; Extract the global context features of the initial sequence data; Based on the global context features, each tag value in the low-confidence tag set is modified to generate an optimized tag set; The low-confidence markers in the initial sequence data are replaced with the corresponding optimized markers in the optimized marker set to form optimized sequence data, and the optimized sequence data is used as the target sequence data; The target sequence data is input into a vocoder to generate a speech waveform signal.

8. A non-autoregressive optimized data sequence processing apparatus, characterized in that, The non-autoregressive optimized data sequence processing device includes: An encoder module is used to receive an input sequence and encode the input sequence to generate a hidden representation; The input sequence is a data set, including a text sequence or a speech symbol sequence. The elements in the text sequence can be words, subwords, or characters, and the elements in the speech symbol sequence can be phonemes, syllables, or other audio expression units. The span decision module is used to initialize the current time step value and determine the dynamic length span based on the current time step value and the hidden representation; The time step value is a numerical value used to identify the current processing position in the sequence data processing process. It is expressed in the form of a non-negative integer and is used to indicate the specific time position or sequence index position in the sequence. The dynamic length span refers to a continuous sequence segment determined jointly by the current time step value and the hidden representation in sequence data processing, the length of which is dynamically adjusted according to the data characteristics in the hidden representation; The initialization of the current time step value and the determination of the dynamic length span based on the current time step value and the hidden representation include: Initialize the current time step to zero; Locate the corresponding segment in the hidden representation based on the current time step value to form a time step-corresponding hidden segment; Extract the temporal feature vector of the hidden segment corresponding to the time step; Determine the span length parameter of the time feature vector, and generate a dynamic length threshold based on the span length parameter; The minimum span boundary value and the maximum span boundary value are determined based on the dynamic length threshold. The dynamic length span is determined based on the minimum span boundary value and the maximum span boundary value; Wherein, the minimum span boundary value = max(0, current time step value - floor(dynamic length threshold × α)), the maximum span boundary value = min(sequence maximum index, current time step value + ceil(dynamic length threshold × β)), and α and β are preset scaling factors; A parallel prediction module is used to generate prediction values ​​for all locations in parallel within the dynamic length span; The location filtering module is used to identify the leftmost location index within the dynamic length span and retain the predicted value corresponding to the leftmost location index; The generation completion determination module is used to determine whether sequence generation is complete. The iterative execution module is used to repeatedly execute the following steps when sequence generation is not complete: updating the current time step value, determining the updated dynamic length span based on the updated current time step value, generating predicted values ​​for all positions within the updated dynamic length span, and identifying and retaining the predicted value corresponding to the leftmost position index within the updated dynamic length span, until sequence generation is complete. The repeated execution of updating the current time step value includes: After each data processing cycle, a new time step value is generated based on the existing time step value through addition, increment, or dynamic adjustment, which is used as a time reference for the next data processing cycle. The step of determining the updated dynamic length span based on the updated current time step value includes: During sequence generation, the range of data intervals that should be generated is recalculated by combining the latest time step value and the hidden representation. The dynamic length span corresponds to the specific location segment in the data sequence and is defined by the minimum span boundary value and the maximum span boundary value. The step of generating predicted values ​​for all locations within the updated dynamic length span includes: Within a defined interval, based on the hidden representation and positional encoding information, a parallel computing mechanism is used to synchronously generate predicted values ​​for all data positions within the interval. The process of identifying and retaining the predicted value corresponding to the leftmost position index within the updated dynamic length span includes: For the identified leftmost position index, extract its corresponding predicted value and add it to the set of retained predicted values; The sequence accumulation module is used to accumulate all retained prediction values ​​to form the initial sequence data; The sequence optimization module is used to optimize the initial sequence data through a non-autoregressive process to generate target sequence data.

9. A computer device, characterized in that, The computer device includes a memory, a processor, and a non-autoregressive optimized data sequence processing program stored in the memory and executable on the processor. When executed by the processor, the non-autoregressive optimized data sequence processing program implements the steps of the non-autoregressive optimized data sequence processing method as described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The storage medium stores a non-autoregressive optimized data sequence processing program, which, when executed by a processor, implements the steps of the non-autoregressive optimized data sequence processing method as described in any one of claims 1-7.

Citation Information

Patent Citations

  • Parallelized Tacotron: non-autoregressive and controllable TTS

    CN116457870A

  • Auto-regression model parallel decoding method based on lexical tree dynamic generation

    CN118153523A