Data processing methods, electronic device, storage medium and computer program product

By selectively performing attention calculation based on data sequence length information in large language model training, and using multi-threaded processors to optimize the calculation process, the problems of waste of computing resources and inefficiency caused by inconsistency in data sequences are solved, and more efficient model training is achieved.

WO2025163400A1PCT designated stage Publication Date: 2025-08-07CLOUD INTELLIGENCE ASSETS HOLDING (SINGAPORE) PTE LTD

Patent Information

Application Number
PCT/IB2025/050187
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-02-04
Filing Date
2025-01-08
Publication Date
2025-08-07

AI Technical Summary

Technical Problem

During the training process of large language models, due to the large-sequence of data sequence lengths, the problems of large-sequence computing resource consumption and low training efficiency cannot be effectively solved in the prior art through data sequence expansion operations.

Method used

After obtaining the pending data, the original input data is selected based on the pre-recorded data sequence length information, and multiple threads are used to perform target calculations on the preset type processor to determine the number of threads to reduce redundant calculations.

Benefits of technology

It reduces the redundant calculation brought by expansion operations, reduces the consumption of computing resources, and improves the efficiency of model training.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure IB2025050187_07082025_PF_FP_ABST
    Figure IB2025050187_07082025_PF_FP_ABST
Patent Text Reader

Abstract

Disclosed in the present application are data processing methods, an electronic device, a storage medium and a computer program product. A method comprises: acquiring data to be processed, said data being data obtained after data sequence length padding is performed on original input data; on the basis of pre-recorded data sequence length information, selecting the original input data from the data to be processed, the data sequence length information being used for recording an initial sequence length corresponding to the original input data; and calling a plurality of threads on a preset type processor to perform target computing on the original input data, so as to obtain a target computing result, the thread number of the plurality of threads being determined by means of the data sequence length information. The present application solves the technical problems in the related art of high consumption of computing resources and low training efficiency caused by performing redundant attention computing on data matrices constructed by padding operations.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] TECHNICAL FIELD This application relates to the field of large model technology, and more specifically, to a data processing method, electronic device, storage medium, and computer program product. Background: With the development of large language models, the length of data sequences in the input data for model training has become increasingly longer. However, the computational effort during model training is quadratically proportional to the sequence length. Consequently, the problem of high computing power and memory resource consumption caused by the increase in data sequence length is becoming increasingly serious. Furthermore, the lengths of multiple data sequences in the input data for model training may vary. A common solution in the related art is to pad shorter data sequences to a specific length to ensure that each data sequence in the input data has the same length, facilitating fine-tuning during model training. Clearly, this padding operation not only fails to improve model training efficiency or effectiveness, but also introduces additional computational and memory access overhead to the model training process. Currently, no effective solution has been proposed to address these issues. SUMMARY OF THE INVENTION Embodiments of the present application provide a data processing method, electronic device, and storage medium to at least address the technical problem in related art of redundant attention calculations on a data matrix constructed by an expansion operation, resulting in high computational resource consumption and low training efficiency. According to one aspect of an embodiment of the present application, a data processing method is provided, comprising: obtaining data to be processed, wherein the data to be processed is data obtained by expanding the data sequence length of original input data; selecting original input data from the data to be processed based on pre-recorded data sequence length information, wherein the data sequence length information is used to record the initial sequence length corresponding to the original input data; and invoking multiple threads on a processor of a preset type to perform a target calculation on the original input data to obtain a target calculation result, wherein the number of threads in the multiple threads is determined by the data sequence length information. According to another aspect of an embodiment of the present application, a data processing method is provided, comprising: obtaining a data processing request through a first application programming interface, wherein request data carried in the data processing request includes: data to be processed, wherein the data to be processed is data obtained by expanding the data sequence length of original input data; and returning a data processing response through a second application programming interface, wherein response data carried in the data processing response includes: a target calculation result, wherein the target calculation result is obtained by calling multiple threads on a preset type of processor to perform a target calculation on the original input data, wherein the number of threads in the multiple threads is determined by data sequence length information, the original input data is selected from the data to be processed based on the data sequence length information, and the data sequence length information is used to record the initial sequence length corresponding to the original input data.According to another aspect of an embodiment of the present application, a data processing method is provided, comprising: obtaining a currently input data processing session request, wherein the request data carried in the data processing session request includes: data to be processed, wherein the data to be processed is data obtained by extending the data sequence length of original input data; returning a data processing session reply in response to the data processing session request, wherein the information carried in the data processing session reply includes: a target calculation result, obtained by invoking multiple threads on a processor of a preset type to perform a target calculation on the original input data, the number of threads being determined by data sequence length information, the original input data being selected from the data to be processed based on the data sequence length information, the data sequence length information being used to record the initial sequence length corresponding to the original input data; and displaying the target calculation result in a graphical user interface. According to another aspect of an embodiment of the present application, an electronic device is provided, comprising: a memory storing an executable program; and a processor configured to execute the program, wherein when the program executes, any of the above-described data processing methods is executed. According to another aspect of an embodiment of the present application, a computer-readable storage medium is provided. The computer-readable storage medium includes a stored executable program. When the executable program is executed, the device containing the computer-readable storage medium is controlled to perform any of the aforementioned data processing methods. According to another aspect of an embodiment of the present application, a computer program product is provided. The computer program includes a computer program. When executed by a processor, the computer program implements any of the aforementioned data processing methods. In this embodiment of the present application, data to be processed is obtained, where the data to be processed is data obtained by extending the data sequence length of original input data. Original input data is selected from the data to be processed based on pre-recorded data sequence length information, where the data sequence length information records the initial sequence length corresponding to the original input data. Multiple threads on a processor of a preset type are invoked to perform a target calculation on the original input data to obtain a target calculation result. The number of threads in the multiple threads is determined by the data sequence length information.It is easy to note that in the embodiments of the present application, attention calculations are performed on a portion of the data to be processed (i.e., the original input data) based on the initial sequence length corresponding to the original input data, reducing redundant calculations performed on the expanded data in the data to be processed. Thus, the present application achieves the goal of reducing computational cost by using data sequence length information to perform attention calculations on the original input data in the data to be processed. This achieves the technical effect of reducing redundant calculations caused by the expansion operation during fine-tuning, reducing computing resource consumption, and improving model training efficiency. This further solves the technical problem in the related art of performing redundant attention calculations on the data matrix constructed by the expansion operation, resulting in high computing resource consumption and low training efficiency. It is easy to note that the general description above and the detailed description that follow are merely for the purpose of exemplifying and explaining the present application and do not constitute limitations of the present application. BRIEF DESCRIPTION OF THE DRAWINGS The drawings described herein are provided to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are provided to explain the present application and do not constitute undue limitations of the present application. In the accompanying drawings: FIG1 is a schematic diagram of an application scenario of a data processing method according to Example 1 of the present application; FIG2 is a schematic diagram of an attention calculation process according to related art; FIG3 is a flow chart of a data processing method according to Example 1 of the present application; FIG4 is a schematic diagram of an optional attention calculation process according to Example 1 of the present application; FIG5 is a schematic diagram of another optional attention calculation process according to Example 1 of the present application; FIG6 is a flow chart of a data processing method according to Example 2 of the present application; FIG7 is a flow chart of a data processing method according to Example 3 of the present application; FIG8 is a schematic diagram of the structure of a data processing device according to Example 4 of the present application; FIG9 is a schematic diagram of the structure of another data processing device according to Example 4 of the present application; FIG10 is a schematic diagram of the structure of yet another data processing device according to Example 4 of the present application; and FIG11 is a block diagram of the structure of an electronic device according to Example 5 of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS To enable those skilled in the art to better understand the present invention, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. All other embodiments derived by persons of ordinary skill in the art based on the embodiments of this application without inventive effort shall fall within the scope of protection of this application. It should be noted that the terms "first," "second," and so on, in the specification and claims of this application, and in the accompanying drawings, are used to distinguish similar objects and are not necessarily used to describe a specific order or precedence.It should be understood that the terms used in this manner are interchangeable where appropriate, such that the embodiments of the present application described herein can be implemented in sequences other than those illustrated or described herein. Furthermore, the terms "including," "having," and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus comprising a series of steps or elements need not be limited to those steps or elements explicitly listed, but may include other steps or elements not explicitly listed or inherent to such process, method, product, or apparatus. The technical solutions provided in this application are primarily implemented using large-scale model technology. Large-scale models herein refer to deep learning models with large-scale model parameters, typically including hundreds of millions, tens of billions, hundreds of billions, trillions, or even more than ten trillion model parameters. Large models, also known as cornerstone models or foundation models, are pre-trained on large amounts of unlabeled corpora, producing pre-trained models with over 100 million parameters. These models are adaptable to a wide range of downstream tasks and exhibit good generalization capabilities. Examples include large language models (LLMs) and multi-modal pre-training models. It should be noted that in practical applications, large models can be fine-tuned using a small number of samples, allowing them to be applied to different tasks. For example, large models are widely used in fields such as natural language processing (NLP) and computer vision. Specifically, they can be applied to computer vision tasks such as visual question answering (VQA), image captioning (IC), and image generation. They can also be widely used in natural language processing tasks such as text-based sentiment classification, text summarization, and machine translation. Therefore, the main application scenarios of large models include, but are not limited to, digital assistants, intelligent robots, search, online education, office software, e-commerce, and intelligent design. First, some nouns or terms appearing in the description of the embodiments of this application are subject to the following explanations. Graphics Processing Unit (GPU): Also known as a graphics card, this is a dedicated processor for graphics processing and data-parallel computing. It can be configured to accelerate the training and inference of large models.Large Language Models (LLMs) are AI language models with a large number of parameters and a complex structure. Fine-tuning is the process of further training a pre-trained model using a small amount of data to make it more adaptable to specific tasks or domains. A batch is the unit of input data used in model training. A batch contains multiple data sequences. For example, a batch of 4 indicates four data sequences. Padding is the process of padding data sequences to a specified length. Since a batch contains multiple data sequences, each of them may have different lengths. However, the input data must be structured in a multidimensional array matrix (Tensor) format, and each data sequence in the matrix must be the same length. Therefore, padding is used to equalize the length of multiple data sequences during large model training. Attention is an AI model or algorithm that simulates the characteristics of human cognitive attention, enabling the model to focus on key information and ignore unimportant parts when processing input data. This mechanism enables the model to process large amounts of information more efficiently and achieve better performance during learning and inference. Normalized exponential function (softmax function): A function used to convert the raw numerical values ​​output by the model into a probability distribution, commonly used in multi-classification tasks. Convolution kernel: In convolutional neural networks, a convolution kernel refers to a filter used for convolution operations, which can extract features from the input data. In this solution, convolution kernels are also used to initiate computing tasks to the GPU. Thread: In this solution, it refers to the smallest unit for executing computing tasks in GPU parallel computing. The GPU can execute multiple threads simultaneously to improve computing efficiency. High Bandwidth Memory (HBM): A high-speed, high-bandwidth memory technology commonly used to accelerate the training and inference of large models. In this solution, HBM also refers to a storage unit on the GPU. Example 1 According to an embodiment of the present application, a data processing method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.Considering the large number of model parameters in large models and the limited computing resources of mobile terminals, the data processing method provided in the embodiments of the present application can be applied to the application scenario shown in FIG1 , but is not limited thereto. In the application scenario shown in FIG1 , the large model is deployed on a server 10. Server 10 can be connected to one or more client devices 20 via a local area network, a wide area network, the Internet, or other types of data networks. Client devices 20 herein may include, but are not limited to, smartphones, tablet computers, laptops, PDAs, personal computers, smart home devices, and in-vehicle devices. Client devices 20 can interact with users via a graphical user interface to invoke the large model and thereby implement the method provided in the embodiments of the present application. During the fine-tuning process of large language model training, each batch of input data contains multiple data sequences, each of which may have different lengths. However, the data input to the model must be structured in a multidimensional array matrix (Tensor) format, in which multiple data sequences must have the same length. Therefore, a common practice in related art is to expand shorter data sequences to a specific length to construct a multidimensional array matrix. An attention mechanism calculation process provided by the aforementioned related art is shown in Figure 2. Large model training typically requires a large number of attention mechanism calculations. As shown in Figure 2, the main calculation process includes: multiplying the query matrix (also called the Q matrix) by the transpose of the key matrix (also called the K matrix) to obtain the first intermediate matrix (denoted as the S matrix); processing the S matrix using a normalized exponential function (softmax function) to obtain the second intermediate matrix (denoted as the P matrix); and multiplying the P matrix by the value matrix (also called the V matrix) to obtain the attention mechanism calculation result matrix (also called the output matrix, also called the O matrix). The above main calculation process can be expressed by the following formulas (1), (2) and (3): s = QK. T e RNXN formula (i)

