A data processing method and apparatus

By aligning speech features with text units using a boundary predictor, the problem of speech and text modal differences is solved, thus improving the processing accuracy of cross-modal tasks.

CN116052714BActive Publication Date: 2026-06-12HUAWEI TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HUAWEI TECH CO LTD
Filing Date
2022-11-30
Publication Date
2026-06-12

AI Technical Summary

Technical Problem

Speech and text are two different modal inputs, and their processing and understanding processes differ, which affects the accuracy of cross-modal conversion tasks such as speech translation.

Method used

By acquiring the feature representation processed by the speech encoder, the boundary predictor is used to determine the boundary information between speech and text units, the speech features are divided into sub-features and aligned with the text units, and downstream tasks are executed through the task network to reduce modal representation differences.

Benefits of technology

It improves the processing accuracy of speech-to-text cross-modal tasks and enhances the accuracy of cross-modal conversion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116052714B_ABST
    Figure CN116052714B_ABST
Patent Text Reader

Abstract

A data processing method applied to multi-modal data processing relates to the field of artificial intelligence, and comprises: obtaining a first feature representation; determining boundary information between different text units in target text expressed in target speech through a boundary predictor according to the first feature representation; the boundary information is used for dividing the first feature representation to obtain a plurality of sub-features; each sub-feature comprises a plurality of frame features corresponding to the speech of one text unit in the target speech; the plurality of frame features are fused to obtain a target feature corresponding to the speech of each text unit; and a downstream task is executed through a task network according to the plurality of target features. According to the application, the features of the speech are divided according to the granularity of the text units, and then the speech and the text can be aligned to the same sequence length, so that the representation difference between the two modalities is reduced, and the processing accuracy of the downstream task of the speech-text cross-modal can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence, and more particularly to a data processing method and apparatus thereof. Background Technology

[0002] Artificial intelligence (AI) is the theory, methods, technology, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results. In other words, AI is a branch of computer science that attempts to understand the essence of intelligence and produce a new kind of intelligent machine that can react in a way similar to human intelligence. AI studies the design principles and implementation methods of various intelligent machines, enabling them to possess the functions of perception, reasoning, and decision-making.

[0003] Speech and text are two modes of expression and communication used by humans. Generally, humans can switch freely between these two modes to communicate without significant obstacles. However, for machines, speech and text are two very different modalities of input, and their processing and understanding processes are quite different. Speech input is a continuous, relatively long signal input, while text is a discrete, relatively short representation input. Tasks involving the conversion between these two modalities are collectively referred to as speech-text cross-modal tasks, including speech recognition, speech synthesis, speech translation, and speech conversion.

[0004] Integrating speech and text into a single system allows for efficient processing of input from both modalities while also combining and applying knowledge learned from each. Such a system heavily relies on the alignment between the two modalities; however, inconsistencies in speech and text representations hinder accurate cross-modal conversion, especially for multi-step tasks like speech translation. Summary of the Invention

[0005] In a first aspect, this application provides a data processing method, the method comprising: obtaining a first feature representation; the first feature representation being obtained by processing target speech through a speech encoder; determining boundary information between different text units in the target text expressed in the target speech using a boundary predictor based on the first feature representation; the boundary information being used to divide the first feature representation to obtain multiple sub-features; each sub-feature including multi-frame features corresponding to the speech of a text unit in the target speech; fusing the multi-frame features to obtain target features corresponding to the speech of each text unit; and executing downstream tasks through a task network based on the multiple target features. By dividing the speech features according to the granularity of text units, speech and text can be aligned to the same sequence length, thereby reducing the representation differences between the two modalities and improving the processing accuracy of speech-text cross-modal downstream tasks.

[0006] In one possible implementation, the boundary information indicates the boundary frames located between different text units in the target text within the target speech.

[0007] In one possible implementation, the boundary information specifically refers to: the first probability that each frame in the target speech is a boundary frame between different text units in the target text, wherein the frame with the first probability greater than a threshold is the boundary frame.

[0008] In one possible implementation, the method further includes: determining a second probability that each frame in the target speech is non-empty based on the first feature representation; the fusion of the multi-frame features includes: performing a weighted summation of the multi-frame features based on the second probability corresponding to each frame feature in the multi-frame features.

[0009] In the above manner, the encoded speech feature input is predicted by the boundary predictor, and the speech feature is compressed according to the predicted boundary result. The compressed speech feature representation has a length similar to the alignment unit sequence, which will be beneficial for alignment with the text space when applied to downstream tasks.

[0010] In one possible implementation, the boundary predictor is a classifier based on convolutional and fully connected layers.

[0011] In one possible implementation, the method further includes: determining a probability distribution corresponding to each frame in the target speech using a temporal classification (CTC) network based on the first feature representation and the word segmentation result of the target text, where each probability in the probability distribution represents the probability of a frame corresponding to a text unit in the dictionary; determining a ground truth value corresponding to the boundary information based on the probability distribution; and using the ground truth value and the boundary information to update the boundary predictor. The boundary predictor is guided by a CTC module and trained using an alignment unit sequence of the corresponding text. This CTC module can be discarded after training. Thus, compared to a conventional model, this scheme only introduces parameters for a lightweight boundary predictor.

[0012] In one possible implementation, the method further includes:

[0013] Multiple second feature representations are obtained; the multiple second feature representations are obtained by processing text data through a text encoder; different second feature representations correspond to different text units in the text data;

[0014] Based on the multiple second feature representations, downstream tasks are executed through the task network.

[0015] In one possible implementation, the downstream task is a speech-text cross-modal task.

[0016] Secondly, this application provides a data processing apparatus, the apparatus comprising:

[0017] The acquisition module is used to acquire a first feature representation; the first feature representation is obtained by processing the target speech through a speech encoder;

[0018] The processing module is configured to determine the boundary information between different text units in the target text expressed in the target speech based on the first feature representation and through a boundary predictor; the boundary information is used to divide the first feature representation to obtain multiple sub-features; each sub-feature includes multiple frame features corresponding to the speech of a text unit in the target speech;

[0019] The features from the multiple frames are fused to obtain the target features corresponding to the speech of each text unit;

[0020] Based on multiple target features, downstream tasks are executed through a task network.

[0021] In one possible implementation, the boundary information indicates the boundary frames located between different text units in the target text within the target speech.

[0022] In one possible implementation, the boundary information specifically refers to: the first probability that each frame in the target speech is a boundary frame between different text units in the target text, wherein the frame with the first probability greater than a threshold is the boundary frame.

[0023] In one possible implementation, the processing module is further configured to: determine a second probability that each frame in the target speech is non-empty based on the first feature representation;

[0024] The processing module is specifically used for:

[0025] The multi-frame features are weighted and summed based on the second probability corresponding to each frame feature in the multi-frame features.

[0026] In one possible implementation, the boundary predictor is a classifier based on convolutional and fully connected layers.

[0027] In one possible implementation, the processing module is further configured to:

[0028] Based on the first feature representation and the word segmentation result of the target text, a probability distribution corresponding to each frame in the target speech is determined through a temporal classification (CTC) network, wherein each probability in the probability distribution represents the probability of a frame corresponding to a text unit in the dictionary;

[0029] Based on the probability distribution, the true value corresponding to the boundary information is determined; the true value and the boundary information are used to update the boundary predictor.

[0030] In one possible implementation, the acquisition module is further configured to:

[0031] Multiple second feature representations are obtained; the multiple second feature representations are obtained by processing text data through a text encoder; different second feature representations correspond to different text units in the text data;

[0032] The processing module is further configured to:

[0033] Based on the multiple second feature representations, downstream tasks are executed through the task network.

[0034] In one possible implementation, the downstream task is a speech-text cross-modal task.

[0035] Thirdly, embodiments of this application provide an execution device, which may include a memory, a processor, and a bus system, wherein the memory is used to store a program, and the processor is used to execute the program in the memory to perform the methods described in the first aspect above and any of its optional methods.

[0036] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when run on a computer, causes the computer to perform the methods described in the first aspect and any of its optional methods.

[0037] Fifthly, embodiments of this application provide a computer program that, when run on a computer, causes the computer to perform the first aspect and any of its optional methods described above.

[0038] Sixthly, this application provides a chip system including a processor for supporting an execution data processing device in implementing the functions involved in the foregoing aspects, such as transmitting or processing data involved in the foregoing methods; or, information. In one possible design, the chip system further includes a memory for storing program instructions and data necessary for the execution device or training device. This chip system may be composed of chips or may include chips and other discrete devices. Attached Figure Description

[0039] Figure 1A A structural diagram illustrating the main framework of artificial intelligence;

[0040] Figure 1B Hezhi Figure 1C This is a schematic diagram of the application system framework in an embodiment of this application;

[0041] Figure 1D This is a schematic diagram of an optional hardware structure for a terminal.

[0042] Figure 2 This is a schematic diagram of the structure of a server;

[0043] Figure 3 This is a schematic diagram of a system architecture according to this application;

[0044] Figure 4 A process for providing a cloud service;

[0045] Figure 5 This is a schematic diagram of a convolutional network;

[0046] Figure 6 This is a schematic diagram of a convolutional network;

[0047] Figure 7 A flowchart illustrating a data processing method provided in an embodiment of this application;

[0048] Figure 8 and Figure 9 This is a schematic diagram of an encoder;

[0049] Figure 10 and Figure 11 This is a schematic diagram of a software architecture;

