Task processing method and device, electronic equipment, storage medium and program product

The central control node analyzes the running status of the target device and filters task retrieval requests, and uses virtualization deployment and pull mode to optimize task allocation. This solves the problems of task delay and low resource utilization on shared devices of the TCU model, and improves user experience and Resource utilization.

CN118535299APending Publication Date: 2024-08-23BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410535901.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-29
Publication Date
2024-08-23

AI Technical Summary

Technical Problem

On the target device shared by the large model, the existing technology is difficult to efficiently handle multiple task invocation requests, resulting in task delays and low resource utilization, affecting the user experience.

Method used

The central control node analyzes the running status information of the target device, filters and determines suitable target task retrieval requests, and uses virtualization deployment and pull mode to optimize task allocation to ensure that the large model being executed handles new tasks in a timely manner and avoids task queuing.

Benefits of technology

It improves the utilization of computing power resources of the target device, reduces task delays, improves user experience, and ensures fair competition among multiple large models and flexibility in task processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118535299A
    Figure CN118535299A
Patent Text Reader

Abstract

The invention provides a task processing method and device, electronic equipment, a storage medium and a program product, and relates to the technical field of artificial intelligence, in particular to the technical fields of deep learning, large language models, load balancing and the like. According to the specific implementation scheme, in response to received multiple task calling requests, operation state information of target equipment is determined, multiple large models are deployed in the target equipment, and the task calling requests comprise requests used for calling tasks processed by the large models; based on the multiple task calling requests and the running state information, a target task calling request used for calling a target task is determined, the target task comprises a task processed by a target large model, and the target large model comprises a large model which is determined based on the running state information and runs on the target equipment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of artificial intelligence technology, in particular to technical fields such as deep learning, large language models, and load balancing, and specifically to task processing methods, devices, electronic devices, storage media, and program products. Background Art

[0002] Artificial intelligence technology is a comprehensive discipline that covers a wide range of fields, including both hardware-level and software-level technologies. Artificial intelligence technology generally includes large language model technology, which can be widely used in various fields of artificial intelligence after fine-tuning the pre-trained model. For example, text processing, semantic understanding, machine translation, human-computer interaction, etc. Using large language models to handle tasks in different fields requires comprehensive consideration of factors such as timeliness and cost. Summary of the invention

[0003] The present disclosure provides a task processing method, device, electronic device, storage medium and program product.

[0004] According to one aspect of the present disclosure, a task processing method is provided, comprising: in response to receiving multiple task call requests, determining running status information of a target device, wherein the target device is deployed with multiple large models, and the task call request includes a request for calling a task processed by the large model; and based on the multiple task call requests and the running status information, determining a target task call request for calling a target task, wherein the target task includes a task processed by a target large model, and the target large model includes a large model running on the target device determined based on the running status information.

[0005] According to another aspect of the present disclosure, a task processing device is provided, including: a state determination module, for determining the running state information of a target device in response to receiving multiple task call requests, wherein the target device is deployed with multiple large models, and the task call request includes a request for calling a task processed by the large model; and a request determination module, for determining a target task call request for calling a target task based on the multiple task call requests and the running state information, wherein the target task includes a task processed by a target large model, and the target large model includes a large model running on the target device determined based on the running state information.

[0006] According to another aspect of the present disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute a method as disclosed in the present disclosure.

[0007] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute the method of the present disclosure.

[0008] According to another aspect of the present disclosure, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the method of the present disclosure is implemented.

[0009] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.

[0011] Figure 1A An exemplary system architecture to which the task processing method and apparatus according to an embodiment of the present disclosure can be applied is schematically shown;

[0012] Figure 1B The following schematically shows an architecture diagram of a service platform according to an embodiment of the present disclosure;

[0013] Figure 2 A flowchart schematically shows a task processing method according to an embodiment of the present disclosure;

[0014] Figure 3 A flowchart of a task processing method according to another embodiment of the present disclosure is schematically shown;

[0015] Figure 4A The schematic diagram schematically shows the architecture of the task processing method according to the embodiment of the present disclosure;

[0016] Figure 4B A schematic diagram schematically shows an architecture of a task processing method according to another embodiment of the present disclosure;

[0017] Figure 5 A block diagram schematically shows a task processing device according to an embodiment of the present disclosure; and

[0018] Figure 6 A block diagram of an electronic device suitable for implementing a task processing method according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION

[0019] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0020] The present disclosure provides a task processing method, device, electronic device, storage medium and program product.

[0021] According to one aspect of the present disclosure, a task processing method is provided, comprising: in response to receiving multiple task call requests, determining running status information of a target device, wherein the target device is deployed with multiple large models, and the task call request includes a request for calling a task processed by the large model; and based on the multiple task call requests and the running status information, determining a target task call request for calling the target task, wherein the target task includes a task processed by a target large model, and the target large model includes a large model running on the target device determined based on the running status information.

