A task scheduling method, system, electronic device, and storage medium

By extracting features from the task request text and predicting the length of the response text of the language processing model, and performing group scheduling processing, the problem of limited efficiency improvement in inference task processing in existing technologies is solved, and more efficient task scheduling and throughput are achieved.

CN120832219BActive Publication Date: 2025-12-02SHENZHEN HONGJING ZONGHENG TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511340055.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-19
Publication Date
2025-12-02
Estimated Expiration
2045-09-19

AI Technical Summary

Technical Problem

In existing language processing models, the batch processing strategy in inference task scheduling is based on the text length of the inference task. Although this improves processing efficiency to some extent, the improvement is limited and cannot effectively improve the system's throughput or reduce the computational cost of a single inference process.

Method used

By obtaining the text vector of the task request text, the length of the response text is predicted, and the task request texts are sorted and grouped according to the length of the response texts. The task request texts in the group are scheduled for processing if the difference in length of the task request texts in the group is less than a preset threshold, and resource space is allocated for parallel processing.

Benefits of technology

It effectively improves the scheduling and processing efficiency of task request texts, reduces the waste of computing resources, increases the system throughput, and reduces the computing cost of a single inference task.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120832219B_ABST
    Figure CN120832219B_ABST
Patent Text Reader

Abstract

This application relates to the field of data processing, specifically to a task scheduling method, system, electronic device, and storage medium, comprising: acquiring task request texts for several inference tasks; extracting features from the task request texts to obtain text vectors of the task request texts; predicting the length of the response texts to the task request texts based on the text vectors; sorting the several task request texts according to the length of the response texts; grouping the sorted task request texts; and scheduling the task request texts according to the groups. Compared with the prior art, this application, by predicting the length of the response texts to the task request texts and grouping the task request texts based on the response text lengths, makes the difference in the length of the response texts of the task request texts in the same group smaller, thereby effectively improving the efficiency of scheduling the task request texts in the same group.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing, and more specifically, to a task scheduling method, system, electronic device, and storage medium. Background Technology

[0002] As language processing models continue to develop, more and more people are using them to solve problems. With the increase in the number of people using language processing models and the increase in the frequency of questions asked, language processing model systems need to respond to a large number of reasoning tasks at the same time, which requires improving the system's throughput.

[0003] To improve system throughput and reduce the computational cost of a single inference process, existing language processing model inference task scheduling techniques typically employ a batch scheduling strategy. This involves merging multiple inference tasks onto a single GPU (Graphics Processing Unit) of the language processing model for processing. Batch processing is usually performed based on the text length of the inference task. While this can improve the processing efficiency of inference tasks to some extent, the improvement is limited.

[0004] Therefore, there is an urgent need for a task scheduling method that can more effectively improve the processing efficiency of inference tasks. Summary of the Invention

[0005] This invention provides a task scheduling method, system, electronic device, and storage medium for more effectively improving the processing efficiency of inference tasks in language processing models.

[0006] According to a first aspect of this application, a task scheduling method is provided, the method comprising:

[0007] Obtain the task request texts for several reasoning tasks;

[0008] Feature extraction is performed on the task request text to obtain the text vector of the task request text;

[0009] Based on the text vector, predict the length of the response text that answers the task request text;

[0010] The task request texts are sorted according to the length of the response text, and the sorted task request texts are then grouped.

[0011] The task request text is scheduled and processed according to the grouping.

[0012] Optionally, predicting the length of the response text based on the text vector to answer the task request text includes:

[0013] The text vector is processed by a pre-trained response length prediction model to predict the response text length to the task request text.

[0014] Optionally, grouping the sorted task request text includes:

[0015] Based on the sorted task request texts, obtain the difference in response text length between adjacent task request texts;

[0016] The sorted task request texts are grouped such that the length difference between the corresponding response texts in each group does not exceed a preset length difference threshold.

[0017] Optionally, the step of scheduling the task request text according to the group includes:

[0018] Obtain the maximum length of the response text of the task request text in each group, and use it as the base scheduling length for the corresponding group;

[0019] Based on the basic scheduling length, resource space is allocated to the corresponding group;

[0020] The task request texts of each group are scheduled to the corresponding resource space for processing.

[0021] Optionally, allocating resource space to the corresponding group based on the basic scheduling length includes:

[0022] The filling margin for the corresponding group is obtained based on the basic scheduling length;

[0023] Based on the basic scheduling length and the corresponding padding margin, the maximum scheduling length of the corresponding group is obtained;

