Task processing method, automatic question answering method, and image generation method

By running multiple task processing models in the processing unit in turn and reuse video memory, the problems of high hardware requirements and insufficient resource utilization in the prior art are solved, and the efficient operation of single card multi-model inference is achieved.

WO2025011408A1PCT designated stage expired Publication Date: 2025-01-16ALIBABA (CHINA) CO LTD

Patent Information

Application Number
PCT/CN2024/103352
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-07-07
Filing Date
2024-07-03
Publication Date
2025-01-16

AI Technical Summary

Technical Problem

In the prior art, multi-card inference or multi-machine distributed inference schemes require a large amount of hardware support, resulting in high complexity of model inference systems and insufficient resource utilization, which cannot meet the rapid growth needs of large-scale models.

Method used

By running multiple task processing models in the processing unit in turn, using a single card to realize the inference of multiple models, using video memory multiplexing and preset model switching conditions to release model data, reducing task processing complexity and resource utilization.

Benefits of technology

This realizes the use of a single card to perform multiple model inference without adding additional hardware, making full use of processing unit resources, reducing task processing complexity and time delay, and improving resource utilization efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024103352_16012025_PF_FP_ABST
    Figure CN2024103352_16012025_PF_FP_ABST
Patent Text Reader

Abstract

Provided in the embodiments of the present specification are a task processing method, an automatic question answering method, and an image generation method. The task processing method, which is applied to a control unit in a task processing platform, comprises: in response to a task processing request, determining a plurality of task processing models corresponding to the task processing request; analyzing the plurality of task processing models to determine the current task processing model; acquiring target model data of the current task processing model from a storage unit, and copying the target model data to a processing unit, such that the processing unit generates a processing result of the current task processing model on the basis of the target model data; and when the processing unit satisfies a preset model switching condition, releasing the target model data from the processing unit, and returning to execute the step of analyzing the plurality of task processing models to determine the current task processing model until a preset stop condition is reached, so as to obtain a task processing result corresponding to the task processing request. The complexity of a task processing process is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Task processing method, automatic question answering method, and image generation method

[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on July 7, 2023, with application number 202310839444.3 and application name “Task processing method, automatic question answering method and image generation method”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] This specification relates to the field of computer technology, and more particularly to a task processing method. One or more embodiments of this specification also relate to an automatic question-answering method, an image generation method, a task processing device, an automatic question-answering device, an image generation device, a computing device, a computer-readable storage medium, and a computer program. Background Art

[0003] With the continuous development of natural language processing (NLP) technology, the types and sizes of models have exploded. The capacity of graphics processing units (GPUs) used for model reasoning and high-performance computing is gradually unable to meet the rapid growth of models. How to use image processors for model reasoning and high-performance computing has gradually become a research focus.

[0004] Currently, model data is typically split across multiple image processors, with model inference and high-performance computing performed through multi-GPU or multi-machine distributed inference. However, these multi-GPU or multi-machine distributed inference solutions require extensive hardware support, resulting in high complexity and inefficient resource utilization in the model inference system. Therefore, a model inference solution with low complexity and sufficient resource utilization is urgently needed.

[0005] Summary of the Invention

[0006] In view of this, embodiments of this specification provide a task processing method. One or more embodiments of this specification also involve an automatic question-answering method, an image generation method, a task processing device, an automatic question-answering device, an image generation device, a computing device, a computer-readable storage medium, and a computer program to address technical deficiencies in the prior art.

[0007] According to a first aspect of an embodiment of this specification, a task processing method is provided, which is applied to a control unit in a task processing platform, the task processing platform including a control unit, a storage unit, and a processing unit. The method includes:

[0008] In response to the task processing request, determining a plurality of task processing models corresponding to the task processing request;

[0009] Analyze multiple task processing models and determine the current task processing model;

[0010] Obtaining target model data of the current task processing model from the storage unit, and copying the target model data to the processing unit, so that the processing unit generates a processing result of the current task processing model based on the target model data;

[0011] When the processing unit meets the preset model switching conditions, the target model data is released from the processing unit, and the analysis of multiple task processing models is returned to determine the steps of the current task processing model until the preset stop conditions are reached to obtain the task processing results corresponding to the task processing request.

[0012] According to a second aspect of an embodiment of this specification, an automatic question-answering method is provided, which is applied to a control unit in a task processing platform, the task processing platform including a control unit, a storage unit, and a processing unit. The method includes:

[0013] In response to the problem handling request, determining a plurality of task processing models corresponding to the problem handling request;

[0014] Analyze multiple task processing models and determine the current task processing model;

[0015] Obtaining target model data of the current task processing model from the storage unit, and copying the target model data to the processing unit, so that the processing unit generates a processing result of the current task processing model based on the target model data;

[0016] When the processing unit meets the preset model switching conditions, the target model data is released from the processing unit, and the analysis of multiple task processing models is returned to determine the steps of the current task processing model until the preset stop condition is reached and the response result corresponding to the problem processing request is obtained.

[0017] According to a third aspect of an embodiment of this specification, there is provided an image generation method, which is applied to a control unit in a task processing platform, the task processing platform including a control unit, a storage unit, and a processing unit, the method comprising:

[0018] In response to the image generation request, determining a plurality of task processing models corresponding to the image generation request;

[0019] Analyze multiple task processing models and determine the current task processing model;

[0020] Obtaining target model data of the current task processing model from the storage unit, and copying the target model data to the processing unit, so that the processing unit generates a processing result of the current task processing model based on the target model data;

[0021] When the processing unit meets the preset model switching conditions, the target model data is released from the processing unit, and the analysis of multiple task processing models is returned to determine the steps of the current task processing model until the preset stop conditions are reached to obtain the target image corresponding to the image generation request.

[0022] According to a fourth aspect of the embodiments of this specification, a task processing device is provided, which is applied to a control unit in a task processing platform. The task processing platform includes a control unit, a storage unit, and a processing unit. The device includes:

[0023] A first determining module is configured to determine, in response to a task processing request, a plurality of task processing models corresponding to the task processing request;

[0024] A first analysis module is configured to analyze multiple task processing models and determine a current task processing model;

[0025] A first acquisition module is configured to acquire target model data of the current task processing model from the storage unit and copy the target model data to the processing unit so that the processing unit generates a processing result of the current task processing model based on the target model data;

[0026] The first release module is configured to release the target model data from the processing unit when the processing unit meets the preset model switching conditions, and return to execute the steps of analyzing multiple task processing models to determine the current task processing model until the preset stop conditions are reached to obtain the task processing results corresponding to the task processing request.

[0027] According to a fifth aspect of the embodiments of this specification, an automatic question-answering device is provided, which is applied to a control unit in a task processing platform. The task processing platform includes a control unit, a storage unit, and a processing unit. The device includes:

[0028] A second determining module is configured to determine, in response to the problem handling request, a plurality of task processing models corresponding to the problem handling request;

[0029] a second analysis module, configured to analyze the plurality of task processing models and determine a current task processing model;

[0030] A second acquisition module is configured to acquire target model data of the current task processing model from the storage unit and copy the target model data to the processing unit so that the processing unit generates a processing result of the current task processing model based on the target model data;

[0031] The second release module is configured to release the target model data from the processing unit when the processing unit meets the preset model switching conditions, and return to execute the analysis of multiple task processing models to determine the steps of the current task processing model until the preset stop condition is reached to obtain the response result corresponding to the problem processing request.

[0032] According to a sixth aspect of the embodiments of this specification, there is provided an image generation device, which is applied to a control unit in a task processing platform, the task processing platform including a control unit, a storage unit, and a processing unit. The device includes:

[0033] a third determining module, configured to determine, in response to the image generation request, a plurality of task processing models corresponding to the image generation request;

