Task processing method, electronic device and storage medium

By predicting the output sequence length and grouping of the sequence data generation task, parallel execution is achieved, which solves the problem of inefficiency of the neural network model in sequence data generation and improves the computing efficiency.

WO2025036136A1PCT designated stage expired Publication Date: 2025-02-20ALIBABA (CHINA) CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/108231
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-08-16
Filing Date
2024-07-29
Publication Date
2025-02-20

AI Technical Summary

Technical Problem

In the prior art, the efficiency of sequence data generation through neural network models is low, and it is not effective to solve the problems of high calculation amount and low efficiency caused by complex model structure and large parameters.

Method used

By acquiring multiple sequence data generation tasks, predicting the sequence length of the output sequence data, and grouping tasks based on this length, realizing parallel execution of the same task set, thereby improving the efficiency of sequence data generation.

Benefits of technology

By executing the sequence data generation tasks in the same task set in parallel, the calculation amount is reduced, the efficiency of sequence data generation is improved, and the problem of inefficiency of neural network models in sequence data generation is solved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024108231_20022025_PF_FP_ABST
    Figure CN2024108231_20022025_PF_FP_ABST
Patent Text Reader

Abstract

The present disclosure relates to the fields of large model technology, sequence data generation and text generation. Disclosed are a task processing method, an electronic device and a storage medium. The method comprises: acquiring a plurality of sequence data generation tasks, wherein the sequence data generation tasks are used for generating output sequence data on the basis of input sequence data included in the sequence data generation tasks; on the basis of the input sequence data included in the plurality of sequence data generation tasks, obtaining the sequence length of the output sequence data by means of predication; on the basis of the sequence length of the output sequence data, grouping the plurality of sequence data generation tasks to obtain at least one task set; and concurrently executing the sequence data generation tasks included in the same task set, so as to obtain the output sequence data. The present disclosure solves the technical problem in related technologies of low efficiency of generating sequence data by means of a neural network model.
Need to check novelty before this filing date? Find Prior Art

Description

Task processing method, electronic device and storage medium Technical Field

[0001] The present disclosure relates to the fields of large model technology, sequence data generation, and text generation, and more specifically, to a task processing method, electronic device, and storage medium. Background Art

[0002] At present, most text generation tasks use neural network models with hundreds of billions of parameters trained using deep learning models. However, even if the new model architecture has achieved good results, in actual applications, due to the complex model structure and large number of parameters, the computational complexity of text generation tasks is still large, which in turn leads to low efficiency of text generation.

[0003] To address the above-mentioned problems, no effective solutions have been proposed so far.

[0004] Summary of the Invention

[0005] The embodiments of the present disclosure provide a task processing method, an electronic device, and a storage medium to at least solve the technical problem of low efficiency in generating sequence data through a neural network model in the related art.

[0006] According to one aspect of an embodiment of the present disclosure, a task processing method is provided, including: acquiring multiple sequence data generation tasks, wherein the sequence data generation tasks are used to generate output sequence data based on input sequence data included in the sequence data generation tasks; predicting the sequence length of the output sequence data based on the input sequence data included in the multiple sequence data generation tasks; grouping the multiple sequence data generation tasks based on the sequence length of the output sequence data to obtain at least one task set; and executing the sequence data generation tasks included in the same task set in parallel to obtain output sequence data.

[0007] According to another aspect of an embodiment of the present disclosure, a task processing method is also provided, including: in the process of a conversation between a target object and a virtual object, constructing multiple text generation tasks based on multiple first conversation texts of the target object, wherein the text generation task is used to generate a second conversation text based on the first conversation text, and the second conversation text is used to represent a reply text corresponding to the first conversation text; based on the first conversation text, predicting the text length of the second conversation text; based on the text length of the second conversation text, grouping the multiple text generation tasks to obtain at least one task set; and executing the text generation tasks contained in the same task set in parallel to obtain the second conversation text.

[0008] According to another aspect of an embodiment of the present disclosure, a task processing method is also provided, including: responding to an input instruction acting on an operation interface, displaying multiple sequence data generation tasks on the operation interface, wherein the sequence data generation task is used to generate output sequence data based on the input sequence data included in the sequence data generation task; responding to a task processing instruction acting on the operation interface, displaying the output sequence data on the operation interface, wherein the output sequence data is obtained by executing in parallel the sequence data generation tasks included in the same task set in at least one task set, at least one task set is obtained by grouping multiple sequence data generation tasks based on the sequence length of the output sequence data, and the sequence length of the output sequence data is predicted based on the input sequence data included in the multiple sequence data generation tasks.

[0009] According to another aspect of an embodiment of the present disclosure, a task processing method is also provided, including: responding to an input instruction on an operation interface for a target object to conduct a dialogue with a virtual object, displaying multiple first dialogue texts of the target object on the operation interface; responding to a task processing instruction on the operation interface, displaying a second dialogue text on the operation interface, wherein the second dialogue text is used to represent a reply text corresponding to the first dialogue text, and the second dialogue text is obtained by executing text generation tasks included in the same task set in at least one task set in parallel, and at least one task set is obtained by grouping multiple text generation tasks based on the text length of the second dialogue text, and the text length of the second dialogue text is predicted based on the first dialogue text, and multiple text generation tasks are constructed based on multiple first dialogue texts.

[0010] According to another aspect of an embodiment of the present disclosure, a task processing method is also provided, including: obtaining multiple sequence data generation tasks by calling a first interface, wherein the first interface includes a first parameter, and the parameter value of the first parameter is multiple sequence data generation tasks, and the sequence data generation tasks are used to generate output sequence data based on the input sequence data contained in the sequence data generation tasks; predicting the sequence length of the output sequence data based on the input sequence data contained in the multiple sequence data generation tasks; grouping the multiple sequence data generation tasks based on the sequence length of the output sequence data to obtain at least one task set; executing the sequence data generation tasks contained in the same task set in parallel to obtain output sequence data; outputting the output sequence data by calling a second interface, wherein the second interface includes a second parameter, and the parameter value of the second parameter is the output sequence data.

[0011] According to another aspect of an embodiment of the present disclosure, a task processing method is also provided, including: obtaining multiple first dialogue texts of a conversation between a target object and a virtual object by calling a first interface, wherein the first interface includes a first parameter, and the parameter value of the first parameter is the first dialogue text; constructing multiple text generation tasks based on the multiple first dialogue texts of the target object, wherein the text generation task is used to generate a second dialogue text based on the first dialogue text, and the second dialogue text is used to represent a reply text corresponding to the first dialogue text; based on the first dialogue text, predicting the text length of the second dialogue text; based on the text length of the second dialogue text, grouping the multiple text generation tasks to obtain at least one task set; executing the text generation tasks included in the same task set in parallel to obtain the second dialogue text; outputting the second dialogue text by calling a second interface, wherein the second interface includes a second parameter, and the parameter value of the second parameter is the second dialogue text.

[0012] In the disclosed embodiments, a plurality of sequence data generation tasks are obtained; based on the input sequence data included in the plurality of sequence data generation tasks, the sequence length of the output sequence data is predicted; based on the sequence length of the output sequence data, the plurality of sequence data generation tasks are grouped to obtain at least one task set; and the sequence data generation tasks included in the same task set are executed in parallel to obtain the output sequence data, thereby achieving the purpose of sequence data generation. It is easy to notice that the plurality of sequence data generation tasks can be grouped according to the predicted sequence length of the output sequence data, so that the computational complexity of the sequence data generation tasks in the same group is similar, and the sequence data generation tasks included in the same task set can be executed in parallel, thereby reducing the computational complexity in the sequence data generation process, improving the efficiency of sequence data generation, and thus solving the technical problem of low efficiency of sequence data generation using neural network models in the related art.

[0013] It is easy to note that the above general description and the following detailed description are only for the purpose of exemplifying and explaining the present disclosure, and do not constitute a limitation of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] The drawings described herein are used to provide a further understanding of the present disclosure and constitute a part of the present disclosure. The exemplary embodiments of the present disclosure and their descriptions are used to explain the present disclosure and do not constitute an improper limitation of the present disclosure. In the drawings:

[0015] FIG1 is a schematic diagram of an application scenario of a task processing method according to an embodiment of the present disclosure;

[0016] FIG2 is a flowchart of a task processing method according to Embodiment 1 of the present disclosure;

[0017] FIG3 is a schematic diagram of an optional task processing method according to an embodiment of the present disclosure;

[0018] FIG4 is a flowchart of a task processing method according to Embodiment 2 of the present disclosure;

[0019] FIG5 is a flowchart of a task processing method according to Embodiment 3 of the present disclosure;