[0024] Resource space is allocated to the corresponding group based on the maximum scheduling length of the group and the number of task request texts in it.

[0025] Optionally, the step of extracting features from the task request text to obtain a text vector of the task request text includes:

[0026] The task request text is segmented to obtain the input words and the number of input words in the task request text;

[0027] The input words are encoded to obtain an encoding vector, and the text embedding vector of the task request text is obtained based on the encoding vector of each input word.

[0028] Obtain the classification labels of the input words, and obtain the topic feature vector of the task request text based on the classification labels of each input word;

[0029] The text vector of the task request text is obtained based on the number of input lexical units, the text embedding vector, and the topic feature vector.

[0030] Optionally, the method further includes:

[0031] Obtain the source of the task request text;

[0032] After the task request text is scheduled and processed according to the grouping, the processing result is fed back according to the source of the task request text.

[0033] Optionally, the response length prediction model includes a feature encoding network layer, a pooling network layer, and a regression network layer connected in sequence.

[0034] According to a second aspect of this application, a task scheduling system is provided, the system comprising:

[0035] The request text acquisition module is used to acquire the task request text for several inference tasks.

[0036] The feature extraction module is used to extract features from the task request text to obtain a text vector of the task request text.

[0037] The response length prediction module is used to predict the length of the response text in response to the task request text based on the text vector.

[0038] The task grouping module is used to sort several task request texts according to the length of the response text, and to group the sorted task request texts.

[0039] The task scheduling module is used to schedule and process the task request text according to the group.

[0040] According to a third aspect of this application, an electronic device is provided, comprising:

[0041] Memory, used to store one or more computer programs;

[0042] A processor, when the one or more computer programs are executed by the processor, implements the task scheduling method described in the first aspect above.

[0043] According to a fourth aspect of this application, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to execute and implement the task scheduling method described in the first aspect above.

[0044] Based on any of the above aspects, the task scheduling method, system, electronic device, and computer storage medium provided in this application embodiment predict the length of the response text to the task request text and group the task request text based on the length of the response text, so that the difference in the length of the response text corresponding to the task request text in the same group is small, thereby effectively improving the scheduling processing efficiency of the task request text in the same group. Attached Figure Description

[0045] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0046] Figure 1 This is an illustrative application scenario diagram of the task scheduling method provided in this embodiment.

[0047] Figure 2 This is a flowchart illustrating the steps of the task scheduling method provided in this embodiment.

[0048] Figure 3 This is a schematic diagram illustrating the steps involved in training the response length prediction model provided in this embodiment.

[0049] Figure 4 This is a flowchart illustrating the steps of the task request text scheduling process provided in this embodiment.

[0050] Figure 5 A flowchart illustrating the resource space allocation steps provided in this embodiment.

[0051] Figure 6 This is a schematic diagram of the functional modules of the task scheduling system provided in this embodiment.

[0052] Figure 7 This is a schematic diagram of the device structure of the electronic device provided in this embodiment. Detailed Implementation

[0053] The accompanying drawings are for illustrative purposes only and should not be construed as limiting the scope of this application. To better illustrate the following embodiments, some components in the drawings may be omitted, enlarged, or reduced, and do not represent the actual dimensions of the product; it is understandable to those skilled in the art that some well-known structures and their descriptions may be omitted in the drawings.

[0054] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0055] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0056] As language processing models continue to develop, more and more people are using them to solve problems. With the increase in the number of people using language processing models and the increase in the frequency of asking questions, language processing model systems need to respond to a large number of question requests simultaneously, which requires improving the system's throughput.

[0057] To improve system throughput and reduce the computational cost of processing a single inference task, existing language processing model inference task scheduling techniques typically employ a batch scheduling strategy, merging multiple inference tasks onto a single system GPU of the language processing model for processing. Existing batch processing methods usually divide the inference tasks into batches based on the text length of the inference task.

[0058] However, when processing inference tasks, the length of the input text has only a minor impact on the processing efficiency. The length of the output text, on the other hand, has a greater impact on efficiency. Therefore, while batching the inference task based on its input text length can improve processing efficiency to some extent, the improvement is limited.

[0059] This embodiment provides a technical solution that can solve the above problems. The specific implementation of this application will be described in detail below with reference to the accompanying drawings.

[0060] This is an exemplary schematic diagram illustrating an application scenario of a task processing method provided in an embodiment of this application. Figure 1 As shown, the application scenario includes at least a server 100 and a terminal 200 that can communicate with the server 100.