[0034] a third analysis module, configured to analyze the multiple task processing models and determine a current task processing model;

[0035] a third acquisition module configured to acquire target model data of the current task processing model from the storage unit, and copy the target model data to the processing unit, so that the processing unit generates a processing result of the current task processing model based on the target model data;

[0036] The third release module is configured to release the target model data from the processing unit when the processing unit meets the preset model switching conditions, and return to execute the analysis of multiple task processing models to determine the steps of the current task processing model until the preset stop conditions are reached to obtain the target image corresponding to the image generation request.

[0037] According to a seventh aspect of the embodiments of this specification, a computing device is provided, including:

[0038] memory and processor;

[0039] The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, the steps of the method provided in the first aspect, the second aspect, or the third aspect are implemented.

[0040] According to an eighth aspect of the embodiments of this specification, a computer-readable storage medium is provided, which stores computer-executable instructions. When the instructions are executed by a processor, the steps of the method provided in the first aspect, the second aspect, or the third aspect are implemented.

[0041] According to a ninth aspect of the embodiments of this specification, a computer program is provided, wherein when the computer program is executed in a computer, the computer is caused to execute the steps of the method provided in the first aspect, the second aspect, or the third aspect above.

[0042] The task processing method provided in one embodiment of the present specification is applied to a control unit in a task processing platform, and the task processing platform includes a control unit, a storage unit, and a processing unit. In response to a task processing request, multiple task processing models corresponding to the task processing request are determined; multiple task processing models are analyzed to determine the current task processing model; the target model data of the current task processing model is obtained from the storage unit, and the target model data is copied to the processing unit, so that the processing unit generates a processing result of the current task processing model based on the target model data; when the processing unit meets the preset model switching condition, the target model data is released from the processing unit, and the step of analyzing multiple task processing models and determining the current task processing model is returned to execute until the preset stop condition is reached, and the task processing result corresponding to the task processing request is obtained. By running multiple task processing models in turn in the processing unit, no additional hardware is required, and reasoning of multiple task processing models can be achieved using a single card, which fully utilizes the processing unit resources and reduces the complexity of the task processing process. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] FIG1 is an architecture diagram of a task processing system provided by one embodiment of this specification;

[0044] FIG2 is an architecture diagram of another task processing system provided by one embodiment of this specification;

[0045] FIG3 is a flowchart of a task processing method provided by one embodiment of this specification;

[0046] FIG4 is a flowchart of constructing a model data registry in a task processing method provided by one embodiment of this specification;

[0047] FIG5 is a flow chart of an automatic question-answering method provided by one embodiment of this specification;

[0048] FIG6 is a flowchart of an image generation method provided by one embodiment of this specification;

[0049] FIG7 is a flowchart of a task processing method according to an embodiment of the present invention;

[0050] FIG8 is a flowchart of a processing process of an image generation method provided by one embodiment of this specification;

[0051] FIG9 is a schematic diagram of an automatic question-and-answer interface provided by one embodiment of this specification;

[0052] FIG10 is a schematic diagram of the structure of a task processing device provided by one embodiment of this specification;

[0053] FIG11 is a schematic diagram of the structure of an automatic question-answering device provided by one embodiment of this specification;

[0054] FIG12 is a schematic structural diagram of an image generating device provided by one embodiment of this specification;

[0055] FIG13 is a structural block diagram of a computing device provided in one embodiment of this specification. DETAILED DESCRIPTION

[0056] The following description sets forth many specific details to facilitate a thorough understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the scope of this specification. Therefore, this specification is not limited to the specific implementations disclosed below.

[0057] The terms used in one or more embodiments of this specification are for the purpose of describing specific embodiments only and are not intended to limit one or more embodiments of this specification. The singular forms "a," "the," and "the" used in one or more embodiments of this specification and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.

[0058] It should be understood that although the terms first, second, etc. may be used to describe various information in one or more embodiments of this specification, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0059] In addition, 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 one or more embodiments of this specification 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.

[0060] In one or more embodiments of this specification, a large model refers to a deep learning model with large-scale model parameters, typically containing hundreds of millions, tens of billions, hundreds of billions, trillions, or even more than ten trillion model parameters. A large model can also be called a cornerstone model / foundation model. By pre-training a large model with large-scale unlabeled corpus, a pre-trained model with more than 100 million parameters is produced. This model can adapt to a wide range of downstream tasks and has good generalization capabilities, such as a large-scale language model (LLM) and a multi-modal pre-training model.

[0061] When large models are used in practice, only a small number of samples are needed to fine-tune the pre-trained model and it can be applied to different tasks. Large models can be widely used in natural language processing (NLP), computer vision and other fields. Specifically, they can be applied to computer vision tasks such as visual question answering (VQA), image description (IC), image generation, as well as natural language processing tasks such as text-based sentiment classification, text summary generation, and machine translation. The main application scenarios of large models include digital assistants, intelligent robots, search, online education, office software, e-commerce, intelligent design, etc.

[0062] First, the terms involved in one or more embodiments of this specification are explained.

[0063] Pinned memory: Pinned memory refers to a locked portion of computer memory, typically allocated and managed using specialized application programming interfaces (APIs) or libraries. Pinned memory is not moved or swapped into virtual memory by the operating system. Pinned memory is commonly used in applications requiring fast memory access, such as high-performance computing, graphics processing, and network communications, to improve memory access speed and reduce latency.

[0064] With the continuous development of natural language processing technology, the types and sizes of models have exploded. The capacity of graphics processor devices used for model reasoning and high-performance computing is gradually unable to meet the rapid growth of models. How to use image processors for model reasoning and high-performance computing has gradually become a research focus.

[0065] Currently, it's possible to perform inference calculations on multiple models in a pipeline, but multiple large models may not all fit in graphics memory. Model data can typically be split across multiple graphics processors, allowing for model inference and high-performance computing through multi-GPU or multi-machine distributed inference. However, these multi-GPU or multi-machine distributed inference solutions require extensive hardware support, resulting in high complexity and inefficient resource utilization in the model inference system.

[0066] To solve the above problems, the embodiments of this specification propose a solution that can enable multiple models to use video memory in turn and hot-load model data in turn, solving the problems of high hardware budget requirements and insufficient resource utilization when alternating inference of multiple large models. It can achieve the purpose of using a single card to perform pipeline inference on multiple models without adding additional hardware, and can keep the runtime delay of inference within an acceptable range.

[0067] Specifically, the control unit in the task processing platform responds to the task processing request, determines multiple task processing models corresponding to the task processing request; analyzes the multiple task processing models to determine the current task processing model; obtains the target model data of the current task processing model from the storage unit, and copies the target model data to the processing unit, so that the processing unit generates the processing result of the current task processing model based on the target model data; when the processing unit meets the preset model switching condition, releases the target model data from the processing unit, and returns to execute the step of analyzing the multiple task processing models to determine the current task processing model, until the preset stop condition is reached, and the task processing result corresponding to the task processing request is obtained.

[0068] In this specification, a task processing method is provided. This specification also involves an automatic question-answering method, an image generation method, a task processing device, an automatic question-answering device, an image generation device, a computing device, a computer-readable storage medium and a computer program, which are described in detail one by one in the following embodiments.

[0069] 1 , which shows an architecture diagram of a task processing system provided by one embodiment of this specification, the task processing system may include a client 100 and a task processing platform 200 , wherein the task processing platform 200 includes a control unit 202 , a storage unit 204 , and a processing unit 206 ;

[0070] The client 100 is used to send a task processing request to the task processing platform 200;