[0022] In the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision, disclosure and application of user personal information involved comply with the provisions of relevant laws and regulations, take necessary confidentiality measures, and do not violate public order and good morals.

[0023] In the technical solution of the present disclosure, the user's authorization or consent is obtained before obtaining or collecting the user's personal information.

[0024] Figure 1A An exemplary system architecture to which the task processing method and apparatus according to an embodiment of the present disclosure can be applied is schematically shown.

[0025] It should be noted that Figure 1A What is shown is merely an example of a system architecture to which the embodiments of the present disclosure can be applied, in order to help those skilled in the art understand the technical content of the present disclosure, but it does not mean that the embodiments of the present disclosure cannot be used in other devices, systems, environments or scenarios.

[0026] As shown in Fig. 1, the system architecture 100 according to this embodiment may include terminal devices 101, 102, 103, a network 104, and a service platform 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the service platform 105. The network 104 may include various connection types, such as wired and / or wireless communication links, etc.

[0027] Users can use terminal devices 101, 102, 103 to interact with service platform 105 through network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, 103, such as knowledge reading applications, web browser applications, search applications, instant messaging tools, email clients and / or social platform software, etc. (only as examples).

[0028] The terminal devices 101 , 102 , and 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers.

[0029] The service platform 105 provides support for the content browsed by users using the terminal devices 101, 102, 103. For example, it can analyze and process the received data such as user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal devices.

[0030] It should be understood that Figure 1A The number of terminal devices, networks and service platforms in the embodiment is only for illustration. Any number of terminal devices, networks and service platforms may be provided according to the implementation requirements.

[0031] Figure 1B The schematic diagram shows an architecture diagram of a service platform according to an embodiment of the present disclosure.

[0032] like Figure 1B As shown, the service platform 105 may include a load balancer cluster 1051 , a task processor cluster 1052 , a task cache cluster 1053 and a central control node 1054 .

[0033] The load balancer cluster 1051 may include at least one load balancer.

[0034] Each load balancer may include a terminal interface for communication connection with the terminal device 101. For example, a terminal request sent by a user through the terminal device 101 is received through the terminal interface. A target task processing result determined in response to the terminal request is fed back to the terminal device 101 through the terminal interface.

[0035] Each load balancer may also include a cache interface for communication connection with the task cache cluster 1053. For example, the terminal request is written into the task cache through the cache interface. The task status in the task cache is updated through the cache interface. In response to receiving the task call request, the target task is obtained from the task cache through the cache interface.

[0036] Each load balancer may also include a call interface for communication with the central control node 1054. For example, a task call request sent by the central control node 1054 is received through the call interface. A target task is sent to the central control node 1054 through the call interface.

[0037] In the event that any load balancer in the load balancer cluster 1051 fails, other load balancers in normal status may be responsible for handling related operations.

[0038] The task buffer 1053 may include at least one task buffer. The task buffer may include a Redis cache database. However, it is not limited thereto. Any database or data queue that can store tasks to be processed generated based on terminal requests sent by terminal devices, record task status and task information, etc. may be used.

[0039] The task processing cluster 1052 may include at least one task processor. The task processor cluster 1052 includes a call interface for communication connection with the central control node 1054. For example, a task call request is sent to the central control node 1054 through the call interface. The target task sent by the central control node 1054 is received through the call interface.

[0040] Each task processor can be used to perform the following: receive the target task sent by the central control node, process the target task using the target large model, send the target task processing result to the central control node, so that the central control node can send the target task processing result to the load balancer.

[0041] Each central control node may be used to perform: in response to receiving multiple task call requests, determine the operation status information of the target device; and based on the multiple task call requests and the operation status information, determine a target task call request for calling the target task.

[0042] Exemplarily, each task processor may include hardware resources, such as GPU (Graphics Processing Unit), CPU (Central Processing Unit / Processor), NPU (Neural-network Process Units), TPU (Tensor Processing Unit), FPGA (Field Programmable Gate Array), video memory, etc. The target device may include a GPU, but is not limited to this, and may also include a CPU, NPU, TPU or FPGA, as long as the hardware resources can be used to run a large model, process the target task, and obtain the target task processing result.

[0043] Exemplarily, the central control node can be deployed on the CPU of each task processor, but is not limited thereto and can also be deployed on a load balancer, or can serve as an intermediate processor independent of the task processor and the load balancer.

[0044] It should be noted that the sequence numbers of the operations in the following method are only used as representations of the operations for the purpose of description, and should not be regarded as representing the execution order of the operations. Unless explicitly stated, the method does not need to be executed completely in the order shown.

