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

Through non-autoregressive optimization data sequence processing methods, the problems of low generation efficiency and insufficient voice naturalness of existing TTS technology in the fields of financial technology and healthcare are solved, efficient and coherent voice generation is achieved, and system complexity and deployment costs are reduced.

CN120808746APending Publication Date: 2025-10-17PING AN TECH (SHENZHEN) CO LTD
View PDF 14 Cites 0 Cited by

Patent Information

Application Number
CN202510952773.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-10
Publication Date
2025-10-17

Smart Images

  • Figure CN120808746A_ABST
    Figure CN120808746A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of voice processing, can be applied to business scenes such as financial science and technology and medical health, and discloses a non-autoregressive optimized data sequence processing method, device, equipment and medium, comprising: receiving an input sequence code to generate a hidden representation, and determining a dynamic length span based on a time step value and the hidden representation, generating predicted values in parallel in the dynamic length span, identifying the leftmost position index and retaining the corresponding predicted value, judging whether the sequence is completed or not, repeatedly updating the time step value when the sequence is not completed so as to determine a new dynamic length span until the corresponding predicted value of the leftmost position index is retained, and accumulating the retained predicted values to form initial sequence data; and optimizing the initial sequence data by using a non-autoregression process to generate target sequence data. According to the method, time step dynamic updating and dynamic length span control are combined, and parallel prediction and non-autoregression optimization processes are matched, so that the speech sequence generation efficiency is improved, and meanwhile, the naturalness and coherence of the speech are enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of speech processing, and in particular to a non-autoregressive optimized data sequence processing method, device, equipment and storage medium. BACKGROUND

[0002] Under the background of rapid development of speech generation technology, text-to-speech (TTS) systems have been widely applied in the fields of financial technology business, medical health business and various intelligent voice interaction systems. However, there are still a series of technical bottlenecks in the existing TTS technical system that restrict its wide application and high-quality development.

[0003] In the field of financial technology business, intelligent voice services have become an important part of customer identity verification, risk prompt, information broadcast and other scenarios. However, the mainstream TTS system currently generally relies on autoregressive (AR) models for speech generation. This type of model recursively generates speech in a frame-by-frame or segment-by-segment manner, which has certain advantages in sound quality restoration, but its inference efficiency is low and the response speed is slow, making it difficult to meet the real-time speech synthesis requirements, especially in high-concurrency financial business systems, which seriously affects the usability and user experience of voice services. At the same time, some systems try to use non-autoregressive (NAR) models to improve generation efficiency, although the overall inference speed is improved, but due to the lack of effective time structure modeling mechanism, the generated speech segments still have obvious defects in naturalness, coherence and semantic expression integrity, which cannot meet the strict requirements of the financial field for high-quality and continuous speech output.

[0004] In the field of medical health business, TTS systems are widely used in intelligent guide, health monitoring, voice broadcast and other scenarios, especially in the face of the elderly, special patients or multi-language environment, the voice system puts forward higher requirements on naturalness, accuracy and real-time performance. However, the existing TTS system generally has problems such as lack of smoothness of speech, lack of context understanding and fragmentation of generated content when processing complex semantics, long text or multi-speaker corpus, which seriously affects the reliability and practicality of the speech synthesis system in the medical health scenario. In addition, the existing technology lacks a unified and efficient generation strategy in terms of multi-language and multi-task adaptation, often requiring separate construction or optimization of models for different languages, speakers or business needs, resulting in complex system structure, high deployment cost and poor scalability. SUMMARY

[0005] The main purpose of the present application is to provide a non-autoregressive optimized data sequence processing method, device, equipment and storage medium, aiming at solving the technical problem that the existing technology lacks a mechanism combining time step dynamic adjustment and dynamic span parallel prediction, resulting in difficulty in balancing generation efficiency and speech naturalness in the speech generation process.

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

[0007] receiving an input sequence and encoding the input sequence to generate a hidden representation;

[0008] initializing a current time step value and determining a dynamic length span based on the current time step value and the hidden representation;

[0009] generating prediction values for all positions in parallel within the dynamic length span;

[0010] identifying the leftmost position index within the dynamic length span and retaining the prediction value corresponding to the leftmost position index;

[0011] determining whether sequence generation is complete;

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

[0013] accumulating all retained prediction values to form initial sequence data;

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

[0015] Further, to achieve the above purpose, the present application provides a non-autoregressive optimized data sequence processing device, comprising:

[0016] an encoder module for receiving an input sequence and encoding the input sequence to generate a hidden representation;

[0017] a span decision module for initializing a current time step value and determining a dynamic length span based on the current time step value and the hidden representation;

[0018] a parallel prediction module for generating prediction values for all positions in parallel within the dynamic length span;

[0019] A position screening module is configured to identify the leftmost position index within the dynamic length span and retain the prediction value corresponding to the leftmost position index.

[0020] A generation completion determination module is configured to determine whether the sequence generation is completed.

[0021] An iteration execution module is configured to repeatedly execute 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 prediction values of all positions within the updated dynamic length span, and identifying and retaining the prediction value corresponding to the leftmost position index within the updated dynamic length span, until the sequence generation is completed.

[0022] A sequence accumulation module is configured to accumulate all retained prediction values to form initial sequence data.

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

[0024] Further, to achieve the above object, the present application also provides a computer device, which comprises a memory, a processor, and a non-autoregressive optimized data sequence processing program stored in the memory and executable on the processor, and the non-autoregressive optimized data sequence processing program, when executed by the processor, implements the steps of the non-autoregressive optimized data sequence processing method as described above.

[0025] Further, to achieve the above object, the present application also provides a computer readable storage medium, which stores a non-autoregressive optimized data sequence processing program, and the non-autoregressive optimized data sequence processing program, when executed by a processor, implements the steps of the non-autoregressive optimized data sequence processing method as described above.

[0026] Beneficial effects: The present application relates to the technical field of speech processing, and can be applied to business scenarios such as financial technology and medical health. The present application discloses a non-autoregressive optimized data sequence processing method, device, equipment and medium, which comprises the following steps: receiving an input sequence and encoding to generate a hidden representation; initializing a current time step value; determining a dynamic length span based on the current time step value and the hidden representation; generating prediction values of all positions in parallel within the dynamic length span; identifying the leftmost position index within the dynamic length span and retaining the corresponding prediction value; determining whether sequence generation is complete; when sequence generation is not complete, repeatedly performing the operations of updating the current time step value, determining an updated dynamic length span based on the updated current time step value and the hidden representation, and retaining the prediction value corresponding to the leftmost position index within the updated dynamic length span; accumulating all retained prediction values to form initial sequence data; and optimizing the initial sequence data through a non-autoregressive process to generate target sequence data. By combining time step dynamic updating and dynamic length span control, and combining parallel prediction and non-autoregressive optimization process, the present application improves the efficiency of speech sequence generation, and enhances the naturalness and coherence of speech. BRIEF DESCRIPTION OF DRAWINGS

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

[0028] Figure 1 An application environment diagram of the non-autoregressive optimized data sequence processing method in an embodiment of the present application;

[0029] Figure 2 A flow diagram of an embodiment of the non-autoregressive optimized data sequence processing method of the present application;

[0030] Figure 3 A functional module diagram of a preferred embodiment of the non-autoregressive optimized data sequence processing device of the present application;

[0031] Figure 4 A structure diagram of a computer device in an embodiment of the present application;

[0032] Figure 5 Another structure diagram of a computer device in an embodiment of the present application. DETAILED DESCRIPTION

[0033] It should be understood that the specific embodiments described herein are only used to explain the present application, and are not used to limit the present application.

[0034] The non-autoregressive optimized data sequence processing method provided by the embodiments of the present application can be applied in the fields of speech recognition, speech synthesis, speech translation, speech generation, etc. Figure 1In an application environment of the present application, a user terminal communicates with a server terminal through a network. The server terminal can receive an input sequence through the user terminal and encode the input sequence to generate a hidden representation, initialize a current time step value, determine a dynamic length span based on the current time step value and the hidden representation, generate prediction values for all positions in parallel within the dynamic length span, identify the leftmost position index within the dynamic length span and retain the corresponding prediction value, determine whether sequence generation is complete, and if sequence generation is not complete, repeat the operations of updating the current time step value, determining an updated dynamic length span based on the updated current time step value and the hidden representation, retaining the prediction value corresponding to the leftmost position index within the updated dynamic length span, accumulating all retained prediction values to form initial sequence data, and optimizing the initial sequence data through a non-autoregressive process to generate target sequence data. By combining time step dynamic updating and dynamic length span control, and combining parallel prediction and non-autoregressive optimization processes, the present application improves the efficiency of speech sequence generation while enhancing the naturalness and coherence of speech. The user terminal can be, but is not limited to, various personal computers, notebook computers, smartphones, tablet computers, and portable wearable devices. The server terminal can be implemented by an independent server or a server cluster composed of multiple servers. The present application will be described in detail below through specific embodiments.

[0035] Referring to Figure 2 , Figure 2 The flowchart of an embodiment of the non-autoregressive optimization data sequence processing method provided by the present application is shown. It should be noted that although a logical order is shown in the flowchart, in some cases, the steps shown or described can be performed in an order different from that shown here.

[0036] As Figure 2 shown, the non-autoregressive optimization data sequence processing method provided by the present application includes the following steps:

[0037] S10, receiving an input sequence and encoding 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 a text sequence, a phonetic symbol sequence, a phoneme sequence, a label sequence, 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, the elements in a text sequence can be words, subwords, or characters, and the elements in a phonetic symbol sequence can be phonemes, syllables, or other audio expression units.

[0039] The encoding input sequence generates a hidden representation, specifically including processing the input sequence by segmentation, grouping or continuous extraction, etc. to form a data structure suitable for subsequent modeling. The encoding process can be completed based on a deep neural network structure, and common implementation forms include but are not limited to self-attention mechanism network, recurrent neural network, convolutional network or their combination structure. Among them, the self-attention mechanism calculates the correlation between each position in the sequence to capture the global dependency information within the sequence and improve the expression ability of long-distance information. The recurrent neural network is suitable for sequence data with strong sequential information and can gradually pass context information. The convolutional structure has high computational efficiency in low latency scenarios.