[0071] The control unit 202, in response to the task processing request, determines a plurality of task processing models corresponding to the task processing request; analyzes the plurality of task processing models to determine a current task processing model; obtains target model data of the current task processing model from the storage unit 204, and copies the target model data to the processing unit 206, so that the processing unit 206 generates a processing result of the current task processing model based on the target model data; releases the target model data from the processing unit 206 when the processing unit 206 meets a preset model switching condition, and returns to executing the step of analyzing the plurality of task processing models to determine the current task processing model until a preset stop condition is met, thereby obtaining a task processing result corresponding to the task processing request; and sends the task processing result to the client 100;

[0072] The client 100 is further configured to receive the task processing result sent by the control unit 202 .

[0073] By applying the solution of the embodiments of this specification, multiple task processing models are run in turn in the processing unit, without adding additional hardware. A single card can be used to implement reasoning of multiple task processing models, fully utilizing the processing unit resources and reducing the complexity of the task processing process.

[0074] Referring to FIG. 2 , FIG. 2 shows an architecture diagram of another task processing system provided in accordance with one embodiment of the present disclosure. The task processing system may include multiple clients 100 and a task processing platform 200. Multiple clients 100 may establish communication connections via the task processing platform 200. In a task processing scenario, the task processing platform 200 is used to provide task processing services between the multiple clients 100. The multiple clients 100 may act as either senders or receivers, respectively, to achieve communication via the task processing platform 200.

[0075] Users can interact with the task processing platform 200 through the client 100 to receive data sent by other clients 100, or send data to other clients 100. In the task processing scenario, users can publish data streams to the task processing platform 200 through the client 100. The task processing platform 200 generates task processing results based on the data stream and pushes the task processing results to other clients with which communication has been established.

[0076] The client 100 and the task processing platform 200 are connected via a network. The network provides a medium for the communication link between the client 100 and the task processing platform 200. The network can include various connection types, such as wired or wireless communication links or fiber optic cables. The data transmitted by the client 100 may need to be encoded, transcoded, compressed, or other processing before being released to the task processing platform 200.

[0077] The client 100 can be a browser, an APP (Application), or a web application such as an H5 (HyperText Markup Language 5, version 5) application, a light application (also known as a mini-program, a lightweight application), or a cloud application. The client 100 can be developed based on the software development kit (SDK) of the corresponding service provided by the task processing platform 200, such as based on the real-time communication (RTC) SDK. The client 100 can be deployed in an electronic device and needs to rely on the device to run or certain APPs in the device to run. For example, the electronic device can have a display screen and support information browsing, such as a personal mobile terminal such as a mobile phone, tablet computer, personal computer, etc. Various other types of applications can also be configured in the electronic device, such as human-computer dialogue applications, model training applications, text processing applications, web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.

[0078] The task processing platform 200 may include servers that provide various services, such as servers that provide communication services to multiple clients, servers for background training that support models used on clients, and servers that process data sent by clients. It should be noted that the task processing platform 200 can be implemented as a distributed server cluster consisting of multiple servers, or as a single server. The server can also be a server for a distributed system, or a server that is combined with a blockchain. The server can also be a cloud server for basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content distribution networks (CDNs), and big data and artificial intelligence platforms, or an intelligent cloud computing server or intelligent cloud host with artificial intelligence technology.

[0079] It is worth noting that the task processing methods provided in the embodiments of this specification are generally executed by the task processing platform. However, in other embodiments of this specification, the client may also have similar functions to the task processing platform to execute the task processing methods provided in the embodiments of this specification. In other embodiments, the task processing methods provided in the embodiments of this specification may also be executed jointly by the client and the task processing platform.

[0080] 3 , which shows a flowchart of a task processing method provided by one embodiment of this specification. The task processing method is applied to a control unit in a task processing platform. The task processing platform includes a control unit, a storage unit, and a processing unit. Specifically, the task processing method includes the following steps:

[0081] Step 302: In response to the task processing request, determine a plurality of task processing models corresponding to the task processing request.

[0082] In one or more embodiments of the present specification, the control unit may receive a task processing request and, in response to the task processing request, determine a plurality of task processing models corresponding to the task processing request.

[0083] Specifically, the control unit can be understood as a micro-edge computer (allspark), which is a static library or dynamic library linked to the user program. The control unit can be scheduled by the user program to execute the task processing request. The tasks requested to be processed by the task processing request can be tasks in different scenarios, such as tasks in conference scenarios, tasks in e-commerce scenarios, and so on. The tasks requested to be processed by the task processing request can also be different types of tasks, such as image generation tasks, recommendation tasks, and so on.

[0084] The multiple task processing models corresponding to the task processing request are used to generate the task processing results corresponding to the task processing request. The task processing model is a deep learning model, including but not limited to a large model, an image generation model, etc., and is selected based on actual circumstances. This specification does not impose any restrictions on this embodiment.

[0085] For example, assuming that the task processing request is "draw a little girl wearing a hairpin in a cute style", the multiple task processing models corresponding to the task processing request include but are not limited to pre-trained models (GPT, Generative Pre-Trained Transformer) and image generation (UNCLIP) models.

[0086] In practical applications, there are multiple ways to determine the multiple task processing models corresponding to a task processing request, and the specific method to be selected depends on the actual situation. The embodiments of this specification do not impose any restrictions on this. In one possible implementation of this specification, multiple task processing models specified by a user through program arrangement can be received. In another possible implementation of this specification, the task processing request can be analyzed to determine the requested task type, and the multiple task processing models corresponding to the task processing request can be further determined based on the requested task type.

[0087] Step 304: Analyze multiple task processing models to determine the current task processing model.

[0088] In one or more embodiments of this specification, in response to a task processing request, after determining multiple task processing models corresponding to the task processing request, the multiple task processing models may be further analyzed to determine a current task processing model.

[0089] Specifically, the current task processing model is an unfinished task processing model among the multiple task processing models. The unfinished task processing model can be a task processing model that has not been run, or a task processing model that has not generated a processing result.

[0090] In actual applications, there are many ways to analyze multiple task processing models and determine the current task processing model. The specific selection is made according to the actual situation, and the embodiments of this specification do not impose any limitation on this.

[0091] In a possible implementation of this specification, the task processing request carries model attribute information of multiple task processing models, and the current task processing model can be determined according to the model attribute information and the current iteration number.

[0092] For example, assuming the current iteration count is 2, the multiple task processing models include task processing model A, task processing model B, task processing model C, and task processing model D. The model attribute information of these four task processing models indicates the execution order of the task processing models: specifically, task processing model A is executed in the first round, task processing model B in the second round, task processing model C in the third round, and task processing model D in the fourth round. Based on the current iteration count of 2 and the model attribute information, it can be determined that the current task processing model is task processing model B. At this point, the current task processing model is an inactive task processing model.

[0093] In another possible implementation of the present specification, a task processing request carries model attribute information of multiple task processing models. Since some task processing models may fail to run during the task processing process, in this case, another task processing model with the same function as the failed task processing model can be used to replace the failed task processing model, and the failed task processing model can also be rerun. Therefore, the current task processing model can be determined based on the model attribute information and the completed task processing models. That is, the above-mentioned method of analyzing multiple task processing models to determine the current task processing model can include the following steps:

[0094] A current task processing model is selected from the multiple task processing models according to the model attribute information and completed task processing models in the multiple task processing models.

[0095] Specifically, the model attribute information is attribute information related to the task processing model, including but not limited to the model running order, model running time, etc. The completed task processing model is a task processing model that has generated a processing result.

[0096] For example, assume that the multiple task processing models include task processing model A, task processing model B, task processing model C, and task processing model D. The model attribute information of the four task processing models is the execution order of the task processing models, specifically, task processing model A is executed in the first round, task processing model B or task processing model C is executed in the second round, and task processing model D is executed in the third round. Model operation information of the four task processing models is obtained, and it is determined that task processing model A is a completed task processing model, task processing model B is a model that failed to run, and task processing models C and task processing model D are task processing models that did not run. Then, based on the model attribute information and the completed task processing model A, the current task processing model is determined to be task processing model B or task processing model C.