[0045] Figure 2 The flowchart of the task processing method according to the embodiment of the present disclosure is schematically shown.

[0046] like Figure 2 As shown, the method includes operations S210 to S220.

[0047] In operation S210 , in response to receiving a plurality of task invoking requests, operating state information of a target device is determined.

[0048] In operation S220 , a target task invoking request for invoking a target task is determined based on the plurality of task invoking requests and the running state information.

[0049] In an example, a plurality of large models are deployed on the target device, and the task invoking request may include a request for invoking a task processed by the large model.

[0050] In one example, the target task includes a task processed by a target large model, and the target large model includes a large model running on a target device determined based on the running state information. The type of the target task is not limited, for example, it may include at least one of the following: text, image, and audio.

[0051] In one example, the large model, also known as the Large Language Model (LLM), may include one or more of GPT (Generative Pre-Trained Transformer), Chat GPT (Chat Generative Pre-Trained Transformer), GLM (General Language Model), etc. However, it is not limited to this. The large model may also include a model constructed by a variety of known networks such as convolutional neural networks, recurrent neural networks, and long short-term memory networks.

[0052] In one example, the execution subject of the task processing method may include a central control node. The central control node may be deployed on a task processor, but is not limited thereto, and may also be deployed on a load balancer, or may be independent of the task processor and the load balancer and deployed on an independent intermediate processor that can communicate with the load balancer and the task processor, respectively.

[0053] In one example, a target device for running a large model is deployed on the task processor, but it is not limited to this. Other devices that assist the running of the large model may also be deployed, such as a graphics card, a memory, etc. The target device may include one or more of a CPU, a GPU, and an NPU. The task call request may be a monitoring device in the task processor for monitoring the running of the large model, such as a monitor deployed in the CPU, sending a task call request to the central control node.

[0054] In one example, multiple large models may be virtually deployed on the target device. The virtual deployment may include: deploying multiple large models, where each task is executed using one large model.

[0055] Specifically, a target device often needs to deploy multiple large models of different types. Each large model will not occupy the entire target device's device resources when running alone, but multiple large models cannot process tasks simultaneously on the same target device.

[0056] Taking into account the volatility of online high-availability resources and traffic, and the incompatibility between the hardware requirements of each large model and the hardware performance of the target device, multiple large models are virtualized and deployed on the target device, so that each large model can maximize the utilization of the target device's computing resources while ensuring good latency.

[0057] In one example, a working thread may be independently deployed for each large model to independently monitor the running status of the large model and independently generate pull-mode task call requests.

[0058] In one example, the central control node may receive task invocation requests from different multiple work threads. In response to receiving the multiple task invocation requests, the central control node may determine the running state information of the target device. The running state information of the target device may indicate whether the target device is in the running stage, model information of the large model running on the target device, etc.

[0059] Based on the running status information, the target big model running on the target device can be determined. A target task call request for calling the target task processed by the target big model is determined from multiple task call requests. So that the target task call request is sent to the load balancing server, and the target task is called from the task cache through the pull mode. For example, the target task may include the theme "Please tell a sad story". The load balancer responds to the target task call request sent by the central control node, obtains the target task from the task cache, and sends the target task to the target device through the central control node, so that the target big model running on the target device processes the target task and obtains the target task processing result. For example, a specific sad story. The target task processing result is fed back to the terminal device.

[0060] According to the task processing method provided by the embodiment of the present disclosure, a target task call request is determined from multiple task call requests by using a central control node through analysis of the operating status information of the target device. As an intermediate controller, the central control node, combined with the technical background that only one large model can be run on a target device with multiple large models virtually deployed, screens and controls multiple task call requests for different multiple large models, determines the target task call request, and then ensures that the target task called by the target task call request can be processed in time, so as to make full use of the computing power resources of the target device while avoiding online service delays caused by task queuing.

[0061] According to the relevant examples, the central control node may not be set, and the pull mode may be adopted to directly send multiple task call requests generated by multiple working threads to the load balancer. In response to the multiple task call requests, the load balancer determines multiple tasks corresponding to the multiple task call requests from the task cache. The multiple tasks are sent to the target device through the load balancer. In this case, the tasks of the running target large model can be processed in time, while the tasks corresponding to other non-running large models need to be queued and cannot be processed in time, resulting in task delays.

[0062] Specifically, large model A is currently executing a task processing operation on the target device, and large model B and large model C are also deployed on the target device. The load balancer receives a task call request A for requesting a task to be processed by large model A, a task call request B for requesting a task to be processed by large model B, and a task call request C for requesting a task to be processed by large model C in the same period. The load balancer determines task A for task call request A, task B for task call request B, and task C for task call request C from the task cache, and sends task A, task B, and task C to the target device. In this case, task A processed by large model A among multiple tasks can be processed by large model A in a timely manner. On the contrary, task B processed by large model B and task C processed by large model C need to queue up and wait for the end of large model A. Therefore, task B and task C cannot be processed in a timely manner, resulting in a poor user experience.