[0020] FIG6 is a schematic diagram of an operation interface according to Example 3 of the present disclosure;

[0021] FIG7 is a flowchart of a task processing method according to Embodiment 4 of the present disclosure;

[0022] FIG8 is a schematic diagram of an operation interface according to Example 4 of the present disclosure;

[0023] FIG9 is a flowchart of a task processing method according to Embodiment 5 of the present disclosure;

[0024] FIG10 is a flowchart of a task processing method according to Embodiment 6 of the present disclosure;

[0025] FIG11 is a schematic diagram of a task processing device according to Embodiment 1 of the present disclosure;

[0026] FIG12 is a schematic diagram of a task processing device according to Embodiment 2 of the present disclosure;

[0027] FIG13 is a schematic diagram of a task processing device according to Embodiment 3 of the present disclosure;

[0028] FIG14 is a schematic diagram of a task processing device according to Embodiment 4 of the present disclosure;

[0029] FIG15 is a schematic diagram of a task processing device according to Embodiment 5 of the present disclosure;

[0030] FIG16 is a schematic diagram of a task processing device according to Embodiment 6 of the present disclosure;

[0031] FIG17 is a structural block diagram of a computer terminal according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0032] In order to enable those skilled in the art to better understand the solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the embodiments described are only part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments of the present disclosure, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present disclosure.

[0033] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0034] The technical solution provided by the present disclosure is mainly implemented using large-scale model technology. The large model here refers to a deep learning model with large-scale model parameters, which can usually contain hundreds of millions, tens of billions, hundreds of billions, trillions, or even more than ten trillion model parameters. The large model can also be called a cornerstone model / foundation model (Foundation Model). The large model is pre-trained by large-scale unlabeled corpus to produce a pre-trained model with more than 100 million parameters. This model can adapt to a wide range of downstream tasks and has good generalization capabilities, such as large-scale language models (LLMs) and multi-modal pre-training models.

[0035] It should be noted that when the large model is actually applied, the pre-trained model can be fine-tuned through a small number of samples, so that the large model can be applied to different tasks. For example, the large model can be widely used in fields such as Natural Language Processing (NLP), computer vision, etc., and can be specifically applied to computer vision tasks such as Visual Question Answering (VQA), Image Caption (IC), and image generation. It can also be widely used in natural language processing tasks such as text-based sentiment classification, text summary generation, and machine translation. Therefore, the main application scenarios of the large model include but are not limited to digital assistants, intelligent robots, search, online education, office software, e-commerce, intelligent design, etc. In the embodiment of the present disclosure, data processing through the generative model in the text generation scenario is taken as an example for explanation,

[0036] First, some nouns or terms that appear in the description of the embodiments of the present disclosure are subject to the following explanations:

[0037] AIGC: Artificial Intelligence Generated Content, also known as generative AI, is set to represent content generated by artificial intelligence.

[0038] GPT: Generative Pre Trained Transformer, an internet-based deep learning model that is set up to train data and generate corresponding text.

[0039] Transformer: A neural network that learns context and learns meaning by tracking relationships in sequential data.

[0040] GPU: Graphics Processing Unit, a graphics processor, is a mainstream computing device used to perform model training and inference.

[0041] CUDA: A general-purpose parallel computing architecture that enables GPUs to solve complex computing problems.

[0042] Batching: A method to optimize GPU computing efficiency.

[0043] Example 1

[0044] According to an embodiment of the present disclosure, a task 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.

[0045] Taking into account the huge amount of model parameters of the large model and the limited computing resources of the mobile terminal, Figure 1 is a schematic diagram of an application scenario of a task processing method according to an embodiment of the present disclosure. The above-mentioned task processing method provided by the embodiment of the present disclosure can be applied to the application scenario shown in Figure 1, but is not limited thereto. In the application scenario shown in Figure 1, the large model is deployed in a server 10, and the server 10 can be connected to one or more client devices 20 through a local area network connection, a wide area network connection, an Internet connection, or other types of data networks. The client devices 20 here may include but are not limited to: smart phones, tablet computers, laptops, PDAs, personal computers, smart home devices, car-mounted devices, etc. The client device 20 can interact with the user through a graphical user interface to implement the call to the large model, thereby implementing the method provided by the embodiment of the present disclosure.

[0046] In an embodiment of the present disclosure, a system consisting of a client device and a server can perform the following steps: the client device generates a sequence data generation task and sends it to the server via a network. After obtaining multiple sequence data generation tasks, the server can use a length prediction model to predict the length sequence of the output sequence data based on the input sequence data contained in the sequence data generation task. The sequence data generation tasks can then be grouped according to the length sequence of the output sequence data to obtain at least one task set. Finally, the multiple sequence data generation tasks in the task set can be executed in parallel. It should be noted that the embodiment of the present disclosure can be performed on the client device if the operating resources of the client device can meet the deployment and operation conditions of the large model.

[0047] In the above operating environment, the present disclosure provides a task processing method as shown in Figure 2. Figure 2 is a flow chart of the task processing method according to Example 1 of the present disclosure. As shown in Figure 2, the method may include the following steps:

[0048] Step S202: Acquire multiple sequence data generation tasks, wherein the sequence data generation tasks are used to generate output sequence data based on the input sequence data included in the sequence data generation tasks.

[0049] The above-mentioned sequence data generation task can be used to instruct the input of an input sequence data into a deep learning model (also referred to as a large model) with large-scale model parameters, so that the deep learning model can generate corresponding output sequence data. The input sequence data here can be multiple data with a certain order, for example, text data, power data, meteorological data, etc., but not limited to this. Optionally, the above-mentioned large model may include but is not limited to: large-scale language models, multimodal pre-training models, neural network models, generative models and other models, and a GPU can be used to perform reasoning and calculation of the model. Optionally, in this disclosure, the large model is used as a generative model as an example for illustration.

[0050] In an optional embodiment, taking the text generation scenario as an example, the sequence data generation task can be a text generation task, which can be applied to scenarios such as digital assistants, intelligent robots, searches, online education, office software, e-commerce, language translation, and intelligent design. Optionally, when the application scenario is the above scenario, a person skilled in the art can input multiple different input texts into the client device, so that the client device can generate a text generation task corresponding to the input text. For example, taking the language translation scenario as an example, the user can input the language to be translated on the operation interface displayed by the client device. When the client device receives the input text entered by the user, it can generate a corresponding language translation task, that is, the above-mentioned text generation task.

[0051] Step S204: Based on the input sequence data included in the multiple sequence data generation tasks, the sequence length of the output sequence data is predicted.

[0052] In an optional embodiment, since the number of model parameters of a large model is large, a large number of matrix calculations are required in the inference process. Therefore, when using a GPU for calculation, there are additional tasks in the startup and stop stages. At the same time, the matrix calculations that can be performed in parallel for a single sequence data generation task cannot fully utilize the GPU computing power. Therefore, an important way to optimize the inference performance of deep learning models under the GPU architecture is to piece together multiple sequence data generation tasks for calculation. An important detail in the implementation of the above scheme is the regularity of the task. For sequence data generation tasks, the regularity of the task is determined by the regularity of the length of the output sequence data. Therefore, after determining the input sequence data, it is necessary to use the input sequence data to predict the sequence length of the output sequence data corresponding to the input sequence data, so that the sequence data generation tasks with the same or similar sequence lengths of the output sequence data that may be generated can be processed in parallel to ensure that the processing time of the sequence data generation tasks of the same group is the same or similar, thereby reducing the amount of calculation in the model inference and calculation process.

[0053] Step S206: Based on the sequence length of the output sequence data, the plurality of sequence data generation tasks are grouped to obtain at least one task set.

[0054] In an optional embodiment, after predicting the sequence length of the output sequence data, multiple sequence data generation tasks can be grouped based on the sequence length of the output sequence data, thereby obtaining different task sets. Optionally, when grouping multiple sequence data generation tasks based on the sequence length of the output sequence data, the multiple sequence data generation tasks can be compared based on the sequence length of the output sequence data, and sequence data generation tasks with the same predicted sequence length of the output sequence data can be grouped together. Alternatively, multiple different sequence length intervals can be set, and sequence data generation tasks with the predicted sequence length of the output sequence data falling within the same sequence length interval can be grouped together, thereby obtaining at least one task set.

[0055] Step S208: executing the sequence data generation tasks included in the same task set in parallel to obtain output sequence data.

[0056] In an optional embodiment, after grouping the sequence data generation tasks according to the sequence length of the output sequence data to obtain at least one task set, all sequence data generation tasks contained in the same task set can be executed in parallel based on the task set, thereby fully utilizing the GPU computing power, optimizing the calculation process, reducing the amount of calculation in the model inference and calculation process, and thus improving the efficiency of text generation.