[0097] It should be noted that if the current task processing model is task processing model B, then the current task processing model is a task processing model that has been executed but has not generated a processing result; if the current task processing model is task processing model C, then the current task processing model is a task processing model that has not been executed. Causes of task processing model failure include, but are not limited to, execution timeout, execution freeze, etc., and the specific selection is based on actual circumstances and is not limited in this specification.

[0098] By applying the solution of the embodiment of this specification, the current task processing model is screened out from multiple task processing models based on model attribute information and completed task processing models in multiple task processing models. On the basis of accurately determining the current task processing model, task processing failure caused by model processing failure is avoided, thereby ensuring the stability of the task processing process.

[0099] Step 306: Obtain target model data of the current task processing model from the storage unit, and copy the target model data to the processing unit, so that the processing unit generates a processing result of the current task processing model based on the target model data.

[0100] In one or more embodiments of the present specification, in response to a task processing request, multiple task processing models corresponding to the task processing request are determined, the multiple task processing models are analyzed, and after the current task processing model is determined, further, target model data of the current task processing model can be obtained from the storage unit, and the target model data can be copied to the processing unit, so that the processing unit generates a processing result of the current task processing model based on the target model data.

[0101] Specifically, the storage unit can be understood as system memory, which is used to store the model data of the task processing model. The processing unit can be understood as video memory, which is used to run the task processing model. The model data can be data at the granularity of tensors, including but not limited to the structural data of the model itself, weight data, and input data of the model. The specific selection is based on the actual situation, and this specification does not impose any restrictions on this.

[0102] In practical applications, there are multiple ways to obtain the target model data of the current task processing model from the storage unit. The specific method is selected according to the actual situation, and the embodiments of this specification do not impose any restrictions on this. In one possible implementation of this specification, the model data of the current task processing model can be obtained from the storage unit and used as the target model data.

[0103] In another possible implementation of the present specification, since the amount of model data corresponding to the current task processing model may be large, the model data of the current task processing model may be screened using a preset copy weight threshold to determine target model data, and the target model data may be further obtained from the storage unit. That is, the above-mentioned obtaining the target model data of the current task processing model from the storage unit may include the following steps:

[0104] Get the preset copy weight threshold;

[0105] Determining target model data of the current task processing model based on the copy weight threshold and the model data of the current task processing model;

[0106] Get the target model data from the storage unit.

[0107] Specifically, the preset copy weight threshold is used to filter target model data from the model data of the current task processing model. The preset copy weight threshold can be input by the user via an interface parameter. The preset copy weight threshold is set according to actual circumstances and is not limited in this embodiment of the present specification.

[0108] It should be noted that, when determining the target model data of the current task processing model based on the preset copy weight threshold and the model data of the current task processing model, the weight of the model data of the current task processing model can be compared with the preset copy weight threshold. If the model data meets the preset copy weight threshold, it means that the model data can be copied to the processing unit, that is, the model data that meets the preset copy weight threshold can be determined as the target model data; if the model data does not meet the preset copy weight threshold, it means that the model data does not need to be copied to the processing unit, that is, model data other than the model data that does not meet the preset copy weight threshold can be determined as the target model data.

[0109] By applying the solution of the embodiments of this specification, a preset copy weight threshold is obtained; the target model data of the current task processing model is determined based on the copy weight threshold and the model data of the current task processing model; the target model data is obtained from the storage unit, which reduces the amount of data transmission, improves the task processing efficiency, and at the same time, achieves a balance between video memory reuse and time overhead.

[0110] In an optional embodiment of this specification, since each task processing model contains thousands of tensor data, these data are generally applied for video memory space through functions (cudaMalloc) or wrappers in the unified computing device architecture, and there is no uniform pattern in the time of data generation and destruction. In order to fully collect the tensor data in the processing unit, the method of allocating and releasing the video memory interface can be intercepted, and a model data registry can be built in the storage unit. That is, before copying the target model data to the processing unit, the following steps can also be included:

[0111] Constructing a model data registry in the storage unit, wherein the model data registry is used to record the copy data and release data corresponding to the processing unit;

[0112] After the target model data is copied to the processing unit, the following steps may be further included:

[0113] Store the target model data into the model data registry.

[0114] Specifically, the model data registry is a model weight data registry, which can also be called a video memory tensor registry. The model data registry registers the video memory starting address, size, name and other information of each model tensor data by address, for use in data swapping in and out of the processing unit. Copying data can be understood as data swapped into the processing unit, and releasing data can be understood as data swapped out of the processing unit. The model data registry can be a two-level graph, and the first-level graph uses the model name as the key (key), and its key value (value) is the second-level graph. The second-level graph uses the video memory address as the key, and its key value is the entity (entry) type, including but not limited to the model name, model size, etc. The specific selection is based on the actual situation, and the embodiments of this specification do not impose any restrictions on this.

[0115] It should be noted that after copying the target model data to the processing unit, the target model data can be stored in the model data registry, thereby centrally registering the model data in the processing unit. In practical applications, the model data registry may include the name, size, real-time usage, total occupancy, etc. of the processing unit. The total occupancy is accumulated when copying model data to the processing unit and is deleted when releasing model data from the processing unit, thereby avoiding missing model data when releasing data.

[0116] Applying the solution of the examples in this specification, a model data registry is constructed in the storage unit. After the target model data is copied to the processing unit, the relevant information of the target model data is stored in the model data registry. This achieves centralized and unified management of processing units, reflecting the occupancy of processing units in real time without missing or unreleased data. Through the model data registry, users can understand the size of the processing units occupied by each model data, thereby accurately setting the preset copy weight threshold and the preset release weight threshold, and further achieving a balance between processing unit reuse and time overhead.

[0117] Refer to Figure 4, which shows a flowchart of constructing a model data registry in a task processing method provided by an embodiment of this specification. The control unit can determine the copy data corresponding to the processing unit by intercepting the processing unit allocation interface, add an entry in the model data registry according to the copy data, determine the release data corresponding to the processing unit by intercepting the processing unit release interface, and delete the entry in the model data registry according to the release data, thereby constructing the model data registry in the storage unit.

[0118] In another optional embodiment of the present specification, before obtaining the target model data of the current task processing model from the storage unit, the following steps may be included:

[0119] Parsing model files of multiple task processing models to determine model data of each task processing model;

[0120] The model data of each task processing model is stored in the storage unit.

[0121] It should be noted that the storage unit may be a system memory or a fixed memory in the system memory, and the selection is made according to actual circumstances, and the embodiments of this specification do not impose any limitation on this.

[0122] In applying the embodiments of this specification, before obtaining the target model data of the current task processing model from the storage unit, the control unit can parse the model files of multiple task processing models, determine the model data of each task processing model, and store the model data of each task processing model to the storage unit, thereby preparing for swapping in and out of the model data in the processing unit and ensuring that task processing can be implemented stably.

[0123] In actual applications, there are many ways to parse the model files of multiple task processing models and determine the model data of each task processing model. The specific method is selected according to the actual situation, and the embodiments of this specification do not impose any limitation on this.

[0124] In a possible implementation of the present specification, a structured data storage (protobuf) file can be directly read from a disk file saved by the user to generate model data for each task processing model.

[0125] In another possible implementation of the present specification, an operator network topology graph corresponding to each task processing model may be constructed based on the model configuration information and the model weight information, and the operator network topology graph may be formatted to determine the model data of each task processing model. That is, the above-mentioned parsing of the model files of the multiple task processing models to determine the model data of each task processing model may include the following steps:

[0126] Parse the model files of multiple task processing models to determine the model configuration information and model weight information of each task processing model;

[0127] According to the model configuration information and model weight information, the operator network topology corresponding to each task processing model is constructed respectively;