[0040] The hidden representation is generated, which is the continuous numerical representation of the input sequence in the high-dimensional space after model transformation, usually in the form of a vector or a tensor structure, used to retain the content information, context dependency information and position structure information of the input sequence. The hidden representation has information compression and information fusion capabilities, and realizes the structured expression of the input sequence through the encoding process. The hidden representation not only retains the data information of the input sequence itself, but also fuses the timing relationship, semantic structure and other context information captured by the model. The structure of the hidden representation can be a fixed-length matrix, a variable-length sequence or other forms, and the expression dimension and structure are dynamically adjusted according to different task requirements.

[0041] The process of receiving the input sequence can be completed through an input interface module, which parses the data format provided by the external system or user and converts the input data into a unified internal data structure. The input interface can be configured with different parsing rules to adapt to text, speech, labels or other types of input data, for example, in a text processing scenario, the input interface parses natural language text into word or subword sequences and further converts them into standard sequence structures. In the speech symbol processing scenario, the input interface arranges acoustic symbols, phonemes or other representation units in chronological order to generate symbol sequences.

[0042] The process of encoding the input sequence is performed through a deep network structure. The network structure can use a self-attention network, in which the elements of each sequence position are calculated by an attention mechanism to calculate the relationship weight with other position elements to form an expression that integrates overall information. Network parameters are optimized through the backpropagation algorithm in the model training stage, so that the encoder has the ability to extract sequence information and context structure. The generation of the hidden representation is based on the output of the encoding network, and the output structure is a multi-dimensional matrix. The number of rows of the matrix 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 for processing, adapting to different data processing procedures.

[0043] Example explanation: In the medical health business field, the input sequence can be the patient's medical record text, diagnosis report or vital sign data sequence. By encoding the input sequence into a hidden representation, the system can extract disease-related information and time series features, providing basic data support for subsequent generation of structured medical records or health risk prompts, improving the efficiency and accuracy of medical information processing.

[0044] In the financial technology business field, the input sequence can be a user transaction behavior sequence, a financial text description or a credit score label sequence. The process of encoding to generate a hidden representation can integrate historical transaction information and account features to form a high-dimensional representation, supporting risk assessment, fraud detection or personalized financial product recommendation, enhancing the intelligent level and prediction ability of financial data processing.

[0045] The embodiment can effectively retain the content information and structure information of the input sequence by receiving the input sequence and generating the hidden representation, and enhance the semantic connection and global dependence expression within the sequence through the encoding process, improving the efficiency and accuracy of subsequent data processing and information reasoning. The hidden representation provides a stable, continuous and controllable data basis for subsequent sequence structure analysis, time relationship modeling and parallel prediction, which helps to realize complex sequence generation, optimization and adjustment operations, and improves the overall expression ability 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, usually expressed in the form of a non-negative integer, 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, facilitating position tracking and data positioning in subsequent operations.

[0048] Based on the current time step value and the hidden representation, the dynamic length span is determined. The dynamic length span refers to a continuous sequence segment determined based on the current time step value and the hidden representation in sequence data processing. Its length is not fixed, but is dynamically adjusted according to the data features in the hidden representation to adapt to the changing needs of different sequence contents. The time step value determines the starting position of the dynamic length span, and the content information and structure information contained in the hidden representation provide data support for the length determination of the dynamic length span. By analyzing the context structure, local features or internal correlation information in the hidden representation, the appropriate span length for the current time position can be dynamically calculated.

[0049] The determination of the dynamic length span generally includes the following specific operation process: first, based on the current time step value, the corresponding sequence segment in the hidden representation is located, which reflects the local data characteristics and context information of the current position. Second, the key features of the sequence segment are extracted, such as time 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 sequence required for data processing at the current position, and the corresponding dynamic length threshold can be generated according to the specific parameter mapping relationship. The dynamic length threshold is used to control the range limit of the span, and based on the threshold, the minimum span boundary value and the maximum span boundary value are determined, and finally the dynamic length span is determined. The starting point of the dynamic length span is determined by the current time step value, and the end point is dynamically calculated according to the boundary value, and the overall span range is flexibly adjusted according to the sequence data characteristics.

[0050] The operation of initializing the time step value can be realized by variable assignment, setting the time step value to zero and marking the starting position of the sequence. This operation is performed before the sequence data is first processed, ensuring the unity and accuracy of the position counting logic.

[0051] The determination of the dynamic length span can be realized by the following technical path. First, from the hidden representation structure, the corresponding segment is located according to the time step value, and the data range of the segment is obtained by index calculation, avoiding traversal data retrieval and improving processing efficiency. Then, the feature extraction network or calculation module is used to analyze the segment to obtain the time feature vector or other feature representation. Through the feature mapping relationship, the span length parameter is calculated, which reflects the continuity requirement or data intensity of the current position of the sequence. Combined with the parameter adjustment rule, the dynamic length threshold is generated, which can be set as a floating value within the controlled range, supporting flexible adjustment of the span range. According to the dynamic length threshold, the minimum span boundary value and the maximum span boundary value are calculated respectively, ensuring that the span length has a clear lower limit and upper limit, avoiding too small or too large span range affecting the stability of data processing. Finally, according to the boundary value, the dynamic length span is determined, and the start and end positions are output as the input data range for subsequent sequence segment processing.

[0052] Example: In the medical health business field, the time step value is used to mark the time sequence position of patient health data, and through the determination of the dynamic length span, the continuous vital sign data of the patient in different time periods can be flexibly extracted, which is convenient for subsequent health trend analysis and abnormal state detection, and improves the timeliness and accuracy of medical data processing.

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

[0054] By initializing the time step value, the embodiment can accurately calibrate the current position of the sequence data, facilitate position tracking and continuous processing in the overall processing process, and avoid data offset problems caused by sequence position confusion. Based on the current time step value and the hidden representation, the dynamic length span is determined, which can dynamically adjust the sequence processing range according to the data content and structure, avoid information loss or redundancy caused by fixed length segments, improve the processing efficiency and information utilization rate of sequence data, and enhance the adaptability and flexibility of the system.

[0055] S30, generating prediction values of all positions in parallel within the dynamic length span;

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

[0057] Generating prediction values of all positions in parallel within the dynamic length span means that within the determined dynamic length span, a prediction operation is performed simultaneously for each position in the range to generate the corresponding prediction value. The prediction value usually represents the next step of the sequence data, the feature output or the data expression required for subsequent processing. The parallel generation process is different from the traditional sequential processing mode by position, which can simultaneously perform prediction tasks for all positions within the dynamic length span, effectively improving data processing efficiency and reducing information lag problems caused by time dependence.

[0058] Generating prediction values for all positions in parallel generally includes the following operation process: first, the starting position index and the ending position index of the dynamic length span are obtained, and the position index sequence is generated according to the range, which lists all specific positions in the span. Secondly, for each position in the position index sequence, the corresponding position encoding information is extracted, which can reflect the sequence attribute or spatial information of the position, and the common implementation is to use position encoding algorithm or mapping matrix construction. At the same time, the hidden feature segment corresponding to the position index sequence is extracted from the hidden representation, which contains the feature expression and structure information of the current position in the global sequence. Then, the position encoding information and the hidden feature segment are spliced to generate enhanced position features, which integrate position information and data expression information, enhancing data relevance and context understanding ability in the prediction process. The enhanced position features are input into the parallel prediction network, which can use deep learning structures such as self-attention network, convolution network or feedforward network, to generate the original prediction distribution using the enhanced position features. Finally, by performing sampling operation from the original prediction distribution, the prediction values of all positions in the dynamic length span are obtained, and the output form of the prediction values can be set according to specific business requirements, supporting classification probability, regression value or symbol label and other forms.

[0059] The starting position index and the ending position index of the dynamic length span can be obtained by index calculation, combined with the subscript system of the sequence structure, to quickly locate the span range. The generation of the position index sequence uses incremental calculation to avoid traversal operation and improve calculation efficiency. The extraction of position encoding information can be implemented by combining sine-cosine encoding, absolute position embedding or learnable position vector to ensure the completeness of position information expression and the consistency of data structure. The hidden feature segment can be obtained by indexing the corresponding area in the hidden representation using matrix slicing operation to efficiently extract the target data range.

[0060] In the generation process of enhanced position features, the joint expression of position encoding information and hidden feature segment is realized by matrix splicing, vector concatenation or feature fusion module to ensure that the input features contain position and content information. The design of parallel prediction network is selected according to specific business requirements and system performance requirements, which can use multi-layer feedforward network, self-attention network with attention mechanism, or efficient inference module based on convolution structure, supporting batch input, parallel computation and high throughput data processing mode.

[0061] The generation of the original prediction distribution is based on a probability modeling method, which expresses the probability space through parameterized distribution or neural network output, realizes the probabilistic and interpretable expression of the prediction result. In the sampling operation process, combined with the distribution characteristics, the maximum probability selection, random sampling or temperature control sampling strategy is adopted to ensure that the prediction value balances between expression diversity and result stability, and finally outputs the prediction value of all positions within the dynamic length span.

[0062] Example: In the medical health business field, by generating all positions of prediction values within a dynamic length span in parallel, the prediction of patient vital signs in different time periods can be quickly completed, such as predicting heart rate, blood pressure and blood oxygen level at multiple time nodes in parallel, which helps real-time health monitoring and early warning of diseases, and improves the response speed and data utilization efficiency of medical services.

[0063] In the field of financial technology business, this method can be used to predict risk indicators, credit scores or market behavior trends of multiple transaction nodes within a dynamic length span in parallel, which is suitable for high-frequency data analysis and risk control in financial transaction systems, and effectively improves the real-time prediction ability and decision efficiency of financial data processing systems.

[0064] By generating all positions of prediction values within a dynamic length span in parallel, the embodiment can break through the time dependence limitation of the traditional sequence processing mode, significantly improve the data processing efficiency, reduce the sequence reasoning delay, and enhance the parallel processing capability of the system. At the same time, combined with the joint expression of position encoding information and hidden feature segments, the understanding ability of the prediction result to the sequence position and context information is improved, and the prediction accuracy and expression integrity of the sequence data are optimized, which meets the efficient and accurate sequence data processing demand.