[0063] Compared with the method of not setting up a central control node, the task processing method provided by the embodiment of the present disclosure can use a pre-screening method to determine the target task call request from multiple task call requests, and then obtain the target task matching the target task call request from the load balancer through a pull mode. In this way, the target large model that is executing task processing can be used to timely process the target task, thereby preventing the user from perceiving that the task is not processed in a timely manner.

[0064] According to the embodiments of the present disclosure, Figure 2 The operation S210 shown, determining the running status information of the target device, may include at least one of the following: determining the running status information of the target device based on the status identification information used to characterize the running status included in the task call request; determining the running status information of the target device based on the recorded requested task and the hardware parameters of the target device.

[0065] In one example, the requested task includes a retrieved task, such as a task obtained from a load balancer.

[0066] In an example, the task invocation request may include: status identification information characterizing the running status of the target device. The status identification information may be determined from the task invocation request, and the running status information of the target device may be determined based on the status identification information.

[0067] In another example, the central control node is used as an intermediate processor to receive the target task sent from the load balancer and forward the target task to the target device. It is also used to receive the target task processing result sent by the target device and send the target task processing result to the terminal device or the load balancer so that the load balancer sends the target task processing result to the terminal device. The central control node can be used to record the information of the requested task and the information of the processed task. The operating status information of the target device can be determined based on the recorded requested tasks and the hardware parameters of the target device.

[0068] The hardware parameters of the target device may include: rated parameters of device resources. For example, the maximum storage capacity of the video memory. Requested tasks may include tasks being processed and unprocessed tasks. As long as the task has been retrieved but has not yet obtained the task processing result. The device resource occupancy can be determined based on the task information of the requested task. For example, the device resource occupancy can be determined based on the amount of information of the requested task, such as the text length or the number of tasks, through a predetermined proportional relationship. The predetermined proportional relationship may include a mapping relationship between the amount of information in the task information and the device resource occupancy.

[0069] In one example, the configuration parameters of the device resources and the device resource occupancy of the requested task can be weighted and summed to determine the current available amount of the device resources. Based on the current available amount of the device resources, the operating status information of the target device is determined. For example, when it is determined that the current available amount of the device resources is greater than or equal to the device resource available amount threshold, it is determined that the operating status information of the target device represents that the device resources used to run the target large model are in a predetermined load state, such as a non-full load state. When it is determined that the current available amount of the device resources is less than the device resource available amount threshold, it is determined that the operating status information of the target device represents that the device resources used to run the target large model are in a full load state. In addition, the model information of the target large model can also be determined based on the task type of the requested task.

[0070] In another example, the process may further include determining the operating state information of the target device as the first operating state information based on the state identification information used to characterize the operating state included in the task call request. Determining the operating state information of the target device as the second operating state information based on the recorded requested task and the hardware parameters of the target device. Determining the operating state information of the target device based on the first operating state information and the second operating state information.

[0071] If the first and second operating status information are determined to be consistent, the operating status information of the target device is determined based on the first operating status information. If the first and second operating status information are determined to be inconsistent, an alarm is issued and the operation of determining the target call task request is stopped.

[0072] According to the embodiments of the present disclosure, the operation status information of the target device is determined by using the task call request, which is simple, effective and efficient. The operation status information of the target device is determined by using the requested task and the hardware parameters of the target device, which improves the task monitoring capability and reasonably utilizes the resources of the central control node. Based on the first operation status information and the second operation status information, the operation status information of the target device is determined to ensure the accuracy and effectiveness of the information.

[0073] According to the embodiments of the present disclosure, Figure 2 The operation S220 shown, determining a target task call request for calling the target task based on multiple task call requests and running status information, may include: when it is determined that the running status information represents that the target device is running, determining a target task call request for calling the target task based on model information included in the running status information and multiple task call requests.

[0074] In one example, when the running status information indicates that the target device is running, it indicates that there is a large model, such as the target large model, executing the task processing operation.

[0075] The running state information may include model information of the target large model. The model information may include a model identifier of the target large model for indicating the task being processed, and task information of the task being processed by the target large model.

[0076] Based on the model information, a task call request sent by a working thread for a target large model can be determined from multiple task call requests as a target task call request.

[0077] By utilizing the determination method of the target task call request, it can be ensured that the called target task is of the same type of task as the requested task being processed, and then the target task can be input into the target big model at the task input node of the target big model, thereby ensuring that the target task can be processed in a timely manner by the running target big model.

[0078] Figure 3 The flowchart of a task processing method according to another embodiment of the present disclosure is schematically shown.