[0128] Convert the format of the operator network topology diagram to determine the model data of each task processing model.

[0129] It should be noted that the control unit can parse the model files of multiple task processing models, initialize the model files, such as the number of transformer layers and the number of hidden layers (hidden number), etc., and determine the model configuration information and model weight information of each task processing model so that they can be distributed to multiple cards for parallel reasoning. Furthermore, based on the model configuration information and model weight information, the operator network topology corresponding to each task processing model can be constructed separately, and the operator network topology can be converted into a format that can be directly loaded, and the model data of each task processing model can be determined.

[0130] In actual applications, the operator network topology diagram after format conversion can also be stored on disk so that it can be directly read at the next startup to speed up the startup.

[0131] By applying the solution of the embodiments of this specification, the model files of multiple task processing models are parsed to determine the model configuration information and model weight information of each task processing model; based on the model configuration information and model weight information, the operator network topology diagram corresponding to each task processing model is constructed respectively; the format of the operator network topology diagram is converted to determine the model data of each task processing model, thereby ensuring the accuracy of the model data.

[0132] In practical applications, there are many ways to store the model data of each task processing model in the storage unit, which can be selected according to actual conditions. This specification does not limit this. In one possible implementation of this specification, the model data of each task processing model can be directly stored in the storage unit.

[0133] In another possible implementation of the present specification, the model data of each task processing model may be stored in a fixed memory in the storage unit. That is, before storing the model data of each task processing model in the storage unit, the following steps may be further included:

[0134] Create pinned memory in the storage unit;

[0135] Storing the model data of each task processing model in a storage unit may include the following steps:

[0136] Store the model data of each task processing model into fixed memory.

[0137] It should be noted that a fixed memory can be allocated in the storage unit through the unified computing device architecture interface. Since the fixed memory is a locked part of the system memory, it will not be moved or swapped to the virtual memory by the operating system. Therefore, the operating system will not perform page interaction, so that the model data can be copied from the storage unit to the processing unit using direct memory access (DMA).

[0138] By applying the solution of the embodiments of this specification, a fixed memory is created in the storage unit, and the model data of each task processing model is stored in the fixed memory, avoiding the memory being executed by the operating system for page interaction, thereby improving the performance of copying the model data from the storage unit to the processing unit, and greatly improving the copying speed of the model data.

[0139] Step 308: When the processing unit meets the preset model switching condition, the target model data is released from the processing unit, and the process returns to analyze multiple task processing models to determine the current task processing model until the preset stop condition is met to obtain the task processing result corresponding to the task processing request.

[0140] In one or more embodiments of the present specification, in response to a task processing request, multiple task processing models corresponding to the task processing request are determined, the multiple task processing models are analyzed to determine the current task processing model, target model data of the current task processing model is obtained from the storage unit, and the target model data is copied to the processing unit. Furthermore, when the processing unit meets the preset model switching condition, the target model data can be released from the processing unit, and the step of analyzing the multiple task processing models and determining the current task processing model is returned to execute until the preset stop condition is reached to obtain the task processing result corresponding to the task processing request.

[0141] Specifically, the preset model switching conditions include, but are not limited to, the processing unit generating a processing result of the current task processing model, the processing unit timing out, and the like. The preset stopping condition may be that the current task processing model is the last model executed in a series of sequentially executed task processing models. The preset stopping condition is selected based on actual circumstances and is not limited in this specification.

[0142] By applying the solution of the embodiments of this specification, multiple task processing models are run in turn in the processing unit, without adding additional hardware. A single card can be used to realize reasoning of multiple task processing models, thereby making full use of the processing unit resources and reducing the complexity of the task processing process. In addition, by directly releasing the target model data in the processing unit, task processing time can be saved and task processing efficiency can be improved.

[0143] In practical applications, when releasing target model data from a processing unit, all target model data in the processing unit may be directly released. Furthermore, a preset release weight threshold may be used to determine the target model data to be released. That is, the above-mentioned release of target model data from the processing unit may include the following steps:

[0144] Get the preset release weight threshold;

[0145] Traverse the model data registry according to the preset release weight threshold to determine the model data to be released in the target model data;

[0146] Release the model data to be released from the processing unit.

[0147] Specifically, the preset release weight threshold is used to filter the model data to be released from the target model data. The preset release weight threshold can be input by the user through an interface parameter. The preset release weight threshold is set according to the actual situation and is not limited in this embodiment of the present invention.

[0148] It should be noted that, when traversing the model data registry according to the preset release weight threshold and determining the model data to be released in the target model data, the weight of the target model data in the model data registry can be compared with the preset release weight threshold. If the target model data meets the preset release weight threshold, it means that the target model data can be released, that is, the target model data that meets the preset release weight threshold can be determined as the model data to be released; if the target model data does not meet the preset release weight threshold, it means that the target model data does not need to be released, that is, the target model data other than the target model data that does not meet the preset release weight threshold can be determined as the model data to be released.

[0149] Applying the solution of the embodiments of this specification, a preset release weight threshold is obtained; based on the preset release weight threshold, a model data registry is traversed to determine the model data to be released in the target model data; and the model data to be released is released from the processing unit. This achieves more precise and faster control over the exchange of model data within the processing unit, avoids unnecessary data exchange, avoids the additional overhead of frequent copy initiation in the parallel computing architecture, and improves task processing efficiency.

[0150] In an optional embodiment of the present specification, after obtaining the task processing result corresponding to the task processing request, the following steps may be further included:

[0151] Send the task processing results to the client so that the client can display the task processing results to the user.

[0152] It should be noted that after obtaining the task processing result corresponding to the task processing request, the task processing result may be sent to the client, and the task processing model corresponding to the task processing result may also be sent to the client.

[0153] In actual applications, there are many ways for the client to display the task processing results to the user, and the specific selection depends on the actual situation. The embodiments of this specification do not impose any restrictions on this. In one possible implementation of this specification, the client can only display the task processing results to the user. In another possible implementation of this specification, the client can simultaneously display the task processing results and the corresponding task processing model to the user, so that the user can accurately know the task processing results and the corresponding task processing model.

[0154] By applying the solution of the embodiment of this specification, the task processing result is sent to the client, so that the client can display the task processing result to the user, so that the user can accurately obtain the task processing result, increase the interaction with the user, and improve user satisfaction.

[0155] Furthermore, after the client displays the task processing results to the user, the user can perform data processing based on the task processing results, or send a post-processing request based on the task processing results displayed by the client to perform multiple rounds of task processing. That is, after sending the task processing results to the client, the following steps may also be included:

[0156] Receive post-processing requests sent by users based on task processing results, process the post-processing requests, and obtain post-processing results corresponding to the post-processing requests.

[0157] Specifically, a post-processing request refers to a task processing request sent by a user based on a task processing result after the user obtains the task processing result.

[0158] It should be noted that the implementation method of "processing the post-processing request and obtaining the post-processing result corresponding to the post-processing request" is the same as the implementation method of the above-mentioned task processing method, and will not be repeated in this embodiment of the specification.

[0159] By applying the solution of the embodiment of this specification, a post-processing request sent by a user based on a task processing result is received, and the post-processing request is processed to obtain a post-processing result corresponding to the post-processing request, thereby increasing interaction with the user and improving user satisfaction.

[0160] The following, in conjunction with Figure 5, further illustrates the task processing method provided in this specification using its application in an intelligent question-answering scenario as an example. Figure 5 shows a flow chart of an automatic question-answering method provided in one embodiment of this specification. The automatic question-answering method is applied to a control unit in a task processing platform, which includes a control unit, a storage unit, and a processing unit. Specifically, the following steps are included:

[0161] Step 502: In response to the problem handling request, determine a plurality of task processing models corresponding to the problem handling request.