[0057] For example, taking a text generation task in a virtual conversation scenario as an example, a user can enter conversation information in the virtual conversation scenario interface. At this time, the client device can use the user's input conversation information as input text and generate corresponding text generation tasks. After receiving multiple text generation tasks sent by the client device, the server can predict the sequence lengths of the output texts corresponding to the multiple input texts based on the multiple input texts contained in the multiple text generation tasks, that is, predict the sequence lengths of the reply information. The multiple input texts can then be grouped according to the predicted sequence lengths of the output texts, and the input texts corresponding to output texts with similar sequence lengths can be grouped into the same task set. The text generation tasks that may generate output texts with the same or similar sequence lengths can be processed in parallel to obtain corresponding reply information, and the reply information can be used as the output text, thereby effectively reducing the calculation time of the text generation task and the amount of calculation required during the text generation task calculation process. After receiving the reply information returned by the server, the client device can display it in the virtual conversation scenario interface for the user to view.

[0058] For example, taking the text generation task in the language translation scenario as an example, the user can enter the language to be translated in the language translation scenario interface. At this time, the client device can use the language to be translated entered by the user as the input text and generate the corresponding text generation task. After receiving multiple text generation tasks sent by the client device, the server can predict the sequence lengths of multiple output texts corresponding to the multiple input texts according to the multiple input texts contained in the multiple text generation tasks, that is, the sequence lengths of the translated languages. Thus, the multiple text generation tasks can be grouped according to the predicted sequence lengths of the output texts, and the text generation tasks corresponding to the output texts with similar sequence lengths can be grouped into the same task set. The text generation tasks with the same or similar sequence lengths of the output texts that may be generated can be processed in parallel to obtain the corresponding translated language and use the translated language as the output text. After receiving the translated language returned by the server, the client device can display it in the language translation scenario interface for the user to view, thereby improving the efficiency of language translation and enhancing the user's translation experience.

[0059] For example, taking the power data prediction task in the power scenario as an example, the user can enter historical power data in the power data prediction interface. At this time, the client device can use the historical power data entered by the user as input sequence data and generate corresponding power data prediction tasks. After receiving multiple power data prediction tasks sent by the client device, the server can respectively take the sequence lengths of the multiple predicted power data corresponding to the multiple historical power data contained in the multiple power data prediction tasks, that is, the power data for the future time period, so that the multiple power data prediction tasks can be grouped according to the sequence lengths of the predicted predicted power data, and the power data prediction tasks corresponding to the predicted power data with similar sequence lengths can be grouped into the same task set. The power data prediction tasks with the same or similar sequence lengths of the predicted power data that may be generated can be processed in parallel to obtain the power data for the future time period, and the power data for the future time period can be used as the output sequence data. After receiving the power data for the future time period returned by the server, the client device can display it in the power data prediction interface for the user to view, thereby improving the efficiency of power data prediction and enhancing the user's prediction experience.

[0060] For example, using a weather forecast task in a remote sensing scenario as an example, a user can enter historical weather data in a weather forecast interface. The client device can then use the user-entered historical weather data as input sequence data and generate corresponding weather data forecast tasks. After receiving multiple weather data forecast tasks sent by the client device, the server can, based on the multiple historical weather data included in the multiple weather data forecast tasks, respectively predict the sequence lengths of the multiple predicted weather data corresponding to the multiple historical weather data, i.e., the sequence lengths of weather data for future time periods. This allows the server to group the multiple weather data forecast tasks based on the predicted sequence lengths of the predicted weather data, grouping weather data forecast tasks corresponding to forecast weather data with similar sequence lengths into the same task set, and parallel processing of weather data forecast tasks with the same or similar sequence lengths to obtain weather data for the future time period, which is then used as output sequence data. After receiving the weather data for the future time period returned by the server, the client device can display it in the weather forecast interface for the user to view, thereby improving the efficiency of weather forecasting and enhancing the user's forecasting experience.

[0061] In the disclosed embodiments, a plurality of sequence data generation tasks are obtained; based on the input sequence data included in the plurality of sequence data generation tasks, the sequence length of the output sequence data is predicted; based on the sequence length of the output sequence data, the plurality of sequence data generation tasks are grouped to obtain at least one task set; and the sequence data generation tasks included in the same task set are executed in parallel to obtain the output sequence data, thereby achieving the purpose of sequence data generation. It is easy to notice that the plurality of sequence data generation tasks can be grouped according to the predicted sequence length of the output sequence data, so that the computational complexity of the sequence data generation tasks in the same group is similar, and the sequence data generation tasks included in the same task set can be executed in parallel, thereby reducing the computational complexity in the sequence data generation process, improving the efficiency of sequence data generation, and thus solving the technical problem of low efficiency of sequence data generation using neural network models in the related art.

[0062] In the above-mentioned embodiment of the present disclosure, sequence data generation tasks of the same task set are executed in parallel to obtain output sequence data, including: based on the sequence data generation tasks of the same task set, an execution device is screened out from at least one device, wherein a large model is deployed on at least one device, and the large model is used to generate corresponding output sequence data based on input sequence data; and the execution device is controlled to use the large model deployed on the execution device to execute the sequence data generation tasks of the same task set in parallel to obtain output sequence data.

[0063] The aforementioned execution device may be at least one device configured to execute sequence data generation tasks in parallel within the same task set. The computing power of the GPU of the execution device matches the computational load of the same task set, thereby avoiding wasting GPU computing resources. The aforementioned device may include, but is not limited to, a server, on which a large model is deployed, so that input sequence data from the sequence data generation task can be fed into the large model, and the corresponding output sequence data can be generated using the large model.

[0064] In an optional embodiment, after grouping multiple sequence data generation tasks according to the predicted sequence length of the output sequence data to obtain at least one task set, a device whose computing power matches the computing amount of each task set can be determined from the at least one, that is, an execution device is determined, so that the large model deployed on the execution device can be controlled to execute the sequence data generation tasks of the same task set in parallel and obtain output sequence data.

[0065] For example, still taking the text generation task in the language translation scenario as an example, the input sequence data can be the language before translation. After obtaining the text generation task, a server deployed with a large model for language translation can be determined from at least one server. If the computing power of the server matches the computing amount of the language translation task in the task set, the server can be determined as the execution device, so that the execution device can be used to perform parallel translation of the semantics to be translated in the language translation task to obtain the translated language, which is the output sequence data mentioned above.

[0066] In the above embodiment of the present disclosure, the sequence length of the output sequence data is predicted based on the input sequence data included in the multiple sequence data generation tasks, including: using a length prediction model to predict the sequence length of the output sequence data based on the input sequence data, wherein the first training data of the length prediction model includes at least the second training data of the large model.

[0067] The first training data mentioned above may be data used to train a length prediction model.

[0068] The second training data mentioned above may be data used to train a large model.

[0069] It should be noted that the first training data may be completely identical to the second training data, or other data may be added to the second training data to serve as the first training data.

[0070] In an optional embodiment, the above-mentioned large model is generally an autoregressive model. Taking the GPT model as an example for illustration, the execution process of the sequence data generation task of the model is a cyclic process. Each cycle predicts an element of the output sequence data until the model gives an end mark. Optionally, the execution time of different cycles is roughly the same. Since the end of the sequence data generation task can not be determined until the last cycle, it is difficult to measure the computational amount of the sequence data generation task based on the input sequence data.

[0071] To solve this problem, a length prediction model can be pre-trained. To ensure that the length prediction model can match the large model, that is, the length prediction model can accurately predict the length of the sequence data generation task input to the large model, the training data used to train the large model (i.e., the second training data mentioned above) can be used to construct training data for training the length prediction model (i.e., the first training data mentioned above), so that the length prediction model can be trained using the constructed training data. The trained length prediction model is used to predict the output sequence lengths of multiple sequence data generation tasks, and the computational complexity of the sequence data generation tasks is measured based on the predicted lengths. The multiple sequence data generation tasks are then grouped to improve the uniformity of the sequence data generation tasks and, in turn, improve the efficiency of sequence output processing.

[0072] In the above embodiment of the present disclosure, the method also includes: obtaining second training data, wherein the second training data at least includes: an input training sequence and a corresponding output training sequence; determining a preset length of the output training sequence; constructing first training data based on the second training data and the preset length of the output training sequence; and using the first training data to train the initial prediction model to obtain a length prediction model.

[0073] The aforementioned input training sequence may be sequence data input to a large model for processing.

[0074] The above-mentioned output training sequence can be the sequence data that the large model should output after the user inputs the input training sequence, that is, it can be used as the true value of the large model training.