[0050] Figure 12 A schematic diagram of the structure of a data processing apparatus provided in an embodiment of this application;

[0051] Figure 13 A schematic diagram of the structure of the execution device provided in the embodiments of this application;

[0052] Figure 14 A schematic diagram of the structure of the training device provided in the embodiments of this application;

[0053] Figure 15 This is a schematic diagram of a chip structure provided in an embodiment of this application. Detailed Implementation

[0054] The embodiments of this application are described below with reference to the accompanying drawings. The terminology used in the implementation section of this application is for explaining specific embodiments only and is not intended to limit the scope of this application.

[0055] The embodiments of this application will now be described with reference to the accompanying drawings. Those skilled in the art will recognize that, with technological advancements and the emergence of new scenarios, the technical solutions provided in the embodiments of this application are equally applicable to similar technical problems.

[0056] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such terms are interchangeable where appropriate; this is merely a way of distinguishing objects with the same attributes in the embodiments of this application. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion, so that a process, method, system, product, or apparatus that comprises a series of elements is not necessarily limited to those elements, but may include other elements not explicitly listed or inherent to those processes, methods, products, or apparatuses.

[0057] The terms “substantially,” “about,” and similar terms used herein are used as approximations, not as terms of degree, and are intended to take into account the inherent biases of measurements or calculations known to those skilled in the art. Furthermore, the term “may” used in describing embodiments of this application means “one or more possible embodiments.” The terms “use,” “using,” and “used” used herein are to be considered synonymous with the terms “utilize,” “utilizing,” and “utilized,” respectively. Additionally, the term “exemplary” is intended to refer to an instance or illustration.

[0058] First, the overall workflow of the artificial intelligence system is described; please refer to [link to documentation]. Figure 1A , Figure 1A The diagram illustrates a structural framework for artificial intelligence (AI). The framework is further elaborated below along two dimensions: the "Intelligent Information Chain" (horizontal axis) and the "IT Value Chain" (vertical axis). The "Intelligent Information Chain" reflects a series of processes from data acquisition to processing. For example, it could be the general process of intelligent information perception, intelligent information representation and formation, intelligent reasoning, intelligent decision-making, and intelligent execution and output. In this process, data undergoes a condensation process of "data—information—knowledge—wisdom." The "IT Value Chain" reflects the value that AI brings to the information technology industry, from the underlying infrastructure of human intelligence and information (provided and processed through technological means) to the industrial ecosystem of the system.

[0059] (1) Infrastructure

[0060] Infrastructure provides computing power to support artificial intelligence systems, enabling communication with the external world and providing support through a basic platform. This communication occurs through sensors; computing power is provided by intelligent chips (hardware acceleration chips such as CPUs, NPUs, GPUs, ASICs, and FPGAs); and the basic platform includes distributed computing frameworks and related platform guarantees and support, which may include cloud storage and computing, interconnected networks, etc. For example, sensors communicate with the outside world to acquire data, and this data is provided to intelligent chips in the distributed computing system provided by the basic platform for computation.

[0061] (2) Data

[0062] The data at the next layer of infrastructure is used to represent the data sources in the field of artificial intelligence. The data involves graphics, images, voice, text, and IoT data from traditional devices, including business data from existing systems and sensor data such as force, displacement, liquid level, temperature, and humidity.

[0063] (3) Data processing

[0064] Data processing typically includes methods such as data training, machine learning, deep learning, search, reasoning, and decision-making.

[0065] Among them, machine learning and deep learning can perform intelligent information modeling, extraction, preprocessing, and training of data by symbolizing and formalizing it.

[0066] Reasoning refers to the process in which, in a computer or intelligent system, the machine thinks and solves problems by simulating human intelligent reasoning, based on reasoning control strategies and using formalized information. Typical functions include search and matching.

[0067] Decision-making refers to the process of making decisions based on intelligent information after reasoning, and it typically provides functions such as classification, sorting, and prediction.

[0068] (4) General ability

[0069] After the data processing mentioned above, the results of the data processing can be used to form some general capabilities, such as algorithms or a general system, for example, translation, text analysis, computer vision processing, speech recognition, image recognition, etc.

[0070] (5) Smart Products and Industry Applications

[0071] Intelligent products and industry applications refer to products and applications of artificial intelligence systems in various fields. They are the encapsulation of overall artificial intelligence solutions, productizing intelligent information decision-making and realizing practical applications. Their application areas mainly include: intelligent terminals, intelligent transportation, intelligent healthcare, autonomous driving, smart cities, etc.

[0072] This application can be applied to the field of natural language processing in the field of artificial intelligence. The following will introduce several application scenarios that have been implemented in products, taking natural language processing as an example.

[0073] First, we will introduce the application scenarios of this application. This application can be applied, but is not limited to, to applications with multimodal processing capabilities for images, text, or audio (hereinafter referred to as multimodal processing applications) or cloud services provided by cloud-side servers, etc., which will be introduced separately below:

[0074] I. Multimodal Processing Applications

[0075] The product form of this application embodiment can be a multimodal processing application. Multimodal processing applications can run on terminal devices or cloud-based servers.

[0076] In one possible implementation, a multimodal processing application can perform tasks to process multimodal data and obtain the processing results. That is, the same processing model can handle input data from multiple modalities.

[0077] For example, for speech translation (such as Chinese to English) tasks: during pre-training, a large amount of unlabeled speech and text modal data can be used to train the language model, while in the task customization stage, only a small amount of paired Chinese to English data is needed to obtain the final translation model.

[0078] For example, for OCR reading tasks: first, a language model is pre-trained using data from different modalities such as OCR images, text, and speech. In the task customization stage, a small number of parallel corpora of paired OCR images and text or OCR images and speech can be used to train a model that can directly recognize and read the content from OCR.

[0079] Similarly, similar scenarios are not limited to content generation and recognition tasks within any cross-modal or unimodal context.

[0080] It should be understood that the examples given here are only for the convenience of understanding the application scenarios of the embodiments of this application, and do not exhaustively list the application scenarios of the embodiments of this application.

[0081] In one possible implementation, a user can open a multimodal processing application installed on a terminal device and input multimodal data such as images, text, or audio. The multimodal processing application can process the image using a multimodal model trained by the method provided in this application embodiment and present the processing result to the user (the presentation method may include, but is not limited to, displaying, saving, uploading to the cloud, etc.).

[0082] In one possible implementation, a user can open a multimodal processing application installed on a terminal device and input multimodal data such as images, text, or audio. The multimodal processing application can send the multimodal data such as images, text, or audio to a cloud-based server. The cloud-based server processes the image using a multimodal model trained by the method provided in this application embodiment and sends the processing result back to the terminal device. The terminal device can then present the processing result to the user (the presentation method may include, but is not limited to, displaying, saving, or uploading to the cloud).

[0083] The following sections will introduce the multimodal processing application in this application embodiment from the perspectives of functional architecture and product architecture that implements the functions.

[0084] Reference Figure 1B , Figure 1B This is a schematic diagram of the functional architecture of the multimodal processing application in the embodiments of this application:

[0085] In one possible implementation, such as Figure 1B As shown, the multimodal processing application 102 can receive input parameters 101 (e.g., including an image) and generate a processing result 103. The multimodal processing application 102 can be executed on at least one computer system (for example) and includes computer code that, when executed by one or more computers, causes the computers to execute a multimodal model trained by the methods provided in the embodiments of this application.

[0086] Reference Figure 1C , Figure 1C This is a schematic diagram of the entity architecture for running a multimodal processing application in this embodiment of the application:

[0087] See Figure 1C , Figure 1C A schematic diagram of a system architecture is shown. The system may include a terminal 100 and a server 200. The server 200 may include one or more servers (…). Figure 1C (The example includes a server), and server 200 can provide multimodal processing capabilities for one or more terminals.

[0088] The terminal 100 may have a multimodal processing application installed, or a webpage related to cross-modal language processing functions opened. The application and webpage can provide an interface. The terminal 100 can receive relevant parameters input by the user on the cross-modal language processing function interface and send the parameters to the server 200. The server 200 can obtain the processing result based on the received parameters and return the processing result to the terminal 100.

[0089] It should be understood that in some optional implementations, the terminal 100 can also complete the action of obtaining the processing result based on the received parameters on its own, without the need for the server to cooperate. This application embodiment is not limited to this.

[0090] The following description Figure 1C The product form of the mid-terminal 100;

[0091] The terminal 100 in this application embodiment can be a mobile phone, tablet computer, wearable device, vehicle device, augmented reality (AR) / virtual reality (VR) device, laptop computer, ultra-mobile personal computer (UMPC), netbook, personal digital assistant (PDA), etc., and this application embodiment does not impose any restrictions on it.

[0092] Figure 1D A schematic diagram of an optional hardware structure for terminal 100 is shown.

[0093] refer to Figure 1D As shown, the terminal 100 may include a radio frequency unit 110, a memory 120, an input unit 130, a display unit 140, a camera 150 (optional), an audio circuit 160 (optional), a speaker 161 (optional), a microphone 162 (optional), a processor 170, an external interface 180, a power supply 190, and other components. Those skilled in the art will understand that... Figure 1D These are merely examples of terminals or multi-functional devices and do not constitute a limitation on terminals or multi-functional devices. They may include more or fewer components than shown in the illustration, or combine certain components, or use different components.

