Task processing method and device, medium and equipment
By creating subprocesses and storage space in the large model calling system to process and store the subtask results of the large model, the blockage caused by synchronous calls and the load pressure problems caused by asynchronous calls are solved, and task processing efficiency and interface configuration efficiency are improved.
Patent Information
- Application Number
- CN202510260064.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-06
- Publication Date
- 2025-04-04
- Estimated Expiration
- 2045-03-06
AI Technical Summary
In the existing large-scale calling methods, synchronous calling causes third-party system blockage, and asynchronous calling causes load pressure and low task processing efficiency.
By receiving task processing requests from the target device, the subtasks of the target task are determined, and a child process is created for each subtask, and the storage space is configured to store subtask data and processing results. The child process calls the big model from the model server to process the data and stores the results in a predetermined storage space until all subtask processing is completed.
It avoids the problem of blocking third-party systems due to long processing time of large models, reduces system load pressure, improves task processing efficiency, and simplifies interface configuration.
Smart Images

Figure CN119759589A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a task processing method, device, medium and equipment. Background Art
[0002] With the continuous advancement of artificial intelligence technology, various large models are gradually becoming the key force in promoting the intelligent transformation of various industries. With their powerful data processing capabilities, complex pattern recognition capabilities and high intelligence level, these large models have shown great application potential in many fields such as text analysis, image recognition, speech recognition, and risk assessment.
[0003] With the continuous development of big models, more and more third-party systems / target devices are beginning to call big models to improve their intelligence level. These third-party systems / target devices cover various fields, such as finance, medical care, education, e-commerce, etc. By calling big models, these systems can achieve more accurate data analysis and prediction, and provide users with more personalized services and experiences. In the process of calling big models and third-party systems, the interface becomes the key to connecting the two. By defining a clear interface protocol, third-party systems can easily call the various functions provided by the big model through the corresponding interface to realize data input and output. At present, the calling methods of third-party systems to big models are mainly divided into synchronous calling and asynchronous calling.
[0004] The synchronous call mode means that after the third-party system sends a request, it will wait for the large model to be processed and return the result before performing subsequent operations. However, synchronous calls have certain limitations, because when the large model processing time is long, synchronous calls will cause the third-party system to be blocked, affecting user experience and system performance. In order to solve the problem of synchronous calls, the asynchronous call mode came into being.
[0005] In the asynchronous call mode, after the third-party system sends a request, it does not need to wait for the large model to complete processing, but immediately returns to continue to perform other tasks. After the large model is processed in the background, the execution result / processing result is notified to the third-party system through the corresponding pre-configured interface each time. The third-party system processes complex callback mechanisms and state management to ensure that subsequent operations can be performed correctly when receiving the processing results of the large model. This will cause a large load pressure on the third-party system, affecting the operating performance of the third-party system, and then resulting in low task processing efficiency. Summary of the invention
[0006] In view of this, the present invention provides a task processing method, device, medium and equipment, the main purpose of which is to solve the problem of low task processing efficiency existing in the current model calling tasks.
[0007] To solve the above problems, the present application provides a task processing method, comprising: Receive a task processing request sent by a target device; Determine each subtask corresponding to the target task based on the task processing request, and create a corresponding subprocess for each subtask; Configuring a corresponding storage space for each of the sub-processes, the storage space being used to store sub-task data and sub-task processing results of predetermined sub-tasks that have been executed in each of the sub-tasks; For the first subtask to be processed currently, based on the first subprocess of the first subtask, the target large model is called from the predetermined model server, and the subtask data in the first storage space and the subtask processing results of the executed predetermined subtask are processed based on the target large model to obtain the first processing result of the first subtask, and the first processing result is stored in the second storage space of the predetermined second subtask until the processing of each subtask is completed, the target processing result is obtained, and the target processing result is sent to the target device.
[0008] Optionally, the creating a corresponding subprocess for each of the subtasks specifically includes: Create the main process; A corresponding sub-process is created for each of the sub-tasks based on the main process.
[0009] Optionally, determining each subtask corresponding to the target task based on the task processing request specifically includes: Based on the task processing request, obtaining task data of the target task; Sending a task splitting request to the model server based on the task data; A task splitting scheme generated by using a predetermined large model for the task splitting request and fed back by the model server is received, wherein the task splitting scheme at least includes: a plurality of subtasks and subtask data corresponding to each subtask.
[0010] Optionally, before sending the task splitting request to the model server based on the task data, the method further includes: generating the task splitting request, specifically including: The task splitting request is generated based on the task data and the scheduled task processing time.
[0011] Optionally, storing the first processing result in a second storage space predetermined for a second subtask specifically includes: Based on the first sub-process, the first processing result is stored in a second storage space of a predetermined second sub-task through a target mail protocol.
[0012] Optionally, the first storage space stores a task identifier of a predetermined second subtask; Before storing the first processing result in a second storage space predetermined for a second subtask, the method further includes: Based on the task identifier of the second subtask, a second storage space corresponding to the second subtask is determined.
[0013] Optionally, the storage space also stores a model identifier for determining the target large model.
[0014] In order to solve the above problems, the present application provides a task processing device, comprising: A receiving module, used for receiving a task processing request sent by a target device; A creation module, used to determine each subtask corresponding to the target task based on the task processing request, and create a corresponding subprocess for each subtask; A configuration module, configured to configure a corresponding storage space for each of the sub-processes, wherein the storage space is used to store sub-task data and sub-task processing results of the pre-determined sub-tasks that have been executed in each of the sub-tasks; A processing module is used to call a target large model from a predetermined model server for a first subtask to be processed currently based on a first subprocess of the first subtask, process the subtask data in a first storage space and the subtask processing results of the executed predetermined subtask based on the target large model, obtain a first processing result of the first subtask, and store the first processing result in a second storage space of a predetermined second subtask until the processing of each subtask is completed, the target processing result is obtained, and the target processing result is sent to the target device.
[0015] In order to solve the above problems, the present application provides a storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the steps of any of the above-mentioned task processing methods are implemented.
[0016] To solve the above problems, the present application provides an electronic device, comprising at least a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any of the above-mentioned task processing methods when executing the computer program on the memory.
[0017] A task processing method, apparatus, medium and device in the present application, during the target task processing process, does not need to feed back the intermediate results of the target task (i.e., the processing results of each subtask) to a third-party system / target device, but stores the processing results of each subtask through the allocated predetermined storage space, which can ensure that the processing of the target task is not affected by the operating status of the third-party system / target device, provides a guarantee for the rapid processing of the target task, and can reduce the load pressure of the third-party system / target device. In addition, since there is no need to feed back the intermediate results to the third-party system / target device, the third-party system / target device does not need to perform additional interface configuration, and only needs to configure a unified interface to realize the sending of the target task and the receiving of the target processing results, which improves the efficiency of interface configuration and further improves the efficiency of task processing.
[0018] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings: Figure 1 A flowchart of a task processing method according to an embodiment of the present application; Figure 2 This is a flowchart of a task processing method according to another embodiment of the present application; Figure 3 This is a structural block diagram of a task processing device according to another embodiment of the present application; Figure 4 This is a structural block diagram of an electronic device according to another embodiment of the present application. DETAILED DESCRIPTION
[0020] Various aspects and features of the present application are described herein with reference to the accompanying drawings.
[0021] It should be understood that various modifications may be made to the embodiments of the present application. Therefore, the above description should not be considered as limiting, but only as an example of an embodiment. Other modifications within the scope and spirit of the present application will occur to those skilled in the art.
[0022] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the present application and, together with the general description of the present application given above and the detailed description of the embodiments given below, serve to explain the principles of the present application.
[0023] These and other characteristics of the present application will become apparent from the following description of a preferred form of embodiment given as a non-limiting example with reference to the accompanying drawings.
[0024] It should also be understood that although the present application has been described with reference to some specific examples, those skilled in the art will be able to readily implement many other equivalent forms of the present application.
[0025] The above and other aspects, features and advantages of the present application will become more apparent in view of the following detailed description when taken in conjunction with the accompanying drawings.
[0026] Specific embodiments of the present application are described hereinafter with reference to the accompanying drawings; however, it should be understood that the embodiments applied for are merely examples of the present application, which may be implemented in a variety of ways. Well-known and / or repeated functions and structures are not described in detail to avoid unnecessary or redundant details that obscure the present application. Therefore, the specific structural and functional details applied for herein are not intended to be limiting, but merely serve as a basis and representative basis for the claims to teach those skilled in the art to use the present application in a variety of ways with substantially any suitable detailed structure.
[0027] This specification may use the phrases "in one embodiment," "in another embodiment," "in yet another embodiment," or "in other embodiments," all of which may refer to one or more of the same or different embodiments according to the present application.
[0028] The present application embodiment provides a task processing method, which can be applied to electronic devices such as terminals and servers. Specifically, taking the application to a server as an example, Figure 1 As shown, a task processing method in this embodiment includes the following steps: Step S101, receiving a task processing request sent by a target device; In this step, the task processing request can be understood as a model calling request, and the target task is processed by calling the big model. Among them, the target device can be a third-party system that calls the big model to implement task processing, or it can be a front-end device / front-end interface that calls the big model to implement task processing. That is, the back-end server receives the task processing request / model calling request sent by the front-end.
[0029] Step S102, determining each subtask corresponding to the target task based on the task processing request, and creating a corresponding subprocess for each subtask; In this step, the backend server may first create a main process, and then create corresponding sub-processes for each sub-task through the main process.
[0030] Step S103, configuring a corresponding storage space for each of the sub-processes, the storage space being used to store sub-task data and sub-task processing results of the pre-determined sub-tasks that have been executed in each of the sub-tasks; In this step, the storage space can be understood as a predetermined storage location in the backend server, such as a folder under a directory of the backend server, which can specifically include a task receiving folder and a task sending folder. The subprocesses realize message transmission and task flow by obtaining and writing files in these folders, so there is no need to feed back the processing results of each subtask to the target device / third-party system / front end.
[0031] Step S104, for the first subtask to be processed currently, based on the first subprocess of the first subtask, call the target large model from the predetermined model server, process the subtask data in the first storage space and the subtask processing results of the executed predetermined subtask based on the target large model, obtain the first processing result of the first subtask, and store the first processing result in the second storage space of the predetermined second subtask, until the processing of each subtask is completed, the target processing result is obtained, and the target processing result is sent to the target device.
[0032] In this step, during the task execution, each sub-process can obtain the task information (the sub-task data corresponding to the sub-task) and the next sub-process ID from its own storage space, and interact with the large model server after parsing to process the sub-task. After the sub-task is processed, the sub-process can write the result to the storage space of the next sub-process according to the ID of the next sub-process in the storage space; until the execution of the entire task is completed, the final execution result is returned to the target device according to the return method specified by the user, thereby completing the processing of the target task.
[0033] The task processing method in this embodiment does not need to feed back the intermediate results of the target task (i.e., the processing results of each subtask) to the third-party system / target device during the target task processing process. Instead, the processing results of each subtask are stored through the allocated predetermined storage space, which can ensure that the processing of the target task is not affected by the operating status of the third-party system / target device, providing a guarantee for the rapid processing of the target task, while reducing the load pressure of the third-party system / target device. In addition, since there is no need to feed back the intermediate results to the third-party system / target device, the third-party system / target device does not need to perform additional interface configuration. It only needs to configure a unified interface to realize the sending of the target task and the receiving of the target processing results, which improves the efficiency of interface configuration and further improves the efficiency of task processing.
[0034] Another embodiment of the present application provides a task processing method, which is specifically executed by a backend server. The method in this embodiment includes the following steps: Step S201, creating a main process; In this step, the backend server may pre-create a main process, communicate with the target device through the main process, and perform subsequent sub-process creation operations.
[0035] Step S202, receiving a task processing request sent by a target device; In this step, the backend server can receive the task processing request sent by the target device / front end based on the main process.
[0036] During the specific implementation of this step, the user can enter / submit the prompt template Prompt in the predetermined input box of the target device, and select the method for returning the final result (such as returning the target processing result of the target task through email notification or local storage). The target device can then encapsulate the Prompt input by the user into an HTTP request, that is, generate a task processing request / model call request, and send the task processing request / model call request / HTTP request to the back-end server. As a result, the server can receive the HTTP request / task processing request sent by the target device based on the main process. The Prompt contains the task data of the target task, which can be email data that needs to be replied using a large model, or text data that needs to be translated / recognized using a large model, or financial data that needs to be risk assessed using a large model, etc.
[0037] Step S203, based on the task processing request, obtaining task data of the target task; In this step, after receiving the task processing request / HTTP request, the backend server may parse the task processing request / HTTP request, thereby obtaining the task data of the target task from the task processing request / HTTP request.
[0038] Step S204, sending a task splitting request to the model server based on the task data; In this step, after obtaining the task data, a task splitting request may be generated based on the task data and the scheduled task processing time; and then the task splitting request may be sent to the model server to request the model server to generate a task splitting solution.
[0039] During the specific implementation of this step, the backend server can send a task splitting request to the model server through a predetermined API interface based on the main process.
[0040] Step S205, receiving a task splitting solution fed back by the model server, which is generated by using a predetermined large model for the task splitting request, wherein the task splitting solution at least includes: a plurality of subtasks and subtask data corresponding to each subtask; In this step, after receiving the task splitting request sent by the backend server, the model server can use the predetermined large model to split the task data, thereby obtaining a task splitting solution including a plurality of subtasks and each subtask data. The predetermined large model can be a predetermined task splitting large model.
[0041] Step S206, creating a corresponding sub-process for each of the sub-tasks based on the main process; In this step, after receiving the task splitting plan sent by the model server, the backend server can create corresponding sub-processes for each sub-task based on the main process and according to the sub-tasks in the task splitting plan.
[0042] Step S207, configuring a corresponding storage space for each of the sub-processes, the storage space being used to store sub-task data and sub-task processing results of the pre-determined sub-tasks that have been executed in each of the sub-tasks; In this step, the main process specifically configures the corresponding storage space for each sub-process.
[0043] Step S208, for the first subtask to be processed currently, based on the first subprocess of the first subtask, call the target large model from the predetermined model server, process the subtask data in the first storage space and the subtask processing results of the executed predetermined subtask based on the target large model, obtain the first processing result of the first subtask, and store the first processing result in the second storage space of the predetermined second subtask, until the processing of each subtask is completed, the target processing result is obtained, and the target processing result is sent to the target device.
[0044] In this step, the backend server can further execute each subtask after completing the configuration of the storage space. Specifically, each subtask can be executed according to the execution order of each subtask and / or the dependency relationship of each subtask in the task allocation plan. The execution order includes parallel execution and serial execution. The dependency relationship means that the execution of subtask B requires the execution result of subtask A.
[0045] That is, when executing the subtask B to be processed, the subprocess b corresponding to subtask B will call the target large model from the predetermined model server, and then perform task processing on the subtask data of subtask B and the processing result of subtask A stored in the storage space 1 corresponding to subtask B based on the target large model, thereby obtaining the execution result of subtask B. Then, subprocess b can store the execution result of subtask B in the storage space 2 of subtask C according to the dependency relationship stored in the storage space 1 (the task identifier of subtask C), until the processing of each subtask is completed, the target processing result is obtained, and the target processing result is sent to the target device.
[0046] In the specific implementation of this embodiment, the first storage space stores a task identifier of a predetermined second subtask. Before storing the first processing result in the second storage space of the predetermined second subtask, the method further includes: determining a second storage space corresponding to the second subtask based on the task identifier of the second subtask.
[0047] That is, the storage space corresponding to each subtask not only stores the subtask data, but also stores the task identifier of the subtask used to determine the dependency relationship between the subtasks. For example, subtask B depends on subtask A (that is, subtask B can only be executed after subtask A is executed), so the storage space of subtask A will store the task identifier of subtask B, so that the subprocess a of subtask A can store the execution result of subtask A in the storage space corresponding to subtask B according to the task identifier of subtask B stored in the storage space of subtask A.
[0048] In the specific implementation process of this embodiment, the storage space also stores a model identifier for determining the target large model. In this embodiment, by storing the model identifier in the storage space, it is convenient for the sub-process to accurately call the corresponding target large model from the model server according to the model identifier, which lays the foundation for the rapid execution of the sub-task.
[0049] In the specific implementation process of this embodiment, storing the first processing result in the second storage space of the predetermined second subtask specifically includes: based on the first subprocess, storing the first processing result in the second storage space of the predetermined second subtask through the target mail protocol. That is, the subprocess stores the processing result of the subtask in the storage space of the next subtask through the target mail protocol.
[0050] The task processing method in this embodiment does not need to feed back the intermediate results of the target task (i.e., the processing results of each subtask) to the third-party system / target device during the target task processing process. Instead, the processing results of each subtask are stored through the allocated predetermined storage space, which can ensure that the processing of the target task is not affected by the operating status of the third-party system / target device, providing a guarantee for the rapid processing of the target task, while reducing the load pressure of the third-party system / target device. In addition, since there is no need to feed back the intermediate results to the third-party system / target device, the third-party system / target device does not need to perform additional interface configuration. It only needs to configure a unified interface to realize the sending of the target task and the receiving of the target processing results, which improves the efficiency of interface configuration and further improves the efficiency of task processing.
[0051] Based on the above embodiments, the task processing method in this application is explained and illustrated in combination with specific application scenarios. Figure 2 shown.
[0052] Take the example of an email text analysis system based on a large model developed by the IT department of a large enterprise, which aims to automatically classify, mark and reply to emails from customers. The content of these emails is extensive, covering technical support, product consultation, complaints and suggestions, and many other aspects. Due to the large number of emails and the need for deep text analysis for each email, the traditional synchronous processing mode will lead to system resource constraints, slow processing speed, and reduced user experience. Therefore, the system (i.e., the third-party system) needs to call the large model to analyze, classify and reply to the email text. Specifically, the model calling process / target task processing process involves three parts, namely the front-end / target device / email text analysis system, the back-end server, and the large model server / model server. The interaction process and processing flow of each part are as follows: Step 1: Front-end user interface (email text analysis system / third-party system / target device); Step 1: After the user logs in to the system, he will see a button "Upload Email File" and a drop-down menu for selecting a return method (such as "Email Notification", "System Message", "Automatically Store Locally", etc.) on the front-end interface. Step 2: The user selects a compressed file (such as .zip format) containing multiple emails (technical support, product consultation, and complaint suggestions), selects "Email Notification" as the result return method, and then clicks the "Upload" button; Step 3: The front end encapsulates the file selected by the user into an HTTP POST request, that is, generates a task processing request. The request body contains the compressed file and the return method information selected by the user, and sends it to the back end server; Step 4: The backend server will create a main process in advance, and then parse the request body after receiving the task processing request sent by the frontend based on the main process, thereby extracting the compressed file and return method information from the task processing request. At the same time, the backend server can generate the task splitting request / task allocation request based on the compressed file and the estimated processing time; Step 5: The main process of the backend server sends a task splitting request / task allocation request to the large model server through the API interface to request the generation of a task splitting plan / task allocation plan; the task splitting request contains information such as the size of the email file and the estimated processing time; Step 6: The large model server calls the predetermined large model according to the task splitting request, processes the task splitting / task allocation, and generates a task splitting plan / task allocation plan, wherein the task splitting plan at least includes: a plurality of subtasks and subtask data corresponding to each subtask; For example, the task splitting plan / task allocation plan contains 4 subtasks, that is, it specifies that 4 sub-processes need to be created to handle this batch of emails (for example, this can be determined based on the number and complexity of emails), and details the subtasks of each sub-process (for example, sub-process 1 handles technical support emails, sub-process 2 handles product consultation emails, and sub-process 3 handles complaint and suggestion emails).
[0053] Step 7: The main process of the backend server dynamically creates sub-processes for each sub-task according to the task splitting plan, and allocates a dedicated storage space for each sub-process; The storage space can be understood as a "mailbox space", for example, a folder in a specific directory on the backend server. The storage space can store subtask data, the execution order of each subtask, the task identifier of the next subtask, and the model identifier, etc. That is, Step 8. Each sub-process obtains sub-task data from its own storage space / task receiving folder according to the execution order, calls the target large model process task processing from the large model server according to the model identifier, obtains the processing result of the sub-task, and stores the task processing result in the storage space of the next sub-task according to the task identifier of the next sub-task in the storage space / task receiving folder until the processing of each sub-task is completed, the target processing result is obtained, and the target processing result is sent to the target device.
[0054] That is, the execution order of subtask A is the first; therefore, subprocess 1 of subtask A obtains the list of technical support emails and the ID of the next subprocess (such as subprocess 4, which is responsible for summarizing all processing results) from its own task receiving folder, and then calls the target big model from the big model server, processes each email in each technical support email list one by one, uses the big model to perform text analysis, judges the email category, extracts key information, generates a reply draft, and thus obtains the processing result, and then writes the processing result (including email ID, analysis result, reply draft) into the task receiving folder of the next subprocess / next subtask (such as subprocess 4 / task A) according to the ID of the next subprocess. Subprocess 1 can specifically use the target email protocol to write the processing result into the task receiving folder of subprocess 4 / task D.
[0055] Similarly, subtask B is executed second; therefore, subtask B's subprocess 2 obtains the product consultation email list from the task receiving folder, calls the large model to perform text analysis, and generates a reply draft. The processing result is written to the task receiving folder of subprocess 4 through the target email protocol.
[0056] Similarly, subtask C is the third in the execution order; thus, subprocess 3 of subtask C can obtain complaint and suggestion emails from the task receiving folder, and also call the large model for text analysis to generate a reply draft or processing suggestions. The processing results are written to the task receiving folder of subprocess 4 through the target email protocol.
[0057] Similarly, subtask D is the fourth in the execution order; therefore, subprocess 4 of subtask D collects the processing results from subprocesses 1, 2, and 3 from its own task receiving folder. All processing results are summarized and sorted to form a final report. Subprocess 4, according to the return method selected by the user (email notification), sends the final report to the front end / target device / third-party system.
[0058] In this embodiment, there is no dependency relationship between the subtasks (i.e., subtask A, subtask B, and subtask C), that is, the execution of subtask A, subtask B, and subtask C is independent of each other. In the specific implementation process, the execution of each subtask can also be non-independent, that is, subtask B and subtask C depend on subtask A. In this case, after subtask A is processed, the subprocess 1 of subtask A will use the target mail protocol to store the processing results of subtask A in the storage space of subtask B and the storage space of subtask C respectively.
[0059] In this embodiment, the prompt input by the user is received through the front-end user interface, and this information is encapsulated as an HTTP request and sent to the back-end server. The back-end server serves as the hub of task scheduling, and its main process is responsible for parsing the request and communicating with the large model server to obtain an optimized task allocation plan. Based on this solution, the back-end server dynamically creates multiple sub-processes, and implements asynchronous message passing and task transfer between sub-processes through an innovative "mailbox space" mechanism. This mechanism avoids the blocking problem caused by direct interface calls and significantly improves the system's concurrent processing capabilities and response speed. At the same time, it supports the interaction between sub-processes and large model servers to ensure that tasks can be executed efficiently in sequence, and finally return results in the manner specified by the user.
[0060] Another embodiment of the present application provides a task processing, such as Figure 3 As shown, including: A receiving module 11 is used to receive a task processing request sent by a target device; A creation module 12, configured to determine each subtask corresponding to the target task based on the task processing request, and create a corresponding subprocess for each subtask; A configuration module 13, configured to configure a corresponding storage space for each of the sub-processes, wherein the storage space is used to store sub-task data and sub-task processing results of the pre-determined sub-tasks that have been executed in each of the sub-tasks; The processing module 14 is used for calling the target large model from the predetermined model server for the first subtask to be processed currently based on the first subprocess of the first subtask, processing the subtask data in the first storage space and the subtask processing results of the executed predetermined subtask based on the target large model, obtaining the first processing result of the first subtask, and storing the first processing result in the second storage space of the predetermined second subtask until the processing of each subtask is completed, obtaining the target processing result, and sending the target processing result to the target device In the specific implementation process of this embodiment, the creation module specifically includes a process creation unit, and the process creation unit is used to: create a main process; and create a corresponding sub-process for each of the sub-tasks based on the main process.
[0061] In the specific implementation process of this embodiment, the creation module also includes a determination unit, which is specifically used to: obtain the task data of the target task based on the task processing request; send a task splitting request to the model server based on the task data; A task splitting scheme generated by using a predetermined large model for the task splitting request and fed back by the model server is received, wherein the task splitting scheme at least includes: a plurality of subtasks and subtask data corresponding to each subtask.
[0062] In the specific implementation process of this embodiment, the task processing device also includes a generation module, which is used to: before sending the task splitting request to the model server based on the task data, generate the task splitting request based on the task data and the predetermined task processing time.
[0063] In the specific implementation of this embodiment, the processing module is specifically used to: based on the first sub-process, store the first processing result into the second storage space of the predetermined second sub-task through the target mail protocol.
[0064] In a specific implementation of this embodiment, the processing module is further used to: before storing the first processing result in the second storage space of the predetermined second subtask, determine the second storage space corresponding to the second subtask based on the task identifier of the second subtask.
[0065] In the specific implementation process of this embodiment, the storage space also stores a model identifier for determining the target large model.
[0066] The task processing device in this embodiment does not need to feed back the intermediate results of the target task (i.e., the processing results of each subtask) to the third-party system / target device during the target task processing process. Instead, the processing results of each subtask are stored through the allocated predetermined storage space, which can ensure that the processing of the target task is not affected by the operating status of the third-party system / target device, providing a guarantee for the rapid processing of the target task and reducing the load pressure of the third-party system / target device. In addition, since there is no need to feed back the intermediate results to the third-party system / target device, the third-party system / target device does not need to perform additional interface configuration. It only needs to configure a unified interface to realize the sending of the target task and the receiving of the target processing results, which improves the efficiency of interface configuration and further improves the efficiency of task processing.
[0067] Another embodiment of the present application provides a storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the following method steps are implemented: Step 1: Receive a task processing request sent by a target device; Step 2: determining each subtask corresponding to the target task based on the task processing request, and creating a corresponding subprocess for each subtask; Step 3: configuring a corresponding storage space for each of the sub-processes, wherein the storage space is used to store sub-task data and sub-task processing results of the pre-determined sub-tasks that have been executed in each of the sub-tasks; Step 4: For the first subtask to be processed currently, based on the first subprocess of the first subtask, call the target large model from the predetermined model server, process the subtask data in the first storage space and the subtask processing results of the executed predetermined subtask based on the target large model, obtain the first processing result of the first subtask, and store the first processing result in the second storage space of the predetermined second subtask until the processing of each subtask is completed, obtain the target processing result, and send the target processing result to the target device.
[0068] The specific implementation process of the above method steps can refer to the embodiments of any of the above task processing methods, and this embodiment will not be repeated here.
[0069] The storage medium in this application does not need to feed back the intermediate results of the target task (i.e., the processing results of each subtask) to the third-party system / target device during the processing of the target task. Instead, the processing results of each subtask are stored through the allocated predetermined storage space, which can ensure that the processing of the target task is not affected by the operating status of the third-party system / target device, providing a guarantee for the rapid processing of the target task, while reducing the load pressure of the third-party system / target device. In addition, since there is no need to feed back the intermediate results to the third-party system / target device, the third-party system / target device does not need to perform additional interface configuration. It only needs to configure a unified interface to realize the sending of the target task and the receiving of the target processing results, which improves the efficiency of interface configuration and further improves the efficiency of task processing.
[0070] Another embodiment of the present application provides an electronic device, such as Figure 4 As shown, at least a memory 1 and a processor 2 are included, the memory 1 stores a computer program, and the processor 2 implements the following method steps when executing the computer program on the memory 1: Step 1: Receive a task processing request sent by a target device; Step 2: determining each subtask corresponding to the target task based on the task processing request, and creating a corresponding subprocess for each subtask; Step 3: configuring a corresponding storage space for each of the sub-processes, wherein the storage space is used to store sub-task data and sub-task processing results of the pre-determined sub-tasks that have been executed in each of the sub-tasks; Step 4: For the first subtask to be processed currently, based on the first subprocess of the first subtask, call the target large model from the predetermined model server, process the subtask data in the first storage space and the subtask processing results of the executed predetermined subtask based on the target large model, obtain the first processing result of the first subtask, and store the first processing result in the second storage space of the predetermined second subtask until the processing of each subtask is completed, obtain the target processing result, and send the target processing result to the target device.
[0071] The specific implementation process of the above method steps can refer to the embodiments of any of the above task processing methods, and this embodiment will not be repeated here.
[0072] In the electronic device of the present application, during the target task processing process, it is not necessary to feed back the intermediate results of the target task (i.e., the processing results of each subtask) to the third-party system / target device. Instead, the processing results of each subtask are stored through the allocated predetermined storage space, which can ensure that the processing of the target task is not affected by the operating status of the third-party system / target device, provide a guarantee for the rapid processing of the target task, and reduce the load pressure of the third-party system / target device. In addition, since there is no need to feed back the intermediate results to the third-party system / target device, the third-party system / target device does not need to perform additional interface configuration. It only needs to configure a unified interface to realize the sending of the target task and the receiving of the target processing results, which improves the efficiency of interface configuration and further improves the efficiency of task processing.
[0073] The above embodiments are only exemplary embodiments of the present application and are not intended to limit the present application. The protection scope of the present application is defined by the claims. Those skilled in the art may make various modifications or equivalent substitutions to the present application within the essence and protection scope of the present application, and such modifications or equivalent substitutions shall also be deemed to fall within the protection scope of the present application.
Claims
1. A task processing method, characterized in that: include: Receive a task processing request sent by a target device; Determine each subtask corresponding to the target task based on the task processing request, and create a corresponding subprocess for each subtask; Configuring a corresponding storage space for each of the sub-processes, the storage space being used to store sub-task data and sub-task processing results of predetermined sub-tasks that have been executed in each of the sub-tasks; For the first subtask to be processed currently, based on the first subprocess of the first subtask, the target large model is called from the predetermined model server, and the subtask data in the first storage space and the subtask processing results of the executed predetermined subtask are processed based on the target large model to obtain the first processing result of the first subtask, and the first processing result is stored in the second storage space of the predetermined second subtask until the processing of each subtask is completed, the target processing result is obtained, and the target processing result is sent to the target device.
2. The method according to claim 1, characterized in that The step of creating a corresponding subprocess for each of the subtasks specifically includes: Create the main process; A corresponding sub-process is created for each of the sub-tasks based on the main process.
3. The method according to claim 1, characterized in that The determining of the subtasks corresponding to the target task based on the task processing request specifically includes: Based on the task processing request, obtaining task data of the target task; Sending a task splitting request to the model server based on the task data; A task splitting scheme generated by using a predetermined large model for the task splitting request and fed back by the model server is received, wherein the task splitting scheme at least includes: a plurality of subtasks and subtask data corresponding to each subtask.
4. The method according to claim 3, characterized in that Before sending the task splitting request to the model server based on the task data, the method further includes: generating the task splitting request, specifically including: The task splitting request is generated based on the task data and the scheduled task processing time.
5. The method according to claim 1, characterized in that The storing the first processing result into a second storage space of a predetermined second subtask specifically includes: Based on the first sub-process, the first processing result is stored in a second storage space of a predetermined second sub-task through a target mail protocol.
6. The method according to claim 1, characterized in that The first storage space stores a task identifier of a predetermined second subtask; Before storing the first processing result in a second storage space predetermined for a second subtask, the method further includes: Based on the task identifier of the second subtask, a second storage space corresponding to the second subtask is determined.
7. The method according to claim 1, characterized in that The storage space also stores a model identifier for determining a target large model.
8. A task processing device, characterized in that: include: A receiving module, used for receiving a task processing request sent by a target device; A creation module, used to determine each subtask corresponding to the target task based on the task processing request, and create a corresponding subprocess for each subtask; A configuration module, configured to configure a corresponding storage space for each of the sub-processes, wherein the storage space is used to store sub-task data and sub-task processing results of the pre-determined sub-tasks that have been executed in each of the sub-tasks; A processing module is used to call a target large model from a predetermined model server for a first subtask to be processed currently based on a first subprocess of the first subtask, process the subtask data in a first storage space and the subtask processing results of the executed predetermined subtask based on the target large model, obtain a first processing result of the first subtask, and store the first processing result in a second storage space of a predetermined second subtask until the processing of each subtask is completed, the target processing result is obtained, and the target processing result is sent to the target device.
9. A storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by the processor, the steps of the task processing method according to any one of claims 1 to 7 are implemented.
10. An electronic device, characterized in that: The system at least comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the task processing method according to any one of claims 1 to 7 when executing the computer program on the memory.
Citation Information
Patent Citations
Task processing method, device and system and storage medium
CN113391814A
Distributed reasoning deployment system for oversized model
CN115511086A
Task data construction method and device, computing equipment and readable storage medium
CN117951723A
Asynchronous task processing method and device and storage medium
CN118051316A
Artificial intelligence-based task processing method and device, computer equipment and medium
CN119513422A