[0079] like Figure 3 As shown, the method includes operations S310, S320, S331 and S332.

[0080] In operation S310 , in response to receiving a plurality of task invoking requests, operating state information of a target device is determined.

[0081] In operation S320, based on the operation status information, it is determined whether the target device is operating. If it is determined that the target device is operating, operation S331 is performed. If it is determined that the target device is not operating, operation S332 is performed.

[0082] In operation S331 , a target task calling request for calling a target task is determined based on the model information included in the running status information and a plurality of task calling requests.

[0083] In operation S332 , when it is determined that the operation status information indicates that the target device is not operating, a task invoking integrated request is generated based on the plurality of task invoking requests.

[0084] In one example, the task call composite request indicates that the task that matches any one of the multiple task call requests is called.

[0085] In one example, the target device is in a non-operating state, such as an initial state. All large models can be used as target large models, and the task call request generated by the corresponding working thread is used as the target task call request. In this case, based on multiple task call requests, a task call comprehensive request representing the task to be processed by any large model can be generated.

[0086] For example, large model A, large model B, and large model C all do not perform task processing operations. A task call comprehensive request can be generated based on a task call request A for large model A, a task call request B for large model B, and a task call request C for large model C. The task call comprehensive request can be used to represent any task that can call task A processed by large model A, task B processed by large model B, and task C processed by large model C.

[0087] According to the embodiments of the present disclosure, in the initial state, by utilizing the generated task to call the comprehensive request to pull the task, it is possible to reflect the fair competition mechanism of multiple large models while reflecting the flexibility of task call request processing, thereby increasing the scope of application.

[0088] According to an embodiment of the present disclosure, when executing Figure 2 After the operation S220 shown in FIG. Figure 3 After operation S332 shown, the task processing method may further include the following operations.

[0089] For example, a target task obtained by calling a request for a target task is received, and the target task is sent to a hardware device.

[0090] According to an embodiment of the present disclosure, the target task may be determined in the following manner: based on the processable task quantity and task type in the target task call request, the target task is determined from multiple tasks to be processed according to the task generation time of the tasks to be processed.

[0091] In one example, the target task invocation request may include: the processable task volume and the task type. The task type may refer to a large model type, such as a task type processed by a large model.

[0092] In one example, the amount of processable tasks can characterize the number of tasks that can process the target task. Exemplarily, the amount of processable tasks can also be used to characterize the current available amount of device resources, or to determine the amount of processable tasks by the current available amount of device resources. Any information that can characterize the number of tasks that can be called can be used as the amount of processable tasks. It should be noted that the amount of processable tasks or the current available amount of device resources can be determined by a working thread based on requested tasks and device parameters. The determination method is similar to the method in which the central control node determines the current available amount of device resources based on requested tasks and device parameters, and will not be repeated here.

[0093] The task type of the pulled target task can be determined based on the task type in the target task call request. The batch quantity of the pulled target task can be determined based on the processable task quantity in the target task call request. According to the task generation time, the batch quantity of tasks is determined from multiple pending tasks that meet the task type as the target task.

[0094] For example, the target task call request includes the target task's processable task quantity M, and the task type is task A processed by large model A. The pending tasks of task type task A are sorted in order from early to late according to the task generation time to obtain the sorting result. The first M pending tasks of task A are taken as the target tasks.

[0095] According to the embodiments of the present disclosure, according to the amount of tasks that can be processed and the type of tasks, it is possible to adapt to the hardware performance while adapting to the target large model that is currently performing the task processing operation, thereby improving the responsiveness to the target task processing. In addition, according to the task generation time of the task to be processed, the target task is determined from multiple tasks to be processed, so that the first received task to be processed can be processed first, reducing delays, improving processing efficiency, and thus improving user experience.

[0096] In another example, based on the task invocation comprehensive request, a target task may be determined from a plurality of tasks to be processed according to the task generation time of the tasks to be processed.

[0097] Specifically, the task receiving time of the task received from the terminal device in the task buffer may be used as a judgment criterion, from which the target task is determined and sent to the central control node.

[0098] For example, the task call comprehensive request can be used to represent that any task of Task A processed by large model A, Task B processed by large model B, and Task C processed by large model C can be called. If the receiving time of pending task C of the same type as Task C is the earliest, then pending task C and other pending tasks of the same type as Task C can be combined into a batch of target tasks and sent to the central control node.

[0099] According to the embodiments of the present disclosure, for task invocation comprehensive requests, combined with the fair competition mechanism of each large model, the tasks to be processed that are received first can be processed first according to the task generation time of the tasks to be processed, thereby reducing delays, improving processing efficiency, and thereby improving user experience.

[0100] Figure 4A The schematic diagram schematically shows the architecture of the task processing method according to an embodiment of the present disclosure.