[0094] The input unit 130 can be used to receive input numerical or character information, and to generate key signal inputs related to user settings and function control of the portable multi-functional device. Specifically, the input unit 130 may include a touchscreen 131 (optional) and / or other input devices 132. The touchscreen 131 can collect touch operations performed by the user on or near it (such as operations performed by the user using fingers, knuckles, styluses, or any suitable object on or near the touchscreen), and drive the corresponding connection devices according to a pre-set program. The touchscreen can detect the user's touch actions, convert the touch actions into touch signals and send them to the processor 170, and can receive and execute commands sent by the processor 170; the touch signal includes at least touch point coordinate information. The touchscreen 131 can provide an input interface and an output interface between the terminal 100 and the user. In addition, various types of touchscreens, such as resistive, capacitive, infrared, and surface acoustic wave, can be used to implement the touchscreen. Besides the touchscreen 131, the input unit 130 may also include other input devices. Specifically, other input devices 132 may include, but are not limited to, one or more of the following: physical keyboard, function keys (such as volume control buttons, power buttons, etc.), trackball, mouse, joystick, etc.

[0095] The input device 132 can receive multimodal data such as input images, text, or audio.

[0096] The display unit 140 can be used to display information input by the user or information provided to the user, various menus of the terminal 100, interactive interfaces, file display, and / or playback of any multimedia file. In this embodiment, the display unit 140 can be used to display the interface and processing results of a multimodal processing application.

[0097] The memory 120 can be used to store instructions and data. The memory 120 may primarily include an instruction storage area and a data storage area. The data storage area can store various types of data, such as multimedia files and text. The instruction storage area can store software units such as operating systems, applications, and instructions required for at least one function, or subsets or extended sets thereof. It may also include non-volatile random access memory. It provides the processor 170 with hardware, software, and data resources for managing the computing device, supporting control software and applications. It is also used for storing multimedia files, as well as storing running programs and applications.

[0098] The processor 170 is the control center of the terminal 100. It connects various parts of the terminal 100 via various interfaces and lines. By running or executing instructions stored in the memory 120 and calling data stored in the memory 120, it performs various functions and processes data of the terminal 100, thereby controlling the terminal device as a whole. Optionally, the processor 170 may include one or more processing units; preferably, the processor 170 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 170. In some embodiments, the processor and memory can be implemented on a single chip; in some embodiments, they can also be implemented separately on independent chips. The processor 170 can also be used to generate corresponding operation control signals, send them to the corresponding components of the computing processing device, read and process data in the software, especially read and process data and programs in the memory 120, so that the various functional modules therein perform corresponding functions, thereby controlling the corresponding components to act according to the instructions.

[0099] The memory 120 can be used to store software code related to the data processing method, and the processor 170 can execute the steps of the chip's data processing method, and can also schedule other units (such as the above-mentioned input unit 130 and display unit 140) to achieve the corresponding functions.

[0100] The radio frequency unit 110 (optional) can be used for receiving and transmitting signals during information transmission or calls. For example, it can receive downlink information from the base station and process it for the processor 170; additionally, it can transmit uplink data to the base station. Typically, the RF circuit includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low-noise amplifier (LNA), a duplexer, etc. Furthermore, the radio frequency unit 110 can also communicate wirelessly with network devices and other devices. This wireless communication can use any communication standard or protocol, including but not limited to Global System for Mobile communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Messaging Service (SMS), etc.

[0101] In this embodiment of the application, the radio frequency unit 110 can send multimodal data such as images, text or audio to the server 200 and receive the processing results sent by the server 200.

[0102] It should be understood that the radio frequency unit 110 is optional and can be replaced with other communication interfaces, such as a network port.

[0103] The terminal 100 also includes a power supply 190 (such as a battery) that supplies power to various components. Preferably, the power supply can be logically connected to the processor 170 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system.

[0104] Terminal 100 also includes an external interface 180, which can be a standard Micro USB interface or a multi-pin connector, which can be used to connect terminal 100 to other devices for communication or to connect a charger to charge terminal 100.

[0105] Although not shown, terminal 100 may also include a flash, a wireless fidelity (WiFi) module, a Bluetooth module, sensors with various functions, etc., which will not be described in detail here. Some or all of the methods described below can be applied to, for example... Figure 1D In the terminal 100 shown.

[0106] The following description Figure 1C The product form of the mid-range server 200;

[0107] Figure 2 A structural diagram of a server 200 is provided, as follows: Figure 2 As shown, server 200 includes bus 201, processor 202, communication interface 203, and memory 204. Processor 202, memory 204, and communication interface 203 communicate with each other via bus 201.

[0108] Bus 201 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of representation, Figure 2 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0109] The processor 202 can be any one or more of the following processors: central processing unit (CPU), graphics processing unit (GPU), microprocessor (MP), or digital signal processor (DSP).

[0110] Memory 204 may include volatile memory, such as random access memory (RAM). Memory 204 may also include non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid state drive (SSD).

[0111] The memory 204 can be used to store software code related to the data processing method, and the processor 202 can execute the steps of the chip's data processing method, and can also schedule other units to achieve corresponding functions.

[0112] It should be understood that the aforementioned terminal 100 and server 200 can be centralized or distributed devices. The processors (e.g., processor 170 and processor 202) in the aforementioned terminal 100 and server 200 can be hardware circuits (such as application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), general-purpose processors, digital signal processors (DSPs), microprocessors or microcontrollers, etc.) or combinations of these hardware circuits. For example, the processor can be a hardware system with instruction execution capabilities, such as a CPU or DSP, or a hardware system without instruction execution capabilities, such as an ASIC or FPGA, or a combination of the aforementioned hardware systems without instruction execution capabilities and hardware systems with instruction execution capabilities.

[0113] It should be understood that the steps related to the model inference process in the embodiments of this application involve AI-related operations. When performing AI operations, the instruction execution architecture of the terminal device and server is not limited to the processor-memory architecture described above. The following section will further explain... Figure 3 The system architecture provided in the embodiments of this application will be described in detail.

[0114] Figure 3 This is a schematic diagram of the system architecture provided for an embodiment of this application. Figure 3 As shown, the system architecture 500 includes an execution device 510, a training device 520, a database 530, a client device 540, a data storage system 550, and a data acquisition system 560.

[0115] The execution device 510 includes a calculation module 511, an I / O interface 512, a preprocessing module 513, and a preprocessing module 514. The calculation module 511 may include a target model / rule 501, while the preprocessing modules 513 and 514 are optional.

[0116] The execution device 510 can be a terminal device or a server that runs the aforementioned multimodal processing applications.

[0117] The data acquisition device 560 is used to collect training samples. The training samples can be multimodal data such as images, text, or audio. After collecting the training samples, the data acquisition device 560 stores these training samples in the database 530.

[0118] The training device 520 can maintain training samples in the database 530 and obtain the target model / rule 501 from the neural network to be trained (e.g., the multimodal model in the embodiments of this application (e.g., including encoder, mapping network, decoder, etc.)).

[0119] It should be understood that the training device 520 can perform a pre-training process on the neural network to be trained based on the training samples maintained in the database 530, or fine-tune the model based on the pre-training.

[0120] It should be noted that in practical applications, the training samples maintained in database 530 may not all come from the data acquisition device 560; they may also be received from other devices. Furthermore, it should be noted that training device 520 may not necessarily train the target model / rule 501 entirely based on the training samples maintained in database 530; it may also obtain training samples from the cloud or other sources for model training. The above description should not be construed as limiting the embodiments of this application.

[0121] The target model / rule 501 trained using training device 520 can be applied to different systems or devices, such as... Figure 3 The execution device 510 shown can be a terminal, such as a mobile phone terminal, tablet computer, laptop computer, augmented reality (AR) / virtual reality (VR) device, vehicle terminal, etc., or it can be a server, etc.

[0122] Specifically, the training device 520 can transfer the trained model to the execution device 510.

[0123] exist Figure 3 In the process, the execution device 510 is configured with an input / output (I / O) interface 512 for data interaction with external devices. Users can input data (such as multimodal data such as images, text, or audio in this embodiment) into the I / O interface 512 through the client device 540.

[0124] Preprocessing modules 513 and 514 are used to preprocess the input data received from the I / O interface 512. It should be understood that preprocessing modules 513 and 514 may be absent, or only one preprocessing module may be used. When preprocessing modules 513 and 514 are absent, the calculation module 511 can be used directly to process the input data.

[0125] During the preprocessing of input data by the execution device 510, or during the calculation module 511 of the execution device 510 performing calculations and other related processes, the execution device 510 can call data, code, etc. in the data storage system 550 for corresponding processing, or store the data, instructions, etc. obtained from the corresponding processing into the data storage system 550.

[0126] Finally, the I / O interface 512 provides the processing result to the client device 540, thereby providing it to the user.

[0127] exist Figure 3 In the illustrated scenario, the user can manually provide input data, which can be done through the interface provided by I / O interface 512. Alternatively, the client device 540 can automatically send input data to I / O interface 512. If user authorization is required for the client device 540 to automatically send input data, the user can set the corresponding permissions in the client device 540. The user can view the output results of the execution device 510 on the client device 540, which can be presented in various forms such as display, sound, or animation. The client device 540 can also act as a data acquisition terminal, collecting the input data and output results of the input I / O interface 512 as shown in the figure, and storing them as new sample data in database 530. Alternatively, data can be collected directly from the I / O interface 512 without going through the client device 540, using the input data and output results of the input I / O interface 512 as shown in the figure, and storing them as new sample data in database 530.