[0075] In an optional embodiment, in order to ensure that the length prediction model is more closely matched with the large model, the same training data can be used to train the large model and the length prediction model. Since the training data of the large model (i.e., the second training data mentioned above) only contains input training sequences and output training sequences, the preset length of the output training sequence can be determined by manual labeling or by using other models for length prediction, thereby constructing training data for training the length prediction model (i.e., the first training data mentioned above). By using the first training data to train the initial prediction model, the prediction accuracy of the final length prediction model can be made higher, and further, the accuracy of the sequence length prediction of the output sequence data can be improved.

[0076] In the above-mentioned embodiment of the present disclosure, based on the sequence length of the output sequence data, multiple sequence data generation tasks are grouped to obtain at least one task set, including: determining at least one length division condition based on the processing performance of different devices in at least one device; and grouping multiple sequence data generation tasks based on the at least one length division condition to obtain at least one task set.

[0077] In an optional embodiment, after predicting the sequence length of the output sequence data, length division conditions can be determined based on the processing performance of different devices, so that the sequence data generation tasks can be grouped based on the determined length division conditions. Optionally, when the performance of the execution device is good, sequence data generation tasks with longer sequence lengths can be grouped into one task set; when the performance of the execution device is poor, sequence data generation tasks with shorter sequence lengths can be grouped into one task set.

[0078] In the above embodiment of the present disclosure, based on the sequence length of the output sequence data, multiple sequence data generation tasks are grouped to obtain at least one task set, including: displaying the multiple sequence data generation tasks and the sequence length of the output sequence data on the operation interface; in response to a first feedback operation acting on the operation interface, obtaining a feedback length corresponding to the first feedback operation, wherein the feedback length is a length obtained by adjusting the sequence length based on the first feedback operation; and grouping the multiple sequence data generation tasks based on the feedback length to obtain at least one task set.

[0079] The aforementioned operation interface may be an interactive interface provided by a client device to a user, wherein the user may operate on the interface to input sequence data and generate a corresponding sequence data generation task. The aforementioned feedback length may be used to determine the length obtained by manually adjusting the sequence length of the output sequence data after the user has viewed the multiple sequence data generation tasks displayed on the operation interface and the sequence length of the output sequence data.

[0080] In an optional embodiment, after determining multiple sequence data generation tasks and the sequence length of the output sequence data, the server can send the multiple sequence data generation tasks and the sequence length of the output sequence data to the client device, which will be displayed on the operation interface for the user to view. The user can confirm the sequence length of the output sequence data. If the sequence length of the output sequence data is predicted incorrectly, the user can directly modify the sequence length of the output sequence data through a first feedback operation, so that the client device can obtain the feedback length by responding to the first feedback operation. The client device sends the feedback length to the server. The server can divide the sequence data generation tasks based on the feedback length, and can optimize the parameters of the length prediction model based on the feedback length, so as to improve the accuracy of the sequence length of the output sequence data, thereby making the sequence data generation task batches in the task set obtained by grouping more uniform, thereby improving the efficiency of sequence data generation.

[0081] In the above-mentioned embodiment of the present disclosure, sequence data generation tasks included in the same task set are executed in parallel to obtain output sequence data, including: displaying multiple sequence data generation tasks and at least one task set on an operation interface; responding to a second feedback operation acting on the operation interface, obtaining at least one feedback task set corresponding to the second feedback operation, wherein the feedback task set is a task set obtained by adjusting at least one task set based on the second feedback operation; and executing the sequence data generation tasks included in the same feedback task set in parallel to obtain output sequence data.

[0082] In an optional embodiment, after the server determines multiple sequence data generation tasks and at least one task set, the multiple sequence data generation tasks and at least one task set can be displayed on the operation interface of the client device, so that the user can confirm the at least one task set. If the sequence lengths of the output sequence data corresponding to the sequence data generation tasks in a task set differ greatly, the user can adjust the at least one task set through a second feedback operation, so that the client device can obtain the feedback task set by responding to the second feedback operation. The client device sends the feedback task set to the server, and the server can execute the sequence data generation tasks contained in the same feedback task set in parallel to obtain the output sequence data, so that the execution device can be fully utilized when performance permits, thereby improving the efficiency of sequence data generation.

[0083] FIG3 is a schematic diagram of an optional task processing method according to an embodiment of the present disclosure. As shown in FIG3 , taking the text generation scenario as an example, after the server obtains the training data of the large model, that is, obtains the second training data mentioned above, it can perform model training on the large model. Optionally, it can also obtain length prediction model training data by performing data processing on the training data of the large model, that is, the first training data mentioned above, so that the length prediction model training data can be used to perform model training on the length prediction model to improve the prediction accuracy of the length prediction model. Furthermore, after the model training is completed, the server can use the length prediction model to predict the sequence length of the output text based on the input text, and group the text generation tasks based on the sequence length of the output text to obtain at least one task set, for example, [0, 100], [100, 200], [200, 300], so that the text generation tasks in the same group can be processed in parallel.

[0084] 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, stored data, displayed data, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0085] It should be noted that for the aforementioned method embodiments, for simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present disclosure is not limited by the order of the actions described, because according to the present disclosure, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present disclosure.

[0086] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the technical solution of the present disclosure, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present disclosure.

[0087] Example 2

[0088] According to an embodiment of the present disclosure, a task processing method is also provided. FIG4 is a flow chart of the task processing method according to embodiment 2 of the present disclosure. As shown in FIG4 , the method includes the following steps:

[0089] Step S402: During a conversation between a target object and a virtual object, construct multiple text generation tasks based on multiple first conversation texts of the target object, wherein the text generation tasks are used to generate second conversation texts based on the first conversation texts, and the second conversation texts are used to represent reply texts corresponding to the first conversation texts;

[0090] Step S404: Based on the first conversation text, predict the text length of the second conversation text;

[0091] Step S406: grouping the multiple text generation tasks based on the text length of the second dialogue text to obtain at least one task set;

[0092] Step S408: executing the text generation tasks included in the same task set in parallel to obtain a second dialogue text.

[0093] The target object mentioned above may be a user.

[0094] The aforementioned virtual object may be a virtual character that communicates with the target object, such as an intelligent robot, a virtual customer service representative, and the like.

[0095] The first dialogue text mentioned above may be dialogue information output by the target object.

[0096] The second dialogue text may be a reply message output by the virtual object in response to the first dialogue text.

[0097] In an optional embodiment, when a target object is conversing with a virtual object in a device such as a computer terminal, the target object's output, i.e., the first conversation text, can be first obtained. Furthermore, a length prediction model can be used to predict the length of the second conversation text replied by the virtual object based on the first conversation text. Optionally, after obtaining the length of the second conversation text, multiple text generation tasks can be grouped according to the length of the second conversation text to obtain at least one task set. This allows devices equipped with the generation model to execute text generation tasks within the same task set in parallel to obtain the second conversation text.

[0098] It should be noted that the preferred implementation scheme involved in the above embodiments of the present disclosure is the same as the solution provided in Example 1, as well as the application scenario and implementation process, but is not limited to the solution provided in Example 1.

[0099] Example 3

[0100] According to an embodiment of the present disclosure, a task processing method is also provided. FIG5 is a flow chart of the task processing method according to embodiment 3 of the present disclosure. As shown in FIG5 , the method includes the following steps:

[0101] Step S502: In response to an input instruction on the operation interface, a plurality of sequence data generation tasks are displayed on the operation interface, wherein the sequence data generation tasks are used to generate output sequence data based on the input sequence data included in the sequence data generation tasks;

[0102] Step S504: In response to a task processing instruction on the operation interface, output sequence data is displayed on the operation interface, wherein the output sequence data is obtained by executing in parallel sequence data generation tasks included in the same task set in at least one task set, and at least one task set is obtained by grouping multiple sequence data generation tasks based on the sequence length of the output sequence data, and the sequence length of the output sequence data is predicted based on the input sequence data included in the multiple sequence data generation tasks.

[0103] The above-mentioned operation interface can be a computer terminal interface, a mobile phone interface, or a tablet computer interface. Optionally, the present disclosure does not impose any specific restrictions on the type of operation interface.

[0104] The above-mentioned input instructions can be expressed in the form of voice, touch screen, etc. Optionally, the present disclosure does not impose any specific restrictions on the form of the input instructions.

[0105] The above-mentioned task processing instructions can be expressed in the form of voice, touch screen, etc. Optionally, the present disclosure does not impose any specific limitation on the form of the task processing instructions.