[0065] S40, identifying the leftmost position index within the dynamic length span and retaining the prediction value corresponding to the leftmost position index;

[0066] In the embodiment, the dynamic length span is a range of sequence determined according to the current time step value and the hidden representation, which contains multiple position indexes. The position index is used to identify each specific data position in the sequence structure, which is usually expressed by an integer or a relative position code to ensure that each position in the sequence has distinguishability and order. Identifying the leftmost position index within the dynamic length span means determining the specific position index with the earliest physical position in the sequence structure by sorting or comparing the position index values within the span range. The determination of the leftmost position index is based on the sequence index system, and the index value is usually used as the reference standard. The smaller the index value is, the earlier the position is, which can reflect the time, space or structural order of the sequence.

[0067] The process of identifying the leftmost position index includes first extracting all position indexes within the dynamic length span, constructing a position index set, and listing the index values corresponding to each position within the span range. Then, each index value in the position index set is scanned, which can be done by traversal, sorting, comparison, etc. The specific numerical expression of each index value is systematically obtained. Based on the scanning result, further numerical comparison is performed to identify the smallest index value in the set, and the specific position corresponding to this index value is the leftmost position index.

[0068] Retaining the prediction value corresponding to the leftmost position index means extracting and storing the prediction value generated in the prediction process at this index position from the entire prediction value set. The retention operation can be implemented through memory writing, data structure updating or persistent storage, ensuring the availability and stability of the prediction value in subsequent data processing. This process emphasizes retaining only the prediction value corresponding to the leftmost position index, avoiding data redundancy and resource waste, while providing the necessary data basis for the recursion, accumulation and output of sequence data.

[0069] The extraction of all position indexes of the dynamic length span can be achieved by traversing the index sequence or calculating the start and end indexes of the span range, combined with incremental calculation to quickly form the position index set. During the scanning of the position index set, sequential scanning, minimum value search or sorting optimization strategies are used 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 result.

[0070] In the process of retaining the prediction value corresponding to the leftmost position index, the system first locates the specific position of the index in the entire prediction value set, and accurately extracts the corresponding prediction value based on the mapping relationship or index table structure. The retention operation supports various data structures, including arrays, linked lists, hash tables or database tables, and the appropriate storage structure is selected based on system performance requirements. The retained prediction value can be stored in a dedicated data set, cache area or output buffer, ensuring the orderliness, traceability and efficient reading ability of the data.

[0071] Example: In the medical health business field, identifying the leftmost position index within the dynamic length span and retaining the prediction value corresponding to this position is suitable for multi-period vital sign monitoring scenarios. The system can accurately extract the key physiological indicators of the earliest time node, assisting doctors or systems in real-time diagnosis, early intervention or data trend analysis, ensuring the timeliness and data reliability of patient health management.

[0072] In the field of financial technology business, this method can accurately retain the prediction results of the earliest node in the time series after predicting the risk data or market indicators of multiple transaction nodes in parallel, making it easier for the financial risk control system to quickly capture market anomalies and deploy risk control measures in advance, thereby improving the real-time response capabilities of the financial data processing system and the timeliness of the predicted data.

[0073] This embodiment ensures the order and structural integrity of data output during sequence data processing by identifying the leftmost position index within a dynamic length span and retaining the corresponding predicted value, effectively avoiding the risk of sequence positional confusion or data duplication. This process combines positional information in the sequence structure with the expression of predicted values, improving the accuracy of sequence reasoning and data utilization efficiency. It helps build an efficient and stable sequence generation and recursion mechanism, optimizing the overall sequence data generation logic and quality control capabilities.

[0074] S50, determining whether sequence generation is completed;

[0075] In this embodiment, determining whether sequence generation is complete involves checking the overall state of sequence data generation after each retention of the leftmost position index within the current dynamic length span to confirm whether the specified termination condition or data integrity criteria have been met. This determination is based on a comparison of the time step value with the maximum sequence length. If the current time step value reaches or exceeds the maximum sequence length, sequence generation is complete. Furthermore, data content checks can be combined, such as monitoring the presence of specific termination markers, boundary symbols, or structural features in the generated data, as criteria for determining sequence generation completion.

[0076] To determine if 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, sequence generation has not yet concluded; if the time step value reaches or exceeds the maximum length, sequence generation has reached its conclusion. Furthermore, the system can design a termination marker detection mechanism, introducing a special termination symbol or end marker into the data structure. Through data parsing and structural inspection, the system determines whether a valid termination signal appears in the sequence, assisting in the comprehensive judgment of the sequence generation status.

[0077] Example description: In the healthcare business field, determining whether sequence generation is complete can be used in real-time health monitoring systems to promote the gradual collection and generation of physiological data according to the time series, ensuring the completeness and clear sequence of health data structures at each time point. This helps to continuously monitor patient status, detect abnormal trends in advance, and realize intelligent health management and medical early warning.

[0078] In the field of financial technology business, in combination with the method, the financial system can generate market trend, risk indicator or transaction prediction data step by step according to the recursion of the time step value, dynamically judge the sequence generation progress, ensure the time continuity and logical integrity of the prediction result, help the financial decision system to respond to market changes in real time, and improve the accuracy and timeliness of risk identification and data prediction.

[0079] The embodiment can realize strict time control and progress management of the sequence data generation process by judging whether the sequence generation is completed, and guarantee the orderliness of data position recursion and the integrity of sequence structure. The process improves the efficiency and accuracy of data generation by dynamically advancing the time step and real-time detecting the sequence state, reduces the risk of sequence structure disorder, data generation interruption or position coverage, helps to build a stable, efficient and controllable sequence data generation mechanism, and improves the data processing capacity and output reliability of the overall system.

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

[0081] In the embodiment, the sequence generation not being completed means that, based on the previous judgment process, the current time step value has not reached the maximum length limit of the sequence as a whole, or no marker meeting the termination condition has been detected in the data structure, and the system needs to continue the sequence data generation process.

[0082] The current time step value is repeatedly updated, which represents the time advancing parameter in the sequence data generation or reasoning process, and is used to control the generation rhythm and processing progress of each data position in the sequence structure. Updating the current time step value means that after each data processing cycle, based on the existing time step value, a new time step value is generated through addition, increment or dynamic adjustment, which is used as the time reference for the next data processing. The update of the time step value ensures that the sequence data generation process has the characteristics of linear advancement, structure increment and position order, avoiding time confusion or position repetition in the data generation process.

[0083] The update of the current time step value can be realized by simple numerical addition operation, that is, setting a fixed increment parameter, adding the existing time step value and the increment to generate a new time step value; if dynamic adjustment is used, the specific value of the increment parameter can be adjusted according to the data quality, system load or external control signal in the sequence generation process in combination with the real-time monitoring module of the system, realizing flexible time step management.

[0084] The repeated execution of determining the updated dynamic length span based on the updated current time step value and the hidden representation refers to the system combining the latest time step value with the hidden representation to recalculate the range of the data interval that should be generated at the current time during the sequence generation process. The dynamic length span corresponds to a specific location segment in the data sequence and is usually defined by a minimum span boundary value and a maximum span boundary value.

[0085] The updated current time step value is obtained through the previous time advancement process, and the hidden representation is the feature abstraction result of the entire sequence data, which includes input sequence structure, context information, and data expression features. Both of them determine the specific interval range of the updated dynamic length span. The determination process of the dynamic length span involves data position positioning, structure feature extraction, and interval boundary operation, ensuring that the interval generated each time has adaptability and pertinence, avoiding position overlap or data loss.

[0086] The repeated execution of generating prediction values for all positions within the updated dynamic length span in parallel refers to the system generating prediction values for all data positions within the interval based on the hidden representation and position encoding information using a parallel computing mechanism, improving the efficiency and coverage of the overall 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 in the current interval through scanning, comparing, sorting, and other means. This position usually corresponds to the logically most front-end structure unit in the data sequence.

[0087] The repeated execution of identifying and retaining the prediction value corresponding to the leftmost position index within the updated dynamic length span refers to the system extracting the prediction value corresponding to the identified leftmost position index and including it in the retained prediction value set as an important component of subsequent data structure generation, sequence assembly, and overall output. Through this process, the system can continuously and recursively generate data segments, gradually expanding the generated sequence content, until the overall generation completion condition is met.

[0088] In specific applications, the system first monitors the sequence generation state, judges the relationship between the time step value and the maximum sequence length, and if the time step value has not reached the upper limit or the termination marker has not appeared in the sequence structure, the system enters the repeated execution process. The system updates the current time step value, and then uses the position mapping, feature decoding, and interval boundary calculation algorithm to dynamically determine the interval span that should be generated at the current time through the combination of the time step value and the hidden representation. The interval boundary value can be calculated using fixed step increments, dynamic adaptive adjustment, or sequence structure reasoning, ensuring that the dynamic length span reasonably covers the positions to be generated.

[0089] Based on the interval range, the system extracts the position coding information and the hidden representation features, uses parallel reasoning, batch processing and other mechanisms, and generates prediction values for all positions within the dynamic length span. The generated results are temporarily stored through the built-in data structure cache module, which facilitates subsequent positioning and retention operations. The system scans the prediction value set, compares the position indexes within the interval, identifies the leftmost position index based on the position number or logical order, and locates the corresponding prediction value data.

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

[0091] Example: In the medical health business field, the intelligent voice system targets health consultation, remote diagnosis or auxiliary diagnosis scenarios, dynamically determines the voice content generation interval based on the updated time step value and hidden representation, and controls the generation range of each round of voice segment through the interval. Based on the parallel generation strategy, the system synchronously generates prediction values for all positions within the interval, and based on the identified leftmost position index, only retains the most semantically complete and position priority prediction result in the current generation, avoiding repeated output or logical misplacement problems, ensuring that the health voice content is gradually, clearly and orderly generated until it meets the voice data structure integrity requirements, improving the accuracy and efficiency of medical information transmission.