[0002] P = softmax(S) G IR WxW Formula (2)

[0003] 0 = PV e "xd Formula (3) Wherein, KT represents the transposed matrix of the K matrix, N represents the length of the data sequence (in this example, the first length, the second length, and the third length are equal in FIG2), d represents the number of attention heads, that is, the dimension of the attention mechanism in the large language model, and R represents the real number domain. FIG2 shows the calculation process of an attention mechanism. The data corresponding to the oblique shadow represents the redundant operations caused by the expansion of the data sequence in the attention mechanism. Obviously, the above expansion process provided by the related art introduces additional calculation and memory access overhead, and does not substantially improve the efficiency or effect of model training. Based on this, how to reduce the calculation and memory access resources consumed by the fine-tuning process in the attention mechanism calculation and improve the model training efficiency has become one of the important issues in the related art. Before this application, the related art has not proposed any effective solution to solve the above problem. Based on this related art, in the above operating environment, the present application provides a data processing method as shown in FIG3. FIG3 is a flow chart of a data processing method according to Example 1 of the present application. As shown in FIG3, the data processing method includes: Step S31, Obtaining data to be processed, where the data to be processed is data obtained by extending the data sequence length of the original input data; Step S32: Selecting original input data from the data to be processed based on pre-recorded data sequence length information, where the data sequence length information records the initial sequence length corresponding to the original input data; Step S33: Invoking multiple threads on a preset type of processor to perform target computations on the original input data to obtain target computation results, where the number of threads in the multiple threads is determined by the data sequence length information. The above method steps can be applied to training large language models in preset application scenarios to optimize the training process. In particular, in some scenarios involving data sequence length extension, the above method steps can enable more accurate computations on the extended data sequences, saving computational costs and improving computational efficiency. The above preset application scenarios may include, but are not limited to, scenarios involving the use of large language models in fields such as e-commerce, education, healthcare, conferences, social networks, financial products, logistics, and navigation. Correspondingly, the above original input data is model training data pre-collected in the above preset application scenarios. The trained large language model can demonstrate high performance on specific tasks within the corresponding predefined application scenarios. The raw input data may include at least one data batch, each of which may include multiple data sequences, each of which may have different sequence lengths.During the fine-tuning process, a multidimensional array matrix needs to be constructed based on the original input data. Therefore, data sequences of varying lengths within the original input data are expanded to a specific length (i.e., the expanded sequence length) to obtain the aforementioned data to be processed. Specifically, the aforementioned data to be processed is the data obtained by expanding data sequences of varying lengths within the original input data during the fine-tuning process for large language model training. The pre-recorded data sequence length information is used to record the initial sequence lengths of multiple data sequences within the original input data before the expansion operation. In other words, the data sequence length information can represent the actual sequence length of the original input data. Based on this data sequence length information, the portion of the processed data obtained after the expansion operation that belongs to the original input data, as well as the portion of the expanded data, can be determined. The aforementioned pre-set processor type can be a multi-core processor, a graphics processor, or an AI-specific accelerated processor. The target computations performed on the original input data may include, but are not limited to, attention computations, matrix computations, activation function computations, gradient computations, and convolution computations. The processor type and the type of computation to be performed can be flexibly selected based on the specific computational requirements of the application scenario. In an exemplary application scenario, the number of threads to be invoked is determined based on data sequence length information. Multiple threads (equal to the number of threads on the GPU) are invoked to perform attention calculations on the original input data, obtaining a target calculation result, which can be an output matrix. Furthermore, by scheduling multiple threads to perform matrix calculations under the attention mechanism, distributed training of large language models can be achieved, allowing for a distributed fine-tuning phase. In an embodiment of the present application, data to be processed is obtained, where the data to be processed is data obtained by extending the data sequence length of the original input data. Original input data is selected from the data to be processed based on pre-recorded data sequence length information, where the data sequence length information records the initial sequence length corresponding to the original input data. Multiple threads on a predetermined processor type are invoked to perform target calculations on the original input data, obtaining a target calculation result. The number of threads in the multiple threads is determined by the data sequence length information.It's easy to note that in the embodiments of the present application, attention calculations are performed on a portion of the data to be processed (i.e., the original input data) based on the initial sequence length corresponding to the original input data, reducing redundant calculations on the expanded data in the processed data. Thus, the present application achieves the goal of reducing computational overhead by using data sequence length information to specifically perform attention calculations on the original input data in the processed data. This reduces redundant computations caused by the expansion operation during fine-tuning, reduces computational resource consumption, and improves model training efficiency. This further addresses the technical issue in related technologies where redundant attention calculations on the data matrix constructed by the expansion operation result in high computational resource consumption and low training efficiency. In the embodiments of the present application, the aforementioned data processing method can be used in scenarios where a system consisting of a client device and a server is used to train a large language model, with the server providing data processing services to the client devices. Specifically, a client device sends data to be processed to a server, where the data to be processed is data obtained by expanding the data sequence length of the original input data. The server selects the original input data from the data to be processed based on pre-recorded data sequence length information, invokes multiple threads on a preset processor type to perform a target calculation on the original input data, and obtains a target calculation result. The data sequence length information records the initial sequence length corresponding to the original input data, and the number of threads in the multiple threads is determined by the data sequence length information. The server returns the target calculation result to the client device. It should be noted that the data processing method of the embodiment of the present application can be executed on a server, which can be a stand-alone server, a distributed server, or a cloud server. Furthermore, if the operating resources of the client device can meet the training, deployment, and operation requirements of a large model, the data processing method of the embodiment of the present application can also be performed on the client device. The data processing method of the embodiment of the present application is further described below. In an optional embodiment, in step S31, obtaining data to be processed includes the following method steps: Step S311: Based on input batch information of the original input data, determining multiple initial sequences, wherein at least some of the multiple initial sequences have different sequence lengths; Step S312: Extending the data sequence lengths of the multiple initial sequences to obtain the data to be processed, wherein the data to be processed includes: an input matrix to be used and a mask matrix; the input matrix includes: multiple target sequences, each having the same sequence length; and the mask matrix is ​​used to determine the data category of each matrix element in the input matrix. In an exemplary application scenario, the above method steps are described using a single attention calculation as an example.For example, the input batch information for the current batch of raw input data in the current attention computation consists of four data sequences with sequence lengths of 1024, 32, 32, and 64, respectively. Furthermore, during the fine-tuning phase of large language model training, the sizes of the Q, K, and V matrices used in the attention computation for the current batch are (B, M, D, K), where B represents the number of initial sequences in the current batch of raw input data (4 in this example), M represents the maximum sequence length corresponding to multiple initial sequences (1024 in this example), D represents the number of attention heads, and K represents the dimension of each attention head. D and K are determined by the model settings of the large language model. In this example, D is set to 16 and K is set to 64. This means that the sizes of the Q, K, and V matrices are (4, 1024, 16, 64). Because a matrix data format needs to be constructed, the multiple initial sequences in the current batch are length-extended (padding) to produce an input matrix and a mask matrix. The input matrix includes multiple target sequences after the initial sequences have been length-extended. The mask matrix has the same dimensions as the input matrix, and each element in the mask matrix is ​​used to determine the data category of the matrix element at the corresponding position in the input matrix. Specifically, the data category is one of the following: original data or augmented data. Original data indicates that the matrix element belongs to the original input data (i.e., the actual input data), while augmented data indicates that the matrix element is the data augmented during the augmentation operation (i.e., the constructed data). In the above exemplary application scenario, the mask matrix (Mask) and the input matrix (input joadding) have the same size: (4, 1024). The matrix elements in the mask matrix consist of 1s and 0s. A 1 indicates that the data category of the matrix element at the corresponding position in the input matrix is ​​original data, and a 0 indicates that the data category of the matrix element at the corresponding position in the input matrix is ​​augmented data. That is, the mask matrix is ​​used to identify which elements in the input matrix are obtained by the expansion operation and which elements are constructed based on the original input data.In an optional embodiment, in step S32, original input data is selected from the data to be processed based on the data sequence length information, including the following method steps: Step S321: Based on the data sequence length information, region determination is performed on each data element in the data to be processed to obtain a determination result, wherein the determination result indicates the data region in which each data element in the data to be processed currently resides. Data regions include: original data regions and expanded data regions. Step S322: Based on the determination result, original input data is selected from the data to be processed. In an exemplary application scenario, region determination is performed on each data element in the constructed input matrix based on the sequence lengths of multiple initial sequences in the current batch of original input data. If the data element being determined is constructed based on the original input data, the current data element is determined to belong to the original data region; if the data element being determined is expanded by a data sequence expansion operation, the current data element is determined to belong to the expanded data region. The above determination result corresponds to the above mask matrix. That is, each data element in the original data region has a 1 at the corresponding position in the mask matrix, and each data element in the expanded data region has a 0 at the corresponding position in the mask matrix. In another exemplary application scenario, the above mask matrix can also be generated based on the above determination result. Based on the determination result, multiple data elements in the input matrix of the data to be processed that belong to the original data region are selected as the original input data. Based on the above method steps of an embodiment of the present application, a schematic diagram of an attention calculation process is provided as shown in FIG4. In the attention mechanism calculation, the mask matrix is ​​first superimposed on the S matrix, and then the superimposed result matrix is ​​processed using the softmax function to obtain the P matrix. This ensures that the expanded portion of the multidimensional array matrix does not affect the calculation of the softmax function. In an optional embodiment, the data processing method further includes the following method steps: Step S34: Refusing to perform the target calculation on the data in the expanded data region and releasing the thread resources occupied by the data in the expanded data region. Still as shown in Figure 4, in the process of performing attention calculation based on the superposition result of the mask matrix and the input matrix, attention calculation is only performed on the input matrix elements at the positions where the mask matrix element value is 1, and the attention calculation of the input matrix elements at the positions where the mask matrix element value is 0 is skipped (or rejected), avoiding redundant calculation in the attention calculation.Each matrix calculation task in the aforementioned attention calculation requires invoking a thread on the GPU. Before each thread executes the matrix calculation task, a pre-calculation judgment is performed according to the aforementioned method steps of the embodiment of the present application. If it is determined that the thread is currently calculating data within the expanded data area, the thread's calculation task is terminated to free up thread resources and reduce the computational and memory resource usage of the attention calculation. It is readily apparent that during model training, by extracting true information about the length of the data sequence from the original input data, the additional computational and memory resource consumption caused by the expansion operation is reduced or eliminated based on this true information, thereby reducing the computational load during model training. In an optional embodiment, the data processing method further includes the following method steps: Step S35: Resizing the input matrix based on the mask matrix to obtain data sequence length information. This resizing operation can be used to perform size mapping on the input matrix, achieved by matrix reorganization. Reorganizing the input matrix into a matrix of a specific size can adapt to specific computational requirements or model structures. Continuing with the aforementioned exemplary application scenario, when the sizes of the Q, K, and V matrices for the attention calculation of the current batch are (4, 1024, 16, 64), the input matrix is ​​resized (e.g., reshaped) according to the mask matrix to obtain the aforementioned data sequence length information. Thus, the sequence lengths of the four data sequences in the current batch of original input data are determined to be 1024, 32, 32, and 64, respectively. This data sequence length information can be recorded in a one-dimensional array, represented as [1024, 32, 32, 64]. In an optional embodiment, the data processing method further includes the following method steps: Step S361, constructing an initial hidden layer state based on the input matrix; Step S362, updating the initial hidden layer state using the data sequence length information to obtain a target hidden layer state. The aforementioned initial hidden layer state can be a hidden state matrix. The data elements of the hidden state matrix include: the number of initial sequences in the current batch of raw input data, the maximum sequence length corresponding to multiple initial sequences, and the number of hidden layer neurons. The number of hidden layer neurons is determined by the model settings of the large language model. The number of hidden layer neurons is calculated by multiplying the number of attention heads by the dimension of each attention head. The hidden state matrix is ​​constructed based on the input matrix. During the fine-tuning phase of large language model training, the hidden state matrix is ​​updated based on the attention calculation results after each attention calculation. In addition, the hidden state matrix can be remapped based on the data sequence length information to remove the impact of invalid data introduced by the expansion operation and obtain the target hidden layer state.In the above exemplary application scenario, the initial hidden layer states ( hidden_states ) are constructed based on the input matrix ( input_adding ). As mentioned above, the input matrix has dimensions ( B, M ). Correspondingly, the initial hidden layer states have dimensions ( B, M, H ), where H represents the number of hidden layer neurons and is obtained by multiplying D by K . D represents the number of attention heads, and K represents the dimensions of each attention head. In this example, the input matrix has dimensions ( 4, 1024 ), and the initial hidden layer states have dimensions ( 4, 1024, 1024 ). Furthermore, the initial hidden layer state is remapped based on the data sequence length information. In this example, the data sequence length information is represented as a one-dimensional array [1024, 32, 32, 64]. The dimension of the remapped target hidden layer state is determined by the sum of the elements in the one-dimensional array and the number of hidden layer neurons, that is, the dimension of the target hidden layer state is (1152, 1024). Therefore, performing attention calculation based on the target hidden layer state according to the above method and steps can eliminate the impact of invalid data introduced during the expansion process, reduce redundant calculations, lower computing resource usage, and improve model training efficiency. In an optional embodiment, the data processing method further includes the following method steps: Step S371: Determine initial matrix dimensions based on the sequence lengths of multiple initial sequences, wherein the initial matrix dimensions are used to determine the initial dimensions of multiple matrices used in parameter target calculations, including a query matrix, a key matrix, and a value matrix corresponding to the original input data; Step S372: Update the initial matrix dimensions based on the data sequence length information and the target hidden layer state to obtain target matrix dimensions, wherein the target matrix dimensions are used to determine the target dimensions of the multiple matrices. The query matrix (i.e., Q matrix), key matrix (i.e., K matrix), and value matrix (i.e., V matrix) are used to represent the attention weight for each element of the input sequence in attention calculations. The query matrix is ​​used to extract information from the input sequence, the key matrix is ​​used to represent the information to be queried, and the value matrix is ​​used to determine the numerical value of the attention weight. The target matrix dimensions are determined by the sum of the lengths of the multiple data sequences in the data sequence length information. In attention calculations, the query matrix is ​​used to represent the object for which attention is to be calculated, which can be an element in an input data sequence. The query matrix is ​​used to calculate the similarity between the object and the key matrix, thereby determining the corresponding value matrix. The key matrix represents the object being compared and typically includes all elements in the input data sequence. Similarity calculations are performed on the key matrix and the query matrix to determine the correlation between each element and the query matrix.The value matrix represents the numerical information corresponding to the key matrix, typically the numerical values ​​corresponding to each element in the input data sequence. This data is used to characterize the degree of similarity. Specifically, under the attention mechanism, the similarity between the query matrix and the key matrix is ​​calculated, and then the value matrix is ​​weighted based on the similarity. The attention mechanism helps the model better focus on task-relevant information in the input data sequence and effectively processes long sequences. In the above exemplary application scenario, before performing attention calculation on the current batch of input data, the initial matrix dimensions are constructed based on the sequence lengths of multiple initial sequences in the original input data. Specifically, the initial dimensions of the query matrix, key matrix, and value matrix are determined. The initial matrix dimensions corresponding to the query matrix, key matrix, and value matrix are denoted as (B, M, D, K). In this example, the initial matrix dimensions corresponding to the query matrix, key matrix, and value matrix for the parameter target calculation (in this case, the attention calculation) are (4, 1024, 16, 64). Furthermore, based on the data sequence length information (sequence_list) and the target hidden layer state, the initial matrix dimensions are remapped. The matrix dimensions corresponding to the query matrix, key matrix, and value matrix are adjusted to (1, sum(sequence_list), D, K), obtaining the target matrix dimensions. In this example, the data sequence length information (sequence_list) is represented as a one-dimensional array [1024, 32, 32, 64], and sum(sequence_list) is 1152. Therefore, the target matrix dimensions are (1, 1152, 16, 64). Furthermore, attention calculation is performed based on the data sequence length information [1024, 32, 32, 64] and the target matrix dimensions (1, 1152, 16, 64). During attention calculation, the convolution kernel schedules multiple threads in the GPU based on the length of the data sequence.In an exemplary embodiment, based on a solution provided by related art, the number of threads to be scheduled is calculated based on the number of initial sequences (B) in the original input data, the maximum sequence length (M) corresponding to multiple initial sequences, the number of attention heads (D), and the dimension of each attention head (K). In this example, the number of threads is B x M / Q x K, where Q represents the length of the data sequence to be processed by each thread (QueriesPerBlock). For a specific thread, Q is a constant, typically set to 64. Therefore, the number of threads here is 4 x 1024 / 64 x 16 = 1024. In an optional embodiment, in step S33, multiple threads on a preset type processor are called to perform target calculations on the original input data to obtain target calculation results. The method further includes the following steps: Step S331: Calling multiple threads on the preset type processor to load multiple matrices corresponding to the original input data from a preset storage area on the preset type processor to registers on the preset type processor, and performing target calculations on the multiple matrices stored in the registers to obtain target calculation results. In the above exemplary application scenario, before executing a matrix calculation task, each GPU thread determines whether the data element being calculated belongs to the extended data area of ​​the input matrix. If so, the task on the current thread is terminated. If not, the matrix calculation task continues. Specifically, the query matrix, key matrix, and value matrix are loaded from the GPU's high-bandwidth memory (HBM) into registers. Furthermore, after the attention calculation is completed, the attention calculation results are written to the HBM. Therefore, in this example, the number of GPU threads actually executing the matrix calculation task is sum(sequence_list) / Q. xD. sum(sequence list) is the sum of the actual lengths of multiple initial sequences in the original data, and B*M represents the total number of elements in the input matrix obtained after the data sequence is length-expanded. Obviously, B*M is usually greater than, or even much greater than, sum(sequence list). In this example, according to the solution provided in this embodiment of the present application, the number of threads is 1152 / 64 x 16 = 228. Compared with the solution provided in the related art (the number of threads is 1024), this application reduces the number of threads required for attention calculation. Therefore, the method provided in this embodiment of the present application can significantly reduce the computational and memory resource consumption in attention calculation during the fine-tuning phase. Furthermore, by avoiding some redundant computations, the method can improve model training efficiency. In an optional embodiment, the data processing method further includes the following method steps: Step S381, writing the target calculation result to a preset storage area; Step S382, in response to the target calculation result being successfully written, restoring the target hidden layer state to the initial hidden layer state based on the data sequence length information. The preset storage area can be a designated HBM area in the GPU. In the exemplary application scenario described above, for a single attention calculation, after the result of the current attention calculation is written to the HBM area, the target hidden layer state is updated based on the result. Restoring the target hidden layer state to the initial hidden layer state based on the data sequence length information can be performed by restoring the target hidden layer state to the initial hidden layer state corresponding to the current batch based on the original input data of the current batch. Restoring the target hidden layer state to the initial hidden layer state based on the data sequence length information can also be performed by re-determining the initial hidden layer state corresponding to the next batch based on the data sequence length information of the original input data of the next batch, and then adjusting the target hidden layer state to the initial hidden layer state corresponding to the next batch. This prevents the attention calculation performed on the input data of the current batch from affecting the calculation of the next batch, which is beneficial for the continuity of attention calculation in large language model training. In accordance with the above-mentioned method steps provided in the embodiments of the present application, a schematic diagram of an attention calculation process is also provided, as shown in Figure 5. As shown in Figure 5, this solution provides a padding-free optimization algorithm for data sequences using the attention mechanism, efficiently utilizing GPU bandwidth. This solves the technical problem in related technologies where the padding operation introduces additional computational and memory overhead and fails to effectively improve model training efficiency. Specifically, as shown in Figure 5, Flash Attention is used to perform block-based matrix calculations during the attention calculation process.Flash Attention is an attention mechanism that simulates human vision. It multiplies the S matrix by a mask matrix (with values ​​of 0 or 1). This ensures that the expanded elements of the S matrix at corresponding positions in the mask matrix are 0. Specifically, as shown in FIG5 , the length of the data sequence in the original input data is expanded to obtain a first intermediate matrix (i.e., the input matrix, denoted as S matrix) and a mask matrix. The first intermediate matrix and the mask matrix are superimposed and then processed using the softmax function to obtain a second intermediate matrix (denoted as P matrix). At the model input, the S matrix is ​​processed according to the mask matrix to obtain the real data sequence corresponding to the original input data (denoted as S_r) and the target hidden layer state after dimension adjustment (denoted as hidden_states_r). Before performing attention calculation, the target dimensions of the query matrix, key matrix, and value matrix are determined according to the real data sequence S_r and the target hidden layer state hidden states r, and the corresponding query matrix, key matrix, and value matrix are constructed according to the target dimensions. In the convolution kernel example, multiple threads of the GPU are scheduled according to the sequence length of the original input data. In each thread, attention calculation is performed based on the query matrix, key matrix, value matrix, and mask matrix. In particular, before each thread calculates, Based on the mask matrix, the algorithm determines whether the data element currently being calculated belongs to the extended data area of ​​the input matrix. If so, the calculation process for that thread is terminated. If not, the attention calculation is performed to obtain the result. As shown in Figure 5, in a single attention calculation, the transposed matrix of the key matrix is ​​traversed in the outer loop, and the query matrix is ​​traversed in the inner loop. Multiple matrix multiplications are performed during this traversal. Figure 5 shows that the first matrix multiplication represents the first matrix multiplication in the inner loop, namely, the multiplication of the transposed matrix of the Q matrix and the K matrix to obtain the S matrix. The second matrix multiplication represents the second matrix multiplication in the inner loop, namely, the multiplication of the P matrix and the V matrix to obtain the output matrix (O matrix). As shown in Figure 5, the shaded area (including the black filled area) in the matrix corresponds to the data currently being calculated in the two loops. Each calculation is assigned to a thread on the GPU for processing. The solution provided in this application can solve the additional computing and memory resource consumption caused by the need for padding operations due to the unequal lengths of input data sequences during the fine-tuning stage of current large language model training.By extracting real information about the length of data sequences in the input data during model training, this real information can be used to reduce or eliminate the additional computational and memory resource consumption caused by expansion operations, thereby reducing the computational load during model training. The above-mentioned solution provided by this application can improve the computational efficiency of model training at a relatively low cost, making distributed training of large language models on heterogeneous cloud computing machines more cost-effective. By applying the above-mentioned method provided by the embodiments of this application in practical application scenarios, the fine-tuning process in large language model training is optimized, effectively reducing the computational workload of model training and improving the computational efficiency of the GPU used for model training. In one exemplary embodiment, the above-mentioned method provided by the embodiments of this application can improve the training performance of large language models by at least 20% compared to related technologies. It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, storage, and display, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. The collection, use, and processing of relevant data must comply with the relevant laws, regulations, and standards of relevant countries and regions, and corresponding operation portals are provided for users to choose to authorize or reject. It should be noted that, for simplicity of description, the aforementioned method embodiments are described as a series of combined actions. However, those skilled in the art should be aware that this application is not limited by the order of the actions described, as certain steps may be performed in a different order or simultaneously. Furthermore, those skilled in the art should also be aware that the embodiments described in this specification are preferred embodiments, and the actions and modules involved are not necessarily required for this application. Through the above description of the implementation methods, those skilled in the art will clearly understand that the methods according to the aforementioned embodiments can be implemented using software and a required general-purpose hardware platform, or alternatively, hardware. Based on this understanding, the technical solution of this application, or the portion that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (e.g., a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk) and includes instructions for enabling a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in the various embodiments of this application. Example 2 In the operating environment as in Example 1, the present application provides another data processing method as shown in FIG6 .FIG6 is a flowchart of a data processing method according to Example 2 of the present application. As shown in FIG6 , the data processing method includes: Step S61, obtaining a data processing request through a first application programming interface, wherein the request data carried in the data processing request includes: data to be processed, wherein the data to be processed is data obtained by extending the data sequence length of the original input data; Step S62, returning a data processing response through a second application programming interface, wherein the response data carried in the data processing response includes: a target calculation result, obtained by invoking multiple threads on a preset type of processor to perform the target calculation on the original input data, wherein the number of threads is determined by data sequence length information, wherein the original input data is selected from the data to be processed based on the data sequence length information, and the data sequence length information is used to record the initial sequence length corresponding to the original input data. Based on the above method steps, a method for implementing a data processing cloud service is provided, which runs on a cloud server. The cloud server receives a data processing request from the service caller via a first application programming interface (API). Based on the data to be processed contained in the data processing request, the cloud server executes the data processing flow to obtain the target computation result. Furthermore, the cloud server returns a data processing response to the service caller via a second application programming interface, providing the target computation result to the service caller. Furthermore, if the client device's operating resources meet the requirements for training, deploying, and operating a large model, the data processing method described in the embodiments of the present application can also be performed on the client device to provide local data processing services to the client. The above-described method steps can be applied to predefined application scenarios where large language model training is assisted by a data processing cloud service to optimize the large language model training process. In particular, in scenarios involving data sequence length expansion, the above-described method steps can enable more accurate computation of the expanded data sequence, saving computational costs and improving computational efficiency. These predefined application scenarios include, but are not limited to, scenarios involving the use of large language models in fields such as e-commerce, education, healthcare, conferencing, social networking, financial products, logistics, and navigation. Correspondingly, the raw input data is model training data pre-collected in the preset application scenario. The trained large language model can demonstrate high performance on specific tasks in the corresponding preset application scenario. The raw input data may include at least one data batch, each of which may include multiple data sequences, and each of the multiple data sequences may have different sequence lengths.During the fine-tuning process, a multidimensional array matrix needs to be constructed based on the original input data. Therefore, data sequences of varying lengths within the original input data are expanded to a specific length (i.e., the expanded sequence length) to obtain the aforementioned data to be processed. Specifically, the aforementioned data to be processed is the data obtained by expanding data sequences of varying lengths within the original input data during the fine-tuning process for large language model training. The pre-recorded data sequence length information is used to record the initial sequence lengths of multiple data sequences within the original input data before the expansion operation. In other words, the data sequence length information can represent the actual sequence length of the original input data. Based on this data sequence length information, the portion of the processed data obtained after the expansion operation that belongs to the original input data, as well as the portion of the expanded data, can be determined. The aforementioned pre-set processor type can be a multi-core processor, a graphics processor, or an AI-specific accelerated processor. The target computations performed on the original input data may include, but are not limited to, attention computations, matrix computations, activation function computations, gradient computations, and convolution computations. The processor type and the type of computation to be performed can be flexibly selected based on the specific computational requirements of the application scenario. In an exemplary application scenario, the number of threads to be invoked is determined based on data sequence length information. Furthermore, multiple threads (Threads) corresponding to the number of threads on the GPU are invoked to perform attention calculations on the original input data to obtain a target calculation result, which can be an output matrix. Furthermore, by scheduling multiple threads to perform matrix calculations under the attention mechanism, distributed training of large language models can be achieved, allowing for a distributed fine-tuning phase. In an embodiment of the present application, a data processing request is obtained through a first application programming interface, wherein the request data carried in the data processing request includes: data to be processed, where the data to be processed is data obtained by extending the data sequence length of the original input data; and a data processing response is returned through a second application programming interface, wherein the response data carried in the data processing response includes: a target calculation result, where the target calculation result is obtained by invoking multiple threads on a processor of a preset type to perform the target calculation on the original input data. The number of threads in the multiple threads is determined by the data sequence length information. The original input data is selected from the data to be processed based on the data sequence length information. The data sequence length information is used to record the initial sequence length corresponding to the original input data.It is easy to note that in the embodiments of this application, a data processing service is provided based on the above-mentioned method, which can be run on a cloud server. The cloud server performs attention calculations on a portion of the data to be processed (i.e., the original input data) based on the initial sequence length corresponding to the original input data, thereby reducing redundant calculations on the expanded data in the data to be processed. Thus, this application achieves the goal of reducing computational consumption by using data sequence length information to perform attention calculations on the original input data in the data to be processed. This achieves the technical effect of reducing redundant calculations caused by expansion operations during fine-tuning, reducing computing resource consumption, and improving model training efficiency. This further solves the technical problem in related technologies of performing redundant attention calculations on the data matrix constructed by the expansion operation, resulting in high computing resource consumption and low training efficiency. In addition, implementing the data processing process in a cloud server improves the flexibility and scalability of the large language model training process. It should be noted that the preferred implementation of this embodiment can be found in the relevant description of Example 1 and will not be repeated here. Example 3 In the operating environment of Example 1, this application provides another data processing method as shown in Figure 7. FIG7 is a flowchart of a data processing method according to Example 3 of the present application. As shown in FIG7 , the data processing method includes: Step S71, obtaining a currently input data processing session request, wherein the request data carried in the data processing session request includes: data to be processed, wherein the data to be processed is data obtained by expanding the data sequence length of the original input data; Step S72, in response to the data processing session request, returning a data processing session reply, wherein the information carried in the data processing session reply includes: a target calculation result, obtained by invoking multiple threads on a preset type of processor to perform a target calculation on the original input data, wherein the number of threads is determined by data sequence length information, wherein the original input data is selected from the data to be processed based on the data sequence length information, and the data sequence length information is used to record the initial sequence length corresponding to the original input data; Step S73, displaying the target calculation result in a graphical user interface. According to the above method steps, a visualization solution for data processing functions is provided. The terminal device provides a graphical user interface that displays at least one data processing scenario. The graphical user interface also includes input components (such as text input boxes and voice input controls) and display components (such as text display windows). Users enter data processing dialog requests through input components to specify the data to be processed in the data processing task.After detecting the user's input behavior, a data processing process is executed based on the data to be processed to obtain a target calculation result. Furthermore, the target calculation result is displayed via a display component within a graphical user interface. The above-described method steps can be applied to visual interactive scenarios of data processing services in large language model training within predefined application scenarios to optimize the large language model training process. In particular, in scenarios involving data sequence length expansion, the above-described method steps can enable more accurate calculations on the length-expanded data sequences, saving computational costs and improving computational efficiency. The predefined application scenarios include, but are not limited to, scenarios involving the use of large language models in fields such as e-commerce, education, healthcare, conferences, social networks, financial products, logistics, and navigation. Correspondingly, the above-described raw input data is model training data pre-collected for the predefined application scenarios. The trained large language model can demonstrate high performance on specific tasks within the corresponding predefined application scenarios. The above-described raw input data can include at least one data batch, each of which can include multiple data sequences, each of which may have different sequence lengths. During the fine-tuning process, a multidimensional array matrix needs to be constructed based on the original input data. Therefore, data sequences of varying lengths within the original input data are expanded to a specific length (i.e., the expanded sequence length) to obtain the data to be processed. Specifically, the data to be processed is obtained by expanding data sequences of varying lengths within the original input data during the fine-tuning process for large language model training. The pre-recorded data sequence length information records the initial sequence lengths of multiple data sequences within the original input data before the expansion operation. In other words, this data sequence length information can represent the actual sequence length of the original input data. Based on this data sequence length information, the portion of the processed data obtained after the expansion operation can be determined to include the portion of data belonging to the original input data and the portion of data obtained through the expansion. The preset processor type can be a multi-core processor, a graphics processor, or an AI-specific accelerated processor. The target computations performed on the original input data can include, but are not limited to, attention computations, matrix computations, activation function computations, gradient computations, and convolution computations. The processor type and the type of computation to be performed can be flexibly selected based on the specific computational requirements of the application scenario. In an exemplary application scenario, the number of threads to be called is determined based on the data sequence length information. Further, multiple threads (Thread) equal to the number of threads on the GPU are called to perform attention calculation on the original input data to obtain a target calculation result, which can be an output matrix.Furthermore, by scheduling multiple threads to perform matrix calculations under the attention mechanism, distributed training of large language models can be achieved, allowing for a distributed fine-tuning phase. In an embodiment of the present application, a currently input data processing dialog request is obtained, wherein the request data carried in the data processing dialog request includes: data to be processed, where the data to be processed is data obtained by expanding the data sequence length of the original input data; a data processing dialog reply is returned in response to the data processing dialog request, wherein the data processing dialog reply includes: a target calculation result, obtained by invoking multiple threads on a preset type of processor to perform a target calculation on the original input data, wherein the number of threads is determined by the data sequence length information; the original input data is selected from the data to be processed based on the data sequence length information; the data sequence length information is used to record the initial sequence length corresponding to the original input data; and the target calculation result is displayed in a graphical user interface. It is easy to note that in the embodiments of the present application, based on the above-mentioned method, a visual interactive solution for data processing services is provided. User input information is obtained through a graphical user interface and the target calculation result is returned to the user. During the data processing process, attention calculation is performed on a portion of the data to be processed (i.e., the original input data) based on the initial sequence length corresponding to the original input data, reducing redundant calculations on the expanded data in the processed data. As a result, the present application achieves the goal of reducing computational consumption by performing targeted attention calculations on the original input data in the processed data based on data sequence length information. This achieves the technical effect of reducing redundant calculations caused by expansion operations during fine-tuning, reducing computing resource consumption, and improving model training efficiency. This further solves the technical problem in the related art of performing redundant attention calculations on the data matrix constructed by the expansion operation, resulting in high computing resource consumption and low training efficiency. In addition, implementing the data processing process in a cloud server improves the flexibility and scalability of the large language model training process. It should be noted that the preferred implementation of this embodiment can be found in the relevant description of Example 1 and will not be repeated here. Example 4 According to the embodiments of the present application, an embodiment of an apparatus configured to implement the above-mentioned data processing method is also provided.FIG8 is a schematic structural diagram of a data processing device according to Example 4 of the present application. As shown in FIG8 , the device includes: an acquisition module 801, configured to acquire data to be processed, wherein the data to be processed is data obtained by expanding the data sequence length of original input data; a selection module 802, configured to select original input data from the data to be processed based on pre-recorded data sequence length information, wherein the data sequence length information is used to record the initial sequence length corresponding to the original input data; and a calculation module 803, configured to call multiple threads on a preset type of processor to perform target calculations on the original input data to obtain target calculation results, wherein the number of threads in the multiple threads is determined by the data sequence length information. Optionally, the acquisition module 801 is further configured to: determine multiple initial sequences based on input batch information of the original input data, wherein at least some of the multiple initial sequences have different sequence lengths; perform data sequence length expansion on the multiple initial sequences to obtain data to be processed, wherein the data to be processed includes: an input matrix to be used and a mask matrix, wherein the input matrix includes: multiple target sequences, wherein the multiple target sequences have the same sequence length, and the mask matrix is ​​used to determine the data category of each matrix element in the input matrix. Optionally, the selection module 802 is further configured to: perform region determination on each data element in the data to be processed based on the data sequence length information to obtain a determination result, wherein the determination result indicates the data region in which each data element in the data to be processed is currently located, wherein the data region includes: the original data region and the expanded data region; and select the original input data from the data to be processed based on the determination result. Optionally, in addition to all of the above modules, the data processing apparatus further includes: a stop module 804 (not shown in the figure), configured to refuse to execute the target calculation on the data in the expanded data region and release thread resources occupied by the data in the expanded data region. Optionally, in addition to all of the above modules, the data processing apparatus further includes: an adjustment module 805 (not shown in the figure), configured to resize the input matrix based on the mask matrix to obtain data sequence length information. Optionally, in addition to all of the above modules, the data processing apparatus further includes: an update module 806 (not shown in the figure), configured to construct an initial hidden layer state based on the input matrix; and update the initial hidden layer state using the data sequence length information to obtain a target hidden layer state.Optionally, in addition to all of the above modules, the data processing apparatus further includes: a determination module 808 (not shown in the figure), configured to determine initial matrix dimensions based on the sequence lengths of multiple initial sequences, wherein the initial matrix dimensions are used to determine the initial dimensions of multiple matrices used in parameter target calculation, wherein the multiple matrices include a query matrix, a key matrix, and a value matrix corresponding to the original input data; the initial matrix dimensions are updated based on data sequence length information and a target hidden layer state to obtain target matrix dimensions, wherein the target matrix dimensions are used to determine the target dimensions of the multiple matrices. Optionally, the calculation module 803 is further configured to: invoke multiple threads on a preset type processor to load the multiple matrices corresponding to the original input data from a preset storage area on the preset type processor to registers on the preset type processor, and perform target calculation on the multiple matrices stored in the registers to obtain target calculation results. Optionally, in addition to all of the aforementioned modules, the data processing device further includes: a restoration module 808 (not shown), configured to write the target calculation result into a preset storage area; and in response to the target calculation result being successfully written, to restore the target hidden layer state to the initial hidden layer state based on the data sequence length information. It should be noted that the acquisition module 801, selection module 802, and calculation module 803 correspond to steps S31 to S33 in Example 1. The examples and application scenarios implemented by these three modules and corresponding steps are the same, but are not limited to those disclosed in Example 1. It should be noted that the aforementioned modules or units may be hardware components or software components stored in a memory and processed by one or more processors. Alternatively, the aforementioned modules may be executed in a computer terminal as part of the device. In an embodiment of the present application, an acquisition module is used to acquire data to be processed, where the data to be processed is data obtained by expanding the data sequence length of original input data. A selection module is used to select original input data from the data to be processed based on pre-recorded data sequence length information, where the data sequence length information is used to record the initial sequence length corresponding to the original input data. A calculation module is used to invoke multiple threads on a preset type of processor to perform target calculations on the original input data to obtain target calculation results, where the number of threads in the multiple threads is determined by the data sequence length information.It is readily apparent that in the embodiments of the present application, attention calculations are performed on a portion of the data to be processed (i.e., the original input data) based on the initial sequence length corresponding to the original input data, thereby reducing redundant calculations on the expanded data in the data to be processed. Thus, the present application achieves the goal of reducing computational overhead by using data sequence length information to perform attention calculations on the original input data in the data to be processed. This achieves the technical effect of reducing redundant calculations caused by the expansion operation during fine-tuning, lowering computing resource consumption, and improving model training efficiency. This further addresses the technical problem in related arts of performing redundant attention calculations on the data matrix constructed by the expansion operation, resulting in high computing resource consumption and low training efficiency. According to embodiments of the present application, another embodiment of a device configured to implement the data processing method of the aforementioned embodiment 2 is also provided. FIG9 is a schematic structural diagram of another data processing device according to Example 4 of the present application. As shown in FIG9 , the device includes: an acquisition module 901, configured to acquire a data processing request through a first application programming interface, wherein the request data carried in the data processing request includes: data to be processed, wherein the data to be processed is data obtained by expanding the data sequence length of original input data; a return module 902, configured to return a data processing response through a second application programming interface, wherein the response data carried in the data processing response includes: a target calculation result, wherein the target calculation result is obtained by calling multiple threads on a preset type of processor to perform a target calculation on the original input data, wherein the number of threads of the multiple threads is determined by data sequence length information, the original input data is selected from the data to be processed based on the data sequence length information, and the data sequence length information is used to record the initial sequence length corresponding to the original input data. It should be noted that the acquisition module 901 and return module 902 correspond to steps S61 to S62 in Example 2. The examples and application scenarios implemented by these two modules and the corresponding steps are the same, but are not limited to the content disclosed in Example 2. It should be noted that the above modules or units may be hardware components or software components stored in a memory and processed by one or more processors. The above modules may also be part of a device and run on a computer terminal. According to an embodiment of the present application, an embodiment of a device configured to implement the data processing method in Example 3 is also provided.FIG10 is a schematic structural diagram of another data processing device according to Embodiment 4 of the present application. As shown in FIG10 , the device includes: an acquisition module 1001, configured to acquire a currently input data processing session request, wherein the request data carried in the data processing session request includes: data to be processed, wherein the data to be processed is data obtained by expanding the data sequence length of original input data; a return module 1002, configured to return a data processing session reply in response to the data processing session request, wherein the information carried in the data processing session reply includes: a target calculation result, wherein the target calculation result is obtained by invoking multiple threads on a preset type of processor to perform a target calculation on the original input data, wherein the number of threads is determined by data sequence length information, wherein the original input data is selected from the data to be processed based on the data sequence length information, and the data sequence length information is used to record the initial sequence length corresponding to the original input data; and a display module 1003, configured to display the target calculation result in a graphical user interface. It should be noted that the acquisition module 1001, return module 1002, and display module 1003 described above correspond to steps S71 to S73 in Example 3. The examples and application scenarios implemented by these three modules and corresponding steps are the same, but are not limited to the content disclosed in Example 3. It should be noted that the above modules or units may be hardware components or software components stored in a memory and processed by one or more processors. The above modules may also be part of an apparatus and run in a computer terminal. It should be noted that the preferred implementation of this embodiment can be found in the relevant descriptions in Example 1 or Example 2 and will not be repeated here. Example 5 According to an embodiment of the present application, an electronic device is also provided. The electronic device may be any terminal device in a group of electronic devices. Optionally, in this embodiment, the electronic device may be replaced by a terminal device such as a mobile terminal. Optionally, in this embodiment, the electronic device may be located in at least one of multiple network devices in a computer network. In this embodiment, the electronic device may execute program code for the following steps in the data processing method: obtaining data to be processed, where the data to be processed is data obtained by expanding the data sequence length of original input data; selecting original input data from the data to be processed based on pre-recorded data sequence length information, where the data sequence length information is used to record the initial sequence length corresponding to the original input data; and invoking multiple threads on a preset type of processor to perform a target calculation on the original input data to obtain a target calculation result, where the number of threads in the multiple threads is determined by the data sequence length information.Alternatively, Figure 11 is a block diagram of an electronic device according to Embodiment 5 of the present application. As shown in Figure 11 , the electronic device 110 may include one or more processors (only one is shown) 1102, a memory 1104, a storage controller 1106, and a peripheral interface 1108. The peripheral interface 1108 is connected to a radio frequency module, an audio module, and a display. The memory 1104 may be configured to store software programs and modules, such as program instructions / modules corresponding to the data processing methods and apparatuses described in the embodiments of the present application. The processor executes the software programs and modules stored in the memory to perform various functional applications and data processing, thereby implementing the aforementioned data processing methods. The memory 1104 may include high-speed random access memory (RAM) and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 1104 may further include memory located remotely from the processor. Such remote memory may be connected to the electronic device 110 via a network. Examples of the aforementioned networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof. Processor 1102 can access information and applications stored in memory via a transmission device to perform the following steps: obtaining data to be processed, where the data to be processed is data obtained by extending the data sequence length of original input data; selecting original input data from the data to be processed based on pre-recorded data sequence length information, where the data sequence length information is used to record the initial sequence length corresponding to the original input data; and invoking multiple threads on a processor of a preset type to perform a target calculation on the original input data to obtain a target calculation result, where the number of threads in the multiple threads is determined by the data sequence length information. Optionally, the processor 1102 may further execute program code for the following steps: determining multiple initial sequences based on input batch information of original input data, wherein at least some of the multiple initial sequences have different sequence lengths; and performing data sequence length expansion on the multiple initial sequences to obtain data to be processed, wherein the data to be processed includes an input matrix and a mask matrix to be used, wherein the input matrix includes multiple target sequences, wherein the multiple target sequences have the same sequence length, and the mask matrix is ​​used to determine the data category of each matrix element in the input matrix.Optionally, the processor 1102 may further execute program code for the following steps: based on the data sequence length information, performing region determination on each data element in the data to be processed to obtain a determination result, wherein the determination result indicates the data region in which each data element in the data to be processed is currently located, where the data region includes: an original data region and an expanded data region; and selecting original input data from the data to be processed based on the determination result. Optionally, the processor 1102 may further execute program code for the following steps: refusing to perform a target calculation on the data in the expanded data region and releasing thread resources occupied by the data in the expanded data region. Optionally, the processor 1102 may further execute program code for the following steps: resizing the input matrix based on a mask matrix to obtain data sequence length information. Optionally, the processor 1102 may further execute program code for the following steps: constructing an initial hidden layer state based on the input matrix; and updating the initial hidden layer state using the data sequence length information to obtain a target hidden layer state. Optionally, the processor 1102 may further execute program code for the following steps: determining initial matrix dimensions based on the sequence lengths of multiple initial sequences, wherein the initial matrix dimensions are used to determine the initial dimensions of multiple matrices for parameter target calculation, wherein the multiple matrices include a query matrix, a key matrix, and a value matrix corresponding to the original input data; updating the initial matrix dimensions based on the data sequence length information and the target hidden layer state to obtain target matrix dimensions, wherein the target matrix dimensions are used to determine the target dimensions of the multiple matrices. Optionally, the processor 1102 may further execute program code for the following steps: invoking multiple threads on a preset type processor to load the multiple matrices corresponding to the original input data from a preset storage area on the preset type processor to registers on the preset type processor, and performing target calculation on the multiple matrices stored in the registers to obtain target calculation results. Optionally, the processor 1102 may further execute program code for the following steps: writing the target calculation results to the preset storage area; and in response to successful writing of the target calculation results, restoring the target hidden layer state to the initial hidden layer state based on the data sequence length information.The processor 1102 can call the information and application stored in the memory through the transmission device to perform the following steps: obtain a data processing request through a first application programming interface, wherein the request data carried in the data processing request includes: data to be processed, wherein the data to be processed is data obtained by expanding the data sequence length of the original input data; return a data processing response through a second application programming interface, wherein the response data carried in the data processing response includes: a target calculation result, wherein the target calculation result is obtained by calling multiple threads on a preset type of processor to perform a target calculation on the original input data, the number of threads of the multiple threads is determined by the data sequence length information, the original input data is selected from the data to be processed based on the data sequence length information, and the data sequence length information is used to record the initial sequence length corresponding to the original input data. Processor 1102 can access information and applications stored in the memory through a transmission device to perform the following steps: obtaining a currently input data processing session request, wherein the request data carried in the data processing session request includes: data to be processed, wherein the data to be processed is data obtained by extending the data sequence length of the original input data; returning a data processing session reply in response to the data processing session request, wherein the information carried in the data processing session reply includes: a target calculation result, wherein the target calculation result is obtained by invoking multiple threads on a processor of a preset type to perform a target calculation on the original input data, wherein the number of threads is determined by the data sequence length information, wherein the original input data is selected from the data to be processed based on the data sequence length information, and the data sequence length information is used to record the initial sequence length corresponding to the original input data; and displaying the target calculation result in a graphical user interface. According to an embodiment of the present application, an electronic device configured to implement the above-described data processing method is provided. Obtaining data to be processed, where the data to be processed is data obtained by expanding the data sequence length of original input data; selecting original input data from the data to be processed based on pre-recorded data sequence length information, where the data sequence length information is used to record an initial sequence length corresponding to the original input data; and invoking multiple threads on a preset type of processor to perform a target calculation on the original input data to obtain a target calculation result, where the number of threads in the multiple threads is determined by the data sequence length information.In the embodiments of the present application, attention calculations are performed on a portion of the data to be processed (i.e., the original input data) based on the initial sequence length corresponding to the original input data, thereby reducing redundant calculations performed on the expanded data in the data to be processed. Thus, the present application achieves the goal of reducing computational overhead by using data sequence length information to specifically perform attention calculations on the original input data in the data to be processed. This reduces redundant computations caused by the expansion operation during fine-tuning, reduces computational resource consumption, and improves model training efficiency. This further addresses the technical problem in related arts of performing redundant attention calculations on the data matrix constructed by the expansion operation, resulting in high computational resource consumption and low training efficiency. Those skilled in the art will appreciate that the structure shown in FIG11 is merely illustrative, and the electronic device may also be a terminal device such as a smartphone (e.g., an Android phone, an iOS phone, etc.), a tablet computer, a PDA, or a mobile internet device (MID). FIG11 does not limit the structure of the electronic device described above. For example, the electronic device 110 may include more or fewer components (e.g., a network interface, a display device, etc.) than those shown in FIG11 , or may have a configuration different from that shown in FIG11 . Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments can be completed by a program instructing the hardware associated with the terminal device. The program can be stored in a computer-readable storage medium, which may include a flash drive, ROM, RAM, a magnetic disk, or an optical disk. Example 6: According to an embodiment of the present application, a computer-readable storage medium is also provided. Optionally, in this embodiment, the storage medium can be configured to store program code executed by the data processing method provided in Example 1, Example 2, or Example 3. Optionally, in this embodiment, the storage medium can be located in any computer terminal in a computer terminal group in a computer network, or in any mobile terminal in a mobile terminal group. Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for executing the following steps: obtaining data to be processed, wherein the data to be processed is data obtained by performing data sequence length expansion on original input data; selecting original input data from the data to be processed based on pre-recorded data sequence length information, wherein the data sequence length information is used to record an initial sequence length corresponding to the original input data; and calling multiple threads on a preset type of processor to perform a target calculation on the original input data to obtain a target calculation result, wherein the number of threads in the multiple threads is determined by the data sequence length information.Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for executing the following steps: determining multiple initial sequences based on input batch information of original input data, wherein at least some of the multiple initial sequences have different sequence lengths; and performing data sequence length expansion on the multiple initial sequences to obtain data to be processed, wherein the data to be processed includes: an input matrix to be used and a mask matrix, wherein the input matrix includes: multiple target sequences, wherein the multiple target sequences have the same sequence length, and the mask matrix is ​​used to determine the data category of each matrix element in the input matrix. Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for executing the following steps: performing a region determination on each data element in the data to be processed based on the data sequence length information to obtain a determination result, wherein the determination result indicates the data region in which each data element in the data to be processed is currently located, and the data region includes: an original data region and an expanded data region; and selecting original input data from the data to be processed based on the determination result. Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for executing the following steps: refusing to perform a target calculation on the data in the expanded data region and releasing thread resources occupied by the data in the expanded data region. Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for executing the following steps: resizing the input matrix based on a mask matrix to obtain data sequence length information. Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for executing the following steps: constructing an initial hidden layer state based on the input matrix; and updating the initial hidden layer state using the data sequence length information to obtain a target hidden layer state. Optionally, In this embodiment, a computer-readable storage medium is configured to store program code for executing the following steps: determining initial matrix dimensions based on the sequence lengths of multiple initial sequences, wherein the initial matrix dimensions are used to determine the initial dimensions of multiple matrices for parameter target calculation, wherein the multiple matrices include a query matrix, a key matrix, and a value matrix corresponding to the original input data; updating the initial matrix dimensions based on data sequence length information and a target hidden layer state to obtain target matrix dimensions, wherein the target matrix dimensions are used to determine the target dimensions of the multiple matrices. Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for executing the following steps: invoking multiple threads on a preset type processor to load multiple matrices corresponding to the original input data from a preset storage area on the preset type processor to registers on the preset type processor, and performing target calculation on the multiple matrices stored in the registers to obtain target calculation results.Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for executing the following steps: writing a target calculation result to a preset storage area; and in response to the target calculation result being successfully written, restoring the target hidden layer state to the initial hidden layer state based on the data sequence length information. Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for executing the following steps: obtaining a data processing request through a first application programming interface, wherein the request data carried in the data processing request includes: data to be processed, wherein the data to be processed is data obtained by extending the data sequence length of original input data; and returning a data processing response through a second application programming interface, wherein the response data carried in the data processing response includes: a target calculation result, wherein the target calculation result is obtained by invoking multiple threads on a preset type of processor to perform the target calculation on the original input data, wherein the number of threads in the multiple threads is determined by the data sequence length information, wherein the original input data is selected from the data to be processed based on the data sequence length information, and wherein the data sequence length information is used to record the initial sequence length corresponding to the original input data. Optionally, in this embodiment, a computer-readable storage medium is configured to store program code for executing the following steps: obtaining a currently input data processing session request, wherein the request data carried in the data processing session request includes: data to be processed, wherein the data to be processed is data obtained by extending the data sequence length of the original input data; returning a data processing session reply in response to the data processing session request, wherein the information carried in the data processing session reply includes: a target calculation result, wherein the target calculation result is obtained by invoking multiple threads on a processor of a preset type to perform a target calculation on the original input data, wherein the number of threads is determined by data sequence length information, wherein the original input data is selected from the data to be processed based on the data sequence length information, and wherein the data sequence length information is used to record the initial sequence length corresponding to the original input data; and displaying the target calculation result in a graphical user interface. According to an embodiment of the present application, a computer-readable storage medium configured to implement the above-described data processing method is provided. Obtaining data to be processed, where the data to be processed is data obtained by expanding the data sequence length of original input data; selecting original input data from the data to be processed based on pre-recorded data sequence length information, where the data sequence length information is used to record an initial sequence length corresponding to the original input data; and invoking multiple threads on a preset type of processor to perform a target calculation on the original input data to obtain a target calculation result, where the number of threads in the multiple threads is determined by the data sequence length information.In an embodiment of the present application, attention calculations are performed on a portion of the data to be processed (i.e., the original input data) based on the initial sequence length corresponding to the original input data, reducing redundant calculations performed on the expanded data in the data to be processed. Thus, the present application achieves the goal of reducing computational overhead by using data sequence length information to perform attention calculations on the original input data in the data to be processed. This reduces redundant computations caused by the expansion operation during fine-tuning, reduces computational resource consumption, and improves model training efficiency. This further addresses the technical problem in related arts of performing redundant attention calculations on the data matrix constructed by the expansion operation, resulting in high computational resource consumption and low training efficiency. A computer program product is also provided according to an embodiment of the present application. Optionally, in this embodiment, the computer program product can provide data processing services based on the data processing method provided in Embodiment 1, Embodiment 2, or Embodiment 3. Optionally, in this embodiment, the computer program product can be a set of instructions and codes pre-written according to the data processing method. The computer program product can run on various computer platforms, including personal computers, servers, mobile devices, and the like. Optionally, in this embodiment, the instructions and code corresponding to the computer program product are used to implement the following method steps: obtaining data to be processed, where the data to be processed is data obtained by performing data sequence length expansion on original input data; selecting original input data from the data to be processed based on pre-recorded data sequence length information, where the data sequence length information is used to record the initial sequence length corresponding to the original input data; and invoking multiple threads on a preset type of processor to perform target calculations on the original input data to obtain target calculation results, where the number of threads in the multiple threads is determined by the data sequence length information. The above-described computer program product can provide data processing services for application scenarios involving data sequence length expansion calculations during model training. This achieves the goal of reducing computational overhead by using data sequence length information to perform targeted attention calculations on the original input data in the data to be processed. This reduces redundant computations caused by the expansion operation during fine-tuning, reduces computing resource consumption, and improves model training efficiency. This further addresses the technical problem in related technologies of performing redundant attention calculations on the data matrix constructed by the expansion operation, resulting in high computing resource consumption and low training efficiency. The serial numbers of the above-mentioned embodiments of the present application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments. In the above-mentioned embodiments of the present application, the descriptions of each embodiment are given with emphasis. For portions not described in detail in one embodiment, reference can be made to the relevant descriptions of other embodiments.In the several embodiments provided herein, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of units is merely a logical functional division. In actual implementation, other divisions may be employed. For example, multiple units or components may be combined or integrated into another system, or some features may be omitted or not implemented. Furthermore, the couplings or direct couplings or communication connections shown or discussed may be through interfaces, or indirect couplings or communication connections between units or modules, and may be electrical or other forms. 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, i.e., they may be located in one location or distributed across multiple network units. Some or all of these units may be selected to achieve the objectives of the present embodiments based on actual needs. Furthermore, the functional units in the various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units can be implemented in either hardware or software functional units. If implemented as software functional units and sold or used as standalone products, the integrated units can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, or the portion that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product, stored in a storage medium, includes instructions for enabling a computer device (such as a personal computer, server, or network device) to perform all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage media include various media capable of storing program code, such as USB flash drives, ROM, RAM, mobile hard drives, magnetic disks, or optical disks. The above description is merely a preferred embodiment of this application. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of this application, and such improvements and modifications should be considered within the scope of protection of this application.