[0061] Understandably, the server 100 can be an independent electronic device or a cluster of multiple electronic devices; the terminal 200 can be a smartphone terminal, personal computer, tablet computer, vehicle terminal, etc., but is not limited to these.

[0062] In one possible implementation, server 100 and terminal 200 may respectively execute the task scheduling method provided in the embodiments of this application, or, optionally, the task scheduling method provided in the embodiments of this application may be partially executed in server 100 and partially executed in terminal 200.

[0063] like Figure 2 As shown, this embodiment provides a task scheduling method, which may include the following steps:

[0064] S1: Obtain the task request text for several reasoning tasks;

[0065] In this embodiment, the task request text of the inference task input by the user can be collected based on a preset period, and the scheduling processing can be performed based on the task request text collected in each period.

[0066] In an optional implementation, data such as the input user's information and the time of the request can also be collected, and the task request text, as well as the input user's information and the time of the request, can be constructed into standardized data to facilitate statistical analysis of the relevant data of the task request text.

[0067] S2: Extract features from the task request text to obtain the text vector of the task request text;

[0068] In this embodiment, the extraction of the text vector may include:

[0069] S21: Perform word segmentation on the task request text to obtain the input words and the number of input words in the task request text;

[0070] In this embodiment, a preset word segmenter can be used to segment the task request text to obtain each input word element of the task request text, and the number of input word elements obtained from the segmentation of the task request text can be counted. The input word elements can be words, sub-words, characters, and punctuation marks of the task request text.

[0071] S22: Encode the input words to obtain encoding vectors, and obtain the text embedding vector of the task request text based on the encoding vectors of each input word;

[0072] In this embodiment, an encoder can be used to process each input word of the task request text to obtain the encoding vector of each input word. Then, the encoding vector of each input word is processed by a pre-trained text processing model to infer and generate the text embedding vector of the task request text.

[0073] S23: Obtain the classification labels of the input words, and obtain the topic feature vector of the task request text based on the classification labels of each input word;

[0074] In this embodiment, the topic feature vector can reflect the text style and main content information of the task request text.

[0075] S24: Obtain the text vector of the task request text based on the number of input lexical units, the text embedding vector, and the topic feature vector.

[0076] In this embodiment, the number of input lexical units can be converted into a vector representation, and the vector representation of the number of input lexical units, the text embedding vector of the task request text, and the topic feature vector can be concatenated to obtain the text vector.

[0077] By obtaining the text vector through the number of input lexical units, the text embedding vector of the task request text, and the topic feature vector, the text vector contains information from multiple perspectives of the task request text, which can be better used to predict the text length of the result obtained after processing the task request text.

[0078] In an optional implementation, the text vector may further include a user preference vector. The user preference vector can be extracted by analyzing the historical task request text corresponding to the user's historical input and the output results after processing the historical task request text, and the vector reflecting the user's style and needs can be used as the user preference vector.

[0079] S3: Based on the text vector, predict the length of the response text to answer the task request text;

[0080] In this embodiment, the length of the response text can be obtained as follows:

[0081] The text vector is processed by a pre-trained response length prediction model to predict the response text length to the task request text.

[0082] In one optional implementation, the response length prediction model may include an encoding network layer, a pooling network layer, and a regression network layer connected in sequence. The encoding network layer may be configured as a neural network containing a Transformer encoder for encoding the text vector; the pooling network layer is used to pool the encoded text vector; and the regression network layer is used to learn and predict the response text length based on the pooled text vector.

[0083] In one implementation, such as Figure 3 As shown, training the response length prediction model may include:

[0084] S31: Collect several historical task request texts, and the length of the historical response texts corresponding to the historical task request texts;

[0085] S32: Extract features from the historical task request texts to obtain the historical text vectors of each historical task request text;

[0086] It is understood that in this embodiment, the acquisition of the historical text vector can be carried out with reference to the above step S2, and will not be described in detail here.

[0087] S33: Add a length label to the corresponding historical text vector according to the length of the historical response text, and construct a training set based on the historical text vector after adding the length label;

[0088] S34: Train the response length prediction model based on the training set until the preset loss function converges to obtain the pre-trained response length prediction model.

[0089] In one implementation, the loss function can be obtained based on the mean squared error between the output of the response length prediction model and the corresponding length label, and can be expressed as:

[0090]

[0091] In the formula, the Let N be the loss function, and N be the number of historical text vectors in the training set. This represents the prediction output of the i-th historical text vector in the training set in the response length prediction model. This represents the length label corresponding to the i-th historical text vector.