[0092] In the financial technology business field, the intelligent voice synthesis-oriented consultant system dynamically divides the financial information broadcast interval using the updated time step value and hidden representation, controls the data output position of each round, and obtains all candidate prediction values within the interval through the parallel generation process. Then, combined with the leftmost position index identification, the system filters out the first priority information within the current interval, retains the prediction value corresponding to the information into the overall voice sequence, and executes the process in a loop until the overall broadcast sequence is generated, ensuring that the financial data broadcast content generation process has position continuity, information integrity and output efficiency, and meets the strict requirements of voice data stability and generation rhythm in high-frequency financial business scenarios.

[0093] The embodiment can realize dynamic expansion, progressive generation and structure optimization of sequence data, improve the continuity, position order and structure integrity of the data generation process, avoid data position omission, sequence break or redundant overlap problems, enhance the reliability, accuracy and efficiency of system data output, and be suitable for large-scale and high-complexity sequence data generation tasks, and meet the comprehensive requirements of data structure integrity and generation efficiency in different scenarios.

[0094] S70, accumulating all the reserved prediction values to form initial sequence data;

[0095] In the embodiment, accumulating all the reserved prediction values to form initial sequence data involves combining each reserved prediction value in the previous generation process in a structured and chronological manner to form a complete data set as the basis information source for subsequent data optimization and generation steps. Accumulation represents the aggregation of stored prediction values to form a continuous data content set, which ensures the consistency and continuity of data in terms of position order, time step, and semantic structure. The reserved prediction value is a data unit determined by the dynamic length span, filtered by the leftmost position index, and stored in the previous generation process, which is usually expressed in the form of vector, label, symbol or other structured numerical value, representing the content information of each time position in the generated sequence. In the accumulation process, the system sequentially sorts each prediction value according to the time step value or position index value to ensure that the internal order of the data set corresponds to the original input sequence or the system-set time logic. After sorting, all prediction values are uniformly converted into a specific sequence data expression form to form initial sequence data, which can be an encoded sequence, a semantic label sequence, a structure label sequence or other sequence information sets with continuity and scalability, facilitating subsequent parallel optimization, structure reconstruction or high-level information generation operations based on the sequence. The whole process emphasizes the consistency, chronology and structure integrity of data accumulation, ensuring the complete output of initial sequence data in terms of logical link, information expression and format standard.

[0096] In the implementation process, the accumulation of all reserved prediction values can be based on the time step value sequence, the position index sequence or the semantic correlation sequence to perform the sorting and aggregation operation, which improves the integrity and logical clarity of the sequence data in structure. The reserved prediction values can be stored through the hash mapping structure, and the ordered set can be dynamically constructed according to the time step or the position index, so as to avoid the repetition or omission of the position, and to ensure that the sequence structure after accumulation and the generation logic remain consistent. In different production environments, if the data type of the prediction value is a numerical symbol sequence, an array structure can be used to directly accumulate and generate the initial sequence data, if the prediction value contains high-dimensional semantic features or context structure information, a structured list, a tensor matrix or an encoding mapping sequence can be used for data conversion and combination to ensure that the initial sequence data has good structure expression ability and subsequent operation compatibility. The sequence accumulation process can also be embedded with a mark checking logic to detect the sequence continuity, the structure integrity and the prediction value validity, and to prevent the data missing or error accumulation from affecting the subsequent generation process.

[0097] Through the above steps, the embodiment can accumulate all the reserved prediction values without destroying the data structure and logical order, form the initial sequence data with continuity, time sequence and structural integrity, provide a unified and accurate data basis for subsequent parallel optimization and overall sequence generation, and effectively improve the stability and structure expression ability of the overall data generation process.

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

[0099] In this embodiment, the initial sequence data is optimized by a non-autoregressive process to generate target sequence data. This involves performing parallel updating, batch optimization, and overall reconstruction 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 a process in which the system does not sequentially propagate the output of a single position according to the time step, but instead utilizes global features, contextual structural information, and potential semantic relationships of the overall sequence data to directly and parallelly calculate and optimize the content of multiple positions, thereby improving generation efficiency and overall data quality. The initial sequence data is a continuous sequence of data accumulated in previous generation steps, which typically includes labels, symbols, encoded vectors, or other structural information, expressing the basic content and structural framework of the sequence data. During the optimization process, the system first scans the content of each position in the initial sequence data, combines global contextual features and sequence internal structural information, identifies parts with low confidence, unclear semantic logic, or incomplete structural expression, and forms a low-confidence label set. The system optimizes the content in the low-confidence label set based on the overall sequence structure and contextual features, which can include operations such as replacement, reconstruction, adjustment, enhancement, etc., to ensure the consistency and completeness of the optimized sequence in terms of structural logic, information expression, and overall quality. After optimization, the system combines the updated content with the high-confidence part of the initial sequence data to form optimized sequence data. Finally, the optimized sequence data is integrated, converted, and output to generate target sequence data, which has complete sequence structure, clear semantic expression, and stable content quality, and can be used as basic data for subsequent data output, speech generation, or other system function calls.

[0100] In different production environments, the non-autoregressive process can be implemented based on neural network parallel architecture, graph structure calculation, or fully connected model to optimize the overall sequence. For short structure initial sequence data, matrix operation can be used to batch process all low-confidence labels to improve overall optimization efficiency. For initial sequence data containing complex contextual information or cross-position strong association structure, self-attention mechanism or global context perception unit can be introduced to dynamically capture deep association information between positions in the sequence, ensuring data consistency and logical accuracy during optimization. In the identification process of the low-confidence label set, confidence threshold, content verification rules, or semantic consistency standards can be set to dynamically select the position content that needs to be optimized, avoiding unnecessary redundant calculations. In the optimization operation, the system can choose to use parameter updating, semantic completion, structure enhancement, or numerical reconstruction according to specific business requirements to ensure that the optimized sequence data meets the requirements in terms of semantic expression, structural logic, and system standards, generating stable and complete target sequence data.

[0101] Example explanation: In the field of medical health services, for the initial sequence data in the multi-turn voice interaction system, the overall parallel optimization is realized through the non-autoregressive process. Specifically, the system obtains continuous voice data or text data input by the patient, combines context information and sequence structure features, automatically identifies positions with unclear information expression, incoherent logic or incomplete content, directly optimizes uncertain content through a parallel update mechanism, ensures that the optimized sequence has stable expression logic and accurate health information output, and effectively improves the data quality and interaction efficiency of the voice question and answer system in medical consultation, health monitoring or auxiliary diagnosis and treatment scenarios.

[0102] In the field of financial technology services, for real-time voice synthesis or intelligent broadcast systems, the initial sequence data is optimized through the non-autoregressive process. Specifically, when the system processes multiple financial data broadcast contents in parallel, it quickly filters out positions with low confidence or ambiguous expression in the data sequence, directly corrects inaccurate parts based on global context information, avoids broadcast delays and content missing caused by traditional single-step recursive reasoning, ensures stable output of the optimized sequence in terms of structural integrity and logical consistency, and meets the needs of efficient data generation and high-quality information transmission in high-frequency transaction information broadcast, financial data interpretation or multi-language synchronous release.

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

[0104] The present invention relates to the field of speech processing technology and can be applied to business scenarios such as financial technology and medical health. A non-autoregressive optimized data sequence processing method, device, equipment, and medium are disclosed, including: receiving an input sequence and encoding it to generate a hidden representation, initializing a 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, and if sequence generation is not complete, repeatedly performing the operations of updating the current time step value, determining an updated dynamic length span based on the updated current time step value and the hidden representation until the predicted value corresponding to the leftmost position index within the updated dynamic length span is retained, 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. The present invention improves the efficiency of speech sequence generation while enhancing the naturalness and coherence of speech by combining dynamic time step update with dynamic length span control, and coordinating parallel prediction with a non-autoregressive optimization process.

[0105] In one embodiment, the above step S10 includes:

[0106] S101, receiving an input sequence, and dividing the input sequence into a plurality of consecutive word units to form a word unit sequence;

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

[0108] S103, adding a position code to each initial embedding vector to form a position-enhanced embedding vector;

[0109] S104, inputting the position-enhanced embedding vector into an encoder network to generate a first-layer encoder hidden state;

[0110] S105, inputting the first layer encoder hidden state into subsequent encoder layers to generate multiple layers of encoder hidden state;

[0111] S106 , aggregating the hidden states of multiple layers of encoders through residual connections to generate an aggregated hidden state, and performing layer normalization processing on the aggregated hidden state to generate a hidden representation.

[0112] In this embodiment, an input sequence is received, which can be any type of symbol sequence, including text information, speech transcription content, label 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 token units, which represent the basic constituent units in the input sequence that have independent encoding significance. The division process can be based on predefined rules, subword segmentation algorithms, or word segmentation models to disassemble the original input sequence into a continuous and complete token unit sequence, ensuring that the subsequent mapping step has clear boundaries.

[0113] Each token unit is mapped to an embedding space to generate an initial embedding vector. The embedding space is a low-dimensional continuous space, and the mapping process converts discrete symbol information into fixed-length numerical vectors through lookup tables, parameter matrix indexing, or other conversion methods. The initial embedding vector contains the basic semantics and partial context information of the token unit, and the number of dimensions is flexibly set according to system configuration and application requirements. Position encoding is added to each initial embedding vector. Position encoding is used to introduce the position information of each token unit in the sequence. Common methods include sine and cosine function encoding, learnable position parameters, or relative position encoding. The position information and semantic information are combined to form a position-enhanced embedding vector, ensuring that the encoder has sequence order perception ability.

[0114] The position-enhanced embedding vector is input into an encoder network to generate a first-layer encoder hidden state. The encoder network usually adopts a self-attention structure or other deep learning network structure. The first-layer encoder hidden state contains local context information and basic feature extraction results. The first-layer encoder hidden state is input into subsequent encoder layers to generate multiple-layer encoder hidden states. The subsequent encoder layers are processed in a stacked structure, extracting deeper sequence features and global context information layer by layer. The multi-layer encoder hidden states fuse different levels of sequence representation capabilities. The multi-layer encoder hidden states are aggregated through residual connections to generate an aggregated hidden state. The residual connection introduces a skip path in each layer structure, alleviating the gradient vanishing problem and enhancing the deep feature fusion effect. The aggregated hidden state fuses multiple layer feature information and has stable expression capability. The aggregated hidden state is subjected to layer normalization processing to generate a hidden representation. The layer normalization operation standardizes the values of each unit to eliminate the scale difference between different dimensions, improving the stability of the sequence features and the overall expression ability of the model. The hidden representation is used as the high-order semantic expression result of the sequence for subsequent modules.