Claims

Claims 1. A data processing method, wherein: include: Obtaining data to be processed, wherein the data to be processed is data obtained by performing data sequence length expansion on original input data; selecting the original input data from the data to be processed based on pre-recorded data sequence length information, wherein the data sequence length information is used to record an initial sequence length corresponding to the original input data; and invoking multiple threads on a preset type of processor to perform a target calculation on the original input data to obtain a target calculation result, wherein the number of the multiple threads is determined by the data sequence length information.

2. The data processing method according to claim 1, wherein obtaining the data to be processed comprises: Based on input batch information of the original input data, multiple initial sequences are determined, wherein at least some of the multiple initial sequences have different sequence lengths; and data sequence lengths are expanded on the multiple initial sequences to obtain the data to be processed, wherein the data to be processed includes: an input matrix and a mask matrix to be used, the input matrix includes: multiple target sequences, the multiple target sequences have the same sequence length, and the mask matrix is used to determine the data category of each matrix element in the input matrix.

3. The data processing method according to claim 1, wherein selecting the original input data from the data to be processed based on the data sequence length information comprises: Based on the data sequence length information, a region determination is performed on each data element in the data to be processed to obtain a determination result, wherein the determination result is used to indicate a data region in which each data element in the data to be processed is currently located, and the data region includes: an original data region and an expanded data region; and based on the determination result, the original input data is selected from the data to be processed.