[0106] FIG6 is a schematic diagram of an operation interface according to Embodiment 3 of the present disclosure. As shown in FIG6 , a user can enter sequence data in the "input box" on the client's operation interface and generate an input instruction by clicking the "Send" button. Thus, after receiving the user's input instruction on the operation interface, the client device can display the user-entered sequence data in the "input sequence data display area" on the operation interface and generate a sequence data generation task based on the user-entered sequence data. Furthermore, after the user-entered sequence data is displayed in the "input sequence data display area", a task processing instruction is automatically generated on the operation interface. After receiving the task processing instruction, the server can execute the sequence data generation tasks in parallel to obtain the corresponding output sequence data and display the output sequence data in the "output sequence data display area" on the client's operation interface. When executing the sequence data generation tasks in parallel, multiple sequence data generation tasks can be grouped based on the sequence length of the output sequence data to obtain at least one task set, so that only the multiple sequence data generation tasks contained in the at least one task set can be executed in parallel, thereby improving the efficiency of sequence data generation.

[0107] It should be noted that the preferred implementation scheme involved in the above embodiments of the present disclosure is the same as the solution provided in Example 1, as well as the application scenario and implementation process, but is not limited to the solution provided in Example 1.

[0108] Example 4

[0109] According to an embodiment of the present disclosure, a task processing method is also provided. FIG7 is a flow chart of the task processing method according to embodiment 4 of the present disclosure. As shown in FIG7 , the method includes the following steps:

[0110] Step S702: In response to an input instruction on the operation interface for the target object to communicate with the virtual object, display a plurality of first dialogue texts of the target object on the operation interface;

[0111] Step S704: In response to a task processing instruction applied to the operation interface, a second dialogue text is displayed on the operation interface, wherein the second dialogue text is used to represent a reply text corresponding to the first dialogue text, the second dialogue text is obtained by executing in parallel text generation tasks included in the same task set in at least one task set, the at least one task set is obtained by grouping multiple text generation tasks based on the text length of the second dialogue text, the text length of the second dialogue text is predicted based on the first dialogue text, and the multiple text generation tasks are constructed based on multiple first dialogue texts.

[0112] FIG8 is a schematic diagram of an operation interface according to Embodiment 4 of the present disclosure. As shown in FIG8 , a target user can enter a first dialogue text in the "input box" on the client's operation interface and click the "Send" button to generate an input instruction. Thus, upon receiving the user's input instruction on the operation interface, the client device can display the first dialogue text entered by the target user in the "first dialogue text display area" on the operation interface and generate a corresponding text generation task based on the first dialogue text entered by the target user. Furthermore, after the first dialogue text entered by the target user is displayed in the "first dialogue text display area," the target user can click the "Task Process" button on the operation interface to generate a task processing instruction. Upon receiving the task processing instruction, the server can execute the text generation task in parallel to obtain the corresponding second dialogue text and display the second dialogue text in the "second dialogue text display area" on the client's operation interface. When executing the text generation tasks in parallel, multiple text generation tasks can be grouped based on the sequence length of the second dialogue text to obtain at least one task set. This allows only the multiple text generation tasks included in the at least one task set to be executed in parallel, thereby improving text generation efficiency.

[0113] It should be noted that the preferred implementation scheme involved in the above embodiments of the present disclosure is the same as the solution provided in Example 1, as well as the application scenario and implementation process, but is not limited to the solution provided in Example 1.

[0114] Example 5

[0115] According to an embodiment of the present disclosure, a task processing method is also provided. FIG9 is a flow chart of the task processing method according to embodiment 5 of the present disclosure. As shown in FIG9 , the method includes the following steps:

[0116] Step S902: Acquire multiple sequence data generation tasks by calling a first interface, wherein the first interface includes a first parameter, a parameter value of the first parameter is multiple sequence data generation tasks, and the sequence data generation tasks are used to generate output sequence data based on the input sequence data included in the sequence data generation tasks;

[0117] Step S904: predicting the sequence length of the output sequence data based on the input sequence data included in the multiple sequence data generation tasks;

[0118] Step S906: grouping the plurality of sequence data generation tasks based on the sequence length of the output sequence data to obtain at least one task set;

[0119] Step S908: executing the sequence data generation tasks included in the same task set in parallel to obtain output sequence data;

[0120] Step S910: Outputting the output sequence data by calling the second interface, wherein the second interface includes a second parameter, and the parameter value of the second parameter is the output sequence data.

[0121] The first interface mentioned above may be a data transmission interface or a virtual interface. Optionally, the first interface mentioned above may be used to transmit the sequence data generation task generated by the client device to the server.

[0122] The second interface may be a data transmission interface or a virtual interface. Optionally, the second interface may be used to transmit the output sequence data generated by the server to the client device.

[0123] In an optional embodiment, a plurality of sequence data generation tasks can be obtained through a first interface on the client, wherein the sequence data generation task includes input sequence data, and the sequence data generation task can be input into the first interface in the form of a first parameter. Optionally, after receiving the plurality of sequence data generation tasks on the server side, the length sequence of the output sequence data corresponding to the input sequence data can be predicted by a length prediction model, and the plurality of sequence data generation tasks can be grouped according to the length sequence of the output sequence data to obtain at least one task set. Furthermore, the output sequence data can be obtained by executing the sequence data generation tasks included in the same task set in parallel, and the output sequence data can be output to the client in the form of a second parameter using a second interface.

[0124] It should be noted that the preferred implementation scheme involved in the above embodiments of the present disclosure is the same as the solution provided in Example 1, as well as the application scenario and implementation process, but is not limited to the solution provided in Example 1.

[0125] Example 6

[0126] According to an embodiment of the present disclosure, a task processing method is also provided. FIG10 is a flowchart of the task processing method according to embodiment 6 of the present disclosure. As shown in FIG10 , the method includes the following steps:

[0127] Step S1002: Acquire a plurality of first dialogue texts of a dialogue between a target object and a virtual object by calling a first interface, wherein the first interface includes a first parameter, and a parameter value of the first parameter is the first dialogue text;

[0128] Step S1004: constructing multiple text generation tasks based on multiple first dialogue texts of the target object, wherein the text generation tasks are used to generate second dialogue texts based on the first dialogue texts, and the second dialogue texts are used to represent the reply texts corresponding to the first dialogue texts;

[0129] Step S1006: Based on the first conversation text, predict the text length of the second conversation text;

[0130] Step S1008: grouping the multiple text generation tasks based on the text length of the second dialogue text to obtain at least one task set;

[0131] Step S1010: executing text generation tasks included in the same task set in parallel to obtain a second dialogue text;

[0132] Step S1012: Output the second dialogue text by calling the second interface, wherein the second interface includes a second parameter, and the parameter value of the second parameter is the second dialogue text.

[0133] In an optional embodiment, during a conversation between a target object and a virtual object, multiple first conversation texts emitted by the target object can be obtained via a first interface on the client. The multiple first conversation texts can be input into the first interface as first parameters. Furthermore, after obtaining the multiple first conversation texts, the server can use a length prediction model to predict the length of the second conversation texts corresponding to the multiple first conversation texts. Multiple text generation tasks can be grouped according to the length of the second conversation texts to obtain at least one task set. Second conversation texts can be obtained by executing the text generation tasks included in the same task set in parallel. The second conversation texts can then be output to the client via a second interface as second parameters.

[0134] It should be noted that the preferred implementation scheme involved in the above embodiments of the present disclosure is the same as the solution provided in Example 1, as well as the application scenario and implementation process, but is not limited to the solution provided in Example 1.

[0135] Example 7

[0136] According to an embodiment of the present disclosure, a device for implementing the above-mentioned task processing method is also provided. Figure 11 is a schematic diagram of the task processing device according to Example 1 of the present disclosure. As shown in Figure 11, the device includes: an acquisition module 1102, a prediction module 1104, a grouping module 1106, and an output module 1108.

[0137] Among them, the above-mentioned acquisition module is configured to acquire multiple sequence data generation tasks, wherein the sequence data generation task is used to generate output sequence data based on the input sequence data contained in the sequence data generation task; the prediction module is configured to predict the sequence length of the output sequence data based on the input sequence data contained in the multiple sequence data generation tasks; the grouping module is configured to group the multiple sequence data generation tasks based on the sequence length of the output sequence data to obtain at least one task set; the output module is configured to execute the sequence data generation tasks contained in the same task set in parallel to obtain output sequence data.

[0138] It should be noted that the acquisition module 1102, prediction module 1104, grouping module 1106, and output module 1108 correspond to steps S202 to S208 in Example 1. The examples and application scenarios implemented by the modules and corresponding steps are the same, but are not limited to the contents disclosed in the above-mentioned Example 1. It should be noted that the above-mentioned modules or units can be hardware components or software components stored in a memory (e.g., memory 104) and processed by one or more processors (e.g., processors 102a, 102b, ..., 102n). The above-mentioned modules can also be run as part of the device in the server 10 provided in Example 1.