[0115] The embodiment can ensure clear semantic unit boundaries by dividing the input sequence into continuous token units, avoid information confusion in the subsequent mapping process, and further introduce sequence position information on the basis of preserving semantic information of the token units in combination with embedding space mapping and position coding, so as to enhance the sequential modeling capability. The encoder network cooperates with the multi-layer stacking structure and residual connection design to improve the extraction depth of sequence features and the context information fusion level, and the layer normalization processing effectively improves the stability of the model and the adaptability under different sequence inputs, thereby realizing stable, continuous and high-quality hidden expression of the input sequence, providing accurate and reliable sequence representation basis for the subsequent processing process, and guaranteeing the integrity of the sequence information and the structure expression capability.

[0116] In one embodiment, the step S20 comprises:

[0117] S201, initializing the current time step value as zero;

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

[0119] S203, extracting a time feature vector of the time step corresponding hidden segment;

[0120] S204, determining a span length parameter of the time feature vector, and generating a dynamic length threshold according to the span length parameter;

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

[0122] S206, determining a dynamic length span according to the minimum span boundary value and the maximum span boundary value.

[0123] In the embodiment, the current time step value is initialized as zero, which is completed by the system built-in variable initialization operation. In a specific implementation, a preset time step value variable is stored in the cache or register of the control module, and the variable is directly assigned as zero when the system starts the sequence generation task. The initialization action is completed in the task scheduling unit through software instructions or hardware control logic, so that all subsequent positioning and calculation based on the time step value start from zero, and cumulative errors are avoided.

[0124] Locate the corresponding segment in the hidden representation according to the current time step value, the hidden representation is usually stored in a multi-dimensional matrix structure, the dimensions include sequence length, hidden layer channel number, etc., the time step value corresponds to the time index of the sequence, and the locating operation extracts the continuous segment corresponding to the time step value in the matrix through a matrix index function. In the implementation, the starting position of the extraction window is set as the current time step value, and the window size is dynamically set according to system parameters or sequence structure. The memory slicing operation is called to directly obtain the hidden segment corresponding to the time step, thereby avoiding repeated calculation and multiple memory reading.

[0125] Extract the time feature vector of the hidden segment corresponding to the time step, and the specific mode includes but is not limited to the following implementation: a global average pooling can be used to perform mean calculation on all feature channels of the hidden segment corresponding to the time step, and compressed into a fixed-dimensional time feature vector; or a one-dimensional convolution or a feedforward neural network module can be used to learn the key time pattern in the segment to form a time feature vector; if the sequence has a multi-scale characteristic, a multi-layer pooling or transformation operation can also be superimposed to enhance the time feature expression ability.

[0126] Determine the span length parameter of the time feature vector, and generate a dynamic length threshold. In the specific implementation, the time feature vector is input into a special length prediction subnetwork, which can be composed of a multi-layer perceptron (MLP), an attention mechanism or a graph neural structure, and outputs a scalar span length parameter. In the process of generating the dynamic length threshold, the span length parameter is usually mapped to a dynamic length threshold that meets the actual sequence structure constraint through a lookup table mapping, a normalization transformation or a nonlinear activation function, so as to avoid that the span exceeds the sequence boundary or is lower than the minimum value set by the system.

[0127] Determine the minimum span boundary value and the maximum span boundary value based on the dynamic length threshold, and the specific implementation mode is that the numerical value of the minimum span boundary value is determined by subtracting a part of the dynamic length threshold from the current time step value, and the numerical value of the maximum span boundary value is determined by adding another part 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 boundary components, for example, according to a fixed ratio or a dynamic weight, which are respectively allocated to the minimum span adjustment amount and the maximum span adjustment amount;

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

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

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

[0132] wherein, a and b are the system preset or dynamically calculated scale factors, ensuring the flexible adjustment of the span boundary while meeting the sequence boundary conditions, and the max and min operations prevent exceeding the sequence index range.

[0133] According to the minimum span boundary value and the maximum span boundary value, the dynamic length span is determined, and the specific implementation manner is that the difference between the two is directly calculated plus one (considering the closed interval case) as the dynamic length span value, and the interval range is recorded for subsequent sequence segment extraction and parallel processing, so that each sequence processing operation is flexibly adjusted according to the latest dynamic span range, and adapts to the sequence structure changes at different time positions. The whole process is realized through efficient matrix operation or index operation, ensuring the calculation efficiency and response speed of the system in actual operation.

[0134] The embodiment ensures that the sequence processing process starts from a unified position by initializing the time step value, and combines the positioning hidden representation, extraction of the time feature vector, and the dynamic length adjustment mechanism. The sequence processing range can be adaptively adjusted according to the actual information density and context features of the sequence content, avoiding the information redundancy or omission problem caused by the fixed length strategy. The dynamic length span is flexibly generated according to the semantic features, which effectively improves the efficiency of sequence processing and the completeness of context information coverage, ensures the rationality of the data processing range at different time positions, and enhances the adaptability and information expression effect of the system in complex sequence scenarios.

[0135] In one embodiment, the above step S30 comprises:

[0136] S301, determining the start position index and the end position index of the dynamic length span, and generating a position index sequence according to the start position index and the end position index;

[0137] S302, extracting the position encoding vector of each position index in the position index sequence, and extracting the position feature segment corresponding to the position index sequence from the hidden representation;

[0138] S303, splicing the position encoding vector and the position feature segment to generate an enhanced position feature;

[0139] S304, inputting the enhanced position feature into a parallel prediction network to generate an original prediction distribution;

[0140] S305, sampling from the original prediction distribution to generate the prediction value of all positions in the dynamic length span.

[0141] In this embodiment, the starting position index and the ending position index of the dynamic length span are determined, which is derived from the interval range information generated in the previous step, wherein the starting position index is the interval starting point of the dynamic length span, which is usually the minimum span boundary value limited by the boundary, and the ending position index is the interval ending point of the dynamic length span, which is derived from the corresponding maximum span boundary value, both of which are represented by standard integer indexes and are limited in the valid position index of the input sequence. Based on the starting position index and the ending position index, a position index sequence is formed by sequential traversal or index interval generation, which is specifically represented as a set of continuous or partially sparse discrete integer indexes that completely cover all positions corresponding to the dynamic length span, avoiding position omission or out-of-bound errors.

[0142] The position encoding vector of each position index in the position index sequence is extracted, which is used to provide relative or absolute position information of each position in the sequence, and common implementations include but are not limited to: sine-cosine function encoding, learnable position embedding vector or hybrid position encoding structure. The dimension of the position encoding vector is consistent with or matched by linear mapping transformation with the feature dimension of the hidden representation, to ensure the dimension uniformity of subsequent feature splicing operations. Each position index in the position index sequence is associated with a predefined position encoding matrix through a mapping function, to quickly obtain the corresponding position encoding vector, avoid multiple calculations, and improve the overall efficiency of the system.

[0143] The position feature segment corresponding to the position index sequence is extracted from the hidden representation, which is generally a multi-dimensional matrix structure recording the deep feature expression result of the sequence input. The extraction process of the position feature segment uses matrix index slicing, and according to 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 position feature segments. The dimension structure of the position feature segment is compatible with the position encoding vector, ensuring that they can be effectively fused.

[0144] The position encoding vector and the position feature segment are spliced to generate an enhanced position feature, and the splicing operation is usually based on the expansion of the feature channel dimension, and the specific process includes: cascading and combining the individual position encoding vector corresponding to each position index with the corresponding position feature segment along the feature dimension direction to form the enhanced position feature with expanded dimension. The enhanced position feature contains both sequence position information and deep feature expression in information expression, has stronger spatial position adaptability and context association ability, and provides richer input feature support for subsequent parallel prediction.

[0145] The enhanced position feature is input into the parallel prediction network to generate an original prediction distribution. The parallel prediction network structure can adopt a one-dimensional convolution network, a feedforward neural network, an attention mechanism network, or a combination structure design. The overall network has the ability to process multiple sequence position data simultaneously. The input is a complete set of enhanced position features, and the output is an original prediction distribution corresponding to the number of positions within the dynamic length span. The structure of the original prediction distribution depends on the specific task requirements. For example, for classification tasks, the original prediction distribution can represent the probability values of each category. In continuous numerical prediction tasks, the original prediction distribution can represent a parameterized probability density distribution or a confidence interval.

[0146] The prediction values of all positions within the dynamic length span are generated by sampling from the original prediction distribution. The sampling process can use random sampling, deterministic sampling, maximum probability selection, or diversity sampling under temperature adjustment. The generated prediction values correspond to the final output results of each position within the dynamic length span, and have controllable randomness and expression flexibility that meet the statistical characteristics of the original prediction distribution. The generated set of all position prediction values is directly used for subsequent sequence updating, optimal position selection, or final output, ensuring the continuity and efficiency of the parallel prediction process.

[0147] The overall process is executed through the above steps in series, ensuring that prediction values for all positions within the dynamic length span can be generated simultaneously in a single inference process, significantly improving sequence generation efficiency and system inference speed, while providing basic data support for sequence local flexibility and global consistency.

[0148] This embodiment uses a parallel generation mechanism within the dynamic length span, and cooperatively processes position index sequences, position encoding vectors, and position feature segments to simultaneously generate prediction values for all positions within the dynamic length span. This avoids the efficiency bottleneck caused by traditional step-by-step sequence generation methods. The introduction of position encoding vectors improves the spatial position expression ability of prediction results, enhances the splicing operation of position features, and ensures the effective fusion of sequence position information and deep feature expression, optimizing the expression completeness of input features. The design of the parallel prediction network 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 generation efficiency and prediction quality of the system, and meeting the application requirements in scenarios that require fast and batch sequence generation.

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

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

[0151] S402, scanning the position index values in the position index set and comparing the numerical values of the position 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 prediction value corresponding to the leftmost position index as the target prediction value, and add the target prediction value to the reserved prediction value set.