[0128] It is worth noting that, Figure 3 This is merely a schematic diagram of a system architecture provided in an embodiment of this application. The positional relationships between the devices, components, modules, etc., shown in the diagram do not constitute any limitation. For example, in Figure 3 In this context, the data storage system 550 is an external storage device relative to the execution device 510. However, in other cases, the data storage system 550 may also be placed within the execution device 510. It should be understood that the aforementioned execution device 510 may be deployed within the client device 540.

[0129] From the inference side of the model:

[0130] In this embodiment, the computing module 511 of the execution device 520 can obtain the code stored in the data storage system 550 to implement the steps related to the model reasoning process in this embodiment.

[0131] In this embodiment of the application, the computing module 511 of the execution device 520 may include hardware circuits (such as application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), general-purpose processors, digital signal processors (DSPs), microprocessors or microcontrollers, etc.) or combinations of these hardware circuits. For example, the training device 520 may be a hardware system with instruction execution capabilities, such as a CPU or DSP, or a hardware system without instruction execution capabilities, such as an ASIC or FPGA, or a combination of the aforementioned hardware systems without instruction execution capabilities and hardware systems with instruction execution capabilities.

[0132] Specifically, the computing module 511 of the execution device 520 can be a hardware system with the function of executing instructions. The steps related to the model inference process provided in this application embodiment can be software code stored in the memory. The computing module 511 of the execution device 520 can obtain the software code from the memory and execute the obtained software code to implement the steps related to the model inference process provided in this application embodiment.

[0133] It should be understood that the computing module 511 of the execution device 520 can be a combination of a hardware system without the function of executing instructions and a hardware system with the function of executing instructions. Some steps related to the model reasoning process provided in the embodiments of this application can also be implemented by the hardware system in the computing module 511 of the execution device 520 without the function of executing instructions, which is not limited here.

[0134] From the training side of the model:

[0135] In this embodiment of the application, the training device 520 can access the memory ( Figure 3 (Not shown in the diagram, but can be integrated into the training device 520 or deployed separately from the training device 520) The code stored in the diagram can be used to implement the steps related to model training in the embodiments of this application.

[0136] In this embodiment of the application, the training device 520 may include hardware circuits (such as application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), general-purpose processors, digital signal processors (DSPs), microprocessors or microcontrollers, etc.) or combinations of these hardware circuits. For example, the training device 520 may be a hardware system with instruction execution capabilities, such as a CPU or DSP, or a hardware system without instruction execution capabilities, such as an ASIC or FPGA, or a combination of the aforementioned hardware systems without instruction execution capabilities and hardware systems with instruction execution capabilities.

[0137] It should be understood that the training device 520 can be a combination of a hardware system without the function of executing instructions and a hardware system with the function of executing instructions. Some steps related to the neutralization model training provided in the embodiments of this application can also be implemented by the hardware system in the training device 520 without the function of executing instructions, which is not limited here.

[0138] II. Cloud services providing multimodal processing capabilities:

[0139] In one possible implementation, the server can provide cross-modal language processing services to the client side through an application programming interface (API).

[0140] In this process, the terminal device can send relevant parameters (such as multimodal data such as images, text, and audio) to the server through the API provided by the cloud. The server can obtain the processing results based on the received parameters and return the processing results to the terminal.

[0141] The description of the terminal and server can be found in the above embodiments, and will not be repeated here.

[0142] like Figure 4 The process of using a cloud service with multimodal processing capabilities provided by a cloud platform is illustrated.

[0143] 1. Activate and purchase content moderation services.

[0144] 2. Users can download the software development kit (SDK) corresponding to the content moderation service. Cloud platforms usually provide multiple development versions of the SDK for users to choose from according to their development environment needs, such as JAVA version SDK, Python version SDK, PHP version SDK, Android version SDK, etc.

[0145] 3. After downloading the corresponding version of the SDK to their local machine according to their needs, users can import the SDK project into their local development environment, configure and debug it in the local development environment, and develop other functions in the local development environment to form an application that integrates multimodal processing capabilities.

[0146] 4. When a multimodal processing application needs to perform cross-modal language processing, it can trigger an API call for the cross-modal language processing function. When the application triggers the cross-modal language processing function, it initiates an API request to the running instance of the multimodal processing service in the cloud environment. The API request carries an image, which is then processed by the running instance in the cloud environment to obtain the processing result.

[0147] 5. The cloud environment returns the processing result to the application, thus completing a multimodal processing function call.

[0148] Since the embodiments of this application involve a large number of neural network applications, for ease of understanding, the relevant terms and concepts such as neural networks involved in the embodiments of this application will be introduced below.

[0149] (1) Neural Network

[0150] A neural network can be composed of neural units, which can be defined as a computational unit that takes xs (i.e., input data) and an intercept of 1 as input. The output of this computational unit can be:

[0151]

[0152] Where s = 1, 2, ..., n, where n is a natural number greater than 1, Ws is the weight of xs, and b is the bias of the neural unit. f is the activation function of the neural unit, used to introduce nonlinear characteristics into the neural network to convert the input signal in the neural unit into an output signal. The output signal of this activation function can be used as the input of the next convolutional layer, and the activation function can be the sigmoid function. A neural network is a network formed by connecting multiple of the above-mentioned individual neural units together, that is, the output of one neural unit can be the input of another neural unit. The input of each neural unit can be connected to the local receptive field of the previous layer to extract the features of the local receptive field, which can be a region composed of several neural units.

[0153] (2) Transformer layer

[0154] The neural network includes an embedding layer and at least one transformer layer. The at least one transformer layer can be N transformer layers (N being an integer greater than 0). Each transformer layer includes sequentially adjacent attention layers, add and normalize layers, feed-forward layers, and add and normalize layers. In the embedding layer, the current input is embedded to obtain multiple embedding vectors. In the attention layer, P input vectors are obtained from the layer above the first transformer layer. Using any first input vector among the P input vectors as the center, intermediate vectors corresponding to the first input vector are obtained based on the correlation between each input vector within a preset attention window and the first input vector. This process determines P intermediate vectors corresponding to the P input vectors. In the pooling layer, the P intermediate vectors are merged into Q output vectors, where the multiple output vectors obtained from the last transformer layer are used as feature representations of the current input.

[0155] (3) Attention mechanism

[0156] Attention mechanisms mimic the internal processes of biological observation—aligning internal experience with external senses to increase the precision of observation in specific areas. They enable the rapid sifting of high-value information from a large volume of data using limited attentional resources. Attention mechanisms can quickly extract important features from sparse data and are therefore widely used in natural language processing tasks, particularly machine translation. Self-attention mechanisms, an improvement on attention mechanisms, reduce reliance on external information and are better at capturing the internal correlations of data or features. The core idea of ​​attention mechanisms can be rewritten as follows:

[0157] In this formula, Lx = ||Source|| represents the length of the Source. The meaning is that the elements in the Source are imagined as a series of data pairs. Given a Query element in the Target, the similarity or relevance between the Query and each Key is calculated to obtain the weight coefficient of the Value corresponding to each Key. Then, the Values ​​are weighted and summed to obtain the final Attention value. Therefore, the Attention mechanism essentially performs a weighted sum of the Values ​​of the elements in the Source, while the Query and Key are used to calculate the weight coefficients of their corresponding Values. Conceptually, Attention can be understood as selectively filtering a small amount of important information from a large amount of information and focusing on this important information, ignoring most of the unimportant information. The focusing process is reflected in the calculation of the weight coefficients; the larger the weight, the more focused it is on its corresponding Value. That is, the weight represents the importance of the information, and the Value is the corresponding information. Self-attention can be understood as intra attention. The attention mechanism occurs between the elements of the Target (Query) and all elements of the Source. Self-attention refers to the attention mechanism that occurs between elements within the Source or between elements within the Target. It can also be understood as the attention calculation mechanism in the special case where Target = Source. The specific calculation process is the same, only the calculation object changes.

[0158] (4) Natural Language Processing (NLP)

[0159] Natural language is human language, and natural language processing (NLP) is the processing of human language.

[0160] Natural Language Processing (NLP) is an intelligent and efficient process for systematically analyzing, understanding, and extracting information from text data. By using NLP and its components, we can manage very large amounts of text data, perform numerous automated tasks, and solve a wide variety of problems, such as automatic summarization, machine translation (MT), named entity recognition (NER), relation extraction (RE), information extraction (IE), sentiment analysis, speech recognition, question answering systems, and topic segmentation, among others.

[0161] (5) Pre-trained language model

[0162] A pre-trained language model is a natural language sequence encoder that encodes each word in a natural language sequence into a vector representation for prediction tasks. Its training consists of two phases. In the pre-training phase, the model is trained on a large-scale unsupervised text environment to learn word representations. In the fine-tuning phase, the model is initialized using the parameters learned in the pre-training phase and then trained on downstream tasks such as text classification and sequence labeling with fewer steps, successfully transferring the semantic information obtained in pre-training to downstream tasks.

[0163] (6) Backpropagation algorithm

[0164] Convolutional neural networks can employ backpropagation (BP) to correct the parameters in the initial super-resolution model during training, thereby reducing the reconstruction error loss. Specifically, forward propagation of the input signal to the output generates an error loss; this error loss information is then propagated back to update the parameters in the initial super-resolution model, leading to convergence of the error loss. The backpropagation algorithm is an error-loss-driven backpropagation process aimed at obtaining the optimal parameters of the super-resolution model, such as the weight matrix.