[0139] In the above embodiment of the present disclosure, the output module 1108 includes: a screening unit, configured to generate sequence data tasks based on the same task set, and screen out execution devices from at least one device, wherein a large model is deployed on at least one device, and the large model is used to generate corresponding output sequence data based on the input sequence data; a first control unit, configured to control the execution device to use the large model deployed on the execution device to execute the sequence data generation tasks of the same task set in parallel to obtain output sequence data.

[0140] In the above embodiment of the present disclosure, the prediction module 1104 includes: a prediction unit, which is configured to use a length prediction model to predict the sequence length of the output sequence data based on the input sequence data, wherein the first training data of the length prediction model includes at least the second training data of the large model.

[0141] In the above embodiment of the present disclosure, the device also includes: a second acquisition module, configured to acquire second training data, wherein the second training data at least includes: an input training sequence and a corresponding output training sequence; a determination module, configured to determine a preset length of the output training sequence; a construction module, configured to construct the first training data based on the second training data and the preset length of the output training sequence; and a training module, configured to train the initial prediction model using the first training data to obtain a length prediction model.

[0142] In the above embodiment of the present disclosure, the grouping module 1106 includes: a determination unit, configured to determine at least one length division condition based on the processing performance of different devices in at least one device; a first grouping unit, configured to group multiple sequence data generation tasks based on at least one length division condition to obtain at least one task set.

[0143] In the above embodiment of the present disclosure, the grouping module 1106 further includes: a first display unit, configured to display multiple sequence data generation tasks and sequence lengths of output sequence data on an operation interface; a first response unit, configured to respond to a first feedback operation acting on the operation interface and obtain a feedback length corresponding to the first feedback operation, wherein the feedback length is a length obtained by adjusting the sequence length based on the first feedback operation; and a second grouping unit, configured to group the multiple sequence data generation tasks based on the feedback length to obtain at least one task set.

[0144] In the above embodiment of the present disclosure, the output module 1108 also includes: a second display unit, configured to display multiple sequence data generation tasks and at least one task set on the operation interface; a second response unit, used to respond to the second feedback operation on the operation interface, to obtain at least one feedback task set corresponding to the second feedback operation, wherein the feedback task set is a task set obtained by adjusting at least one task set based on the second feedback operation; a second control unit, configured to execute the sequence data generation tasks contained in the same feedback task set in parallel to obtain output sequence data.

[0145] It should be noted that the preferred implementation scheme involved in the above embodiments of the present disclosure is the same as the solution provided in Example 1, as well as the application scenario and implementation process, but is not limited to the solution provided in Example 1.

[0146] Example 8

[0147] According to an embodiment of the present disclosure, a device for implementing the above-mentioned task processing method is also provided. Figure 12 is a schematic diagram of the task processing device according to Example 2 of the present disclosure. As shown in Figure 12, the device includes: a construction module 1202, a prediction module 1204, a grouping module 1206, and a control module 1208.

[0148] Among them, the above-mentioned construction module is configured to construct multiple text generation tasks based on multiple first dialogue texts of the target object during the dialogue between the target object and the virtual object, wherein the text generation task is used to generate a second dialogue text based on the first dialogue text, and the second dialogue text is used to represent the reply text corresponding to the first dialogue text; the prediction module is configured to predict the text length of the second dialogue text based on the first dialogue text; the grouping module is configured to group multiple text generation tasks based on the text length of the second dialogue text to obtain at least one task set; the control module is configured to execute the text generation tasks contained in the same task set in parallel to obtain the second dialogue text.

[0149] It should be noted here that the above-mentioned construction module 1202, prediction module 1204, grouping module 1206, and control module 1208 correspond to steps S402 to S408 in Example 2. The instances and application scenarios implemented by the modules and corresponding steps are the same, but are not limited to the contents disclosed in the above-mentioned Example 2.

[0150] Example 9

[0151] According to an embodiment of the present disclosure, a device for implementing the above-mentioned task processing method is also provided. Figure 13 is a schematic diagram of the task processing device according to embodiment 3 of the present disclosure. As shown in Figure 15, the device includes: a display module 1302 and an output module 1304.

[0152] In which, the above-mentioned display module is configured to respond to input instructions acting on the operation interface and display multiple sequence data generation tasks on the operation interface, wherein the sequence data generation task is used to generate output sequence data based on the input sequence data contained in the sequence data generation task; the output module is configured to respond to task processing instructions acting on the operation interface and display the output sequence data on the operation interface, wherein the output sequence data is obtained by parallel execution of sequence data generation tasks contained in the same task set in at least one task set, at least one task set is obtained by grouping multiple sequence data generation tasks based on the sequence length of the output sequence data, and the sequence length of the output sequence data is predicted based on the input sequence data contained in the multiple sequence data generation tasks.

[0153] It should be noted here that the above-mentioned display module 1302 and output module 1304 correspond to steps S502 to S504 in Example 3. The instances and application scenarios implemented by the modules and corresponding steps are the same, but are not limited to the contents disclosed in the above-mentioned Example 3.

[0154] Example 10

[0155] According to an embodiment of the present disclosure, a device for implementing the above-mentioned task processing method is also provided. Figure 14 is a schematic diagram of the task processing device according to embodiment 4 of the present disclosure. As shown in Figure 14, the device includes: a first display module 1402 and a second display module 1404.

[0156] The first display module 1402 is configured to respond to input instructions on the operation interface for the target object to communicate with the virtual object, and display multiple first dialogue texts of the target object on the operation interface; the second display module 1404 is configured to respond to task processing instructions on the operation interface, and display the second dialogue text on the operation interface, wherein the second dialogue text is used to represent the reply text corresponding to the first dialogue text, and the second dialogue text is obtained by executing the text generation tasks included in the same task set in at least one task set in parallel, and at least one task set is obtained by grouping multiple text generation tasks based on the text length of the second dialogue text, and the text length of the second dialogue text is predicted based on the first dialogue text, and multiple text generation tasks are constructed based on multiple first dialogue texts.

[0157] It should be noted here that the above-mentioned first display module 1402 and second display module 1404 correspond to steps S702 to S704 in Example 4. The instances and application scenarios implemented by the modules and corresponding steps are the same, but are not limited to the contents disclosed in the above-mentioned Example 4.

[0158] Example 10

[0159] According to an embodiment of the present disclosure, a device for implementing the above-mentioned task processing method is also provided. Figure 15 is a schematic diagram of a task processing device according to embodiment 5 of the present disclosure. As shown in Figure 15, the device includes: a first output module 1502, a second output module 1504, a grouping module 1506, a control module 1508, and a third output module 1510.

[0160] The first output module is configured to obtain multiple sequence data generation tasks by calling a first interface, wherein the first interface includes a first parameter, the parameter value of the first parameter is multiple sequence data generation tasks, and the sequence data generation tasks are used to generate output sequence data based on the input sequence data contained in the sequence data generation tasks; the second output module is configured to predict the sequence length of the output sequence data based on the input sequence data contained in the multiple sequence data generation tasks; the grouping module is configured to group the multiple sequence data generation tasks based on the sequence length of the output sequence data to obtain at least one task set; the control module is configured to execute the sequence data generation tasks contained in the same task set in parallel to obtain output sequence data; the third output module is configured to output the output sequence data by calling the second interface, wherein the second interface includes a second parameter, the parameter value of the second parameter is the output sequence data.

[0161] It should be noted here that the above-mentioned first output module 1502, second output module 1504, grouping module 1506, control module 1508, and third output module 1510 correspond to steps S902 to S910 in Example 5. The instances and application scenarios implemented by the modules and corresponding steps are the same, but are not limited to the contents disclosed in the above-mentioned Example 5.

[0162] Example 11

[0163] According to an embodiment of the present disclosure, a device for implementing the above-mentioned task processing method is also provided. Figure 16 is a schematic diagram of a task processing device according to embodiment 6 of the present disclosure. As shown in Figure 16, the device includes: an acquisition module 1602, a construction module 1604, a prediction module 1606, a grouping module 1608, a control module 1610, and an output module 1612.