4. The data processing method according to claim 3, further comprising: Refuse to execute target calculation on the data in the extended data area, and release thread resources occupied by the data in the extended data area.

5. The data processing method according to claim 2, further comprising: A resizing operation is performed on the input matrix based on the mask matrix to obtain the data sequence length information. 27 6. The data processing method according to claim 2, further comprising: constructing an initial hidden layer state based on the input matrix; and updating the initial hidden layer state using the data sequence length information to obtain a target hidden layer state.

7. The data processing method according to claim 6, further comprising: Determining initial matrix dimensions based on sequence lengths of the multiple initial sequences, wherein the initial matrix dimensions are used to determine initial dimensions of multiple matrices participating in target calculation, the multiple matrices including: a query matrix, a key matrix, and a value matrix corresponding to the original input data; and updating the initial matrix dimensions based on the data sequence length information and the target hidden layer state to obtain target matrix dimensions, wherein the target matrix dimensions are used to determine target dimensions of the multiple matrices.

8. The data processing method according to claim 7, wherein calling the multiple threads on the preset type processor to perform target calculation on the original input data to obtain the target calculation result comprises: Invoking the multiple threads on the preset type processor, loading the multiple matrices corresponding to the original input data from a preset storage area on the preset type processor to registers on the preset type processor, and performing target calculations on the multiple matrices stored in the registers to obtain the target calculation results.