[0162] Step 504: Analyze multiple task processing models to determine the current task processing model.

[0163] Step 506: Obtain target model data of the current task processing model from the storage unit, and copy the target model data to the processing unit, so that the processing unit generates a processing result of the current task processing model based on the target model data.

[0164] Step 508: When the processing unit meets the preset model switching conditions, the target model data is released from the processing unit, and the process returns to analyze multiple task processing models and determine the steps of the current task processing model until the preset stop conditions are reached and the response result corresponding to the problem processing request is obtained.

[0165] It should be noted that the implementation of step 502 to step 508 is the same as the implementation of step 302 to step 308 described above, and will not be described in detail in this embodiment of the specification.

[0166] By applying the solution of the embodiments of this specification, multiple task processing models are run in turn in the processing unit, without adding additional hardware. A single card can be used to realize reasoning of multiple task processing models, thereby making full use of the processing unit resources and reducing the complexity of the automatic question-answering process. In addition, by directly releasing the target model data in the processing unit, the automatic question-answering time can be saved and the efficiency of automatic question-answering can be improved.

[0167] The following further illustrates the task processing method provided in this specification, using its application in the field of image generation as an example, with reference to FIG6 . FIG6 shows a flowchart of an image generation method provided in one embodiment of this specification. The image generation method is applied to a control unit in a task processing platform, which includes a control unit, a storage unit, and a processing unit. Specifically, the method includes the following steps:

[0168] Step 602: In response to the image generation request, determine a plurality of task processing models corresponding to the image generation request.

[0169] Step 604: Analyze multiple task processing models to determine the current task processing model.

[0170] Step 606: Obtain target model data of the current task processing model from the storage unit, and copy the target model data to the processing unit, so that the processing unit generates a processing result of the current task processing model based on the target model data.

[0171] Step 608: When the processing unit meets the preset model switching conditions, the target model data is released from the processing unit, and the process returns to analyze multiple task processing models and determine the steps of the current task processing model until the preset stop conditions are reached to obtain the target image corresponding to the image generation request.

[0172] It should be noted that the implementation of step 602 to step 608 is the same as the implementation of step 302 to step 308 described above, and will not be described in detail in this embodiment of the specification.

[0173] By applying the solution of the embodiments of this specification, multiple task processing models are run in turn in the processing unit, without adding additional hardware, and reasoning of multiple task processing models can be achieved using a single card, thereby fully utilizing the processing unit resources and reducing the complexity of the image generation process. In addition, by directly releasing the target model data in the processing unit, image generation time can be saved and image generation efficiency can be improved.

[0174] Refer to Figure 7, which shows a processing flow chart of a task processing method provided by an embodiment of this specification. If task processing is performed on a single machine and a single card, the processing unit cannot load the model files of multiple task processing models at the same time because the model file of the task processing model is too large. Therefore, the model data of the task processing model can be loaded into the processing unit only when a certain task processing model is run.

[0175] As shown in Figure 7, the control unit can load the model files of multiple task processing models from the file system at one time, parse the model files of each task processing model, determine the model data of the tensor granularity of each task processing model, and store the model data of each task processing model in the storage unit; during the task processing process, when the model is swapped in, the control unit can call the loading model interface to parse the model data in the storage unit to obtain the weight chart, and traverse and copy the model data from the weight chart to the processing unit; when the model is swapped out, the target model data in the processing unit is directly released, and the model data of the task processing model to be run is copied from the storage unit to the processing unit, and the model continues to run. In this way, a relatively cheap storage unit is used to store a large amount of model data, and the processing unit only loads the currently used model data, thereby realizing the reuse of video memory.

[0176] It should be noted that when calling the load model interface, the control unit can parse the weight chart that includes the model weight data. The key in the weight chart is the weight name, and the key value is the specific model data (tensor object), and its data is located in the processing unit. At the same time, the control unit can also save a reference to the weight chart internally. If the user specifies a weight threshold, an additional mirror weight chart that is exactly the same as the weight chart can be generated when loading the model, and the model data in the mirror weight chart can be stored in the host memory.

[0177] By applying the solution of the embodiments of this specification, since the storage unit stores model data with tensor granularity, the model data exchanged in the processing unit can be controlled more finely and quickly, thereby improving task processing efficiency.

[0178] Referring to Figure 8, Figure 8 shows a flowchart of the processing process of an image generation method provided by an embodiment of this specification. An image generation request sent by a user is received, and the request descriptive text in the image generation request is processed using a prompt preprocessing model to convert the request descriptive text into an input text string that can be recognized by the pre-trained model. Then, the input text string is input into the pre-trained model, and the encoder in the pre-trained model performs encoding processing to generate an encoding vector called the last hidden state (last_hidden_state). The encoding vector contains the representation of the user input information in the text vector space and contains semantic information. Finally, the encoding vector is input into the image generation model to generate a target image that conforms to the semantic information, or the encoding vector is input into a specific style generation model to generate a target image that conforms to the semantic information and has a specific style. Among them, the image generation model and the specific style generation model are in a parallel relationship, and their model structures are similar, but the corresponding training data are different. The image generation model or the specific style generation model can be selected according to the user's needs.

[0179] It's worth noting that in the task processing solution provided by the embodiments of this specification, the time required to swap out video memory is less than 10ms, and the time required to swap in video memory is proportional to the size of the model. Generally, a 10GB model takes less than 500ms to fully swap in. By using the task processing solution provided by the embodiments of this specification in downstream tasks, the hardware requirements of a service instance can be reduced from three graphics cards to one, while the overall service runtime only decreases by one percent, which is of great significance for reducing costs and increasing efficiency.

[0180] In practical applications, since the task processing solution provided by the embodiment of this specification does not rely on information interaction between multiple machines, it performs video memory exchange within each machine, so that multiple machines can implement data parallel (Data Parallel) or pipeline parallel (Pipeline Parallel) multi-machine and multi-card reasoning mode. The task processing solution provided by the embodiment of this specification can also be extended to model training scenarios. For example, in the case of limited video memory, the model training framework needs to use multiple models to generate content during the training process. At this time, the task processing solution provided by the embodiment of this specification can be used to implement multiple models using video memory in turn. Furthermore, the gradient checkpointing in the deep learning model training framework can be used to store the outputs of certain layers of the model in memory, and use these outputs in subsequent calculations to avoid repeated calculations.

[0181] See Figure 9, which shows a schematic diagram of an automatic question-and-answer interface provided by one embodiment of this specification. The automatic question-and-answer interface is divided into a question-handling request input interface and a response result display interface. The question-handling request input interface includes a question-handling request input box, an "OK" control, and a "Cancel" control. The response result display interface includes a response result display box.

[0182] The user enters a problem handling request in the problem handling request input box displayed on the client and clicks the "OK" control. The task processing platform receives the problem handling request sent by the client and, in response to the problem handling request, determines the multiple task processing models corresponding to the problem handling request; analyzes the multiple task processing models to determine the current task processing model; obtains the target model data of the current task processing model from the storage unit and copies the target model data to the processing unit so that the processing unit generates a processing result for the current task processing model based on the target model data; if the processing unit meets the preset model switching conditions, the target model data is released from the processing unit and the process returns to the step of analyzing the multiple task processing models to determine the current task processing model until the preset stop condition is met, obtaining a response result corresponding to the problem handling request, and sending the response result to the client. The client displays the response result in the response result display box.

[0183] In actual applications, users can operate controls by clicking, double-clicking, touching, hovering the mouse, sliding, long pressing, voice control, or shaking, etc. The specific selection is based on the actual situation, and the embodiments of this specification do not impose any restrictions on this.