[0164] An acquisition module is configured to acquire multiple first dialogue texts of a conversation between a target object and a virtual object by calling a first interface, wherein the first interface includes a first parameter, and the parameter value of the first parameter is the first dialogue text; a construction module is configured to construct multiple text generation tasks based on the multiple first dialogue texts of the target object, wherein the text generation task is used to generate a second dialogue text based on the first dialogue text, and the second dialogue text is used to represent the reply text corresponding to the first dialogue text; a prediction module is configured to predict the text length of the second dialogue text based on the first dialogue text; a grouping module is configured to group multiple text generation tasks based on the text length of the second dialogue text to obtain at least one task set; a control module is configured to execute the text generation tasks included in the same task set in parallel to obtain the second dialogue text; an output module is configured to output the second dialogue text by calling a second interface, wherein the second interface includes a second parameter, and the parameter value of the second parameter is the second dialogue text.

[0165] It should be noted here that the above-mentioned acquisition module 1602, construction module 1604, prediction module 1606, grouping module 1608, control module 1610, and output module 1612 correspond to steps S1002 to S1012 in Example 6. The instances and application scenarios implemented by the modules and corresponding steps are the same, but are not limited to the contents disclosed in the above-mentioned Example 6.

[0166] Example 12

[0167] The embodiment of the present disclosure may provide a computer terminal, which may be any computer terminal device in a computer terminal group. Optionally, in this embodiment, the computer terminal may also be replaced by a terminal device such as a mobile terminal.

[0168] Optionally, in this embodiment, the computer terminal may be located in at least one network device among a plurality of network devices of a computer network.

[0169] In this embodiment, the above-mentioned computer terminal can execute the program code of the following steps in the task processing method: obtaining multiple sequence data generation tasks, wherein the sequence data generation tasks are used to generate output sequence data based on the input sequence data included in the sequence data generation tasks; predicting the sequence length of the output sequence data based on the input sequence data included in the multiple sequence data generation tasks; grouping the multiple sequence data generation tasks based on the sequence length of the output sequence data to obtain at least one task set; and executing the sequence data generation tasks included in the same task set in parallel to obtain output sequence data.

[0170] Optionally, Figure 17 is a block diagram of a computer terminal according to an embodiment of the present disclosure. As shown in Figure 17, the computer terminal A may include: one or more (only one is shown in the figure) processors 1702, a memory 1704, a storage controller, and a peripheral interface, wherein the peripheral interface is connected to a radio frequency module, an audio module, and a display.

[0171] Among them, the memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the task processing method and device in the embodiment of the present disclosure. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, realizing the above-mentioned task processing method. The memory may include a high-speed random access memory, and may also include a 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 may further include a memory remotely located relative to the processor, and these remote memories may be connected to the terminal A via a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.

[0172] The processor can call the information and application stored in the memory through the transmission device to perform the following steps: obtain multiple sequence data generation tasks, wherein the sequence data generation tasks are used to generate output sequence data based on the input sequence data included in the sequence data generation tasks; predict the sequence length of the output sequence data based on the input sequence data included in the multiple sequence data generation tasks; group the multiple sequence data generation tasks based on the sequence length of the output sequence data to obtain at least one task set; and execute the sequence data generation tasks included in the same task set in parallel to obtain output sequence data.

[0173] Optionally, the processor may also execute the program code of the following steps: generating tasks based on the sequence data of the same task set, screening out execution devices from at least one device, wherein a large model is deployed on at least one device, and the large model is used to generate corresponding output sequence data based on the input sequence data; controlling the execution device to execute the sequence data generation tasks of the same task set in parallel using the large model deployed on the execution device to obtain output sequence data.

[0174] Optionally, the processor may also execute the program code of the following steps: using a length prediction model to predict the sequence length of the output sequence data based on the input sequence data, wherein the first training data of the length prediction model includes at least the second training data of the large model.

[0175] Optionally, the processor may also execute the program code of the following steps: obtaining second training data, wherein the second training data includes at least: an input training sequence and a corresponding output training sequence; determining a preset length of the output training sequence; constructing first training data based on the second training data and the preset length of the output training sequence; and using the first training data to train an initial prediction model to obtain a length prediction model.

[0176] Optionally, the processor may also execute the program code of the following steps: determining at least one length division condition based on the processing performance of different devices in at least one device; and grouping multiple sequence data generation tasks based on at least one length division condition to obtain at least one task set.

[0177] Optionally, the processor may also execute program code for the following steps: displaying multiple sequence data generation tasks and sequence lengths of output sequence data on an operation interface; obtaining a feedback length corresponding to the first feedback operation in response to a first feedback operation performed on the operation interface, wherein the feedback length is a length obtained by adjusting the sequence length based on the first feedback operation; and grouping multiple sequence data generation tasks based on the feedback length to obtain at least one task set.

[0178] Optionally, the processor may also execute the program code of the following steps: displaying multiple sequence data generation tasks and at least one task set on an operation interface; obtaining at least one feedback task set corresponding to the second feedback operation in response to a second feedback operation on the operation interface, wherein the feedback task set is a task set obtained by adjusting at least one task set based on the second feedback operation; and executing the sequence data generation tasks contained in the same feedback task set in parallel to obtain output sequence data.

[0179] In the disclosed embodiments, a plurality of sequence data generation tasks are obtained; based on the input sequence data included in the plurality of sequence data generation tasks, the sequence length of the output sequence data is predicted; based on the sequence length of the output sequence data, the plurality of sequence data generation tasks are grouped to obtain at least one task set; and the sequence data generation tasks included in the same task set are executed in parallel to obtain the output sequence data, thereby achieving the purpose of sequence data generation. It is easy to notice that the plurality of sequence data generation tasks can be grouped according to the predicted sequence length of the output sequence data, so that the computational complexity of the sequence data generation tasks in the same group is similar, and the sequence data generation tasks included in the same task set can be executed in parallel, thereby reducing the computational complexity in the sequence data generation process, improving the efficiency of sequence data generation, and thus solving the technical problem of low efficiency of sequence data generation using neural network models in the related art.

[0180] Those skilled in the art will appreciate that the structure shown in the figure is for illustration only, and the computer terminal may also be a smartphone (such as an Android phone, iOS phone, etc.), a tablet computer, a PDA, a mobile internet device (MID), a PAD, or other terminal device. FIG17 does not limit the structure of the above-mentioned electronic devices. For example, the computer terminal A may include more or fewer components (such as a network interface, a display device, etc.) than those shown in FIG17 , or may have a configuration different from that shown in FIG17 .

[0181] A person skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a computer-readable storage medium, which may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0182] Example 13

[0183] The embodiment of the present disclosure further provides a storage medium. Optionally, in this embodiment, the storage medium can be used to store the program code executed by the task processing method provided in the first embodiment.

[0184] Optionally, in this embodiment, the storage medium may 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.

[0185] Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps: obtaining multiple sequence data generation tasks, wherein the sequence data generation tasks are used to generate output sequence data based on the input sequence data included in the sequence data generation tasks; predicting the sequence length of the output sequence data based on the input sequence data included in the multiple sequence data generation tasks; grouping the multiple sequence data generation tasks based on the sequence length of the output sequence data to obtain at least one task set; and executing the sequence data generation tasks included in the same task set in parallel to obtain output sequence data.

[0186] The serial numbers of the above-mentioned embodiments of the present disclosure are for description only and do not represent the advantages or disadvantages of the embodiments.

[0187] In the above embodiments of the present disclosure, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0188] In the several embodiments provided in the present disclosure, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0189] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0190] In addition, the functional units in the various embodiments of the present disclosure may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0191] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.

[0192] The above is only a preferred embodiment of the present disclosure. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present disclosure. These improvements and modifications should also be regarded as within the scope of protection of the present disclosure.

[0193] The present disclosure discloses a task processing method, electronic device, and storage medium, relating to the fields of large model technology, sequence data generation, and text generation. The method comprises: obtaining multiple sequence data generation tasks, wherein the sequence data generation tasks are used to generate output sequence data based on the input sequence data contained in the sequence data generation tasks; predicting the sequence length of the output sequence data based on the input sequence data contained in the multiple sequence data generation tasks; grouping the multiple sequence data generation tasks based on the sequence length of the output sequence data to obtain at least one task set; and executing the sequence data generation tasks contained in the same task set in parallel to obtain the output sequence data. The present disclosure solves the technical problem of low efficiency in sequence data generation using neural network models in related technologies.

Claims

1. A task processing method, comprising: Acquire a plurality of sequence data generation tasks, wherein the sequence data generation tasks are used to generate output sequence data based on input sequence data included in the sequence data generation tasks; Predicting the sequence length of the output sequence data based on the input sequence data included in the plurality of sequence data generation tasks; Based on the sequence length of the output sequence data, grouping a plurality of the sequence data generation tasks to obtain at least one task set; The sequence data generation tasks included in the same task set are executed in parallel to obtain the output sequence data.