[0154] In this embodiment, extracting all position indexes within the dynamic length span to form a position index set means that within the determined dynamic length span, the unique position index value corresponding to each position is obtained, and these position index values are numbered according to physical position or sequence position. The composition of the set ensures that all positions within the current dynamic length span are covered, forming a structured index set. The position index set can be organized using various data structures such as arrays, linked lists, tensors, etc., to ensure efficient execution of subsequent scanning and comparison operations.

[0155] Scanning the position index values in the position index set and comparing the numerical values of the position index values to determine the minimum index value is achieved by traversing all position indexes in the position index set, reading each position index value in turn, and comparing the numerical values pairwise to retain the index value with the smallest numerical value as the minimum index value. Comparison operations usually use linear traversal or parallel computing methods to improve the efficiency of finding the minimum value in large-scale position index sets and ensure real-time requirements.

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

[0157] Locating the prediction value corresponding to the leftmost position index as the target prediction value and adding the target prediction value to the reserved prediction value set means that according to the leftmost position index, the previously generated prediction value set or prediction value mapping table is retrieved to obtain the prediction value data corresponding to the position index. The obtained target prediction value is stored in the reserved prediction value set, which can use various data structures such as linked structures, dynamic arrays, or pre-allocated buffers to support high-frequency data appending operations and ensure that the accumulated reserved prediction values are used for subsequent sequence data construction.

[0158] By the above steps, the leftmost position index can be accurately and efficiently identified within the dynamic length span, and the prediction value corresponding to the position is ensured to be retained in time, avoiding information omission or sequence disorder. The positioning of the leftmost position index in combination with the position index set and the minimum value judgment has rigorous logical certainty. The dynamic updating mechanism of the reserved prediction value set effectively accumulates generated data, improves the integrity and accuracy of the overall sequence data construction, and optimizes the data storage and index efficiency in the sequence generation task.

[0159] In one embodiment, the above step S70 comprises:

[0160] S701, obtaining all reserved prediction values to form a prediction value set;

[0161] S702, sorting the prediction values in the prediction value set in time step order to form a sorted prediction value sequence;

[0162] S703, converting the sorted prediction value sequence into sequence tokens to form a sequence token set;

[0163] S704, adding a sequence termination token to the sequence token set to form a complete sequence token set;

[0164] S705, combining the complete sequence token set to form a sequence data block, and converting the sequence data block into initial sequence data.

[0165] In the present embodiment, obtaining all reserved prediction values to form a prediction value set means that all previously reserved prediction values within each dynamic length span are collected according to the data storage structure to form a unified data set. The prediction value set can take the form of an array, a linked list, a mapping structure or a tensor, etc., ensuring that the set contains all reserved prediction values, and each prediction value has associated time step information or position index information for subsequent sorting and serialization operations.

[0166] Sorting the prediction values in the prediction value set in time step order to form a sorted prediction value sequence is achieved by reading the time step information of each prediction value in the prediction value set and sorting according to the numerical value of the time step. The sorting method can use quicksort, stable sorting or distributed sorting to ensure that each prediction value in the sorted prediction value sequence is strictly arranged in ascending order of time step or logical position. This operation eliminates the time disorder of prediction values caused by batch reservation, ensuring the logical coherence and structural integrity of the sequence data.

[0167] Converting the sorted prediction value sequence into sequence tokens to form a sequence token set refers to converting the original prediction value data into sequence tokens conforming to sequence expression specifications according to a preset mapping rule, encoding rule or token template for each prediction value in the sorted prediction value sequence. The sequence token can be a numerical code, a character code, a discrete symbol or a structured data unit. The formation of the sequence token set enables the prediction value to have a unified expression format, facilitating the subsequent construction and analysis of sequence data.

[0168] Adding a sequence termination token to the sequence token set to form a complete sequence token set refers to adding a special token identifying the end of the sequence at the tail or specified position of the sequence token set according to the logical requirements of the sequence generation task. The type of sequence termination token can be a predefined symbol, a special code or a structured control field. Adding the termination token ensures that the subsequent data processing system can accurately determine the boundary of the sequence, preventing parsing errors or abnormal behavior caused by incomplete data.

[0169] Combining the complete sequence token set to form a sequence data block and converting the sequence data block into initial sequence data refers to combining all sequence tokens in the complete sequence token set according to the organization method of the data block to generate a structured and continuous sequence data block. The data block can use fixed or variable length format to support efficient data access and storage. Subsequently, the sequence data block undergoes necessary format conversion, encoding adjustment or structure packaging to finally generate initial sequence data. The initial sequence data, as input data for subsequent optimization, inference or synthesis process, has a clear logical structure and stable expression form.

[0170] The above steps can systematically and efficiently integrate the dispersed prediction values into ordered and standardized initial sequence data, ensuring that the sequence data has logical coherence, structural integrity and expression consistency. The sorting operation eliminates the problem of time step disorder, the sequence token conversion and termination token addition improve the standardization level of data expression, and the data block combination and format conversion operation optimizes the organization efficiency and convenience of data. Overall, it improves the reliability and applicability of sequence data in subsequent generation, optimization and inference processes.

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

[0172] S801, scanning all tokens in the initial sequence data and determining the confidence value of each token;

[0173] S802, identifying tokens with confidence values below a preset threshold as low-confidence tokens to form a low-confidence token set;

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

[0175] S804, modifying each label value in the low-confidence label set based on the global context feature to generate an optimized label set;

[0176] S805, replacing the low-confidence labels in the initial sequence data with the corresponding optimized labels in the optimized label set to form optimized sequence data, and taking the optimized sequence data as target sequence data;

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

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

[0179] When identifying labels with confidence values below a preset threshold as low-confidence labels to form a low-confidence label set, a numerical threshold needs to be set first, which can be statically defined as a fixed probability lower limit, or dynamically adjusted according to the length of the current input sequence, the content complexity, the distribution state of the generated labels, or the confidence statistics in the model training process, to set a threshold parameter that adapts to the sequence properties. In the calculation process, by comparing the confidence value of each label with the threshold one by one, all labels less than the threshold are selected, and these labels are constructed into a low-confidence label set. The set can be sorted according to the sequence position index or sorted according to the confidence value, in order to facilitate subsequent targeted optimization processing.

[0180] When extracting the global context feature of the initial sequence data, the entire initial sequence data needs to be modeled. The global dependency between labels in the sequence can be calculated based on the multi-head attention mechanism to obtain a context feature matrix of the entire sequence. A global context perception layer can also be added after the non-autoregressive model to summarize the global dynamic relationship between the input sequence and the currently generated sequence, and to extract context features containing global attributes such as temporal dependency, semantic continuity and structural coherence. The global context feature can include a high-dimensional continuous vector, a probability distribution structure, or a set of context states after multi-layer encoding, which is used to provide global information support for subsequent label optimization.

[0181] When generating the optimized label set based on the global context features modifying each label value in the low-confidence label set, the context condition generation network can be used to re-predict each low-confidence label, or the residual adjustment mechanism can be used to fine-tune the prediction result of the original label based on the joint features of the global context features and the low-confidence label position. In specific implementation, the current global context features can be input for the low-confidence label to perform single-step prediction to generate the optimized label, or a parallel optimization module under context constraints can be used to simultaneously process multiple low-confidence labels to generate the optimized label set. The optimization result can select the label according to the maximum prediction probability, or determine the updated label value through a joint optimization loss function.

[0182] When replacing the low-confidence labels in the initial sequence data with the corresponding optimized labels in the optimized label set to form the optimized sequence data, and using the optimized sequence data as the target sequence data, the positions and contents of the high-confidence labels in the original initial sequence data need to be preserved, and only the low-confidence labels are replaced according to the position index to ensure that the sequence structure and order do not change. In the replacement process, the original label can be directly overwritten, or the optimization label and the original label can be aligned and updated through a version control strategy. The optimized sequence data obtained after the replacement is completed is the target sequence data, which contains a complete label sequence that has been corrected in confidence, re-predicted in context, and maintained in structure.

[0183] The target sequence data refers to the intermediate sequence representation generated by optimizing the initial sequence data through a non-autoregressive process. This data is essentially structured sequence information, usually in the form of a multi-dimensional vector sequence or a feature matrix. Its content is derived from a comprehensive screening of predicted values at each position, global context analysis, and local correction operations for low-confidence regions. The target sequence data retains the overall structure of the initial sequence data while systematically improving data coherence, prediction accuracy, and context consistency. In specific applications, the form of the target sequence data is closely related to the field requirements. In speech synthesis tasks, the target sequence data typically represents optimized acoustic feature sequences, such as Mel spectrograms or other audio feature parameter sequences. These data serve as inputs to the vocoder to further generate speech waveform signals. In the medical and health field, the target sequence data can represent medical information sequences that have been structurally optimized and contextually supplemented, facilitating the subsequent generation of standardized electronic medical records or voice broadcast content. In the financial technology field, the target sequence data can be business data encoding sequences that have been compliance-checked, ensuring the accuracy, integrity, and regulatory compliance of information in subsequent voice prompts or automatic text generation processes. Overall, the target sequence data may not be the final output, but an important intermediate data form in the sequence task execution chain, with clear data structure, high expression precision, and adaptability to various downstream modules. It is widely used in sequence-related scenarios such as speech generation, text output, and multi-modal information synthesis.

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

[0185] Example description: In the medical health business scenario, the voice follow-up system for chronic disease patients receives a voice input sequence describing the patient's condition, the input sequence is transcribed into a text sequence in real time, the text sequence is divided into multiple continuous word units, the word units include symptom words, frequency words, drug name words and the like described by the patient, the word units are mapped to generate initial embedding vectors, and position encoding is added to each initial embedding vector to form position-enhanced embedding vectors. The position-enhanced embedding vectors input the encoder network to generate the first layer encoder hidden state, and the first layer encoder hidden state inputs the subsequent encoder layer to obtain the multi-layer encoder hidden state through multi-layer encoding. The multi-layer encoder hidden state is aggregated through a residual connection method, and the aggregated layer is normalized to obtain a hidden representation for subsequent analysis and prediction.