[0184] Corresponding to the above-mentioned task processing method embodiment, this specification also provides a task processing device embodiment. FIG10 shows a schematic diagram of the structure of a task processing device provided in one embodiment of this specification. As shown in FIG10 , the task processing device is applied to a control unit in a task processing platform. The task processing platform includes a control unit, a storage unit, and a processing unit. The device includes:

[0185] A first determining module 1002 is configured to determine, in response to a task processing request, a plurality of task processing models corresponding to the task processing request;

[0186] A first analysis module 1004 is configured to analyze multiple task processing models and determine a current task processing model;

[0187] A first acquisition module 1006 is configured to acquire target model data of the current task processing model from the storage unit and copy the target model data to the processing unit so that the processing unit generates a processing result of the current task processing model based on the target model data;

[0188] The first release module 1008 is configured to release the target model data from the processing unit when the processing unit meets the preset model switching conditions, and return to execute the steps of analyzing multiple task processing models to determine the current task processing model until the preset stop condition is reached to obtain the task processing result corresponding to the task processing request.

[0189] Optionally, the device also includes: a construction module configured to construct a model data registry in the storage unit, wherein the model data registry is used to record copy data and release data corresponding to the processing unit; and a storage module configured to store the target model data in the model data registry.

[0190] Optionally, the first releasing module 1008 is further configured to obtain a preset release weight threshold; traverse the model data registry according to the preset release weight threshold to determine the model data to be released in the target model data; and release the model data to be released from the processing unit.

[0191] Optionally, the first acquisition module 1006 is further configured to obtain a preset copy weight threshold; determine target model data of the current task processing model based on the copy weight threshold and model data of the current task processing model; and obtain the target model data from the storage unit.

[0192] Optionally, the device further includes: a parsing module configured to parse the model files of the plurality of task processing models to determine the model data of each task processing model; and store the model data of each task processing model in the storage unit.

[0193] Optionally, the device further includes: a creation module configured to create a fixed memory in the storage unit; and a parsing module further configured to store the model data of each task processing model into the fixed memory.

[0194] Optionally, the parsing module is further configured to parse the model files of multiple task processing models to determine the model configuration information and model weight information of each task processing model; construct the operator network topology diagram corresponding to each task processing model according to the model configuration information and model weight information; perform format conversion on the operator network topology diagram to determine the model data of each task processing model.

[0195] Optionally, the task processing request carries model attribute information of multiple task processing models; the first analysis module 1004 is further configured to filter out the current task processing model from the multiple task processing models based on the model attribute information and completed task processing models in the multiple task processing models.

[0196] Optionally, the device further includes: a sending module configured to send the task processing result to the client, so that the client displays the task processing result to the user.

[0197] Optionally, the device further includes: a processing module configured to receive a post-processing request sent by a user based on the task processing result, and process the post-processing request to obtain a post-processing result corresponding to the post-processing request.

[0198] By applying the solution of the embodiments of this specification, multiple task processing models are run in turn in the processing unit, without adding additional hardware. A single card can be used to realize reasoning of multiple task processing models, thereby making full use of the processing unit resources and reducing the complexity of the task processing process. In addition, by directly releasing the target model data in the processing unit, task processing time can be saved and task processing efficiency can be improved.

[0199] The above is a schematic scheme of a task processing device of this embodiment. It should be noted that the technical scheme of the task processing device and the technical scheme of the task processing method described above are of the same concept. For details not described in detail in the technical scheme of the task processing device, please refer to the description of the technical scheme of the task processing method described above.

[0200] Corresponding to the above-mentioned automatic question-answering method embodiment, this specification also provides an automatic question-answering device embodiment. Figure 11 shows a schematic structural diagram of an automatic question-answering device provided in one embodiment of this specification. As shown in Figure 11, the automatic question-answering device is applied to a control unit in a task processing platform. The task processing platform includes a control unit, a storage unit, and a processing unit. The device includes:

[0201] The second determining module 1102 is configured to determine, in response to the problem handling request, a plurality of task processing models corresponding to the problem handling request;

[0202] The second analysis module 1104 is configured to analyze the multiple task processing models and determine the current task processing model;

[0203] The second acquisition module 1106 is configured to acquire target model data of the current task processing model from the storage unit and copy the target model data to the processing unit so that the processing unit generates a processing result of the current task processing model based on the target model data;

[0204] The second release module 1108 is configured to release the target model data from the processing unit when the processing unit meets the preset model switching conditions, and return to execute the steps of analyzing multiple task processing models to determine the current task processing model until the preset stop condition is reached to obtain the response result corresponding to the problem processing request.

[0205] By applying the solution of the embodiments of this specification, by running multiple task processing models in turn in the processing unit, no additional hardware is needed, and reasoning of multiple task processing models can be achieved using a single card, thereby making full use of the processing unit resources and reducing the complexity of the automatic question-answering process. In addition, by directly releasing the target model data in the processing unit, the automatic question-answering time can be saved and the efficiency of automatic question-answering can be improved.

[0206] The above is a schematic diagram of an automatic question-answering device according to this embodiment. It should be noted that the technical solution of this automatic question-answering device and the technical solution of the automatic question-answering method described above are based on the same concept. For details not described in detail in the technical solution of the automatic question-answering device, please refer to the description of the technical solution of the automatic question-answering method described above.

[0207] Corresponding to the above-mentioned image generation method embodiment, this specification also provides an image generation device embodiment. Figure 12 shows a schematic structural diagram of an image generation device provided in one embodiment of this specification. As shown in Figure 12, the image generation device is applied to a control unit in a task processing platform. The task processing platform includes a control unit, a storage unit, and a processing unit. The device includes:

[0208] The third determining module 1202 is configured to determine, in response to the image generation request, a plurality of task processing models corresponding to the image generation request;

[0209] The third analysis module 1204 is configured to analyze the multiple task processing models and determine the current task processing model;

[0210] The third acquisition module 1206 is configured to acquire target model data of the current task processing model from the storage unit and copy the target model data to the processing unit so that the processing unit generates a processing result of the current task processing model based on the target model data;

[0211] The third release module 1208 is configured to release the target model data from the processing unit when the processing unit meets the preset model switching conditions, and return to execute the steps of analyzing multiple task processing models to determine the current task processing model until the preset stop conditions are reached to obtain the target image corresponding to the image generation request.

[0212] By applying the solution of the embodiments of this specification, by applying the solution of the embodiments of this specification, multiple task processing models can be run in turn in the processing unit without adding additional hardware. A single card can be used to realize reasoning of multiple task processing models, thereby making full use of the processing unit resources and reducing the complexity of the image generation process. Moreover, by directly releasing the target model data in the processing unit, image generation time can be saved and image generation efficiency can be improved.

[0213] The above is a schematic diagram of an image generation device according to this embodiment. It should be noted that the technical solution of this image generation device and the technical solution of the aforementioned image generation method are based on the same concept. For details not described in detail in the technical solution of the image generation device, please refer to the description of the technical solution of the aforementioned image generation method.

[0214] Figure 13 shows a block diagram of a computing device according to one embodiment of the present disclosure. Components of the computing device 1300 include, but are not limited to, a memory 1310 and a processor 1320. The processor 1320 is connected to the memory 1310 via a bus 1330, and a database 1350 is used to store data.

[0215] The computing device 1300 also includes an access device 1340 that enables the computing device 1300 to communicate via one or more networks 1360. Examples of such networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 1340 may include one or more of any type of network interface (e.g., a network interface card (NIC)) whether wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a World Interoperability for Microwave Access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, a near field communication (NFC) interface, and the like.

[0216] In one embodiment of the present specification, the aforementioned components of computing device 1300 and other components not shown in FIG13 may also be connected to each other, for example, via a bus. It should be understood that the computing device structure block diagram shown in FIG13 is for illustrative purposes only and does not limit the scope of this specification. Those skilled in the art may add or replace other components as needed.