[0092] S4: Sort the task request texts according to the length of the response text, and group the sorted task request texts.

[0093] In this embodiment, step S4 may include:

[0094] Based on the sorted task request texts, the length difference of the response texts of adjacent task request texts is obtained; the sorted task request texts are grouped so that the length difference of the response texts corresponding to the task request texts in each group does not exceed a preset length difference threshold.

[0095] In one optional implementation, starting from one end of the sorted task request text, for each task request text, the length difference between the task request text and the corresponding response text of the next task request text is calculated. If the length difference of the response text does not exceed a preset length difference threshold, the task request text and the next task request text are grouped into the same group. This continues until the length difference of the response text exceeds the length difference threshold. Then, the next task request text of the task request text that exceeds the length difference threshold is grouped into another group. The above-mentioned calculation of the response text length difference is then performed based on the next task request text, and so on.

[0096] In one example, assuming the lengths of the response texts corresponding to the sorted task request texts are [5, 6, 8, 10, 14, 16, 19, 20], and the length difference threshold is set to 2, then the task request texts with response text lengths of 5, 6, 8, and 10 can be grouped into one group. Since the difference between 10 and 14 exceeds the length difference threshold, the task request text corresponding to 14 is grouped into the next group. At the same time, the task request texts with response text lengths of 14 and 16 can be grouped into one group. Similarly, the task request texts with response text lengths of 19 and 20 can be grouped into one group.

[0097] S5: Schedule the task request text according to the grouping.

[0098] In this embodiment, as Figure 4 As shown, step S5 may include:

[0099] S51: Obtain the maximum value of the response text length of the task request text in each group, and use it as the base scheduling length of the corresponding group;

[0100] S52: Allocate resource space to the corresponding group according to the basic scheduling length;

[0101] S53: Schedule the task request text of each group to the corresponding resource space for processing.

[0102] In this embodiment, the resource space refers to the video memory space in the GPU that processes the task request text, and the basic scheduling length refers to the maximum space occupied when processing the task request text in the group. By using the maximum length of the response text of the task request text in the group to allocate the resource space to the corresponding group, it can be ensured that the resource space can process all the task request text in the corresponding group in parallel, thereby effectively improving the processing efficiency of the task request text.

[0103] Furthermore, such as Figure 5 As shown, step S52 may include:

[0104] A1: Obtain the filling margin of the corresponding group based on the basic scheduling length;

[0105] A2: Based on the basic scheduling length and the corresponding padding margin, obtain the maximum scheduling length of the corresponding group;

[0106] A3: Allocate resource space to the corresponding group based on the maximum scheduling length of the group and the number of task request texts in it.

[0107] In order to cope with errors in the processing of the task request text and to further ensure that all task request texts in the group can be processed effectively, a certain margin needs to be considered when allocating resource space in the group.

[0108] Simultaneously, when the task request texts in the group are processed in the resource space, a certain amount of padding needs to be added to each task request text in the group to unify all the task request texts in the group to the same length, thereby facilitating parallel processing of each task request text in the resource space. After the task request text has completed scheduling processing, the added padding data is removed from the scheduled task request text.

[0109] Therefore, in this embodiment, the required space size of the group can be obtained by multiplying the maximum scheduling length by the number of task request texts in the group, and then the resource space can be allocated to the group according to the required space size, so that all task request texts in the group can be processed in parallel in the resource space, and the amount of padding data that needs to be added to the group is minimized, thereby reducing the waste of computing resources.

[0110] In one optional implementation, the result of multiplying the basic scheduling length by a preset multiplier can be used as the filling margin, and the result of adding the basic scheduling length and the filling margin can be used as the maximum scheduling length; wherein, the preset multiplier can be set to 5%-10%.

[0111] In an optional implementation, the method further includes obtaining the source of the task request text based on the input user information in the standardized data described above, and after scheduling the task request text according to the group, feeding back the processing result based on the source of the task request text.

[0112] In this embodiment, a task scheduling system is also provided, such as... Figure 6 As shown, the system may include:

[0113] The request text acquisition module 11 is used to acquire the task request texts of several inference tasks;

[0114] In this embodiment, the request text acquisition module 11 can be used to perform... Figure 2 For a detailed description of the request text acquisition module 11 shown in step S1, please refer to the description of step S1.

[0115] The feature extraction module 12 is used to extract features from the task request text to obtain a text vector of the task request text.

[0116] In this embodiment, the feature extraction module 12 can be used to perform... Figure 2 For a detailed description of the feature extraction module 12 shown in step S2, please refer to the description of step S2.