[0186] The system initializes the current time step value to zero, and locates the hidden segment corresponding to the current time step value from the hidden representation at the current time step value. The hidden segment contains local features in the patient's voice description, such as relevant word units describing the current physical state. For the extracted hidden segment, the system generates a time feature vector, calculates a span length parameter based on the time feature vector, and generates a dynamic length threshold using the span length parameter. Based on the dynamic length threshold, the system determines the minimum span boundary value and the maximum span boundary value at the current step, and determines the current dynamic length span through the boundary values. This span represents the range of the word unit segment analyzed by the system in the time sequence.

[0187] Within the current dynamic length span, the system determines a start position index and an end position index, and generates a position index sequence based on the two indexes. For each index in the position index sequence, a position encoding vector is extracted, and a feature segment of the corresponding position is extracted from the hidden representation. By splicing the position encoding vector and the position feature segment, the system generates an enhanced position feature containing time position information and content information. The enhanced position feature is input into a parallel prediction network to generate a prediction distribution for all positions within the current dynamic length span, and the prediction distribution is sampled to generate prediction values for all positions. The prediction values can include standardized labels for patient symptom descriptions or general vocabulary in the medical field.

[0188] The system further scans all position indexes within the current dynamic length span, compares the position index values one by one, identifies the smallest index value, and marks the position corresponding to the index as the current leftmost position index. The prediction value corresponding to the position is extracted as a target prediction value, and the target prediction value is added to a reserved prediction value set for gradually constructing a complete semantic sequence.

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

[0190] After the generation is completed, the system obtains all the retained prediction values, forms a prediction value set, sorts the prediction values in time step order, and maps the sorted prediction value sequence into sequence markers specific to the medical and health field, such as symptom labels, disease course descriptions, and drug name labels, to form a sequence marker set. The system adds an end marker to the sequence marker set to ensure the closure of the sequence structure and form a complete sequence marker set. The complete sequence marker set is further combined to form a structured sequence data block, which is mapped to form an initial sequence data as input for subsequent speech optimization.

[0191] Based on the initial sequence data, the system scans all the markers and calculates the confidence value of each marker. Low-confidence markers are usually concentrated in segments where the patient's description is ambiguous, the speech speed is abnormal, or the background noise interference is significant. The system automatically identifies markers with a confidence value below a preset threshold to form a low-confidence marker set, extracts global context features of the initial sequence data, and integrates the semantic flow, time sequence, and medical context of the patient's entire description. Based on the global context features, the system performs re-prediction or adjustment operations on the low-confidence markers to generate an optimized marker set. The optimized markers are replaced with the low-confidence markers in the initial sequence data to obtain optimized sequence data, forming the target sequence data.

[0192] The system inputs the target sequence data into a vocoder to generate a continuous speech waveform signal, which is played back in real time through a synthesized speech system to report the intelligent diagnosis result or automatically generate a patient follow-up voice report, ensuring that the output speech meets the application requirements in terms of naturalness, coherence, and accuracy of medical terminology. This process is widely used in remote follow-up, health consultation, and chronic disease voice intervention in medical and health scenarios.

[0193] In the field of financial technology business, for intelligent voice interaction systems of banks, securities, insurance, etc., the voice synthesis quality and generation efficiency of financial product explanations, contract element confirmations, and risk prompts can be effectively improved. Taking an intelligent wealth management terminal as an example, a customer wants to know the detailed information of a structural deposit product. The system automatically generates a high-quality voice broadcast through the following operation process:

[0194] Firstly, the system receives an input sequence, which is a standardized text content for a structured deposit product, including product name, term, expected yield interval, investment currency, liquidity description, risk warning language, and other components. The system divides the input sequence into a continuous sequence of token units, which can be financial terms, amount of money, time expressions, professional abbreviations, or natural language phrases. Then, each token unit is converted into a corresponding initial embedding vector through embedding space mapping. To enhance the time sequence information in the sequence, the system adds position encoding to the initial embedding vector to form a set of position-enhanced embedding vectors.

[0195] Next, the system inputs the position-enhanced embedding vectors into an encoder network to generate the first layer of encoder hidden states. Through a multi-layer encoder stack, deep semantic information is further extracted to form multi-layer encoder hidden states. Finally, with the help of residual connection and layer normalization operation, 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 the sequence generation process, the system initializes the current time step value to zero and determines the dynamic length span based on the current time step value and the hidden representation. The dynamic length span is self-adaptively adjusted according to the text characteristics to avoid information omission caused by fixed windows. The system generates prediction values for all positions within the dynamic length span in parallel, which reflect the probability distribution of words or financial terms at different positions in the text interval. By scanning the position index set within the dynamic length span, the system determines the leftmost position index and prioritizes the preservation of the prediction value corresponding to that position to ensure that important information such as financial terms and amount expressions is output first.

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

[0198] All preserved prediction values are sorted according to the time step order to form a sorted prediction value sequence, which is converted into a sequence token set. The sequence token corresponds to a standardized semantic unit in the product text, such as "The minimum subscription amount for this product is 10,000 yuan" or "The investment term is six months." The system adds a sequence termination token, and the complete token 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 expression, the system performs batch optimization on the initial sequence data through a non-autoregressive process. The system scans all tokens, calculates confidence values, and identifies low-confidence tokens with confidence values below a set threshold, such as unclear amount expressions, contradictory terms before and after, and other issues. For these tokens, the system regenerates optimized tokens based on global context features, combined with professional semantics and context logic in the financial field, to ensure that key information is expressed accurately, coherently, and normatively.

[0200] The optimized target sequence data is input into the vocoder, the system generates natural and fluent voice waveform signals, and pushes them to the terminal device to broadcast the detailed explanation of the structured deposit product to the customer in real time. The customer can clearly hear the complete set of information including product type, yield structure, risk disclosure, and liquidity arrangement, and the voice content is expressed clearly, accurately, and naturally, and the overall process meets the demand for efficient voice interaction in financial technology business, significantly reducing the cost of manual explanation, and improving the efficiency and accuracy of financial product information transmission.

[0201] The above steps can effectively identify and optimize low-confidence tokens in the initial sequence data, and realize non-autoregressive optimization operation at the sequence level combined with global context information, to improve the expression accuracy and internal logic consistency of the sequence. Further, the optimized sequence data is converted into voice waveform signals by the vocoder to realize the overall improvement of naturalness, clarity and fluency of voice output, and meet the application demand of high-quality voice synthesis.

[0202] In an embodiment, a non-autoregressive optimized data sequence processing device is provided, which corresponds to the non-autoregressive optimized data sequence processing method in the above embodiment. Referring to Figure 3 , Figure 3 A functional module diagram of a preferred embodiment of the non-autoregressive optimized data sequence processing device of the present application is shown. The encoder module 10, the span decision module 20, the parallel prediction module 30, the position screening module 40, the generation completion determination module 50, the iteration execution module 60, the sequence accumulation module 70 and the sequence optimization module 80. The detailed description of each functional module is as follows:

[0203] The 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 a current time step value and determine a dynamic length span based on the current time step value and the hidden representation;

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

[0206] The position screening module 40 is configured to identify a leftmost position index in the dynamic length span and reserve a prediction value corresponding to the leftmost position index.

[0207] The generation completion determination module 50 is configured to determine whether the sequence generation is completed.

[0208] The iteration execution module 60 is configured to repeatedly execute the steps of updating the current time step value, determining an updated dynamic length span based on the updated current time step value, generating prediction values of all positions in the updated dynamic length span, and identifying and reserving a prediction value corresponding to a leftmost position index in the updated dynamic length span, until the sequence generation is completed.

[0209] The sequence accumulation module 70 is configured to accumulate all the reserved prediction values to form initial sequence data.

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

[0211] In an embodiment, the encoder module 10 is specifically configured to:

[0212] receive an input sequence and divide the input sequence into a plurality of continuous token units to form a token unit sequence;

[0213] map each token unit to an embedding space to generate an initial embedding vector;

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

[0215] input the position-enhanced embedding vector into an encoder network to generate a first layer encoder hidden state;

[0216] input the first layer encoder hidden state into a subsequent encoder layer to generate a plurality of layer encoder hidden states;

[0217] aggregate the plurality of layer encoder hidden states by a residual connection to generate an aggregated hidden state, and perform layer normalization processing on the aggregated hidden state to generate a hidden representation.

[0218] In an embodiment, the span decision module 20 is specifically configured to:

[0219] initialize a current time step value as zero;

[0220] locate a corresponding segment in the hidden representation according to the current time step value to form a time step corresponding hidden segment;

[0221] extract a time feature vector of the time step corresponding hidden segment;

[0222] determine a span length parameter of the time feature vector, and generate a dynamic length threshold according to the span length parameter;

[0223] determine a minimum span boundary value and a maximum span boundary value respectively based on the dynamic length threshold;

[0224] determine a dynamic length span according to the minimum span boundary value and the maximum span boundary value.

[0225] In an embodiment, the parallel prediction module 30 is specifically configured to:

[0226] determine a start position index and an end position index of the dynamic length span, and generate a position index sequence according to the start position index and the end position index;

[0227] extract a position encoding vector of each position index in the position index sequence, and extract a position feature segment corresponding to the position index sequence from the hidden representation;

[0228] splice the position encoding vector and the position feature segment to generate an enhanced position feature;

[0229] input the enhanced position feature into a parallel prediction network to generate an original prediction distribution;

[0230] sample from the original prediction distribution to generate prediction values of all positions in the dynamic length span.

[0231] In an embodiment, the position screening module 40 is specifically configured to:

[0232] extract all position indexes in the dynamic length span to form a position index set;

[0233] scan position index values in the position index set and compare numerical values of the position index values to determine a minimum index value;

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

[0235] locate a prediction value corresponding to the leftmost position index as a target prediction value, and add the target prediction value to a reserved prediction value set.

[0236] In an embodiment, the sequence accumulation module 70 is specifically configured to:

[0237] obtain all reserved prediction values to form a prediction value set;

[0238] sort prediction values in the prediction value set in a time step order to form a sorted prediction value sequence;

[0239] convert the sequence of ordered prediction values into sequence tokens to form a set of sequence tokens;