[0101] like Figure 4A As shown, for each task processor in the task processor cluster, a central control node and a target device are deployed. Each target device is deployed with two large models. The first central control node 451 deployed in the first task processor 410 can receive a task call request for the first large model A and a task call request for the first large model B. The first large model A and the second large model B are both deployed in the first target device 411. Similarly, the second central control node 452 deployed in the second task processor 420 can receive a task call request for the second large model A and a task call request for the second large model B. The second large model A and the second large model B are both deployed in the second target device 421.

[0102] Based on the model information, a task call request for calling the target task can be determined from the multiple task call requests as an initial target task call request. Based on the initial target task call request and the device identification of the target device, the target task call request is determined.

[0103] like Figure 4A As shown, the first central control node 451 may send a first target task call request with a device identifier of the first target device to the load balancer cluster 430. Similarly, the second central control node 452 sends a second target task call request with a device identifier of the second target device to the load balancer cluster 430.

[0104] like Figure 4AAs shown, the load balancer cluster 430 determines the first target task corresponding to the first target task call request and the second target task corresponding to the second target task call request from the task cache cluster 440. Based on the device identifier, the first target task is sent to the first central control node 451, and the second target task is sent to the second central control node 452, so that the first central control node 451 sends the first target task to the first target device 411, and the second central control node 452 sends the second target task to the second target device 421.

[0105] According to an embodiment of the present disclosure, by using the device identifier of the target device, multiple task processors in a task processor cluster can be accurately distinguished from multiple target task call requests, thereby facilitating accurate sending of the target task to the corresponding task processor and facilitating data transmission.

[0106] Figure 4B The schematic diagram schematically shows the architecture of a task processing method according to another embodiment of the present disclosure.

[0107] like Figure 4B As shown, for each load balancer in the load balancer cluster, a central control node is deployed. Two large models are deployed on each target device. The first central control node 451 deployed in the first load balancer 431 can receive a task call request for the first large model A and a task call request for the first large model B. The first large model A and the first large model B are both deployed in the first target device 411 of the first task processor 410. Similarly, the second central control node 452 deployed in the second load balancer 432 can receive a task call request for the second large model A and a task call request for the second large model B. The second large model A and the second large model B are both deployed in the second target device 421 of the second task processor 420. Each task call request includes a device identifier of the target device.

[0108] A target task calling request for calling the target task may be determined from the multiple task calling requests based on the device identification and model information of each task calling request.

[0109] like Figure 4B As shown, the first central control node 451 determines the first target task call request based on the device identification and model information in the task call request. Similarly, the second central control node 452 determines the second target task call request.

[0110] like Figure 4BAs shown, the first load balancer 431 determines the first target task corresponding to the first target task call request from the task cache cluster 440, and the second load balancer 432 determines the second target task corresponding to the second target task call request from the task cache cluster 440. Based on the device identifier, the first target task is sent to the first central control node 451, and the second target task is sent to the second central control node 452, so that the first central control node 451 sends the first target task to the first target device 411, and the second central control node 452 sends the second target task to the second target device 421.

[0111] According to an embodiment of the present disclosure, a central control node is deployed in a load balancer cluster. When one of the central control nodes fails, other central control nodes in the load balancer cluster can be used to replace the failed central control node, thereby avoiding resource waste due to the inability of the task processor corresponding to the failed central control node to obtain the target task, thereby improving the task processing capability to cope with failures.

[0112] According to an optional embodiment of the present disclosure, the task invoking request may be generated in the following manner.

[0113] For example, when the working thread determines that the current processing state is an idle state, it determines the current time node, and when it determines that the current time node is a task call node, it generates a task call request.

[0114] In one example, determining the current processing state may include: determining the operating state information of the target device. For example, when the working thread determines that the current available amount of device resources is greater than or equal to the device resource available amount threshold, it is determined that the operating state information of the target device indicates that the device resources used to run the large model are in a predetermined load state, such as a non-full load state. When it is determined that the current available amount of device resources is less than the device resource available amount threshold, it is determined that the operating state information of the target device indicates that the device resources used to run the large model are in a full load state. The device resources being in the predetermined load state is determined as the current processing state being an idle state.

[0115] In one example, determining the current time node may include: determining whether the current moment is in a preset task request period. If it is determined that the current moment is in the preset task request period, determining that the current time node is in a task call node.

[0116] According to an embodiment of the present disclosure, in the process of batch processing task information of target tasks using a large language model, once the operation is started, even if some target tasks in the batch have been processed, new target tasks cannot be immediately input into the large model to start the operation, and it is necessary to wait for a certain time window before joining the operation of the large language model.

[0117] In one example, the preset task request period may represent the period for inputting task information into the large model. For example, after the large model processes the first batch of tasks, N seconds have passed and the current moment reaches the preset task request period. During this period, the target task information is input into the large model so that the large model can start computing the second batch of tasks.