[0117] The response length prediction module 13 is used to predict the response text length of the response to the task request text based on the text vector.

[0118] In this embodiment, the response length prediction module 13 can be used to perform... Figure 2 For a detailed description of the response length prediction module 13 shown in step S3, please refer to the description of step S3.

[0119] The task grouping module 14 is used to sort the several task request texts according to the length of the response text, and to group the sorted task request texts.

[0120] In this embodiment, the task grouping module 14 can be used to execute... Figure 2 For a detailed description of the task grouping module 14 shown in step S4, please refer to the description of step S4.

[0121] The task scheduling module 15 is used to schedule the task request text according to the group.

[0122] In this embodiment, the task scheduling module 15 can be used to execute... Figure 2 For a detailed description of the task scheduling module 15, please refer to the description of step S5 shown in step S5.

[0123] This application provides an electronic device with the following structure: Figure 7 As shown. The electronic device can be as described in this embodiment. Figure 1 The server 100 or terminal 200 shown.

[0124] The electronic device includes a memory 21, a processor 22, a communication module 23, and an input / output interface 24, etc. Optionally, the memory 21, the processor 22, the communication module 23, and the input / output interface 24 can be connected and communicate with each other through a bus 25.

[0125] The memory 21 is used to store one or more computer programs and to transfer the code of the computer programs to the processor 22; when the one or more computer programs are executed by the processor 22, the task scheduling method in the embodiments of this application is implemented.

[0126] Optionally, the electronic device can be connected to a network via communication module 23 to communicate with other devices, such as terminals or servers, to achieve data interaction. The electronic device can be various forms of digital computers, exemplarily such as desktop computers, servers, workbenches, mainframes, or other types of computers. The electronic device can also be various forms of mobile terminals, exemplarily such as smartphones, tablets, wearable devices (such as helmets, glasses, watches, etc.), and other similar mobile terminals.

[0127] Optionally, the electronic device can connect to required input / output devices, such as a keyboard or display device, via the input / output interface 24. The electronic device itself may have a display device, and other display devices can also be connected externally via the input / output interface 24. Optionally, a storage device, such as a hard disk, can also be connected via the input / output interface 24 to store data from the electronic device, read data from the storage device, or store data from the storage device in the memory 21. It is understood that the input / output interface 24 can be a wired interface or a wireless interface. Depending on the actual application scenario, the device connected to the input / output interface 24 can be a component of the electronic device or an external device connected to the electronic device when needed.

[0128] Optionally, the memory 21 may be a volatile memory and / or a non-volatile memory. The volatile memory may be a random access memory, etc., and the non-volatile memory may be a read-only memory, a programmable read-only memory, an erasable programmable read-only memory, an electrically erasable programmable read-only memory, or a flash memory, etc.

[0129] Optionally, the computer program stored in the processor 22 can be divided into one or more modules, which are stored in the memory 21 and executed by the processor 22 to perform the method provided in this embodiment. The one or more modules can be a series of computer program instruction segments capable of performing specific functions, which describe the execution process of the computer program in the electronic device.

[0130] Optionally, the processor 22 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the processor 22 include, but are not limited to, a central processing unit, a graphics processing unit, a digital signal processor, various special-purpose artificial intelligence computing chips, various processors running machine learning model algorithms, and can also be any suitable controller, microcontroller, processor, etc. The processor 22 executes the various methods and processes of this embodiment, exemplarily, such as a task scheduling method according to an embodiment of this application.

[0131] Optionally, the bus 25 may include a path for transmitting information. Depending on its function, the bus 25 may be divided into an address bus, a data bus, a control bus, etc.

[0132] In an optional implementation, this application embodiment also provides a computer storage medium storing a computer program thereon. When the computer program is executed by a computer, it enables the computer to perform the methods described in the above-described method embodiments. Part or all of the computer program can be loaded and / or installed on the memory 21 of an electronic device. When the computer program is executed by the processor 22, one or more steps of a task scheduling method according to an embodiment of this application can be performed.

[0133] Optionally, the computer-readable storage medium may be a random access memory, a read-only memory, a programmable read-only memory, an erasable programmable read-only memory, an electrically erasable programmable read-only memory, etc.

[0134] Obviously, the above embodiments of this application are merely examples for clearly illustrating the technical solution of this application, and are not intended to limit the specific implementation of this application. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the claims of this application should be included within the protection scope of the claims of this application.

Claims