[0240] add a sequence end token to the set of sequence tokens to form a complete set of sequence tokens;

[0241] combine the complete set of sequence tokens to form a sequence data block, and convert the sequence data block into initial sequence data.

[0242] In an embodiment, the sequence optimization module 80 is specifically configured to:

[0243] scan all tokens in the initial sequence data and determine a confidence value for each token;

[0244] identify tokens with a confidence value below a preset threshold as low-confidence tokens to form a set of low-confidence tokens;

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

[0246] modify each token value in the set of low-confidence tokens based on the global context features to generate a set of optimized tokens;

[0247] replace low-confidence tokens in the initial sequence data with corresponding optimized tokens in the set of optimized tokens to form optimized sequence data, and use the optimized sequence data as target sequence data;

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

[0249] In one embodiment, a computer device is provided, which can be a server, and an internal structure diagram thereof can be as shown in Figure 4 The computer device includes a processor, a memory, a network interface, and a database connected through a system bus. The processor of the computer device is configured to provide determination and control capabilities. The memory of the computer device includes a non-volatile and / or volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operating system and the computer program in the non-volatile storage medium to run. The network interface of the computer device is configured to communicate with an external user terminal through a network connection. The computer program is executed by the processor to implement the functions or steps of a non-autoregressive optimization data sequence processing method on the server side.

[0250] In one embodiment, a computer device is provided, which can be a user terminal, and an internal structure diagram thereof can be as shown in Figure 5The computer device includes a processor, a memory, a network interface, a display screen and an input device connected through a system bus. The processor of the computer device is configured to provide determination and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operating system and the computer program in the non-volatile storage medium to run. The network interface of the computer device is configured to communicate with an external server through a network connection. The computer program is executed by the processor to implement the functions or steps of a non-autoregressive optimized data sequence processing method on the user side

[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, and the processor implements the following steps when executing the computer program:

[0252] receiving an input sequence and encoding the input sequence to generate a hidden representation;

[0253] initializing a current time step value and determining a dynamic length span based on the current time step value and the hidden representation;

[0254] generating prediction values for all positions in parallel within the dynamic length span;

[0255] identifying the leftmost position index within the dynamic length span and retaining the prediction value corresponding to the leftmost position index;

[0256] determining whether sequence generation is complete;

[0257] When sequence generation is not complete, repeating the steps of updating the current time step value, determining an updated dynamic length span based on the updated current time step value, generating prediction values for all positions within the updated dynamic length span, and identifying and retaining the prediction value corresponding to the leftmost position index within the updated dynamic length span until sequence generation is complete;

[0258] accumulating all retained prediction values to form initial sequence data;

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

[0260] In one embodiment, a computer readable storage medium is provided, which stores a computer program, and the computer program is executed by a processor to implement the following steps:

[0261] receiving an input sequence and encoding the input sequence to generate a hidden representation;

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

[0263] generate prediction values for all positions in parallel within the dynamic length span;

[0264] identify a leftmost position index within the dynamic length span, and reserve a prediction value corresponding to the leftmost position index;

[0265] determine whether sequence generation is completed;

[0266] when sequence generation is not completed, repeat the steps of updating the current time step value, determining an updated dynamic length span based on the updated current time step value, generating prediction values for all positions within the updated dynamic length span, and identifying and reserving a prediction value corresponding to a leftmost position index within the updated dynamic length span, until sequence generation is completed;

[0267] accumulate all reserved prediction values to form initial sequence data;

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

[0269] It should be noted that the functions or steps described above with respect to the computer-readable storage medium or the computer device can correspond to the relevant descriptions of the server side and the 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 can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium, and when the computer program is executed, the processes of the above-mentioned embodiments of the methods can be included. Any reference to memory, storage, database or other medium used in the embodiments provided in the present 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. As an illustration but not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0271] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above-mentioned functional units and modules is exemplified, and in actual application, the above-mentioned functions can be completed by different functional units and modules according to needs, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above.

[0272] It should be noted that if non-company software tools or components appear in the embodiments of the present application, they are only used for example introduction and do not represent actual use. The above-described embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that the technical solutions recorded in the foregoing embodiments can be modified, or some technical features can be replaced by equivalents; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application.

Claims

1. A non-autoregressive optimized data sequence processing method, characterized in that: The following steps are involved: receiving an input sequence and encoding the input sequence to generate a hidden representation; Initializing a current time step value and determining a dynamic length span based on the current time step value and the hidden representation; Generate prediction values ​​for all positions in parallel within the dynamic length span; Identifying a leftmost position index within the dynamic length span, and retaining a predicted value corresponding to the leftmost position index; Determine whether sequence generation is completed; When sequence generation is not completed, repeatedly performing the steps of updating the current time step value, determining an updated dynamic length span based on the updated current time step value, generating prediction values ​​for all positions within the updated dynamic length span, and identifying and retaining the prediction value corresponding to the leftmost position index within the updated dynamic length span until sequence generation is completed; Accumulate all retained prediction values ​​to form the initial sequence data; The initial sequence data is optimized through a non-autoregressive process to generate target sequence data.

2. The non-autoregressive optimized data sequence processing method according to claim 1, characterized in that: Receiving an input sequence and encoding the input sequence to generate a hidden representation, including: receiving an input sequence and dividing the input sequence into a plurality of consecutive word units to form a word unit sequence; Map each word unit to the embedding space to generate the initial embedding vector; Add position encoding to each initial embedding vector to form a position-enhanced embedding vector; Inputting the position-enhanced embedding vector into the encoder network to generate the first layer encoder hidden state; Inputting the first layer encoder hidden state into subsequent encoder layers to generate multiple layers of encoder hidden state; The hidden states of multiple layers of encoders are aggregated through residual connections to generate aggregated hidden states, and the aggregated hidden states are layer-normalized to generate hidden representations.

3. The non-autoregressive optimized data sequence processing method according to claim 1, wherein: Initializing a current time step value and determining a dynamic length span based on the current time step value and the hidden representation, comprising: Initialize the current time step value to zero; Locating a corresponding segment in the hidden representation according to the current time step value to form a hidden segment corresponding to the time step; Extracting a time feature vector of a hidden segment corresponding to the time step; Determining a span length parameter of the time feature vector, and generating a dynamic length threshold according to the span length parameter; Determining a minimum span boundary value and a maximum span boundary value based on the dynamic length threshold respectively; A dynamic length span is determined based on the minimum span boundary value and the maximum span boundary value.

4. The non-autoregressive optimized data sequence processing method according to claim 1, wherein: Generate predictions for all positions in the dynamic length span in parallel, including: Determine a starting position index and an ending position index of the dynamic length span, and generate a position index sequence according to the starting position index and the ending position index; Extracting a position encoding vector for each position index in the position index sequence, and extracting a position feature segment corresponding to the position index sequence from the hidden representation; splicing the position encoding vector and the position feature fragment to generate an enhanced position feature; Inputting the enhanced position features into a parallel prediction network to generate an original prediction distribution; Sampling is performed from the original prediction distribution to generate prediction values ​​for all positions within the dynamic length span.

5. The non-autoregressive optimized data sequence processing method according to claim 1, characterized in that: Identifying a leftmost position index within the dynamic length span and retaining a predicted value corresponding to the leftmost position index includes: Extracting all position indexes within the dynamic length span to form a position index set; Scanning the position index values ​​in the position index set and comparing the numerical values ​​of the position index values ​​to determine a minimum index value; Identify the position index corresponding to the minimum index value as the leftmost position index; The prediction value corresponding to the leftmost position index is located as the target prediction value, and the target prediction value is added to the retained prediction value set.

6. The non-autoregressive optimized data sequence processing method according to claim 1, characterized in that: Accumulate all retained predictions to form the initial sequence data, including: Get all retained prediction values ​​to form a prediction value set; sorting the predicted values ​​in the predicted value set in order of time steps to form a sorted predicted value sequence; Converting the ranked prediction value sequence into a sequence tag to form a sequence tag set; Adding a sequence end marker to the sequence marker set to form a complete sequence marker set; The complete sequence tag sets are combined to form sequence data blocks, and the sequence data blocks are converted into initial sequence data.

7. The non-autoregressive optimized data sequence processing method according to claim 1, characterized in that: Optimizing the initial sequence data through a non-autoregressive process to generate target sequence data includes: Scanning all markers in the initial sequence data and determining a confidence value for each marker; Identify tags with confidence values ​​lower than a preset threshold as low-confidence tags to form a low-confidence tag set; Extracting global context features of the initial sequence data; Modifying each tag value in the low-confidence tag set based on the global context feature to generate an optimized tag set; Replacing low-confidence markers in the initial sequence data with corresponding optimized markers in the optimized marker set to form optimized sequence data, and using the optimized sequence data as target sequence data; The target sequence data is input into a vocoder to generate a speech waveform signal.

8. A data sequence processing device for non-autoregressive optimization, characterized in that: The non-autoregressive optimized data sequence processing device comprises: An encoder module, configured to receive an input sequence and encode the input sequence to generate a hidden representation; a span decision module for initializing a current time step value and determining a dynamic length span based on the current time step value and the hidden representation; A parallel prediction module, configured to generate prediction values ​​for all positions in parallel within the dynamic length span; a position screening module, configured to identify the leftmost position index within the dynamic length span and retain the predicted value corresponding to the leftmost position index; A generation completion determination module is used to determine whether sequence generation is completed; an iterative execution module, configured to, when sequence generation is not completed, repeatedly execute the steps of updating a current time step value, determining an 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 completed; The sequence accumulation module is used to accumulate all the 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 capable of running on the processor. When the non-autoregressive optimized data sequence processing program is executed by the processor, the steps of the non-autoregressive optimized data sequence processing method according to any one of claims 1 to 7 are implemented.

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 according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Non-autoregressive Mongolian-Chinese machine translation method based on round-robin decoding and vocabulary attention

    CN112417901A

  • Scene character recognition system and method based on parallel iterative imitation decoding

    CN113963340A

  • Knowledge distillation method, electronic equipment and storage medium

    CN114822518A

  • Speech synthesis method and device

    CN116052640A

  • Parallelized Tacotron: non-autoregressive and controllable TTS

    CN116457870A