9. The data processing method according to claim 8, further comprising: Writing the target calculation result into the preset storage area; In response to the target calculation result being written successfully, the target hidden layer state is restored to the initial hidden layer state based on the data sequence length information.

10. A data processing method, wherein: include: A data processing request is obtained through a first application programming interface, wherein request data carried in the data processing request includes: data to be processed, wherein the data to be processed is data obtained by expanding the data sequence length of original input data; a data processing response is returned through a second application programming interface, wherein response data carried in the data processing response includes: a target calculation result, wherein the target calculation result is obtained by calling multiple threads on a preset type processor to perform a target calculation on the original input data, wherein the number of threads of the multiple threads is determined by data sequence length information, and the original input data is obtained from the processor based on the data sequence length information. The data sequence length information is selected from the data to be processed, and the data sequence length information is used to record the initial sequence length corresponding to the original input data.

11. A data processing method, wherein: include: Obtaining a currently input data processing dialogue request, wherein request data carried in the data processing dialogue request includes: data to be processed, wherein the data to be processed is data obtained by expanding the data sequence length of original input data; returning a data processing dialogue reply in response to the data processing dialogue request, wherein information carried in the data processing dialogue reply includes: a target calculation result, wherein the target calculation result is obtained by invoking multiple threads on a preset type of processor to perform a target calculation on the original input data, the number of the multiple threads being determined by data sequence length information, the original input data being selected from the data to be processed based on the data sequence length information, and the data sequence length information being used to record an initial sequence length corresponding to the original input data; and displaying the target calculation result in a graphical user interface.

12. An electronic device, wherein: include: a memory storing an executable program; A processor is configured to run the program, wherein the program executes the data processing method according to any one of claims 1 to 11 when running.

13. A computer-readable storage medium, wherein: The computer-readable storage medium includes a stored executable program, wherein when the executable program is run, the device where the computer-readable storage medium is located is controlled to execute the data processing method according to any one of claims 1 to 11.

14. A computer program product, wherein: The computer program comprises a computer program, which implements the data processing method according to any one of claims 1 to 11 when executed by a processor.

Citation Information

Patent Citations

  • Character string storage method, matching method, electronic equipment and readable storage medium

    CN109857740A

  • Distributed parallel training method and device, and readable medium

    CN111381966A

  • Track prediction method based on semantic fusion representation

    CN115049009A

  • Variable-length speech emotion recognition method based on space-time multi-fusion network

    CN115206297A

  • Interception processing method and equipment during memory overflow and computer readable storage medium

    CN116755916A

Cited By

  • Sequence processing method, electronic equipment, storage medium and program product

    CN121502365A

  • Memory access unit, memory access instruction execution method and chip

    CN122240187A