1. A task scheduling method, characterized in that, The method includes: Obtain the task request texts for several reasoning tasks; Feature extraction is performed on the task request text to obtain the text vector of the task request text; Based on the text vector, predict the length of the response text that answers the task request text; Sort the task request texts according to the length of the response text; Based on the sorted task request texts, obtain the difference in response text length between adjacent task request texts; The sorted task request texts are grouped such that the length difference between the corresponding response texts in each group does not exceed a preset length difference threshold. Obtain the maximum length of the response text of the task request text in each group, and use it as the base scheduling length for the corresponding group; The filling margin for the corresponding group is obtained based on the basic scheduling length; Based on the basic scheduling length and the corresponding padding margin, the maximum scheduling length of the corresponding group is obtained; Based on the maximum scheduling length of the group and the number of task request texts in it, resource space is allocated to the corresponding group; The task request texts of each group are scheduled to the corresponding resource space for processing.

2. The task scheduling method according to claim 1, characterized in that, The step of predicting the length of the response text based on the text vector includes: The text vector is processed by a pre-trained response length prediction model to predict the response text length to the task request text.

3. A task scheduling method according to any one of claims 1-2, characterized in that, The step of extracting features from the task request text to obtain a text vector of the task request text includes: The task request text is segmented to obtain the input words and the number of input words in the task request text; The input words are encoded to obtain an encoding vector, and the text embedding vector of the task request text is obtained based on the encoding vector of each input word. Obtain the classification labels of the input words, and obtain the topic feature vector of the task request text based on the classification labels of each input word; The text vector of the task request text is obtained based on the number of input lexical units, the text embedding vector, and the topic feature vector.

4. A task scheduling method according to any one of claims 1-2, characterized in that, The method further includes: Obtain the source of the task request text; After the task request text is scheduled and processed according to the grouping, the processing result is fed back according to the source of the task request text.

5. A task scheduling method according to claim 2, characterized in that, The response length prediction model comprises a feature encoding network layer, a pooling network layer, and a regression network layer connected in sequence.

6. A task scheduling system, characterized in that, The system includes: The request text acquisition module is used to acquire the task request texts for several inference tasks. The feature extraction module is used to extract features from the task request text to obtain a text vector of the task request text. The response length prediction module is used to predict the length of the response text in response to the task request text based on the text vector. The task grouping module is used to sort several task request texts according to the length of the response text; obtain the length difference of the response text of adjacent task request texts according to the sorted task request texts; and group the sorted task request texts so that the length difference of the response text of the task request text in each group does not exceed a preset length difference threshold. The task scheduling module is used to obtain the maximum length of the response text of the task request text in each group as the basic scheduling length of the corresponding group; obtain the filling margin of the corresponding group according to the basic scheduling length; obtain the maximum scheduling length of the corresponding group according to the basic scheduling length and the corresponding filling margin; allocate resource space to the corresponding group according to the maximum scheduling length of the group and the number of task request texts in it; and schedule the task request texts of each group to the corresponding resource space for processing.

7. A task scheduling system according to claim 6, characterized in that, The step of predicting the length of the response text based on the text vector includes: The text vector is processed by a pre-trained response length prediction model to predict the response text length to the task request text.

8. A task scheduling system according to any one of claims 6-7, characterized in that, The step of extracting features from the task request text to obtain a text vector of the task request text includes: The task request text is segmented to obtain the input words and the number of input words in the task request text; The input words are encoded to obtain an encoding vector, and the text embedding vector of the task request text is obtained based on the encoding vector of each input word. Obtain the classification labels of the input words, and obtain the topic feature vector of the task request text based on the classification labels of each input word; The text vector of the task request text is obtained based on the number of input lexical units, the text embedding vector, and the topic feature vector.

9. A task scheduling system according to any one of claims 6-7, characterized in that, The system also includes: Obtain the source of the task request text; After the task request text is scheduled and processed according to the grouping, the processing result is fed back according to the source of the task request text.

10. A task scheduling system according to claim 7, characterized in that, The response length prediction model comprises a feature encoding network layer, a pooling network layer, and a regression network layer connected in sequence.

11. An electronic device, characterized in that, include: Memory, used to store one or more computer programs; A processor, when the one or more computer programs are executed by the processor, implements a task scheduling method as described in any one of claims 1-5.

12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute a task scheduling method as described in any one of claims 1-5.

Citation Information

Patent Citations

  • Response time testing method, response time testing device and electronic equipment

    CN111352817A

  • Text dynamic reasoning method and device based on Internet community and storage medium

    CN115328642A