[0118] By utilizing the task call node provided in the embodiment of the present disclosure, it is possible to match the processing characteristics of a large language model, reasonably start the operation timing and the timing of sending the task call request to the load balancer, thereby improving the processing efficiency and avoiding invalid operations.

[0119] Figure 5 The block diagram of a task processing device according to an embodiment of the present disclosure is schematically shown.

[0120] like Figure 5 As shown, the task processing device 500 includes: a state determination module 510 and a request determination module 520 .

[0121] The state determination module 510 is used to determine the operation state information of the target device in response to receiving multiple task invocation requests. The target device is deployed with multiple large models, and the task invocation request includes a request for invoking a task processed by the large model.

[0122] The request determination module 520 is used to determine a target task call request for calling a target task based on multiple task call requests and running status information. The target task includes a task processed by a target large model, and the target large model includes a large model running on a target device determined based on the running status information.

[0123] According to an embodiment of the present disclosure, the task processing state further includes: a request generation module.

[0124] The request generation module is used to generate a task call comprehensive request based on multiple task call requests when it is determined that the running status information indicates that the target device is not running. The task call comprehensive request indicates that it is used to call a task that matches any of the multiple task call requests.

[0125] According to an embodiment of the present disclosure, the request determination module includes: a request determination submodule.

[0126] The request determination submodule is used to determine a target task call request for calling the target task based on the model information and multiple task call requests included in the running state information when it is determined that the running state information indicates that the target device is running. The model information includes information of the target large model.

[0127] According to an embodiment of the present disclosure, the request determination submodule includes: an initial request determination unit and an identification adding unit.

[0128] The initial request determining unit is used to determine an initial target task calling request for calling the target task from a plurality of task calling requests based on the model information.

[0129] The identification adding unit is used to determine the target task calling request based on the initial target task calling request and the device identification of the target device.

[0130] According to an embodiment of the present disclosure, each task invoking request includes a device identification of a target device.

[0131] According to an embodiment of the present disclosure, the request determination submodule includes: a target request determination unit.

[0132] The target request determining unit is used to determine a target task calling request for calling a target task from a plurality of task calling requests based on a device identification and model information of each task calling request.

[0133] According to an embodiment of the present disclosure, the state determination module includes at least one of the following: a first state determination submodule and a second state determination submodule.

[0134] The first state determination submodule is used to determine the operation state information of the target device based on the state identification information used to characterize the operation state included in the task invoking request.

[0135] The second state determination submodule is used to determine the operation state information of the target device based on the recorded requested tasks and the hardware parameters of the target device, wherein the requested tasks include the retrieved tasks.

[0136] According to an embodiment of the present disclosure, the task processing device further includes: a task receiving module and a task sending module.

[0137] The task receiving module is used to receive the target task obtained by the target task call request.

[0138] A task sending module is used to send the target task to the hardware device;

[0139] According to an embodiment of the present disclosure, the target task is determined in the following manner: based on the processable task amount and task type in the target task call request, the target task is determined from multiple tasks to be processed according to the task generation time of the tasks to be processed.

[0140] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.

[0141] According to an embodiment of the present disclosure, an electronic device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute a method as in the embodiment of the present disclosure.

[0142] According to an embodiment of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to cause a computer to execute a method as described in an embodiment of the present disclosure.

[0143] According to an embodiment of the present disclosure, a computer program product includes a computer program, and when the computer program is executed by a processor, the method according to the embodiment of the present disclosure is implemented.

[0144] Figure 6 A schematic block diagram of an example electronic device 600 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.

[0145] like Figure 6 As shown, the device 600 includes a computing unit 601, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 602 or a computer program loaded from a storage unit 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the device 600 can also be stored. The computing unit 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0146] A number of components in the device 600 are connected to an input / output (I / O) interface 605, including: an input unit 606, such as a keyboard, a mouse, etc.; an output unit 607, such as various types of displays, speakers, etc.; a storage unit 608, such as a disk, an optical disk, etc.; and a communication unit 609, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 609 allows the device 600 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0147] The computing unit 601 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 601 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 601 performs the various methods and processes described above, such as the task processing method. For example, in some embodiments, the task processing method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 608. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 600 via the ROM 602 and / or the communication unit 609. When the computer program is loaded into the RAM 603 and executed by the computing unit 601, one or more steps of the task processing method described above may be performed. Alternatively, in other embodiments, the computing unit 601 may be configured to perform the task processing method in any other appropriate manner (e.g., by means of firmware).

[0148] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0149] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0150] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0151] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0152] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.

[0153] A computer system may include a client and a server. The client and the server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises through computer programs running on respective computers and having a client-server relationship to each other. The server may be a cloud server, a server in a distributed system, or a server combined with a blockchain.