[0165] (7) Loss Function

[0166] In training a deep neural network, to ensure the output closely approximates the desired predicted value, we compare the network's prediction with the target value. Based on the difference, we update the weight vector of each layer (usually pre-configuring parameters before the initial update). For example, if the prediction is too high, the weight vector is adjusted to predict a lower value. This adjustment continues until the deep neural network predicts the target value or a value very close to it. Therefore, we need to predefine "how to compare the difference between the predicted and target values," which is the loss function or objective function. These are important equations used to measure the difference between the predicted and target values. Taking the loss function as an example, a higher output value (loss) indicates a greater difference, and training the deep neural network becomes a process of minimizing this loss.

[0167] (8) Encoder / Decoder

[0168] Encoders and decoders typically exist in pairs; for example, a sequence-to-sequence model consists of at least one encoder and at least one decoder. The core of their operation is that the encoder encodes the raw input data into some intermediate feature, and the decoder then decodes that intermediate feature into the target result.

[0169] (9) A Convolutional Neural Network (CNN) is a deep neural network with a convolutional structure. A CNN contains a feature extractor consisting of convolutional layers and subsampling layers. This feature extractor can be viewed as a filter, and the convolution process can be seen as using a trainable filter to convolve with an input image or a convolutional feature map. A convolutional layer refers to the neuron layer in a CNN that performs convolution processing on the input signal. In a convolutional layer of a CNN, a neuron can be connected to only some of the neurons in its neighboring layers. A convolutional layer typically contains several feature planes, each of which can be composed of rectangularly arranged neural units. Neural units on the same feature plane share weights, which are the convolutional kernels. Shared weights can be understood as the way image information is extracted regardless of location. The underlying principle is that the statistical information of one part of the image is the same as that of other parts. This means that image information learned in one part can also be used in another part. Therefore, for all locations on the image, we can use the same learned image information. In the same convolutional layer, multiple convolutional kernels can be used to extract different image information. Generally, the more convolutional kernels there are, the richer the image information reflected by the convolution operation.

[0170] Convolutional kernels can be initialized as matrices of random size, and during the training of a convolutional neural network, they can learn appropriate weights. Furthermore, sharing weights directly reduces the number of connections between layers in the convolutional neural network, while also lowering the risk of overfitting.

[0171] Specifically, such as Figure 5 As shown, the convolutional neural network (CNN) 100 may include an input layer 110, a convolutional / pooling layer 120, wherein the pooling layer is optional, and a neural network layer 130.

[0172] The structure consisting of the convolutional layer / pooling layer 120 and the neural network layer 130 can be the first convolutional layer and the second convolutional layer described in this application. The input layer 110 is connected to the convolutional layer / pooling layer 120, and the convolutional layer / pooling layer 120 is connected to the neural network layer 130. The output of the neural network layer 130 can be input to the activation layer, and the activation layer can perform non-linear processing on the output of the neural network layer 130.

[0173] Convolutional / pooling layers 120:

[0174] Convolutional layers:

[0175] like Figure 5The convolutional / pooling layer 120 shown may include layers 121-126 as in Examples 121-126. In one implementation, layer 121 is a convolutional layer, layer 122 is a pooling layer, layer 123 is a convolutional layer, layer 124 is a pooling layer, layer 125 is a convolutional layer, and layer 126 is a pooling layer. In another implementation, layers 121 and 122 are convolutional layers, layer 123 is a pooling layer, layers 124 and 125 are convolutional layers, and layer 126 is a pooling layer. That is, the output of the convolutional layer can be used as the input of a subsequent pooling layer, or as the input of another convolutional layer to continue the convolution operation.

[0176] Taking convolutional layer 121 as an example, it can include multiple convolution operators, also known as kernels. In image processing, a convolution operator acts as a filter, extracting specific information from the input image matrix. Essentially, a convolution operator can be a weight matrix, which is usually predefined. During the convolution operation, the weight matrix processes the input image pixel by pixel (or two pixels by two pixels, depending on the stride) along the horizontal direction, thus extracting specific features. The size of the weight matrix should be related to the image size. It's important to note that the depth dimension of the weight matrix is ​​the same as the depth dimension of the input image; during convolution, the weight matrix extends to the entire depth of the input image. Therefore, convolution with a single weight matrix produces a single-depth convolutional output. However, in most cases, multiple weight matrices of the same dimension are applied instead of a single weight matrix. The outputs of each weight matrix are stacked to form the depth dimension of the convolutional image. Different weight matrices can be used to extract different features from an image. For example, one weight matrix can be used to extract image edge information, another weight matrix can be used to extract specific colors from the image, and yet another weight matrix can be used to blur unwanted noise in the image. These multiple weight matrices have the same dimension, and the feature maps extracted by these multiple weight matrices with the same dimension also have the same dimension. The extracted feature maps with the same dimension are then merged to form the output of the convolution operation.

[0177] The weight values ​​in these weight matrices need to be obtained through extensive training in practical applications. The weight matrices formed by the weight values ​​obtained through training can extract information from the input image, thereby helping the convolutional neural network 100 to make correct predictions.

[0178] When a convolutional neural network 100 has multiple convolutional layers, the initial convolutional layers (e.g., 121) tend to extract more general features, which can also be called low-level features. As the depth of the convolutional neural network 100 increases, the features extracted by later convolutional layers (e.g., 126) become more and more complex, such as high-level semantic features. Features with higher semantic levels are more suitable for the problem to be solved.

[0179] Pooling layer:

[0180] Because it is often necessary to reduce the number of training parameters, pooling layers are often introduced periodically after convolutional layers, i.e., ... Figure 5 In the example of 120, each layer 121-126 can be a convolutional layer followed by a pooling layer, or multiple convolutional layers followed by one or more pooling layers.

[0181] Neural network layer 130:

[0182] After processing by the convolutional / pooling layers 120, the convolutional neural network 100 is still insufficient to output the required information. As mentioned earlier, the convolutional / pooling layers 120 only extract features and reduce the parameters introduced by the input image. However, to generate the final output information (the required class information or other relevant information), the convolutional neural network 100 needs to utilize neural network layers 130 to generate one or more outputs representing the required number of classes. Therefore, neural network layers 130 may include multiple hidden layers (such as...). Figure 5 As shown in layers 131, 132 to 13n) and output layer 140, the parameters contained in these multiple hidden layers can be pre-trained based on relevant training data for specific task types, such as image recognition, image classification, image super-resolution reconstruction, etc.

[0183] After the multiple hidden layers in neural network layer 130, the final layer of the entire convolutional neural network 100 is the output layer 140. This output layer 140 has a loss function similar to classification cross-entropy, specifically used to calculate the prediction error. Once the entire convolutional neural network 100 has undergone forward propagation (e.g., ...), the loss function is applied. Figure 5 The propagation from 110 to 140 is completed (forward propagation), and the reverse propagation (such as...) Figure 5 The propagation from 140 to 110 (backpropagation) will begin to update the weight values ​​and biases of the layers mentioned above, in order to reduce the loss of the convolutional neural network 100 and the error between the output of the convolutional neural network 100 through the output layer and the ideal result.

[0184] It should be noted that, as Figure 5The convolutional neural network 100 shown is merely an example of a convolutional neural network. In specific applications, convolutional neural networks can also exist in the form of other network models, such as... Figure 6 The multiple convolutional / pooling layers shown are run in parallel, and the extracted features are all input into the full neural network layer 130 for processing.

[0185] (10) Forced Alignment: Forced alignment is a technique that, given a speech and its corresponding text, obtains the speech time segment corresponding to each character or word.

[0186] (11)Unit: A unit, a unit representation obtained according to a certain rule.

[0187] (12) Hidden unit: a unit that cannot be directly observed from the data.

[0188] (13)Seq2seq: Sequence to sequence model, which is a model that maps sequence A to sequence B.

[0189] (14) CTC (Connectionist Temporal Classification): An algorithm commonly used in speech recognition, text recognition and other fields to solve the problem of inconsistent lengths of input and output sequences and the inability to align them. It is usually a loss function that maps a longer input to a shorter output.

[0190] Speech and text are two modes of expression and communication used by humans. Generally, humans can switch freely between these two modes to communicate without significant obstacles. However, for machines, speech and text are two very different modalities of input, and their processing and understanding processes are quite different. Speech input is a continuous, relatively long signal input, while text is a discrete, relatively short representation input. Tasks involving the conversion between these two modalities are collectively referred to as speech-text cross-modal tasks, including speech recognition, speech synthesis, speech translation, and speech conversion.

[0191] Integrating speech and text into a single system allows for efficient processing of input from both modalities while also combining and applying knowledge learned from each. Such a system heavily relies on the alignment between the two modalities; however, inconsistencies in speech and text representations hinder accurate cross-modal conversion, especially for multi-step tasks like speech translation.

[0192] To address the aforementioned problems, embodiments of this application provide a data processing method. The data processing method of this application embodiment will be described in detail below with reference to the accompanying drawings.

[0193] Reference Figure 7 , Figure 7 This is a flowchart illustrating a data processing method provided in an embodiment of this application, such as... Figure 7 As shown in the figure, the data processing method provided in this application embodiment may include steps 701 to 704, which are described in detail below.

[0194] 701. Obtain the first feature representation; the first feature representation is obtained by processing the target speech through a speech encoder.