[0217] Computing device 1300 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, personal digital assistant, laptop computer, notebook computer, netbook computer, etc.), a mobile phone (e.g., a smartphone), a wearable computing device (e.g., a smartwatch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or personal computer (PC). Computing device 1300 may also be a mobile or stationary server.

[0218] Among them, the processor 1320 is used to execute the following computer-executable instructions, which, when executed by the processor, implement the steps of the above-mentioned task processing method, automatic question-answering method, or image generation method.

[0219] The above is a schematic diagram of a computing device according to this embodiment. It should be noted that the technical solution of this computing device is based on the same concept as the technical solutions of the aforementioned task processing method, automatic question-answering method, and image generation method. For details not described in detail in the technical solution of the computing device, please refer to the description of the technical solutions of the aforementioned task processing method, automatic question-answering method, or image generation method.

[0220] An embodiment of the present specification further provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the steps of the above-mentioned task processing method, automatic question-answering method, or image generation method.

[0221] The above is a schematic diagram of a computer-readable storage medium according to this embodiment. It should be noted that the technical solution of this storage medium is based on the same concept as the technical solutions of the aforementioned task processing method, automatic question-answering method, and image generation method. For details not described in detail in the technical solution of the storage medium, please refer to the description of the technical solutions of the aforementioned task processing method, automatic question-answering method, or image generation method.

[0222] An embodiment of the present specification further provides a computer program, wherein when the computer program is executed in a computer, the computer is caused to execute the steps of the above-mentioned task processing method, automatic question-answering method, or image generation method.

[0223] The above is an illustrative embodiment of a computer program. It should be noted that the technical solution of this computer program is based on the same concept as the technical solutions of the aforementioned task processing method, automatic question-answering method, and image generation method. For details not described in detail in the technical solution of the computer program, please refer to the description of the technical solutions of the aforementioned task processing method, automatic question-answering method, or image generation method.

[0224] The foregoing description of this specification describes specific embodiments. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in an order different from that described in the embodiments and still achieve the desired results. Furthermore, the processes depicted in the accompanying drawings do not necessarily require the specific order shown or the sequential order to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0225] The computer instructions include computer program code, which may be in source code form, object code form, executable file, or some intermediate form. The computer-readable medium may include any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunications signal, and a software distribution medium.

[0226] It should be noted that for the aforementioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the embodiments of this specification are not limited by the order of the actions described, because according to the embodiments of this specification, 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 this specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the embodiments of this specification.

[0227] In the above embodiments, 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.

[0228] The preferred embodiments disclosed above are intended only to help illustrate this specification. The optional embodiments do not exhaustively describe all details, nor do they limit the invention to the specific embodiments described. Obviously, many modifications and variations can be made based on the content of the embodiments of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the embodiments of this specification, so that those skilled in the art can better understand and utilize this specification. This specification is limited only by the claims and their full scope and equivalents.

Claims

1. A task processing method, applied to a control unit in a task processing platform, wherein the task processing platform comprises the control unit, a storage unit and a processing unit, and the method comprises: In response to a task processing request, determining a plurality of task processing models corresponding to the task processing request; Analyze the multiple task processing models to determine a current task processing model; Acquire target model data of the current task processing model from the storage unit, and copy the target model data to the processing unit, so that the processing unit generates a processing result of the current task processing model based on the target model data; When the processing unit meets the preset model switching conditions, the target model data is released from the processing unit, and the step of analyzing the multiple task processing models and determining the current task processing model is returned to execute until the preset stop conditions are met to obtain the task processing result corresponding to the task processing request.

2. The method according to claim 1, before copying the target model data to the processing unit, further comprising: Constructing a model data registry in the storage unit, wherein the model data registry is used to record the copy data and release data corresponding to the processing unit; After the target model data is copied to the processing unit, the method further includes: The target model data is stored in the model data registry.

3. The method according to claim 2, wherein releasing the target model data from the processing unit comprises: Get the preset release weight threshold; Traversing the model data registry according to the preset release weight threshold, determining the model data to be released in the target model data; The to-be-released model data is released from the processing unit.

4. The method according to claim 1, wherein the step of obtaining the target model data of the current task processing model from the storage unit comprises: Get the preset copy weight threshold; Determining target model data of the current task processing model according to the copy weight threshold and the model data of the current task processing model; The target model data is acquired from the storage unit.

5. The method according to claim 1, before acquiring the target model data of the current task processing model from the storage unit, further comprising: Parsing the model files of the multiple task processing models to determine the model data of each task processing model; The model data of each task processing model is stored in the storage unit.

6. The method according to claim 5, before storing the model data of each task processing model in the storage unit, further comprising: creating a fixed memory in the storage unit; The storing the model data of each task processing model into the storage unit comprises: The model data of each task processing model is stored in the fixed memory.

7. The method according to claim 5, wherein parsing the model files of the plurality of task processing models to determine the model data of each task processing model comprises: Parsing the model files of the multiple task processing models to determine the model configuration information and model weight information of each task processing model; According to the model configuration information and the model weight information, construct an operator network topology graph corresponding to each task processing model respectively; The operator network topology diagram is formatted and the model data of each task processing model is determined.

8. The method according to claim 1, wherein the task processing request carries model attribute information of the plurality of task processing models; The method of analyzing the multiple task processing models to determine the current task processing model includes: A current task processing model is selected from the multiple task processing models according to the model attribute information and completed task processing models among the multiple task processing models.

9. The method according to claim 1, after obtaining the task processing result corresponding to the task processing request, further comprising: The task processing result is sent to the client, so that the client displays the task processing result to the user.

10. The method according to claim 9, after sending the task processing result to the client, further comprises: A post-processing request sent by a user based on the task processing result is received, and the post-processing request is processed to obtain a post-processing result corresponding to the post-processing request.

11. An automatic question-answering method, applied to a control unit in a task processing platform, the task processing platform comprising the control unit, a storage unit and a processing unit, the method comprising: In response to a problem handling request, determining a plurality of task processing models corresponding to the problem handling request; Analyze the multiple task processing models to determine a current task processing model; Acquire target model data of the current task processing model from the storage unit, and copy the target model data to the processing unit, so that the processing unit generates a processing result of the current task processing model based on the target model data; When the processing unit meets the preset model switching conditions, the target model data is released from the processing unit, and the step of analyzing the multiple task processing models and determining the current task processing model is returned to execute until the preset stop conditions are met to obtain a reply result corresponding to the problem processing request.

12. An image generation method, applied to a control unit in a task processing platform, the task processing platform comprising the control unit, a storage unit and a processing unit, the method comprising: In response to an image generation request, determining a plurality of task processing models corresponding to the image generation request; Analyze the multiple task processing models to determine a current task processing model; Acquire target model data of the current task processing model from the storage unit, and copy the target model data to the processing unit, so that the processing unit generates a processing result of the current task processing model based on the target model data; When the processing unit satisfies the preset model switching condition, the target model data is released from the processing unit, and the step of analyzing the multiple task processing models and determining the current task processing model is returned to execute until the preset stop condition is reached to obtain the target image corresponding to the image generation request.

13. A computing device comprising: Memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, the steps of the method described in any one of claims 1 to 10 or claim 11 or claim 12 are implemented.

14. A computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the steps of the method described in any one of claims 1 to 10 or claim 11 or claim 12.

Citation Information

Patent Citations

  • Task processing method and device, equipment and storage medium

    CN113778644A

  • Task processing method, device and system, electronic equipment and storage medium

    CN114201294A

  • Task processing method and dialogue task processing method

    CN115934275A

  • Task processing method, automatic question and answer method and image generation method

    CN116578423A

  • Task data processing method, system and apparatus

    WO2023115278A1

Cited By

  • Data processing method, platform and system, computing equipment and storage medium

    CN122285234A