2. The method according to claim 1, wherein: Executing the sequence data generation tasks of the same task set in parallel to obtain the output sequence data includes: Based on the sequence data generation task of the same task set, selecting an execution device from at least one device, wherein a large model is deployed on the at least one device, and the large model is used to generate corresponding output sequence data based on the input sequence data; The execution device is controlled to utilize the large model deployed on the execution device to execute the sequence data generation tasks of the same task set in parallel to obtain the output sequence data.

3. The method according to claim 2, wherein: Predicting the sequence length of the output sequence data based on the input sequence data included in the plurality of sequence data generation tasks includes: The length prediction model is used to predict the sequence length of the output sequence data based on the input sequence data, wherein the first training data of the length prediction model at least includes the second training data of the large model.

4. The method according to claim 3, wherein: The method further comprises: Acquire the second training data, wherein the second training data at least includes: an input training sequence and a corresponding output training sequence; Determining a preset length of the output training sequence; constructing the first training data based on the second training data and a preset length of the output training sequence; The initial prediction model is trained using the first training data to obtain the length prediction model.

5. The method according to claim 1, wherein: Based on the sequence length of the output sequence data, a plurality of the sequence data generation tasks are grouped to obtain at least one task set, including: determining at least one length partitioning condition based on processing performance of different devices in at least one device; The plurality of sequence data generation tasks are grouped based on at least one of the length division conditions to obtain to at least one of the task sets.

6. The method according to claim 1, wherein: Based on the sequence length of the output sequence data, a plurality of the sequence data generation tasks are grouped to obtain at least one task set, including: Displaying a plurality of the sequence data generation tasks and the sequence lengths of the output sequence data on an operation interface; In response to a first feedback operation performed on the operation interface, obtaining a feedback length corresponding to the first feedback operation, wherein the feedback length is a length obtained by adjusting the sequence length based on the first feedback operation; A plurality of the sequence data generation tasks are grouped based on the feedback length to obtain at least one task set.

7. The method according to claim 1, wherein: Parallel execution of the sequence data generation tasks included in the same task set to obtain the output sequence data includes: Displaying a plurality of the sequence data generation tasks and at least one of the task sets on an operation interface; In response to a second feedback operation on the operation interface, obtaining at least one feedback task set corresponding to the second feedback operation, wherein the feedback task set is a task set obtained by adjusting at least one of the task sets based on the second feedback operation; The sequence data generation tasks included in the same feedback task set are executed in parallel to obtain the output sequence data.

8. A task processing method, wherein: include: During the dialogue between the target object and the virtual object, multiple text generation tasks are constructed based on multiple first dialogue texts of the target object, wherein the text generation tasks are used to generate second dialogue texts based on the first dialogue texts, and the second dialogue texts are used to represent the reply text corresponding to the first dialogue texts; Based on the first dialogue text, predicting the text length of the second dialogue text; Based on the text length of the second dialogue text, grouping the plurality of text generation tasks to obtain at least one task set; The text generation tasks included in the same task set are executed in parallel to obtain the second dialogue text.

9. The method according to claim 8, wherein: The text generation tasks included in the same task set are executed in parallel to obtain the second dialogue text, including: Based on the text generation task of the same task set, selecting an execution device from at least one device, wherein a large model is deployed on the at least one device, and the large model is used to generate a corresponding second dialogue text based on the first dialogue text; Control the execution device to use the large model deployed on the execution device to execute the same The text generation task of the task set obtains the second dialogue text.

10. The method according to claim 9, wherein: Predicting the text length of the second dialogue text based on the first dialogue text includes: The length of the second dialogue text is predicted based on the first dialogue text using a length prediction model, wherein the first training data of the length prediction model at least includes the second training data of the large model.

11. A task processing method, wherein: include: In response to an input instruction acting on an operation interface, a plurality of sequence data generation tasks are displayed on the operation interface, wherein the sequence data generation tasks are used to generate output sequence data based on input sequence data included in the sequence data generation tasks; In response to a task processing instruction acting on the operation interface, the output sequence data is displayed on the operation interface, wherein the output sequence data is obtained by executing in parallel the sequence data generation tasks included in the same task set in at least one task set, at least one of the task sets is obtained by grouping a plurality of the sequence data generation tasks based on the sequence length of the output sequence data, and the sequence length of the output sequence data is predicted based on the input sequence data included in the plurality of the sequence data generation tasks.

12. The method according to claim 11, wherein: The output sequence data is obtained by controlling the execution device to use the large model deployed on the execution device to execute the sequence data generation task of the same task set in parallel. The execution device is selected from at least one device based on the sequence data generation task of the same task set. The large model is deployed on at least one device, and the large model is used to generate corresponding output sequence data based on the input sequence data.

13. A task processing method, wherein: include: In response to an input instruction on an operation interface for a target object to have a conversation with a virtual object, displaying a plurality of first conversation texts of the target object on the operation interface; In response to a task processing instruction acting on the operation interface, a second dialogue text is displayed on the operation interface, wherein the second dialogue text is used to represent a reply text corresponding to the first dialogue text, and the second dialogue text is obtained by executing in parallel a text generation task included in the same task set in at least one task set, and at least one of the task sets is obtained by grouping a plurality of the text generation tasks based on the text length of the second dialogue text, and the text length of the second dialogue text is predicted based on the first dialogue text, and a plurality of the text generation tasks are constructed based on a plurality of the first dialogue texts.

14. The method according to claim 13, wherein: The second dialogue text is obtained by controlling the execution device to use the big model deployed on the execution device to execute the text generation task of the same task set in parallel. The execution device is screened from at least one device based on the text generation task of the same task set. The big model is deployed on at least one device, and the big model is used to generate the corresponding second dialogue text based on the first dialogue text.

15. A task processing method, wherein: include: Acquire multiple sequence data generation tasks by calling a first interface, wherein the first interface includes a first parameter, a parameter value of the first parameter is a plurality of the sequence data generation tasks, and the sequence data generation tasks are used to generate output sequence data based on input sequence data included in the sequence data generation tasks; Predicting the sequence length of the output sequence data based on the input sequence data included in the plurality of sequence data generation tasks; Based on the sequence length of the output sequence data, grouping the plurality of sequence data generation tasks to obtain at least one task set; executing the sequence data generation tasks included in the same task set in parallel to obtain the output sequence data; The output sequence data is output by calling a second interface, wherein the second interface includes a second parameter, and a parameter value of the second parameter is the output sequence data.

16. The method according to claim 15, wherein: Parallel execution of the sequence data generation tasks included in the same task set to obtain the output sequence data includes: Based on the sequence data generation task of the same task set, selecting an execution device from at least one device, wherein a large model is deployed on the at least one device, and the large model is used to generate corresponding output sequence data based on the input sequence data; The execution device is controlled to utilize the large model deployed on the execution device to execute the sequence data generation tasks of the same task set in parallel to obtain the output sequence data.

17. A task processing method, wherein: include: Acquire multiple first dialogue texts of dialogues between the target object and the virtual object by calling a first interface, wherein the first interface includes a first parameter, and the parameter value of the first parameter is the first dialogue text; Based on the multiple first dialogue texts of the target object, construct multiple text generation tasks, wherein the text generation tasks are used to generate second dialogue texts based on the first dialogue texts, and the second dialogue texts are used to represent the reply texts corresponding to the first dialogue texts; Based on the first dialogue text, predicting the text length of the second dialogue text; Based on the text length of the second dialogue text, grouping the plurality of text generation tasks to obtain at least one task set; executing the text generation tasks included in the same task set in parallel to obtain the second dialogue text; The second dialogue text is outputted by calling a second interface, wherein the second interface includes a second parameter, and a parameter value of the second parameter is the second dialogue text.

18. The method according to claim 17, wherein: The text generation tasks included in the same task set are executed in parallel to obtain the second dialogue text, including: Based on the text generation task of the same task set, selecting an execution device from at least one device, wherein a large model is deployed on the at least one device, and the large model is used to generate a corresponding second dialogue text based on the first dialogue text; The execution device is controlled to use the large model deployed on the execution device to execute the text generation tasks of the same task set in parallel to obtain the second dialogue text.

19. An electronic device, wherein: include: A memory storing an executable program; A processor, configured to run the program, wherein the program, when running, performs the method according to any one of claims 1 to 18.

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

Citation Information

Patent Citations

  • User adaptive interfaces

    CN107148554A

  • Data parallelism-based time sequence analysis method and system

    CN107644063A

  • Bill classification method and device, equipment and storage medium

    CN113255767A

  • BERT-based sequence generation method and device

    CN113536736A

  • Event identification and classification method based on bidirectional recurrent neural network and attention mechanism

    CN113946677A