[0195] In one possible implementation, the speech encoder can be a transformer-based neural network. A speech encoder can also be called an acoustic encoder. Taking a transformer-based neural network as an example, the target speech can include S frames. After embedding, the target speech can be obtained as an S*F matrix, where S is the speech length (i.e., the number of frames) and F is the feature dimension. This matrix is ​​then encoded using multiple transformer layers, and the output vector is represented as an S'*D matrix, where S' is the encoded length and D is the vector dimension.

[0196] Reference Figure 8 , Figure 8 This is a schematic diagram of a transformer model. It needs to be understood. Figure 8 The structure shown is merely an example; the number of neural network layers can be adjusted as needed. The embedding layer processes the input, yielding multiple feature vectors. A core feature of the transformer model is its unique attention mechanism. When processing natural language, such as a sentence, the transformer model uses this mechanism to assign different attention coefficients to each word vector in the sentence, thus more comprehensively considering the influence of the context on each word. The embedding layer can encode N embedding vectors Xl based on the node features and their positions in the current sequence. The attention layer is connected to the embedding layer, taking the N embedding vectors as input vectors. Based on the correlation between the N input vectors, it synthesizes them to obtain N output vectors, which are then fed to subsequent transformer layers. The transformer layer takes the output of the previous layer as its input vector and performs similar operations as the previous transformer layer.

[0197] Reference Figure 9 , Figure 9This is a schematic diagram of a transformer layer structure, wherein the transformer layer may include sequentially adjacent multi-head attention layers (or simply attention layers), addition and normalization (add&norm) layers, feedforward net (FFN) layers, and addition and normalization layers.

[0198] The multi-head attention layer obtains N input vectors Xl from the layer above it. These N input vectors Xl can be represented as a matrix X. The multi-head attention layer employs a self-attention mechanism, transforming each vector based on the correlation between them to obtain N output vectors, which can also be represented as a matrix Y. It can be understood that when this multi-head attention layer is directly connected to the embedding layer, for example... Figure 9 In a transformer layer directly connected to the embedding layer, the input vector it receives is the embedding vector output by the embedding layer; when this multi-head attention layer is a multi-head attention layer included in subsequent transformer layers, for example... Figure 9 A multi-head attention layer, which is directly connected to the previous transformer layer, receives the input vector as the output vector of the previous transformer layer. A multi-head attention layer can include multiple attention heads (e.g., ...). Figure 9 The following are Head 1, Head 2, ..., Head N shown in the figure.

[0199] In one possible implementation, the text data can be processed by a text encoder to obtain multiple second feature representations, with different second feature representations corresponding to different text units in the text data. These text units can be word units, character units, phoneme units, or latent units learned in some way.

[0200] Taking words as the unit of text, word segmentation tools can be used to segment the text. For example, "How's the weather today?" can be segmented into "How's the weather today?".

[0201] It should be understood that, optionally, if the subsequent task is text-to-speech conversion, such as speech translation, then the aforementioned text data can be the target text, that is, the text expressed in the target speech. Since the target speech features can also be segmented subsequently, and the text expressed in the speech segment corresponding to each feature after segmentation is consistent with the result of word segmentation of the target text, that is, aligning the inputs of different modalities to the same alignment unit, and then converting them through a unified seq2seq (sequence-to-sequence) model, downstream tasks such as speech translation can be achieved.

[0202] 702. Based on the first feature representation, a boundary predictor is used to determine the boundary information between different text units in the target text expressed in the target speech; the boundary information is used to divide the first feature representation to obtain multiple sub-features; each sub-feature includes multiple frame features corresponding to the speech of a text unit in the target speech.

[0203] In one possible implementation, the boundary information between different text units in the target text expressed in the target speech can be determined by a boundary predictor based on the first feature representation, wherein different text units may refer to different word units, different character units, different phoneme units, or other types of hidden units in the target text.

[0204] In one possible implementation, the boundary predictor is a classifier based on convolutional and fully connected layers. The boundary predictor can identify the boundary frames between different text units in the spoken text and can segment the speech based on the identified boundary frames.

[0205] Next, we will explain how to train the boundary predictor:

[0206] In one possible implementation, a Temporal Classification (CTC) network can be used to generate a supervisory signal as a training boundary predictor. The CTC network maps longer sequences to shorter sequences by introducing "empty" or consecutive identical characters. CTC is trained by maximizing the probability of all possible mapping paths.

[0207] In one possible implementation, based on the first feature representation and the word segmentation result of the target text, a temporal classification (CTC) network can be used to determine the probability distribution corresponding to each frame in the target speech, where each probability in the probability distribution represents the probability of a frame corresponding to a text unit in the dictionary; based on the probability distribution, the ground value corresponding to the boundary information can be determined; the ground value and the boundary information are used to update the boundary predictor.

[0208] In one possible implementation, the input to the CTC network can be the word segmentation result of the target text and the first feature representation of the target speech. The CTC network can output the probability distribution of the possible units corresponding to each frame of the speech input. Based on this probability distribution, for each frame t, the ground truth value of the classification probability corresponding to the boundary predictor can be calculated. For example, the classification can include two categories: boundary and non-boundary, or the classification can include three categories: null, boundary and others. Taking three categories as an example:

[0209] p′ t ( <bk>)=p(π t (=φ)

[0210] p′ t ( <bd>)=∑ i≠φ p(π t =i)p(π t+1 ≠i)

[0211] p′ t ( <ot> )=1-p′ t ( <bk> )-p′ t ( <bd>)

[0212] Where p(πt) is the probability predicted by CTC. The probability of empty (BK) is the probability that CTC predicts an empty value, the probability of boundary (BD) is the probability that the unit in the current frame is different from that in the next frame, and the probability of other (OT) is the remaining probability. These probabilities are used as weak supervision signals to train the boundary predictor.

[0213] Specifically, during training, the speech feature representation encoded by the speech encoder is processed by the CTC network and the boundary predictor to obtain output matrices S'*V and S'*3 (where V is the unit vocabulary size), representing the unit probability distribution and boundary probability distribution for each frame. The CTC module is trained with the goal of aligning the text to the unit sequence, while the boundary predictor is trained according to the formula mentioned above. In the derivation, the boundary probability is obtained directly from the boundary predictor without going through the CTC module again.

[0214] In one possible implementation, the boundary predictor can be a multi-classifier consisting of convolutional layers and fully connected layers. Taking a class of three as an example, the classes can include empty, boundary, and others. It performs three classifications on the feature representation of each frame and outputs the probabilities corresponding to the three classes respectively.

[0215] In one possible implementation, the boundary information indicates the boundary frames located between different text units in the target text within the target speech.

[0216] In one possible implementation, the boundary information specifically refers to: the first probability that each frame in the target speech is a boundary frame between different text units in the target text, wherein the frame with the first probability greater than a threshold is the boundary frame.

[0217] After determining the boundary frames, the feature representation of the target speech can be divided into multiple sub-features. Each sub-feature corresponds to a speech segment, and different speech segments represent different text units in the target text. For example, if the target text expressed by the target speech is "How is the weather today?", then the three sub-features after division correspond to "today", "weather", and "how is it" respectively.

[0218] 703. The features of the multiple frames are fused to obtain the target features corresponding to the speech of each text unit.

[0219] In one possible implementation, for text processing, the extracted text feature representations are at the text unit level, with each text unit yielding a corresponding feature representation. For speech processing, however, the extracted speech feature representations are at the frame level, meaning a speech segment representing a text unit can correspond to multiple features, each feature corresponding to a frame of the speech segment. For example, each sub-feature after segmentation includes features from multiple frames. To maintain consistency with text processing, features from multiple frames can be compressed and fused so that each text unit can obtain a corresponding feature representation. Compressing longer speech features improves the inference efficiency of downstream tasks.

[0220] In one possible implementation, the features of the multiple frames can be fused to obtain the target features corresponding to the speech of each text unit, which is equivalent to obtaining multiple target features.

[0221] The following section describes how to fuse the features from these multiple frames:

[0222] In one possible implementation, a second probability that each frame in the target speech is non-empty can be determined based on the first feature representation. For example, based on the first feature representation, a boundary predictor can be used to determine the second probability that each frame in the target speech is non-empty. Taking the three-class classification described above as an example, the second probability can be the boundary probability plus the sum of other probabilities. Furthermore, each frame can obtain a corresponding second probability. The target features can be obtained by weighted summation of the multi-frame features based on the second probability corresponding to each frame feature in the multi-frame features.

[0223] For example, if the probability of a frame being predicted as a boundary by the boundary predictor is greater than a preset threshold, then that frame is considered a boundary. Based on the boundary prediction results, the speech feature representations between two boundaries can be weighted and shrunk, and the result is the compressed representation of the corresponding unit of the speech features.

[0224] For example, weighted contraction can be performed using the following formula:

[0225]

[0226] In this model, the weight of each frame is the probability that the boundary predictor predicts it to be non-empty. This compressed speech feature representation has a length similar to the alignment unit sequence, which will be beneficial for alignment with the text space when applied to downstream tasks.

[0227] In the above manner, the encoded speech feature input is predicted by the boundary predictor, and the speech feature is compressed according to the predicted boundary result. The compressed speech feature representation has a length similar to the alignment unit sequence, which will be beneficial for alignment with the text space when applied to downstream tasks.

[0228] Furthermore, the boundary predictor is guided by a CTC module, trained using a sequence of aligned units from the corresponding text. This CTC module can be discarded after training. Thus, compared to a conventional model, this approach only introduces parameters for a lightweight boundary predictor.

[0229] 704. Based on the multiple target features, execute downstream tasks through a task network.

[0230] In one possible implementation, after obtaining multiple target features, downstream tasks can be executed through a task network based on the multiple target features.

[0231] In one possible implementation, for the processing of text data, as described in the above embodiments, multiple second feature representations can be obtained; the multiple second feature representations are obtained by processing text data through a text encoder; different second feature representations correspond to different text units in the text data, and downstream tasks can be executed through the task network based on the multiple second feature representations.

[0232] In one possible implementation, the downstream task is a cross-modal speech-to-text task. Taking speech translation as an example, the compressed speech representation can be used to obtain the corresponding unit sequence in another language through a seq2seq module, thereby obtaining the text or speech output in the other language and realizing the translation function.

[0233] In one possible implementation, the loss can be constructed based on the execution results of downstream tasks to update the alignment module (including the boundary predictor) mentioned above, thereby achieving end-to-end training of the alignment module and downstream tasks.

[0234] This application provides a data processing method, comprising: acquiring a first feature representation; the first feature representation being obtained by processing target speech through a speech encoder; determining boundary information between different text units in the target text expressed in the target speech using a boundary predictor based on the first feature representation; the boundary information being used to divide the first feature representation into multiple sub-features; each sub-feature including multi-frame features corresponding to the speech of a text unit in the target speech; fusing the multi-frame features to obtain target features corresponding to the speech of each text unit; and executing downstream tasks through a task network based on the multiple target features. By dividing the speech features according to the granularity of text units, speech and text can be aligned to the same sequence length, thereby reducing the representation differences between the two modalities and improving the processing accuracy of speech-text cross-modal downstream tasks.

[0235] Reference Figure 10 , Figure 10 This is a schematic diagram of a software architecture according to an embodiment of this application. The input can be either text or speech. Different alignment modules align inputs of different modalities to the same alignment unit. This alignment unit can be a word, subword, phoneme, or a latent unit learned in some way. After alignment, a unified seq2seq (sequence-to-sequence) model is used for conversion, thereby enabling downstream tasks such as speech translation.

[0236] The speech alignment module in the above framework aligns the speech input to a unified unit through speech feature compression, and enables the alignment module to be trained end-to-end along with other targets. This speech alignment module (see...) Figure 11 The system mainly consists of an acoustic encoder and a boundary predictor. The acoustic encoder is a module that encodes the speech input and maps it into a vector representation (such as a Transformer). Its input is speech features extracted from the speech signal, and its output is the corresponding vector representation. The boundary predictor is a three-class classifier composed of convolutional layers and fully connected layers. The classes include empty, boundary, and others. It performs three classifications on the speech vector representation of each frame and outputs the probabilities corresponding to the three classes.

[0237] Reference Figure 12 , Figure 12 This is a schematic diagram of the structure of a data processing apparatus provided in an embodiment of this application, such as... Figure 12 As shown in the embodiment of this application, a data processing apparatus 1200 is provided, the apparatus comprising:

[0238] The acquisition module 1201 is used to acquire a first feature representation; the first feature representation is obtained by processing the target speech through a speech encoder;

[0239] For a detailed description of the acquisition module 1201, please refer to the description of step 701 in the above embodiment, which will not be repeated here.

[0240] Processing module 1202 is configured to determine, based on the first feature representation, the boundary information between different text units in the target text expressed in the target speech using a boundary predictor; the boundary information is used to divide the first feature representation to obtain multiple sub-features; each sub-feature includes multiple frame features corresponding to the speech of a text unit in the target speech;

[0241] The features from the multiple frames are fused to obtain the target features corresponding to the speech of each text unit;

[0242] Based on multiple target features, downstream tasks are executed through a task network.

[0243] For a detailed description of the processing module 1202, please refer to the description of steps 702 to 704 in the above embodiments, which will not be repeated here.

[0244] In one possible implementation, the boundary information indicates the boundary frames located between different text units in the target text within the target speech.

[0245] In one possible implementation, the boundary information specifically refers to: the first probability that each frame in the target speech is a boundary frame between different text units in the target text, wherein the frame with the first probability greater than a threshold is the boundary frame.

[0246] In one possible implementation, the processing module 1202 is further configured to: determine a second probability that each frame in the target speech is non-empty based on the first feature representation;

[0247] The processing module 1202 is specifically used for:

[0248] The multi-frame features are weighted and summed based on the second probability corresponding to each frame feature in the multi-frame features.

[0249] In one possible implementation, the boundary predictor is a classifier based on convolutional and fully connected layers.

[0250] In one possible implementation, the processing module 1202 is further configured to:

[0251] Based on the first feature representation and the word segmentation result of the target text, a probability distribution corresponding to each frame in the target speech is determined through a temporal classification (CTC) network, wherein each probability in the probability distribution represents the probability of a frame corresponding to a text unit in the dictionary;

[0252] Based on the probability distribution, the true value corresponding to the boundary information is determined; the true value and the boundary information are used to update the boundary predictor.

[0253] In one possible implementation, the acquisition module 1201 is further configured to:

[0254] Multiple second feature representations are obtained; the multiple second feature representations are obtained by processing text data through a text encoder; different second feature representations correspond to different text units in the text data;

[0255] The processing module 1202 is further configured to:

[0256] Based on the multiple second feature representations, downstream tasks are executed through the task network.

[0257] In one possible implementation, the downstream task is a speech-text cross-modal task.

[0258] The following describes an execution device provided in an embodiment of this application. Please refer to [link / reference]. Figure 13 , Figure 13 This is a schematic diagram of an execution device provided in an embodiment of this application. The execution device 1300 can specifically be a virtual reality (VR) device, a mobile phone, a tablet, a laptop, a smart wearable device, a monitoring data processing device, or a server, etc., and is not limited thereto. Specifically, the execution device 1300 includes: a receiver 1301, a transmitter 1302, a processor 1303, and a memory 1304 (wherein the execution device 1300 may have one or more processors 1303). Figure 13 (Taking a processor as an example), processor 1303 may include application processor 13031 and communication processor 13032. In some embodiments of this application, receiver 1301, transmitter 1302, processor 1303 and memory 1304 may be connected via bus or other means.

[0259] Memory 1304 may include read-only memory and random access memory, and provides instructions and data to processor 1303. A portion of memory 1304 may also include non-volatile random access memory (NVRAM). Memory 1304 stores processor and operation instructions, executable modules, or data structures, or subsets thereof, or extended sets thereof, wherein the operation instructions may include various operation instructions for implementing various operations.

[0260] Processor 1303 controls the operation of the execution device. In specific applications, the various components of the execution device are coupled together through a bus system, which may include not only the data bus, but also power buses, control buses, and status signal buses. However, for clarity, all buses are referred to as the bus system in the diagram.

[0261] The methods disclosed in the embodiments of this application can be applied to or implemented by the processor 1303. The processor 1303 can be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of the processor 1303 or by instructions in software form. The processor 1303 can be a general-purpose processor, a digital signal processor (DSP), a microprocessor, or a microcontroller, and may further include an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The processor 1303 can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software module can reside in a mature storage medium in the field, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory 1304. Processor 1303 reads the information from memory 1304 and, in conjunction with its hardware, completes the steps involved in the model inference process described above.

[0262] Receiver 1301 can be used to receive input digital or character information, and to generate signal inputs related to the settings and function control of the execution device. Transmitter 1302 can be used to output digital or character information through the first interface; transmitter 1302 can also be used to send instructions to the disk group through the first interface to modify the data in the disk group; transmitter 1302 may also include a display device such as a display screen.

[0263] This application also provides a training device; please refer to [link / reference]. Figure 14 , Figure 14 This is a schematic diagram of a training device provided in an embodiment of this application. Specifically, the training device 1400 is implemented by one or more servers. The training device 1400 can vary significantly due to different configurations or performance. It may include one or more central processing units (CPUs) 1414 (e.g., one or more processors) and memory 1432, and one or more storage media 1430 (e.g., one or more mass storage devices) for storing application programs 1442 or data 1444. The memory 1432 and storage media 1430 can be temporary or persistent storage. The program stored in the storage media 1430 may include one or more modules (not shown in the diagram), each module may include a series of instruction operations on the training device. Furthermore, the CPU 1414 may be configured to communicate with the storage media 1430 and execute the series of instruction operations in the storage media 1430 on the training device 1400.

[0264] The training device 1400 may also include one or more power supplies 1426, one or more wired or wireless network interfaces 1450, one or more input / output interfaces 1458; or, one or more operating systems 1441, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.

[0265] In this embodiment, the central processing unit 1414 is used to perform actions related to model training in the above embodiments.

[0266] This application also provides a computer program product that, when run on a computer, causes the computer to perform steps as performed by the aforementioned execution device, or causes the computer to perform steps as performed by the aforementioned training device.

[0267] This application also provides a computer-readable storage medium storing a program for signal processing, which, when run on a computer, causes the computer to perform steps as performed by the aforementioned execution device, or causes the computer to perform steps as performed by the aforementioned training device.

[0268] The execution device, training device, or terminal device provided in this application embodiment can specifically be a chip. The chip includes a processing unit and a communication unit. The processing unit can be, for example, a processor, and the communication unit can be, for example, an input / output interface, pins, or circuits. The processing unit can execute computer execution instructions stored in the storage unit to cause the chip within the execution device to execute the data processing method described in the above embodiments, or to cause the chip within the training device to execute the data processing method described in the above embodiments. Optionally, the storage unit can be a storage unit within the chip, such as a register or cache. Alternatively, the storage unit can be a storage unit located outside the chip within the wireless access device, such as a read-only memory (ROM) or other types of static storage devices capable of storing static information and instructions, such as random access memory (RAM).

[0269] For details, please refer to Figure 15 , Figure 15 This is a schematic diagram of a chip provided in an embodiment of this application. The chip can be represented as a neural network processor (NPU) 1500. The NPU 1500 is mounted as a coprocessor on the host CPU, and tasks are assigned by the host CPU. The core part of the NPU is the arithmetic circuit 1503, which is controlled by the controller 1504 to extract matrix data from the memory and perform multiplication operations.

[0270] In some implementations, the arithmetic circuit 1503 internally includes multiple processing engines (PEs). In some implementations, the arithmetic circuit 1503 is a two-dimensional pulsating array. The arithmetic circuit 1503 can also be a one-dimensional pulsating array or other electronic circuits capable of performing mathematical operations such as multiplication and addition. In some implementations, the arithmetic circuit 1503 is a general-purpose matrix processor.

[0271] For example, suppose we have an input matrix A, a weight matrix B, and an output matrix C. The arithmetic circuit retrieves the corresponding data of matrix B from the weight memory 1502 and caches it in each PE of the arithmetic circuit. The arithmetic circuit retrieves the data of matrix A from the input memory 1501 and performs matrix operations with matrix B. The partial result or the final result of the obtained matrix is ​​stored in the accumulator 1508.

[0272] Unified memory 1506 is used to store input and output data. Weight data is directly transferred to weight memory 1502 via Direct Memory Access Controller (DMAC) 1505. Input data is also transferred to unified memory 1506 via DMAC.

[0273] BIU stands for Bus Interface Unit, which is used for interaction between the AXI bus and the DMAC and the Instruction Fetch Buffer (IFB) 1509.

[0274] The Bus Interface Unit (BIU) 1510 is used by the instruction fetch memory 1509 to fetch instructions from external memory, and also by the memory access controller 1505 to fetch the original data of the input matrix A or the weight matrix B from external memory.

[0275] The DMAC is mainly used to move input data from external memory DDR to unified memory 1506, or to weight data to weight memory 1502, or to input data to input memory 1501.

[0276] The vector computation unit 1507 includes multiple arithmetic processing units that, when needed, further process the output of the computation circuit 1503, such as vector multiplication, vector addition, exponential operations, logarithmic operations, size comparisons, etc. It is mainly used for computation in non-convolutional / fully connected layers of neural networks, such as batch normalization, pixel-level summation, and upsampling of feature planes.

[0277] In some implementations, the vector computation unit 1507 can store the processed output vector in the unified memory 1506. For example, the vector computation unit 1507 can apply a linear function, or a nonlinear function, to the output of the computation circuit 1503, such as performing linear interpolation on the feature planes extracted by the convolutional layer, or, for example, accumulating a vector of values ​​to generate activation values. In some implementations, the vector computation unit 1507 generates normalized values, pixel-level summed values, or both. In some implementations, the processed output vector can be used as an activation input to the computation circuit 1503, for example, for use in subsequent layers of the neural network.

[0278] The instruction fetch buffer 1509 connected to the controller 1504 is used to store the instructions used by the controller 1504;

[0279] Unified memory 1506, input memory 1501, weighted memory 1502, and instruction fetch memory 1509 are all on-chip memories. External memory is proprietary to this NPU hardware architecture.

[0280] The processor mentioned above can be a general-purpose central processing unit, a microprocessor, an ASIC, or one or more integrated circuits used to control the execution of the above program.

[0281] It should also be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. In addition, in the device embodiment drawings provided in this application, the connection relationship between modules indicates that they have a communication connection, which can be implemented as one or more communication buses or signal lines.

[0282] Through the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware, or it can be implemented by special-purpose hardware including application-specific integrated circuits, special-purpose CPUs, special-purpose memory, special-purpose components, etc. Generally, any function performed by a computer program can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be diverse, such as analog circuits, digital circuits, or special-purpose circuits. However, for this application, software program implementation is more often the preferred implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a readable storage medium, such as a computer floppy disk, USB flash drive, mobile hard disk, ROM, RAM, magnetic disk, or optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, training equipment, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0283] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product.