[0154] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.

[0155] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.

Claims

1. A task processing method, comprising: In response to receiving a plurality of task invocation requests, determining operation status information of a target device, wherein the target device has a plurality of large models deployed thereon, the task invocation requests comprising requests for invoking tasks processed by the large models; and Based on the multiple task call requests and the running status information, a target task call request for calling the target task is determined, wherein the target task includes a task processed by a target big model, and the target big model includes a big model running on the target device determined based on the running status information.

2. The method according to claim 1, further comprising: In a case where it is determined that the running status information indicates that the target device is not running, a task call comprehensive request is generated based on the multiple task call requests, wherein the task call comprehensive request indicates a task for calling a task matching any one of the multiple task call requests.

3. The method according to claim 1 or 2, wherein: The determining, based on the multiple task call requests and the running status information, a target task call request for calling the target task includes: When it is determined that the operating status information represents that the target device is running, the target task call request for calling the target task is determined based on the model information included in the operating status information and the multiple task call requests, wherein the model information includes information of the target large model.

4. The method according to claim 3, wherein: The determining the target task call request for calling the target task based on the model information represented by the running status information and the plurality of task call requests includes: Based on the model information, determining an initial target task call request for calling the target task from the multiple task call requests; and The target task call request is determined based on the initial target task call request and the device identification of the target device.

5. The method according to claim 3, wherein: Each of the task invoking requests includes a device identifier of the target device; The determining the target task call request for calling the target task based on the model information represented by the running status information and the plurality of task call requests includes: Based on the device identification of each of the task calling requests and the model information, a target task calling request for calling the target task is determined from the multiple task calling requests.

6. The method according to any one of claims 1 to 5, wherein: The step of determining the operating status information of the target device includes at least one of the following: Determine the running status information of the target device based on the status identification information used to characterize the running status included in the task invoking request; Based on the recorded requested tasks and the hardware parameters of the target device, the operating state information of the target device is determined, wherein the requested tasks include the retrieved tasks.

7. The method according to any one of claims 1 to 6, further comprising: Receiving a target task obtained by calling the target task request; as well as Sending the target task to the hardware device; The target task is determined in the following way: Based on the processable task quantity and task type in the target task call request, the target task is determined from a plurality of tasks to be processed according to the task generation time of the tasks to be processed.

8. A task processing device, comprising: a state determination module, configured to determine operation state information of a target device in response to receiving a plurality of task invocation requests, wherein the target device has a plurality of large models deployed thereon, the task invocation requests comprising requests for invoking tasks processed by the large models; and A request determination module is used to determine a target task call request for calling a target task based on the multiple task call requests and the running status information, wherein the target task includes a task processed by a target big model, and the target big model includes a big model running on the target device determined based on the running status information.

9. The apparatus according to claim 8, further comprising: The request generation module is used to generate a task call comprehensive request based on the multiple task call requests when it is determined that the running status information indicates that the target device is not running, wherein the task call comprehensive request indicates a task for calling any one of the multiple task call requests.

10. The device according to claim 8 or 9, wherein: The request determination module comprises: A request determination submodule is used to determine the target task call request for calling the target task based on the model information included in the running status information and the multiple task call requests when it is determined that the running status information represents that the target device is running, wherein the model information includes information of the target large model.

11. The device according to claim 10, wherein: The request determination submodule includes: an initial request determining unit, configured to determine, based on the model information, an initial target task calling request for calling the target task from the plurality of task calling requests; and The identification adding unit is used to determine the target task calling request based on the initial target task calling request and the device identification of the target device.

12. The device according to claim 10, wherein: Each of the task invoking requests includes a device identifier of the target device; The request determination submodule includes: The target request determining unit is used to determine a target task calling request for calling the target task from the multiple task calling requests based on the device identification of each task calling request and the model information.

13. The device according to any one of claims 8 to 12, wherein: The state determination module includes at least one of the following: A first state determination submodule, configured to determine the operation state information of the target device based on the state identification information used to characterize the operation state included in the task call request; The second state determination submodule is used to determine the operation state information of the target device based on the recorded requested tasks and the hardware parameters of the target device, wherein the requested tasks include the retrieved tasks.

14. The device according to any one of claims 8 to 13, further comprising: A task receiving module, used for receiving a target task obtained by calling the target task request; as well as A task sending module, used for sending the target task to the hardware device; The target task is determined in the following way: Based on the processable task quantity and task type in the target task call request, the target task is determined from a plurality of tasks to be processed according to the task generation time of the tasks to be processed.

15. An electronic device, comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 7.

16. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1 to 7.

17. A computer program product comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 7.

Citation Information

Cited By

  • Large model AI central control platform control method and double-protocol large model AI central control platform

    CN121209340A