[0284] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, training device, or data center to another website, computer, training device, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device or data center that integrates one or more available media. The available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state drives (SSDs)).< / bd> < / bk> < / ot> < / bd> < / bk>

Claims

1. A data processing method, characterized in that, The method includes: Obtain a first feature representation; the first feature representation is obtained by processing the target speech through a speech encoder. Based on the first feature representation, a boundary predictor determines the boundary information between different text units in the target text expressed in the target speech; the boundary information is used to divide the first feature representation to obtain multiple sub-features; each sub-feature includes multiple frame features corresponding to the speech of a text unit in the target speech, and the boundary information indicates the boundary frame between different text units in the target text in the target speech, wherein the text unit includes word units, character units, phoneme units or hidden units; The features from the multiple frames are fused to obtain the target features corresponding to the speech of each text unit; Based on multiple target features, downstream tasks are executed through a task network; Based on the first feature representation and the word segmentation result of the target text, a probability distribution corresponding to each frame in the target speech is determined through a temporal classification CTC network, wherein each probability in the probability distribution represents the probability of a frame corresponding to a text unit in the dictionary; based on the probability distribution, the ground value corresponding to the boundary information is determined; the ground value and the boundary information are used to update the boundary predictor.

2. The method according to claim 1, characterized in that, The boundary information specifically refers to the first probability that each frame in the target speech is a boundary frame between different text units, sub-units, or phoneme units in the target text, wherein the frame with the first probability greater than a threshold is the boundary frame.

3. The method according to claim 1, characterized in that, The method further includes: determining a second probability that each frame in the target speech is non-empty based on the first feature representation; The process of fusing the features from the multiple frames includes: The multi-frame features are weighted and summed based on the second probability corresponding to each frame feature in the multi-frame features.

4. The method according to any one of claims 1 to 3, characterized in that, The boundary predictor is a classifier based on convolutional layers and fully connected layers.

5. The method according to any one of claims 1 to 3, characterized in that, The method further includes: Multiple second feature representations are obtained; the multiple second feature representations are obtained by processing text data through a text encoder; different second feature representations correspond to different text units in the text data; Based on the multiple second feature representations, downstream tasks are executed through the task network.

6. The method according to any one of claims 1 to 3, characterized in that, The downstream task is a cross-modal task involving speech and text.

7. A data processing apparatus, characterized in that, The device includes: The acquisition module is used to acquire a first feature representation; the first feature representation is obtained by processing the target speech through a speech encoder; The processing module is configured to determine the boundary information between different text units in the target text expressed in the target speech based on the first feature representation and through a boundary predictor; the boundary information is used to divide the first feature representation to obtain multiple sub-features; each sub-feature includes multiple frame features corresponding to the speech of a text unit in the target speech, and the boundary information indicates the boundary frames between different text units in the target text in the target speech, wherein the text unit includes word units, character units, phoneme units, or hidden units; The features from the multiple frames are fused to obtain the target features corresponding to the speech of each text unit; Based on multiple target features, downstream tasks are executed through a task network; The processing module is further configured to determine the probability distribution corresponding to each frame in the target speech through a temporal classification CTC network based on the first feature representation and the word segmentation result of the target text, wherein each probability in the probability distribution represents the probability of a text unit in the dictionary corresponding to the frame; determine the truth value corresponding to the boundary information based on the probability distribution; and use the truth value and the boundary information to update the boundary predictor.

8. The apparatus according to claim 7, characterized in that, The boundary information specifically refers to: the first probability that each frame in the target speech is a boundary frame between different text units in the target text, wherein the frame with the first probability greater than a threshold is the boundary frame.

9. The apparatus according to claim 7, characterized in that, The processing module is further configured to: determine a second probability that each frame in the target speech is non-empty based on the first feature representation; The processing module is specifically used for: The multi-frame features are weighted and summed based on the second probability corresponding to each frame feature in the multi-frame features.

10. The apparatus according to any one of claims 7 to 9, characterized in that, The boundary predictor is a classifier based on convolutional layers and fully connected layers.

11. The apparatus according to any one of claims 7 to 9, characterized in that, The acquisition module is also used for: Multiple second feature representations are obtained; the multiple second feature representations are obtained by processing text data through a text encoder; different second feature representations correspond to different text units in the text data; The processing module is further configured to: Based on the multiple second feature representations, downstream tasks are executed through the task network.

12. The apparatus according to any one of claims 7 to 9, characterized in that, The downstream task is a cross-modal task involving speech and text.

13. A computer storage medium, characterized in that, The computer storage medium stores one or more instructions that, when executed by one or more computers, cause the one or more computers to perform the operation of the method according to any one of claims 1 to 6.

14. A computer program product, characterized in that, Includes computer-readable instructions that, when executed on a computer device, cause the computer device to perform the method as described in any one of claims 1 to 6.

15. A system comprising at least one processor and at least one memory; the processor and the memory are connected via a communication bus and communicate with each other. The at least one memory is used to store code; The at least one processor is used to execute the code to perform the method as described in any one of claims 1 to 6.