CN117312502A - Task processing method, question-answer task processing method and computing device - Google Patents

Task processing method, question-answer task processing method and computing device Download PDF

Info

Publication number
CN117312502A
CN117312502A CN202310975985.9A CN202310975985A CN117312502A CN 117312502 A CN117312502 A CN 117312502A CN 202310975985 A CN202310975985 A CN 202310975985A CN 117312502 A CN117312502 A CN 117312502A
Authority
CN
China
Prior art keywords
task
processed
processing
tasks
text
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310975985.9A
Other languages
Chinese (zh)
Inventor
刘阳
苏璐岩
张志成
周文猛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alibaba China Co Ltd
Original Assignee
Alibaba China Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alibaba China Co Ltd filed Critical Alibaba China Co Ltd
Priority to CN202310975985.9A priority Critical patent/CN117312502A/en
Publication of CN117312502A publication Critical patent/CN117312502A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/332Query formulation
    • G06F16/3329Natural language query formulation or dialogue systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/3331Query processing
    • G06F16/3332Query translation
    • G06F16/3338Query expansion
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/3331Query processing
    • G06F16/334Query execution
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks

Abstract

The embodiment of the specification provides a task processing method, a question-answer task processing method and a computing device, wherein the task processing method comprises the following steps: receiving a plurality of task processing requests; combining task information of each task to be processed to obtain at least one task group to be processed; aiming at target tasks to be processed in each task to be processed, a search engine is called to obtain a search result, and task information of the target tasks to be processed in at least one task group to be processed is updated based on the search result; processing task information of each task to be processed in at least one task group to be processed by using a text processing model to obtain task processing results of each task to be processed; and feeding back task processing results of the tasks to be processed to the corresponding request ends. The task group to be processed is combined first and then searched, so that the problem that a target task to be processed cannot be processed together with task information of other tasks to be processed is avoided, a task processing result is timely obtained and fed back correspondingly, delay is reduced, and high concurrency and user experience are improved.

Description

Task processing method, question-answer task processing method and computing device
Technical Field
The embodiment of the specification relates to the technical field of data processing, in particular to a task processing method.
Background
With the development of computer technology, after training a deep learning model, namely a text processing model, by using sample description information of different sample tasks, input task information is processed by using the text processing model obtained by training to obtain task processing results, and the method has wide application in multiple fields, such as text generation, text classification, entity identification, reasoning and the like.
Currently, due to the large scale of parameters of text processing models, e.g., 13B, 50B, or 175B generative large language models, it is difficult to deploy directly at the requesting end. When text processing is carried out, a request end is required to send a task processing request, after the task processing request is received, a text processing model is utilized to process the task, and then a task processing result is fed back to the request end, so that the task processing is completed in an interactive mode. The training of the text processing model is completed by utilizing a large-scale sample, long time is required, the sample is often not updated timely, the sample is generally a universal sample and is difficult to adapt to the requirements of different tasks to be processed in practical application, and a search engine can be selected to acquire a search result to assist the text processing model in task processing. The text processing model deployed at the server side often processes multiple tasks to be processed synchronously.
However, since the model size of the text processing model is large, a large amount of time is often required for synchronously processing a plurality of tasks to be processed, generally in a few minutes, a plurality of tasks to be processed are combined to obtain a task group to be processed, a time window is set, generally in a few seconds, if the time for calling a search engine to acquire a search result for a certain task to be processed exceeds the time window, the task to be processed needs to wait for a plurality of subsequent tasks to be processed to be recombined to obtain the task group to be processed, at this time, the text processing model is completing task processing of a previous task group to be processed, and long waiting time is required to process task information of the task to be processed by using the text processing model, so that a state that a request end requiring calling the search engine is in a state of waiting for a processing result is caused, high delay exists, a high-concurrency task processing scene is difficult to be supported, and user experience of the request end is insufficient. Therefore, a task processing method with low latency and high concurrency is needed.
Disclosure of Invention
In view of this, the present embodiment provides a task processing method. One or more embodiments of the present specification relate to a question-answering task processing method, a task processing device, a question-answering task processing device, a task processing system, a computing device, a computer-readable storage medium, and a computer program that solve the technical drawbacks of the prior art.
According to a first aspect of embodiments of the present specification, there is provided a task processing method, including:
receiving a plurality of task processing requests, wherein the task processing requests carry tasks to be processed;
combining task information of each task to be processed to obtain at least one task group to be processed;
aiming at target tasks to be processed in each task to be processed, a search engine is called to obtain a search result, and task information of the target tasks to be processed in at least one task group to be processed is updated based on the search result;
processing task information of each task to be processed in at least one task group to be processed by using a text processing model to obtain task processing results of each task to be processed, wherein the text processing model is a deep learning model trained according to sample task information of sample tasks;
and feeding back task processing results of the tasks to be processed to the corresponding request ends.
According to a second aspect of embodiments of the present specification, there is provided a question-answering task processing method, including:
receiving a plurality of task processing requests, wherein the task processing requests carry question-answering tasks;
combining the question text of each question-answer task to obtain at least one question-answer task group;
Aiming at target question-answering tasks in each question-answering task, calling a search engine to obtain search results, and updating the question text of the target question-answering task in at least one question-answering task group based on the search results;
processing the question text of each question-answer task in at least one question-answer task group by using a large language model to obtain a answer text of each question-answer task, wherein the large language model is a deep learning model trained according to sample question text of a sample question-answer task;
and feeding back the reply text of each question and answer task to the corresponding request end.
According to a third aspect of embodiments of the present specification, there is provided a task processing device including:
the first receiving module is configured to receive a plurality of task processing requests, wherein the task processing requests carry tasks to be processed;
the first combination module is configured to combine task information of each task to be processed to obtain at least one task group to be processed;
the first search module is configured to call a search engine to obtain a search result aiming at a target task to be processed in each task to be processed, and update task information of the target task to be processed in at least one task group to be processed based on the search result;
The first processing module is configured to process task information of each task to be processed in at least one task group to be processed by using a text processing model to obtain task processing results of each task to be processed, wherein the text processing model is a deep learning model trained according to sample task information of sample tasks;
the first feedback module is configured to feed back task processing results of each task to be processed to the corresponding request end.
According to a fourth aspect of embodiments of the present specification, there is provided a question-answering task processing device, including:
the second receiving module is configured to receive a plurality of task processing requests, wherein the task processing requests carry question-answering tasks;
the second combination module is configured to combine the question text of each question-answering task to obtain at least one question-answering task group;
the second search module is configured to call a search engine to obtain search results aiming at target question-answering tasks in each question-answering task, and update the question text of the target question-answering task in at least one question-answering task group based on the search results;
the second processing module is configured to process the question text of each question-answer task in at least one question-answer task group by using a large language model to obtain a answer text of each question-answer task, wherein the large language model is a deep learning model trained according to sample question text of a sample question-answer task;
And the second feedback module is configured to feed back the reply text of each question-answer task to the corresponding request end.
According to a fifth aspect of embodiments of the present disclosure, there is provided a task processing system, including a request end and a server end;
the request end is used for sending a task processing request to the server end, wherein the task processing request carries a task to be processed;
the server is used for receiving a plurality of task processing requests, combining task information of each task to be processed to obtain at least one task group to be processed, calling a search engine to obtain a search result aiming at a target task to be processed in each task to be processed, updating task information of the target task to be processed in the at least one task group to be processed based on the search result, and processing the task information of each task to be processed in the at least one task group to be processed by utilizing a text processing model to obtain task processing results of each task to be processed, wherein the text processing model is a deep learning model trained according to sample task information of a sample task, and feeding the task processing results of each task to be processed back to a corresponding request end.
The request end is also used for receiving the corresponding task processing result fed back by the server end.
According to a sixth aspect of embodiments of the present specification, there is provided a computing device comprising:
a memory and a processor;
the memory is configured to store computer-executable instructions that, when executed by the processor, perform the steps of the method described above.
According to a seventh aspect of embodiments of the present description, there is provided a computer-readable storage medium storing computer-executable instructions which, when executed by a processor, implement the steps of the above-described method.
According to an eighth aspect of embodiments of the present specification, there is provided a computer program, wherein the computer program, when executed in a computer, causes the computer to perform the steps of the above method.
In one or more embodiments of the present disclosure, a plurality of task processing requests are received, where the task processing requests carry tasks to be processed; combining task information of each task to be processed to obtain at least one task group to be processed; aiming at target tasks to be processed in each task to be processed, a search engine is called to obtain a search result, and task information of the target tasks to be processed in at least one task group to be processed is updated based on the search result; processing task information of each task to be processed in at least one task group to be processed by using a text processing model to obtain task processing results of each task to be processed, wherein the text processing model is a deep learning model trained according to sample task information of sample tasks; and feeding back task processing results of the tasks to be processed to the corresponding request ends. The method has the advantages that the plurality of tasks to be processed are combined to obtain the task groups to be processed, then the search engine is called for searching, the situation that the target task to be processed, which is required to be searched by the search engine, does not enter the current task groups to be processed is avoided, further, the task groups to be processed cannot be processed by the text processing model together with task information of other tasks to be processed is avoided, at least one task group to be processed synchronously by the text processing model is guaranteed, a request end corresponding to the target task to be processed can timely obtain a task processing result and feed back the task processing result to the corresponding request end, delay of task processing is reduced, high concurrency of task processing is improved, and user experience of the request end is improved.
Drawings
FIG. 1 is a flow chart of a method of task processing provided in one embodiment of the present disclosure;
FIG. 2 is a flowchart of a method for processing a question-answering task according to one embodiment of the present disclosure;
FIG. 3 is a diagram of a map-reduce model architecture in a task processing method according to one embodiment of the present disclosure;
FIG. 4 is a process flow diagram of a method of task processing provided by one embodiment of the present disclosure;
FIG. 5 is a process flow diagram of a task processing method applied to an inference scenario provided in one embodiment of the present disclosure;
FIG. 6 is a schematic diagram of a task processing device according to one embodiment of the present disclosure;
fig. 7 is a schematic structural diagram of a question-answering task processing device according to an embodiment of the present disclosure;
FIG. 8 is a schematic diagram of a task processing system according to one embodiment of the present disclosure;
FIG. 9 is a block diagram of a computing device provided in one embodiment of the present description.
Detailed Description
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present description. This description may be embodied in many other forms than described herein and similarly generalized by those skilled in the art to whom this disclosure pertains without departing from the spirit of the disclosure and, therefore, this disclosure is not limited by the specific implementations disclosed below.
The terminology used in the one or more embodiments of the specification is for the purpose of describing particular embodiments only and is not intended to be limiting of the one or more embodiments of the specification. As used in this specification, one or more embodiments and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used in one or more embodiments of the present specification refers to and encompasses any or all possible combinations of one or more of the associated listed items.
It should be understood that, although the terms first, second, etc. may be used in one or more embodiments of this specification to describe various information, these information should not be limited by these terms. These terms are only used to distinguish one type of information from another. For example, a first may also be referred to as a second, and similarly, a second may also be referred to as a first, without departing from the scope of one or more embodiments of the present description. The word "if" as used herein may be interpreted as "at … …" or "at … …" or "responsive to a determination", depending on the context.
Furthermore, it should be noted that, user information (including, but not limited to, user equipment information, user personal information, etc.) and data (including, but not limited to, data for analysis, stored data, presented data, etc.) according to one or more embodiments of the present disclosure are information and data authorized by a user or sufficiently authorized by each party, and the collection, use, and processing of relevant data is required to comply with relevant laws and regulations and standards of relevant countries and regions, and is provided with corresponding operation entries for the user to select authorization or denial.
In one or more embodiments of the present description, a large model refers to a deep learning model with large scale model parameters, typically including hundreds of millions, billions, trillions, and even more than one billion model parameters. The large Model can be called as a Foundation Model, a training Model is performed by using a large-scale unlabeled corpus, a pre-training Model with more than one hundred million parameters is produced, the Model can adapt to a wide downstream task, and the Model has better generalization capability, such as a large-scale language Model (Large Language Model, LLM), a multi-mode pre-training Model and the like.
When the large model is actually applied, the pretrained model can be applied to different tasks by only slightly adjusting a small number of samples, the large model can be widely applied to the fields of natural language processing (Natural Language Processing, NLP for short), computer vision and the like, and particularly can be applied to the tasks of the computer vision fields such as visual question and answer (Visual QuestionAnswering, VQA for short), image description (IC for short), image generation and the like, and the tasks of the natural language processing fields such as emotion classification based on texts, text abstract generation, machine translation and the like, and main application scenes of the large model comprise digital assistants, intelligent robots, searching, online education, office software, electronic commerce, intelligent design and the like.
First, terms related to one or more embodiments of the present specification will be explained.
Map reduction model (Map-Reduce model): a programming model architecture for parallel operation of large-scale data sets (greater than 1 TB). In the mapping stage, a plurality of groups of key value pairs are mapped into a group of new key value pairs through a mapping function, and then in the reduction stage, the basic parallel computing task is realized by appointing concurrent reduction functions.
Batch processing: multiple requests are put into a batch combination and sent to a processing end for processing at one time, so that the low-delay effect is achieved in an interactive system.
At present, a search engine process corresponding to each request is processed by adopting multithreading, and a task group to be processed is formed after the processing is finished, so that the task group to be processed enters a task processing stage. This approach generally tends to make individual task processing requests miss the construction of the same batch of task groups to be processed due to the lengthy search engine call time, and thus the latency is lengthy. Pulling the search engine off, invoking the search engine introduces more modules and introduces greater costs to the search results and task information.
In the present specification, a task processing method, a task processing device, a task processing system, a computing device, a computer-readable storage medium, and a computer program are provided, which are described in detail one by one in the following embodiments.
Referring to fig. 1, fig. 1 shows a flowchart of a task processing method according to an embodiment of the present disclosure, including the following specific steps:
Step 102: and receiving a plurality of task processing requests, wherein the task processing requests carry tasks to be processed.
The embodiment of the specification is applied to a service end of an application program, a webpage or an applet with a task processing function, and the service end can be directly deployed with a text processing model or can be deployed with a calling interface to call the text processing model. The data connection is established between the server and the request end, and the request end is a client or a terminal for requesting task processing, for example, the data connection is realized through a network request transmission mode such as a route, a gateway and the like, a message queue and the like, and a sidecar mode, a containerization mode and the like. Specifically, task information of a task to be processed is input to a request end, the request end generates a corresponding task processing request based on the input task information, and the task processing request is sent to a server end through data connection.
The task to be processed is a task that is not executed or processed, a particular type of task, including but not limited to: generating tasks, classifying tasks, reasoning tasks and the like, and corresponding multi-mode task processing results can be further subdivided into: text generation task, image generation task, voice generation task, text classification task, image classification task, entity identification task, clustering task, numerical value prediction task and the like, and the task to be processed is represented by the information carrier of task information. The task information is text information describing the task to be processed in natural language, for example, the task to be processed is a text translation task, and the task information of the task to be processed is: "please translate the following sentences into English: technological development is an important factor in productivity advancement. Because the deep learning model cannot directly process natural language, the task to be processed needs to be understood and executed through the text vector of the input task information (the text vector is subjected to feature transformation), and certain difference exists between the task to be processed and the actual task to be processed, namely, the task processing result with insufficient accuracy is obtained or the task processing result is obtained, so that different task information is corresponding to the same task to be processed. The task processing request is a network request of a task to be processed, which is generated and sent by a request end, and the task processing request contains task information of the task to be processed and has a specific network transmission protocol format.
Receiving a plurality of task processing requests, wherein the specific mode is as follows: and receiving a plurality of task processing requests sent by at least one request end.
Optionally, after receiving the plurality of task processing requests, the method further comprises the following specific steps: and recording the corresponding relation between the request end and the task processing request.
Illustratively, the user a logs in a web client having a task processing function, and inputs task information for reasoning task a at the front end of the web client: "please extract the arguments, arguments and arguments of the following articles and give a logical relationship explanation: … … ", the web client generates a corresponding task processing request based on the task information, and sends the task processing request a to the server through data connection, and similarly, the user B and the user C … … user Y log in the web client, and send 25 task processing requests in total, namely the task processing request B and the task processing request C … … task processing request Y, to the web server, and the web server receives the above 25 task processing requests, wherein the task processing requests a-Y correspondingly include tasks a-Y to be processed.
A plurality of task processing requests are received, wherein the task processing requests include tasks to be processed. And a foundation is laid for obtaining the task group to be processed by subsequent combination.
Step 104: and combining task information of each task to be processed to obtain at least one task group to be processed.
The task group to be processed is a task Batch (Batch) for executing the task to be processed at one time by the text processing model, and consists of at least two tasks to be processed. Since the text processing model cannot directly process natural language, feature extraction needs to be performed on task information of a plurality of tasks to be processed to obtain corresponding text vectors, and feature extraction may be performed before or after the task groups to be processed are obtained by combining, which is not limited herein. Accordingly, the task group to be processed may be represented by an information carrier of a text modality of task information, or may be represented by an information carrier of a feature encoding vector of a text vector of task information, which is not limited herein.
Combining task information of each task to be processed to obtain at least one task group to be processed, wherein the specific mode is as follows: and combining task information of each task to be processed by utilizing the task queue to be processed to obtain at least one task group to be processed. The task queue to be processed is a task queue for storing a plurality of tasks to be processed.
For example, using a task queue to be processed, in which the tasks to be processed sent by 25 request ends are stored, task information of 8 tasks to be processed (task a to be processed, task B … … to be processed, task H to be processed) is combined, to obtain a task group to be processed.
And combining task information of each task to be processed to obtain at least one task group to be processed. And avoiding that the target task to be processed which is required to be called and searched by the search engine does not enter the task group to be processed.
Step 106: and aiming at target tasks to be processed in each task to be processed, calling a search engine to obtain a search result, and updating task information of the target tasks to be processed in at least one task group to be processed based on the search result.
The target task to be processed is a task to be processed which needs to be subjected to search enhancement, and the target task to be processed needs to call a search engine to search, so that the corresponding search enhancement is realized, the task processing result is more accurate and effective, and the task processing request is accurately and effectively corresponding. The target task to be processed may be determined when the request end sends the task processing request, that is, the target task processing request is identified, for example, the user clicks a search enhancement control on the front end of an application program, a web page or an applet with a task processing function on the request end, sends the task processing request to the server end, and determines that the task processing request carries the target task to be processed. The target task to be processed may also be determined after the server receives the task processing request, for example, after the server receives the task processing request, the server performs search enhancement rule detection to determine whether the task to be processed carried by the task processing request needs to be subjected to search enhancement, if so, the task to be processed is marked as the target task to be processed, and the search detection rule may be a detection function component external to the text processing model or a plug-in unit built in the text processing model, for example, a large language model plug-in unit (LLM plug ins, large Language Model Plugins).
The search engine is an application of information search, a server side finishes calling the search engine through an application programming interface (API, application Programming Interface) of the search engine, the search engine performs feature coding on task information, searches from a pre-established index library according to feature coding vectors obtained by the feature coding, and determines corresponding network resource information. For example, the task information is "please describe the distinction between synchronous communication and asynchronous communication", and the corresponding network resource information is determined by searching from the pre-established index library according to the feature code vector of the task information: domain name of'www.ABC.com"capturing the relevant text information from the web page" synchronize communications (Synchronous Communication), the communications between the sender and receiver must be synchronized … … ". It should be noted that, the search engine is not only a text-mode search engine, but also can search for multiple-mode search results through task information of the text mode. The search engine is not stripped from the server, avoiding the complexity of the architecture.
The search results are related information of the target task to be processed returned by the search engine, and can be multi-modal information, such as text-modal search results, chart-modal search results, image-modal search results, video-modal search results, audio-modal search results and the like. For example, the task information is "please explain the distinction between synchronous communication and asynchronous communication", and the call search engine obtains the search result of the text modality "in synchronous communication (Synchronous Communication), the communication between the sender and the receiver must be performed in synchronization … …", the search result of the image modality of the execution flow chart of synchronous communication and asynchronous communication, the search result of the chart modality of the data table of the execution instance of synchronous communication and asynchronous communication.
The search engine is called to obtain search results, and the specific method is as follows: and calling a search engine to obtain a search result according to the task information of the target task to be processed. Further, according to the text vector of the task information of the target task to be processed, a search engine is called to obtain a search result. Further, according to the text vector of the task information of the target task to be processed, the search engine is called through an application programming interface of the search engine to obtain a search result. It should be noted that, the search is completed through the application programming interface of the search engine, which is implemented by allocating a corresponding thread to the target task to be processed.
Updating task information of a target task to be processed in at least one task group to be processed based on a search result, wherein the specific mode is as follows: based on the feature vector of the search result, updating the text vector of the task information of the target task to be processed in at least one task group to be processed. For example, vector fusion is performed on the feature vector of the search result and the text vector of the task information of the target task to be processed in the task group to be processed, so as to obtain the text vector of the task information of the target task to be processed in the updated task group to be processed. The vector fusion may be a stitching manner (direct stitching, voting mode, bayesian mode, etc.), or, for example, a prompt vector is determined based on a feature vector of a search result, and a text vector of task information of a target task to be processed in at least one task group to be processed is updated, which is not limited herein.
It should be noted that, the subsequent text processing model cannot directly process the natural language, and needs to process the feature vector, so that the target vector of at least one task group to be processed needs to be input into the text processing model. The task group to be processed includes task information of a plurality of tasks to be processed, and a target vector of the task group to be processed is formed by text vectors of the task information of the plurality of tasks to be processed. The target vector of the task group to be processed may be obtained by directly splicing the task information of each task to be processed after the text feature encoding is performed in step 104, or may be obtained by splicing the text vector of the task information of each task to be processed after the updating of the task information of the target task to be processed is completed in step 106, which is not limited herein.
The task group to be processed includes a task a to be processed, a task B … … to be processed, and task information of 8 tasks to be processed in total, where the task H to be processed is a target task to be processed, text Feature encoding is performed on the task information of the task H to be processed to obtain a corresponding text vector feature_h, according to the text vector feature_h, an application programming interface of a search engine is used to call the search engine to obtain a search result H, vector fusion is performed on the Feature vector feature_h of the search result H and the text vector feature_h of the task information of the task H to be processed in the task group to be processed to obtain a text vector feature_h' of the task information of the target task to be processed after updating, and text vectors of the task information of 8 tasks to be processed are spliced to obtain a target vector Feature target of the task group to be processed, where the text vector of the task information of the 8 tasks to be processed is a vector of 1×n, and the target vector Feature of the task group to be processed is spliced to obtain the target vector Feature of the task group to be processed, and the target vector Feature of the target vector of the task group to be processed is 10×n.
And aiming at target tasks to be processed in each task to be processed, calling a search engine to obtain a search result, and updating task information of the target tasks to be processed in at least one task group to be processed based on the search result. The method has the advantages that the plurality of tasks to be processed are combined to obtain the task groups to be processed, and then the search engine is called to obtain the search result to update the task information of the target tasks to be processed, so that the situation that the target tasks to be processed do not enter the current at least one task group to be processed is avoided, the fact that the subsequent at least one task group to be processed is synchronously processed by the text processing model is guaranteed, and a foundation is laid for completing task processing in time.
Step 108: and processing task information of each task to be processed in at least one task group to be processed by using a text processing model to obtain task processing results of each task to be processed, wherein the text processing model is a deep learning model trained according to sample task information of sample tasks.
The text processing model is a deep learning model with a task processing function, the text processing model is obtained by training sample task information of a sample task, the text processing model is used for understanding task content of a task to be processed through the task information and carrying out corresponding task processing to obtain a task processing result. In the data layer, the text processing model obtains a corresponding output vector by carrying out feature transformation on an input text vector, and obtains a corresponding task processing result through decoding. The text processing model can process different tasks and has generalization capability. The text processing model may be a large model, a large language model, or a model group obtained by combining deep learning models of a plurality of task processing functions. The text processing model can be deployed at a server side, the server side directly calls a text processing model instance (the text processing model and software and hardware resources corresponding to the text processing model) to process tasks, and the server side can also be deployed at an independent model side, and the server side calls the text processing model instance of the model side through a call interface to process tasks.
The task processing result is a task processing result obtained after the text processing model processes the task to be processed based on the task information. The type of the target task to be processed in the corresponding task group to be processed includes task processing results of at least one mode, including but not limited to: text mode, image mode, chart mode, and audio mode. For example, the task to be processed is an image generating task, the task processing result is a generated image, and for example, the task to be processed is a numerical value predicting task, and the task processing result is a predicted numerical value. The task processing result may be a real-time result or a non-real-time result, for example, the task to be processed may be a text generation task, the task processing result may be a word generated in real time or a text generated finally, for example, the task to be processed may be an inference task, and the task processing result may be a real-time inference intermediate result or a final inference result.
Processing task information of each task to be processed in at least one task group to be processed by using a text processing model to obtain text processing results corresponding to each target task to be processed, wherein the specific mode is as follows: and inputting the target vector of at least one task group to be processed into a text processing model, and processing the target vector by the text processing model to obtain a task processing result corresponding to each task to be processed. In the embodiment of the specification, text vectors of task information of a plurality of tasks to be processed are spliced in determinant, updated target vectors are spliced, the text processing model processes the input target vectors according to the determinant sequence of the target vectors, and task processing results of the tasks to be processed can be sequentially obtained, so that follow-up accurate feedback to corresponding request ends is ensured.
It should be noted that, the task processing flow of the server is implemented by using a mapping reduction model architecture, and before the at least one task group to be processed is obtained by combining, the method further includes detecting parameters of the task processing request, where the step of detecting parameters is implemented in a mapping stage of the mapping reduction model architecture, and the step 104 and the step 106 are implemented in a reduction stage of the mapping reduction model architecture.
It should be noted that, the server side is configured with a plurality of text processing model instances, for example, a plurality of nodes loaded with text processing models are configured, and for the task group to be processed, the text processing model instance with the idle task processing state is called to execute step 106, so that it is further avoided that the text processing model with the task processing state being the processing state still processes the previous task group to be processed, the current task group to be processed needs to wait until the previous task group to be processed is completed, and the plurality of request ends are in a state of waiting for a processing result for a long time.
The method includes the steps that the task processing states of 20 large language Model instances deployed on a server side are determined, a large language model_GPT with idle task processing states is determined, a target vector TargetFeature of a task group to be processed is input into the large language model_GPT, and processing is carried out through the large language model_GPT, so that task processing results corresponding to 8 tasks to be processed are obtained: task processing result a, task processing result B … … task processing result H.
And processing task information of each task to be processed in at least one task group to be processed by using a text processing model to obtain task processing results of each task to be processed, wherein the text processing model is a deep learning model trained according to sample task information of sample tasks. And processing task information of each task to be processed in at least one task group to be processed by using the text processing model, and obtaining corresponding task processing results in time, so that the delay of task processing is reduced, and the high concurrency of task processing is improved.
Step 110: and feeding back task processing results of the tasks to be processed to the corresponding request ends.
And feeding back a task processing result to the corresponding request end in the following specific modes: and feeding back a task processing result to the corresponding request end according to the corresponding relation between the plurality of pre-recorded request ends and the task processing request. Further, the method comprises the steps of. And feeding back a task processing result to the corresponding request end through data connection between the service end and the plurality of request ends. For example, data connection is realized by means of a device such as a router or gateway, a distribution method such as a message queue, and a mode such as a sidecar or a containerization.
After feeding back the text processing request to the corresponding request end, the request end renders the task processing result, and the user can send an evaluation of the task processing result based on the rendered task processing result, including but not limited to: the method comprises positive evaluation and negative evaluation, wherein the negative evaluation comprises a fact error, an unintelligible task processing request, a repeated text processing request, sensitive information of the text processing request, invalid task processing result and the like, and a server side collects the negative evaluation for subsequent fine adjustment (Finetune) of a text processing model.
The task processing result may be a real-time result or a non-real-time result, in which case the task processing result is a real-time result, the task processing result is synchronously fed back to the corresponding request end, in which case the task processing result is a non-real-time result, in which case the task processing result is fed back to the corresponding request end, in which case the processing end is determined, wherein the determination of the processing end may be determined by special characters in the task information, such as "thank" and "? By the way, the end of the processing can be confirmed by judging the preset length of the task processing result, for example, when the task processing result reaches 400 words.
Illustratively, the task processing result a is fed back to the web client logged in by the user a for rendering, the task processing result B is fed back to the web client logged in by the user B for rendering … …, and the task processing result H is fed back to the web client logged in by the user H for rendering.
In the embodiment of the specification, a plurality of task processing requests are received, wherein the task processing requests carry tasks to be processed; combining task information of each task to be processed to obtain at least one task group to be processed; aiming at target tasks to be processed in each task to be processed, a search engine is called to obtain a search result, and task information of the target tasks to be processed in at least one task group to be processed is updated based on the search result; processing task information of each task to be processed in at least one task group to be processed by using a text processing model to obtain task processing results of each task to be processed, wherein the text processing model is a deep learning model trained according to sample task information of sample tasks; and feeding back task processing results of the tasks to be processed to the corresponding request ends. The method has the advantages that the plurality of tasks to be processed are combined to obtain the task groups to be processed, then the search engine is called for searching, the situation that the target task to be processed, which is required to be searched by the search engine, does not enter the current task groups to be processed is avoided, further, the task groups to be processed cannot be processed by the text processing model together with task information of other tasks to be processed is avoided, at least one task group to be processed synchronously by the text processing model is guaranteed, a request end corresponding to the target task to be processed can timely obtain a task processing result and feed back the task processing result to the corresponding request end, delay of task processing is reduced, high concurrency of task processing is improved, and user experience of the request end is improved.
In an alternative embodiment of the present disclosure, the target task to be processed is at least one;
accordingly, before step 108, the method further comprises the following specific steps:
identifying whether search results for each target task to be processed are obtained, whether task information of each target task to be processed in the at least one task group to be processed is updated, and whether the search time reaches a preset duration;
accordingly, step 108 includes the following specific steps:
and under the condition that the search results for the target tasks to be processed are obtained and the task information of the target tasks to be processed in the at least one task group is updated, or under the condition that the search time reaches the preset duration, processing the task information of the tasks to be processed in the at least one task group by using a text processing model to obtain the task processing results of the tasks to be processed.
Under the condition that the target task to be processed is at least one, due to the limitations of the performance of a search engine, the searching complexity of the target task to be processed and the like, the searching result of each target task to be processed is difficult to ensure to be obtained synchronously, if the searching result of a certain target task to be processed is still waiting to be obtained at the moment, that is, the task information of each task to be processed is not completely updated, the task information of each task to be processed is processed by utilizing a text processing model, the processing of the target task to be processed cannot be completed according to the searching enhancement, the obtained task processing result is insufficient in accuracy and effectiveness, the task processing result with insufficient accuracy and effectiveness is fed back to a corresponding request end, and the user experience is reduced. Meanwhile, the task information can not be updated by waiting for obtaining the search result in an infinite way, and the problem of high delay is caused because a request end needing to call the search engine is in a state of waiting for the processing result for a long time. Therefore, before processing by using the text processing model, it is required to identify whether the search result of each target task to be processed is obtained, and update of task information is completed and whether the search time reaches a preset duration, so as to ensure that the tasks to be processed in the task group to be processed are synchronously processed (in the same task batch) by the text processing model.
Identifying whether search results for each target task to be processed have been obtained, including the following: 1. checking whether the search result queue stores the search results of each target task to be processed; 2. monitoring application programming interface requests of a search engine: monitoring the execution of the application programming interface request using a logging or monitoring tool; 3. acquiring a status field of a search result: when the application programming interface is used for calling the search engine, the state field of the search result is acquired so as to judge whether the search result is successful or not.
Identifying whether task information of each target task to be processed in the task group to be processed is updated or not comprises the following steps: 1. monitoring the task information updating progress of each target task to be processed in the task group to be processed: monitoring the update progress of the task information in a timing or real-time mode, and determining whether the task information is updated; 2. checking a log record of task information update: the log record of the task information updates is reviewed to determine whether the task information has been successfully updated.
The search time length is the time length of searching the target task to be processed by calling the search engine currently. The preset duration is a preset duration threshold value for searching the target task to be processed, and the target task to be processed is searched by distributing corresponding threads and calling the search engine through an application programming interface of the search engine, so the preset duration is realized by setting the duration of the corresponding threads.
The target task to be processed includes a task to be processed F and a task to be processed H, and the log recording and monitoring tool is used to identify whether search results for the task to be processed F and the task to be processed H are obtained, whether text vectors feature_f and feature_h of task information of the task to be processed F and the task to be processed H in the task group to be processed are updated, and whether search time reaches a preset duration, and when the search results are obtained and the task information is updated, the target vector TargetFeature of the task group to be processed is input into a large language model_gpt, and the task processing results corresponding to 8 tasks to be processed are obtained through the large language model_gpt: task processing result a, task processing result B … … task processing result H.
Identifying whether search results for all target tasks to be processed are obtained, whether task information of all target tasks to be processed in a task group to be processed is updated, and whether the search time reaches a preset duration; and under the condition that the search results for all target to-be-processed tasks are obtained and the task information of all target to-be-processed tasks in the to-be-processed task group is updated, or under the condition that the search time reaches the preset duration, processing the task information of all to-be-processed tasks in the to-be-processed task group by using a text processing model to obtain the task processing result of all to-be-processed tasks. The task information of each task to be processed is processed by using the text processing model, so that the accuracy and the effectiveness of the task processing result are ensured, and the user experience is improved.
In an optional embodiment of the present disclosure, after identifying whether the search result for each target task to be processed has been obtained and whether the task information of each target task to be processed in at least one task group to be processed has been updated, the method further includes the following specific steps:
if the search result of any target task to be processed in all target tasks to be processed is not obtained, the search engine is continuously called to obtain the search result aiming at any target task to be processed.
Referring to the above-mentioned embodiment of the specification, if the search result of any target task to be processed in the target task to be processed is still waiting to be obtained at this time, that is, the task information of each task to be processed is processed by using the text processing model without completing the processing of the target task to be processed according to the search enhancement, the accuracy and the effectiveness of the obtained task processing result are not enough, and the task processing result with insufficient accuracy and effectiveness is fed back to the corresponding request end, thereby reducing the user experience. Therefore, aiming at any target task to be processed, the search engine is continuously called to obtain a search result, the updating of the information of the follow-up task is completed, and the task to be processed in the task group to be processed is ensured to be processed by the text processing model in the same task batch.
If the search result of any target task to be processed in each target task to be processed is not obtained, the search engine is continuously called for obtaining the search result aiming at any target task to be processed, and the specific mode is as follows: if the search result of any target task to be processed in all target tasks to be processed is not obtained, the search engine is continuously called through an application programming interface of the search engine to obtain the search result aiming at any target task to be processed.
The target task to be processed includes a task to be processed F and a task to be processed H, and the log recording and monitoring tool is used to identify whether search results for the task to be processed F and the task to be processed H are obtained, and whether text vectors feature_f and feature_h of task information of the task to be processed F and the task to be processed H in the task group to be processed are updated, if the search results for the task to be processed F are not obtained, the search engine is continuously called through an application programming interface of the search engine to obtain the search results F for the task to be processed F.
If the search result of any target task to be processed in all target tasks to be processed is not obtained, the search engine is continuously called to obtain the search result aiming at any target task to be processed. The task information of each task to be processed is processed by using the text processing model, so that the accuracy and the effectiveness of the task processing result are ensured, and the user experience is improved.
In an optional embodiment of the present disclosure, after the search engine is invoked to obtain the search result for the target task to be processed in step 106, the method further includes the following specific steps:
counting search time;
and stopping executing the step of calling the search engine to obtain the search result under the condition that the search time reaches the preset duration.
Due to various reasons such as accuracy of task information and performance of a search engine, a situation that a large amount of search time is required for searching a target task to be processed can occur, and at the moment, other tasks to be processed in the same task group still wait for search results of the target task to be processed, so that task processing of a text processing model of the same batch is realized, delay of task processing is increased, task processing results cannot be obtained in time and fed back to a corresponding request end, and therefore, search time is required to be limited and search cannot be performed without limitation.
The searching time is counted by the following specific modes: and counting the running time of the search thread which is pre-allocated to the target task to be processed.
Under the condition that the search time reaches the preset duration, stopping executing the step of calling the search engine to obtain the search result, wherein the specific mode is as follows: and stopping executing the step of calling the search engine to obtain the search result under the condition that the running time of the search thread reaches the preset thread time.
The target task to be processed is a task F to be processed, running time ThreadTime of a search thread pre-allocated to the task F to be processed is counted, and when the running time ThreadTime of the search thread reaches a preset thread time threadlimited time, the step of calling the search engine to obtain the search result is stopped.
Counting search time; and stopping executing the step of calling the search engine to obtain the search result under the condition that the search time reaches the preset duration. The method and the device avoid that other tasks to be processed in the same task group to be processed are waiting for the search result of the target task to be processed, reduce the delay of task processing, improve the high concurrency of task processing and improve the user experience of a request end.
In an alternative embodiment of the present disclosure, before step 104, the following specific steps are further included:
and screening the plurality of tasks to be processed according to the parameters of the task processing requests to obtain the tasks to be processed meeting the preset parameter detection conditions.
The preset parameter detection conditions are detection conditions preset based on the feasibility of parameters called by the text processing model, and include but are not limited to: the method comprises the steps of presetting a data quantity detection condition, presetting a hardware resource quantity detection condition and presetting a software resource quantity detection condition. For example, the memory bandwidth of the task to be processed is 500MB, and the preset memory detection conditions are: and if the memory bandwidth of each task to be processed is less than or equal to 300MB, the preset parameter detection condition, namely the preset hardware resource quantity detection condition, is not met.
Illustratively, the 8 tasks to be processed are filtered according to the data amount of the tasks to be processed of the 8 tasks to be processed, the hardware resource amount of the tasks to be processed and the software resource amount of the tasks to be processed, so as to obtain 6 tasks to be processed (task A to be processed, task C … … to be processed) meeting the preset data amount detection condition, the preset hardware resource amount detection condition and the preset software resource amount detection condition.
And screening the plurality of tasks to be processed according to the parameters of the task processing requests to obtain the tasks to be processed meeting the preset parameter detection conditions. The method and the device avoid influencing the processing of the subsequent task groups to be processed under the condition that the parameters of the tasks to be processed do not meet the preset parameter detection conditions, avoid a plurality of request ends to be in a long-time waiting state, reduce the delay of task processing, improve the high concurrency of task processing and improve the user experience.
In an optional embodiment of the present disclosure, after screening the plurality of tasks to be processed according to parameters of the plurality of tasks to be processed, the method further includes the following specific steps:
aiming at the task to be processed, analyzing parameters of the task to be processed by using a text processing model to obtain a parameter analysis result, wherein the task to be processed is a task to be processed which does not meet preset parameter detection conditions;
And feeding back the parameter analysis result to the corresponding request end.
Considering user experience of a request end, parameters of a screened task to be processed are required to be analyzed under the condition that parameter detection fails, a parameter analysis result is obtained and fed back to the request end, clients of the request end are assisted in carrying out subsequent processing, task processing efficiency of a plurality of tasks to be processed is not affected, synchronization is achieved, task processing progress is timely determined by the request end corresponding to the screened task to be processed, which fails in parameter detection, and subsequent processing is carried out in combination with the parameter analysis result, so that user experience is improved.
And screening the task to be processed as the task to be processed which does not meet the detection condition of the preset parameters. For example, the preset parameter detection condition is a preset memory detection condition: the memory bandwidth of each task to be processed is less than or equal to 300MB, the memory bandwidth of the task to be processed is 500MB, and the task to be processed is a screening task to be processed.
The parameter analysis results are analysis results of performing parameter feasibility analysis on parameters of the task to be processed, including but not limited to: the data volume of the task to be processed exceeds a threshold, the hardware resource volume of the task to be processed exceeds a threshold, the software resource volume of the task to be processed exceeds a threshold, the parameter type is wrong, and the parameter is out of range. For example, the video memory bandwidth in the parameters of the task to be processed is 32GB, and the parameter analysis result is: the upper limit of the current video memory space is 24GB, and the video memory space is required to be modified.
It should be noted that, the text processing model in the embodiment of the present disclosure is a deep learning model having a task processing function and a parameter feasibility analysis function for parameters of a task to be processed. The text processing model performs parameter feasibility analysis function on parameters of the task to be processed, and the function is obtained by performing supervision training in advance.
Optionally, after feeding back the parameter analysis result to the corresponding request end, the method further comprises the following specific steps:
and receiving an update task processing request, wherein the update task processing request comprises an update task to be processed. The step 102 may be executed with the update task processing request as a re-received normal task processing request, or the step 104 may be executed with priority by processing and weighting the update task processing request, which is not limited herein.
Illustratively, according to the data amount of the to-be-processed task of the 8 to-be-processed tasks, the hardware resource amount of the to-be-processed task and the software resource amount of the to-be-processed task, the 8 to-be-processed tasks are filtered to obtain 6 to-be-processed tasks (to-be-processed task A, to-be-processed task C … … to-be-processed task H) meeting the preset data amount detection condition, the preset hardware resource amount detection condition and the preset software resource amount detection condition, and to obtain a filtered to-be-processed task which does not meet the preset hardware parameter detection condition: and analyzing parameters of the task B to be processed and the task E to be processed by using a text processing model to obtain a parameter analysis result: the task B to be processed fails to process, the upper limit of the current video memory space is 24G, the video memory space is required to be modified, and the task E to be processed: the processing failure is that the task information of the task is 1200 words, please modify to be within 400 words, the parameter analysis result is fed back to the corresponding webpage clients of the user B and the user E for rendering, the task information of the update task B and the update task E which are input again by the user B and the user E on the webpage clients is received, the update task processing request is processed and weighted, and the step 104 is preferentially executed, wherein the update task B and the update task E are added into the latest task group to be processed.
Aiming at the task to be processed, analyzing parameters of the task to be processed by using a text processing model to obtain a parameter analysis result, wherein the task to be processed is a task to be processed which does not meet preset parameter detection conditions; and feeding back the parameter analysis result to the corresponding request end. The method and the device avoid influencing the processing progress of the whole task group to be processed, reduce the total delay, analyze the parameters of the task to be processed under the condition of failure of parameter detection, obtain the parameter analysis result and feed back the parameter analysis result to the request terminal, assist the client of the request terminal to carry out subsequent processing, and improve the user experience of the request terminal.
In an alternative embodiment of the present disclosure, before step 108, the following specific steps are further included:
acquiring task processing states of a plurality of initial text processing models;
and determining the initial text processing model with the task processing state being the idle state as the text processing model according to the task processing states of the plurality of initial text processing models.
The initial text processing models are deep learning models with task processing functions to be selected, any initial text processing model is a text processing model instance (a text processing model and software and hardware resources corresponding to the text processing model), and an idle initial text processing model is determined to process a task group to be processed according to the task processing state of each initial text processing model. Typically, the plurality of initial text processing models are deep learning models of the same parameters. The multiple initial text processing models can be deployed at a server side, the server side directly calls a text processing model instance (the text processing model and software and hardware resources corresponding to the text processing model) to process tasks, and the multiple initial text processing models can also be deployed at an independent model side, and the server side calls the text processing model instance of the model side to process tasks by calling an interface.
The task processing state is the current processing state of the initial text processing model including, but not limited to: process neutral and idle state.
The task processing states of a plurality of initial text processing models are acquired by the following specific modes: and acquiring task processing states of a plurality of initial text processing models through a model state monitoring tool. Wherein the model state monitoring tool is a tool that monitors the current process state of the deployed plurality of initial text process models, such as a sidecar.
The task processing states of the plurality of initial generation type large language models are obtained, and the initial generation type large language model with the task processing states being idle states is determined to be the generation type large language model according to the task processing states of the plurality of initial generation type large language models.
Acquiring task processing states of a plurality of initial text processing models; and determining the initial text processing model with the task processing state being the idle state as the text processing model according to the task processing states of the plurality of initial text processing models. The text processing model in the idle state is determined to process the subsequent tasks, so that the problem that the task group to be processed is distributed to the text processing model in the process and needs to wait for the completion of the process is avoided, the request end is in the waiting state for a long time, the total delay is reduced, and the user experience of the request end is improved.
In an alternative embodiment of the present specification, the method further comprises the specific steps of:
and returning to execute the step of acquiring the task processing states of the plurality of initial text processing models under the condition that the processing of the task information of any task to be processed in at least one task group to be processed fails by utilizing the text processing models.
In the process of processing task information of a task to be processed in at least one task group to be processed by a text processing model, the current task processing fails due to unreasonable configuration of a text processing model instance or software and hardware faults, and a request end is in a waiting state under the condition that a processing result is waiting for the processing result and the execution of the model processing fails, and has high delay, the text processing model needs to be determined again to execute the processing failure of the model, so that the processing of the task information of the task to be processed in the at least one task group to be processed is completed in time, the delay is reduced, and the user experience is improved.
When processing the task information of any task to be processed in at least one task group to be processed by using the text processing model fails, returning to execute the step of acquiring the task processing states of a plurality of initial text processing models, wherein the specific mode is as follows: and when the text processing model is utilized to process the task information of any task to be processed in at least one task group to be processed, ending the processing of the task group to be processed, and returning to the step of executing the task processing states of the plurality of initial text processing models. Optionally, in the case that processing of task information of any one task to be processed in at least one task group to be processed fails by using the text processing model, processing of the task group to be processed is ended, a processing failure message is fed back to a corresponding request end, and a step of acquiring task processing states of a plurality of initial text processing models is performed in a returning manner, where the step of acquiring the task processing states of the plurality of initial text processing models in the returning manner may be performed in a returning manner when a processing instruction is received, or may be performed in a returning manner directly, which is not limited herein.
It should be noted that, the reason for the failure of the current task processing may be a model problem of the currently determined text processing model, a problem of resources in the instance configuration, or a problem of data transmission. The text processing model can be removed from the plurality of initial text processing models, then the task processing states of the plurality of initial text processing models are obtained, and the initial text processing model with the task processing state being the idle state is determined to be the text processing model again according to the task processing states of the plurality of initial text processing models. The text processing model can be reserved, the task processing states of the plurality of initial text processing models can be directly obtained, and the initial text processing model with the task processing state being the idle state is determined to be the text processing model again according to the task processing states of the plurality of initial text processing models. The above two methods are determined according to the specific cause of the processing failure, and are not limited herein.
In an exemplary case where processing of task information of any task to be processed in the task group to be processed fails by using the generated large language model_gpt, processing of the task group to be processed is ended, task processing states of a plurality of initial generated large language models are acquired, and an initial generated large language Model whose task processing state is an idle state is determined to be the generated large language model_gpt again according to the task processing states of the plurality of initial generated large language models.
And returning to execute the step of acquiring the task processing states of the plurality of initial text processing models under the condition that the processing of the task information of any task to be processed in at least one task group to be processed fails by utilizing the text processing models. The text processing model is replaced in time to process the task, so that the situation that the request end is in a waiting state for a long time is avoided, the delay of task processing is reduced, and the user experience is improved.
In an alternative embodiment of the present specification, the following specific steps are further included after step 102:
storing a plurality of task processing requests into a task queue to be processed;
accordingly, step 104 comprises the following specific steps:
selecting at least two tasks to be processed from a plurality of tasks to be processed in a task queue to be processed;
and combining task information of at least two tasks to be processed to obtain at least one task group to be processed.
Generally, after receiving a plurality of task processing requests, the server needs to take tens of seconds to complete configuration, so that subsequent processing of each task processing request is ensured, and the received plurality of task processing requests are stored by introducing a first-in first-out queue, so that more reasonable and uniform grouping configuration is completed. For example, 1000 task processing requests are received, 1000 task processing requests are stored in a task queue to be processed, and then 10 task processing requests are processed into a task group to be processed according to a first-in first-out mode, so that more reasonable and uniform grouping configuration is completed.
The task queue to be processed is a task queue for controlling the call of the shared resource, and the processing of the task to be processed is coordinated among a plurality of threads. For example, a corresponding thread is allocated to each task to be processed to perform parameter detection and feature extraction, if the upper limit of the thread is 10, 10 tasks to be processed are selected from the task queue to be processed, and resource call of shared parameter detection and feature extraction is coordinated and controlled.
Storing a plurality of task processing requests into a task queue to be processed, wherein the specific mode is as follows: and storing the plurality of task processing requests into a task queue to be processed in sequence.
At least two tasks to be processed are selected from a plurality of tasks to be processed in a task queue to be processed, and the specific mode is as follows: and selecting at least two tasks to be processed according to the storage sequence from a plurality of tasks to be processed in the task queue to be processed. The task queue to be processed may be a global queue, and corresponding threads may be allocated to at least two tasks to be processed, or the task queue to be processed may be a local queue, and the same thread may be allocated to at least two tasks to be processed.
The method comprises the steps of selecting at least two to-be-processed task combinations from a plurality of to-be-processed tasks in the to-be-processed task queue to obtain to-be-processed task groups, integrating actual task processing performance of a server, completing task division of different batches, completing synchronous processing of at least two to-be-processed tasks according to the batches, more fully utilizing model performance of a text processing model, and realizing more reasonable planning of task processing.
For example, task processing requests (task processing request a and task processing request B … …) sent by web clients logged in by 25 users are sequentially stored in a task queue to be processed, 8 tasks to be processed (task a to be processed and task B … … to be processed) are selected from 25 tasks to be processed in the task queue to be processed according to the storage sequence, and corresponding threads are allocated to the 8 tasks to be processed.
Storing a plurality of task processing requests into a task queue to be processed; selecting at least two tasks to be processed from a plurality of tasks to be processed in a task queue to be processed; and combining task information of at least two tasks to be processed, and at least one task group to be processed. And more reasonable resource management of the server is realized, and the stability and feasibility of task processing are ensured.
In an alternative embodiment of the present disclosure, after the search engine is invoked to obtain the search result in step 106, the following specific steps are further included:
the search results of the tasks to be processed of the targets are fed back to the corresponding request ends;
receiving search feedback information fed back by the first request end based on the corresponding search result;
and calling a search engine to obtain updated search results based on the search feedback information fed back by the first request end.
If the search result obtained by the search engine cannot be matched with the target task to be processed, the search result can be fed back to the request end, the optimization search is carried out according to the search feedback information fed back by the request end, the task information of the target task to be processed is prevented from being updated based on the current unadapted search result, the subsequent task processing is carried out, and the task processing result with insufficient accuracy is obtained.
The first request end is a request end for sending search feedback information.
The result feedback information is information fed back by the request end based on the corresponding search result, and is used for optimizing search. Including but not limited to: determining feedback information, negative feedback information, and modifying feedback information. For example, text that determines feedback information as "the result meets expectations" or a determination control (e.g., praise or praise) that the user selects at the front end point. As another example, the negative feedback information is text of "the search result is in fact wrong" or a negative control (e.g., go on or off or bad) that the user selects at the front. Also for example, the feedback information is modified as "please: please describe the modification task information of the distinction of simplex communication, full duplex communication and half duplex communication. The modification feedback information may be addition, replacement or deletion of task information, which is not limited herein.
The updated search result is the relevant information of the target task to be processed, which is returned by the search engine based on the search feedback information, and can be multi-modal information.
Based on search feedback information fed back by the first request end, a search engine is called to obtain updated search results, and the method comprises the following steps: 1. updating task information of a target task to be processed based on the search feedback information, and calling a search engine to obtain an updated search result according to the updated task information; 2. according to the search feedback information and the task information of the target task to be processed, a search engine is called to obtain updated search results, which is not limited herein. The method comprises the following specific steps of: and calling the search engine to obtain updated search results through an application programming interface of the search engine.
The method includes the steps that a search result E of a task E to be processed is fed back to a webpage client logged in by a user E, a search result H of a task H to be processed is fed back to the webpage client logged in by the user H, search feedback information H fed back by the webpage client logged in by the user H based on the search result H is received, the search feedback information H is modification feedback information, task information of the task H to be processed is modified based on the modification feedback information, and according to the updated task information, the search engine is called through an application programming interface of the search engine to obtain an updated search result H.
The search results of the tasks to be processed of the targets are fed back to the corresponding request ends; receiving search feedback information fed back by the first request end based on the corresponding search result; and calling a search engine to obtain updated search results based on the search feedback information fed back by the first request end. Through the interactive feedback of the search results with the request end, the optimal search of the target task to be processed is completed, the accuracy of the search results is improved, the accuracy of the updated task information is improved, and the accuracy of task processing is improved.
In an alternative embodiment of the present disclosure, following step 110, the following specific steps are further included:
receiving processing feedback information sent by a second request end;
based on the processing feedback information, invoking a search engine to execute an optimized search task aiming at the task to be processed, and obtaining a target search result;
based on the target search result, updating by using a text processing model to obtain an updating task processing result;
and feeding back the update task processing result to the second request end.
When the task to be processed is not a target task to be processed which needs to call a search engine to perform search enhancement, or task information of the target task to be processed is not updated due to search timeout, a task processing result obtained by performing task processing by using a text processing model may have a problem of insufficient accuracy, and according to the problem, processing feedback information fed back by a request end can be received after the task processing result is fed back to the corresponding request end, and update task processing performed by optimizing search enhancement is performed to obtain an update task processing result with higher accuracy. The task to be processed which is not enhanced by searching is converted into the target task to be processed which needs to be enhanced by searching through optimizing searching, and the task information of the target task to be processed can be updated for optimizing searching, which is not limited herein.
The second request end is a request end for sending the processing feedback information.
The processing feedback information is information fed back by the request end based on the corresponding task processing result, and is used for optimizing task processing, specifically, the task to be processed is converted into the task to be processed with optimized search enhancement, and optionally, the task information is updated after the task to be processed. For example, the processing feedback information is processing feedback information generated after the user clicks the search enhancement control on the front end of the request end, for example, the processing feedback information is processing feedback information generated after the user clicks the search enhancement control on the front end of the request end and inputs update task information, for example, the processing feedback information is processing feedback information generated when the user inputs update task information on the front end of the request end.
The target search result is the relevant information of the optimized search task returned by the search engine based on the processing feedback information, and can be multi-modal information. In the case that the optimized search task is an updated search task, the target search result is an updated search result, and in the case that the optimized search task is not an updated search task (i.e., the previous task to be processed is not the target task to be processed, this time, the newly added search is enhanced).
And updating the task processing result to obtain a task processing result after the text processing model processes the task to be processed based on the processing feedback information. The type of the target task to be processed in the corresponding task group to be processed includes task processing results of at least one mode, including but not limited to: text mode, image mode, chart mode, and audio mode. For example, the task to be processed is an image generating task, the task processing result is a generated image, and for example, the target task to be processed is a numerical value predicting task, and the task processing result is a predicted numerical value. The task processing result may be a real-time result or a non-real-time result, for example, the task to be processed may be a text generation task, the task processing result may be a word generated in real time or a text generated finally, for example, the task to be processed may be an inference task, and the task processing result may be a real-time inference intermediate result or a final inference result.
Based on the processing feedback information, invoking a search engine to execute an optimized search task aiming at a task to be processed to obtain a target search result, wherein the method comprises the following steps of: 1. updating task information of a task to be processed based on the processing feedback information, and calling a search engine to obtain a target search result according to the updated task information; 2. according to the processing feedback information, a search engine is called to obtain a target search result; 3. and determining to call the search engine according to the processing feedback information, and calling the search engine to obtain target search results according to the task processing information, wherein the method is not limited. Invoking a search engine to execute an optimized search task aiming at a task to be processed to obtain a target search result, wherein the specific mode is as follows: and calling the search engine to execute an optimized search task aiming at the task to be processed through an application programming interface of the search engine to obtain a target search result.
The method includes the steps of feeding back a task processing result A to a webpage client logged in by a user A for rendering, feeding back a task processing result B to the webpage client logged in by the user B for rendering … …, feeding back a task processing result H to the webpage client logged in by the user H for rendering, receiving processing feedback information fed back by the webpage client logged in by the user C, calling a search engine to execute an optimized search task for a task H to be processed through an application programming interface of the search engine based on the processing feedback information, obtaining a target search result H, processing update task information of the task H to be processed by a text processing model based on the target search result H, obtaining an update task processing result H of the task H to be processed, and feeding back the update task processing result H to the webpage client logged in by the user C for rendering.
Receiving processing feedback information sent by a second request end; based on the processing feedback information, a search engine is called to execute an optimized search task aiming at the task to be processed, and a target search result is obtained; based on the target search result, updating by using the text processing model to obtain an updating task processing result; and feeding back the update task processing result to the second request end. By the interactive feedback of the task processing results with the request end, the optimal search and task updating processing aiming at the target task to be processed are completed, the accuracy of the search results is improved, and the accuracy of task processing is improved.
In an alternative embodiment of the present disclosure, based on the target search result, update processing is performed using a text processing model to obtain an update task processing result, including the following specific steps:
updating task information of the tasks to be processed in at least one task group to be processed based on the target search result;
and processing the task information by using the text processing model to obtain an updated task processing result of the task to be processed.
The embodiments of the present disclosure are consistent with the specific manners of step 106 and step 108, and refer to the descriptions of step 106 and step 108, which are not repeated herein.
The task information of the task to be processed H is updated based on the target search result H, the updated task information of the task to be processed H is processed by using the text processing model, an updated task processing result H of the task to be processed H is obtained, and the updated task processing result H is fed back to the webpage client logged in by the user C for rendering.
Updating task information of a target task to be processed in at least one task group to be processed based on the target search result; and processing the task information by using the text processing model to obtain an updated task processing result of the task to be processed. And updating task information of the tasks to be processed in at least one task group to be processed is completed by using a more accurate target search result, so that the accuracy of the task information and the accuracy of task processing are improved.
In an alternative embodiment of the present disclosure, before step 108, the following specific steps are further included:
obtaining a sample set, wherein the sample set comprises a plurality of sample tasks, and any sample task comprises sample task information and corresponding sample task processing results;
extracting a first sample task from a plurality of sample tasks of a sample set, wherein the first sample task is any one of the plurality of sample tasks, and the first sample task comprises first sample task information and a corresponding first sample task processing result;
processing the first sample task information by using a text processing model to obtain a predicted task processing result corresponding to the first sample task;
determining a loss value based on the predicted task processing result and the first sample task processing result;
and adjusting parameters of the text processing model according to the loss value, returning to the step of executing the first sample task extracted from the plurality of sample tasks in the sample set, and obtaining the trained text processing model under the condition that the preset training ending condition is reached.
The sample set is a collection of a plurality of sample tasks which are built in advance and used for training a text processing model, the sample set comprises a plurality of sample tasks, and any sample task comprises sample task information and corresponding sample task processing results. The sample tasks are tasks to be executed by the sample, and the sample tasks are tasks of different types. The sample task information is text information for carrying out natural language description on the sample task, the sample task processing result is a task execution result of the sample task, the sample task information and the sample task processing result form sample groups of training data and tag data, one sample task can comprise a plurality of sample groups, and corresponding prompt texts can be added on the sample task to carry out prompt model training. Sample task information can be obtained from a sample database, can be generated by using a text processing model, and can be artificially constructed. The sample task processing result can be obtained from a sample database, can be obtained by inputting sample description information into other text processing models after training, and can be obtained by artificial construction.
Optionally, sample task information of the sample task is pre-processed, including, but not limited to: desensitization processing, screening processing, and sample enhancement processing, for example, generate similar text of sample task information as augmented sample task information.
The penalty value is a degree of difference between the predicted task processing result and the first sample task processing result, including, but not limited to: cosine loss value, cross entropy loss value, vector distance loss value.
The preset training ending condition is a preset judging condition for ending training of the text processing model, including but not limited to: preset iteration times, preset loss value threshold value and preset training convergence conditions.
Processing the first sample task information by using a text processing model to obtain a predicted task processing result corresponding to the first sample task, wherein the specific mode is as follows: and extracting features of the first sample task information to obtain text vectors of the first sample task information, inputting the text vectors of the first sample task information into a text processing model, and processing the text vectors of the first sample task information through the text processing model to obtain a predicted task processing result corresponding to the first sample task.
According to the loss value, parameters of a text processing model are adjusted in the following specific modes: and according to the loss value, adjusting parameters of the text processing model by using a gradient descent method.
The method comprises the steps of obtaining a pre-constructed sample set, wherein the sample set comprises 10000 sample tasks, each sample task comprises sample task information and corresponding sample task processing results, extracting a first sample task sample_i from 10000 sample tasks of the sample set, wherein the first sample task comprises any one of 10000 sample tasks, the first sample task comprises the first sample task information sampletxt_i and the corresponding first sample task processing results samplerst_i, extracting features of the first sample task information, obtaining text vectors FeatureAmplTxt_i of the first sample task information, inputting the text vectors of the first sample task information into a large language Model, processing the text vectors by the large language Model, obtaining a predicted task processing result PredimtRst_i corresponding to the first sample task, determining a cross entropy Loss value Loss based on the predicted task processing result and the first sample task processing result, adjusting parameters of the large sample task information by a gradient descent method, and obtaining the cross entropy Loss value of the sample from the sample set after the cross entropy Loss value of the sample is obtained under the condition of the sample set.
Obtaining a sample set, wherein the sample set comprises a plurality of sample tasks, and any sample task comprises sample task information and corresponding sample task processing results; extracting a first sample task from a plurality of sample tasks of a sample set, wherein the first sample task is any one of the plurality of sample tasks, and the first sample task comprises first sample task information and a corresponding first sample task processing result; processing the first sample task information by using a text processing model to obtain a predicted task processing result corresponding to the first sample task; determining a loss value based on the predicted task processing result and the first sample task processing result; and adjusting parameters of the text processing model according to the loss value, returning to the step of executing the first sample task extracted from the plurality of sample tasks in the sample set, and obtaining the trained text processing model under the condition that the preset training ending condition is reached. And through sample task information and corresponding sample text processing results, the supervised training of the text processing model is completed, a high-performance text processing model is obtained, and the accuracy of subsequent task processing is ensured.
Referring to fig. 2, fig. 2 shows a flowchart of a method for processing a question-answering task according to one embodiment of the present disclosure, including the following specific steps:
Step 202: and receiving a plurality of task processing requests, wherein the task processing requests carry question-answering tasks.
Step 204: and combining the question text of each question-answer task to obtain at least one question-answer task group.
Step 206: and aiming at the target question-answering task in each question-answering task, calling a search engine to obtain a search result, and updating the question text of the target question-answering task in at least one question-answering task group based on the search result.
Step 208: and processing the question text of each question-answer task in at least one question-answer task group by using a large language model to obtain a answer text of each question-answer task, wherein the large language model is a deep learning model trained according to sample question text of a sample question-answer task.
Step 210: and feeding back the reply text of each question and answer task to the corresponding request end.
The embodiment of the specification is applied to the service end of the application program, the webpage or the applet with the question-answering task processing function, and the service end can be directly deployed with a large language model or can be deployed with a calling interface to call the large language model.
The question-answering task is a text processing task completed in a question-answering mode, and the question-answering task is a task of a specific type which is completed through interaction with a large language model according to a question text and a answer text fed back by a server. Including but not limited to: generating tasks, classifying tasks, reasoning tasks and the like, and corresponding multi-mode task processing results can be further subdivided into: text generation tasks, text classification tasks, text entity identification tasks, clustering tasks, numerical prediction tasks and the like, and question and answer tasks are represented by an information carrier, namely a question text. The question text is a text describing a question-answering task in natural language, for example, the question-answering task is a text translation task, and the question text of the question-answering task is: "please translate the following sentences into English: technological development is an important factor in productivity advancement. Because the deep learning model cannot directly process natural language, a question-answering task needs to be understood and executed through the text vector of the input question text (the text vector is subjected to feature transformation), and a certain difference exists between the question-answering task and the actual question-answering task, namely a task processing result with insufficient accuracy is obtained or a task processing result is obtained, so that different question texts correspond to the same question-answering task. The task processing request is a network request of a question-answer task generated and sent by a request end, and the task processing request contains a question text of the question-answer task and has a specific network transmission protocol format.
The question-answer task group is a task Batch (Batch) for executing the question-answer tasks at one time by a large language model, and consists of at least two question-answer tasks. Since the large language model cannot directly process natural language, feature extraction needs to be performed on the question text of a plurality of question-answering tasks to obtain corresponding text vectors, and feature extraction can be performed before the question-answering task groups are obtained by combining or after the question-answering task groups are obtained by combining, which is not limited herein. Accordingly, the question-answering task group may be represented by an information carrier of a text modality, which is a question text, or by an information carrier of a feature code vector, which is a text vector of a question text, which is not limited herein.
The target question-answering task is a question-answering task which needs to be subjected to search enhancement, and the target question-answering task needs to call a search engine to search, so that the corresponding search enhancement is realized, the reply text is more accurate and effective, and the task processing request is accurately and effectively corresponding. The target question-answering task may be determined when the request end sends the task processing request, that is, the target task processing request is identified, for example, the user clicks the search enhancement control on the front end of an application program, a webpage or an applet with a question-answering task processing function on the request end, sends the task processing request to the server end, and determines that the task processing request carries the target question-answering task. The target question-answering task may also be determined after the server receives the task processing request, for example, after the server receives the task processing request, the server performs search enhancement rule detection to determine whether the question-answering task carried by the task processing request needs to be search enhanced, if so, the question-answering task is marked as the target question-answering task, and the search detection rule may be a detection function component external to the large language model or a plug-in unit built in the large language model, for example, a large language model plug-in unit (LLM plug ins, large Language Model Plugins).
The large language model is a text processing model with a model parameter scale reaching a certain degree, and in the embodiment of the specification, the large language model carries out question-answering task processing through the input question text to generate a corresponding answer text.
The reply text is a text carrier of a task processing result obtained after the task to be processed is processed by the large language model based on the task information. And the type of the target task to be processed in the corresponding task group to be processed comprises a task processing result of a text mode. For example, a question-and-answer task generates a task for a text, a answer text is the generated text, and for example, a question-and-answer task is a numerical value prediction task, and the answer text is a text of a predicted numerical value. The answer text can be a real-time result or a non-real-time result, for example, a question-answer task is a text generation task, the answer text can be a word generated in real time or a finally generated text, for example, a question-answer is an reasoning task, and the answer text can be a text of a real-time reasoning intermediate result or a text of a final reasoning result.
The embodiment of the present disclosure and the embodiment of fig. 1 are in the same inventive concept, and the specific manner of steps 202 to 210 refers to steps 102 to 110.
Illustratively, a user a logs in a web page client with a question-answer task processing function, and a question text of an inference task a is input at the front end of the web page client: "please extract the arguments, arguments and arguments of the following articles and give a logical relationship explanation: … … ", the web client generates a corresponding task processing request based on the question text, and sends the task processing request a to the server through data connection, and similarly, the user B and the user C … … user Y log in the web client, and send 25 task processing requests in total, namely the task processing request B and the task processing request C … … task processing request Y, to the web server, and the web server receives the above 25 task processing requests, wherein the task processing requests a-Y correspond to the question-answering tasks a-Y. And combining the question text of 8 question-answering tasks (question-answering task A and question-answering task B … … question-answering task H) by using a question-answering task queue storing 25 question-answering tasks to obtain a question-answering task group. The question-answering task group comprises question-answering task A and question-answering task B … … question-answering task H, and 8 question-answering task H is a question text of a target question-answering task, text Feature coding is carried out on the question text of the question-answering task H to obtain a corresponding text vector feature_H, a search engine is called through an application programming interface of the search engine according to the text vector feature_H to obtain a search result H, vector fusion is carried out on the Feature vector feature_H of the search result H and the text vector feature_H of the question text of the question-answering task H in the question-answering task group to obtain a text vector feature_H' of the question text of the updated target question-answering task, text vectors of the question text of the 8 question-answering tasks are spliced in a row-column mode to obtain a target vector feature_H of the question-answering task group, the text vectors of the question text of the 8 question-answering tasks are spliced to obtain a target vector Feature of the question-answering task group, and the target vector Feature of the question-answering task group is spliced to obtain a target vector Feature of the question-answering task group, and the target vector Feature of the target vector of the question-answering task group is spliced to be 10 multiplied by N. Determining task processing states of 20 large language Model instances deployed on a server, determining a large language model_GPT with the task processing states of idle states, inputting a target vector TargetFeature of a question-answer task group into the large language model_GPT, and processing the target vector TargetFeature by the large language model_GPT to obtain answer texts corresponding to 8 question-answer tasks: reply text a, reply text B … … reply text H. And feeding back the reply text A to the webpage client logged in by the user A for rendering, feeding back the reply text B to the webpage client logged in by the user B for rendering … …, and feeding back the reply text H to the webpage client logged in by the user H for rendering.
In the embodiment of the specification, a plurality of task processing requests are received, wherein the task processing requests carry question-answering tasks; combining the question text of each question-answer task to obtain at least one question-answer task group; aiming at target question-answering tasks in each question-answering task, calling a search engine to obtain search results, and updating the question text of the target question-answering task in at least one question-answering task group based on the search results; processing the question text of each question-answer task in at least one question-answer task group by using a large language model to obtain a answer text of each question-answer task, wherein the large language model is a deep learning model trained according to sample question text of a sample question-answer task; and feeding back the reply text of each question and answer task to the corresponding request end. The method has the advantages that the multiple question-answering tasks are combined to obtain the question-answering task group, then the search engine is called for searching, the problem that the target question-answering task which needs to be called for searching does not enter the current question-answering task group, and further the question text of other question-answering tasks cannot be processed by the text processing model, so that at least one question-answering task group is synchronously processed by the question-answering model, a request end corresponding to the target question task can be timely provided with a response text, delay of processing the question-answering task is reduced, high concurrency of processing the question-answering task is improved, and user experience of the request end is improved.
Fig. 3 illustrates a map-reduce model architecture diagram in a task processing method according to an embodiment of the present disclosure, as shown in fig. 3:
a gateway is arranged between the request end and the service end, the service end is configured with a corresponding model state monitoring tool, the monitoring of task processing states of a plurality of initial text processing models is executed, and a mapping reduction model framework is deployed on the service end.
The task processing request sent by the request end reaches the server end through the gateway, the global queue and the model state monitoring tool. The method comprises the steps that a server side synchronously receives N task processing requests, N threads are started in a mapping stage to respectively perform processes such as parameter detection, if errors occur, the processes are directly returned, abnormal task processing requests are prevented from entering a reduction stage, M (M is less than or equal to N) task processing requests enter the reduction stage and then are combined to obtain a task group to be processed, task information of each task to be processed in the task group to be processed is processed by using a text processing model, task processing results corresponding to each task to be processed are obtained, and the task processing results are fed back to a corresponding request side.
Fig. 4 shows a process flow chart of a task processing method according to an embodiment of the present disclosure, as shown in fig. 4:
Starting. And (3) entering a mapping stage, and detecting whether the task to be processed meets the preset parameter detection condition in the mapping stage. If not, performing parameter detection failure execution, and directly ending; if yes, entering a reduction stage. In the reduction stage, combining task information of each task to be processed to obtain at least one task group to be processed, calling a search engine to obtain a search result aiming at each target task to be processed, processing the task information of each task to be processed in the at least one task group to be processed by utilizing a text processing model, and executing the model processing failure if the processing fails; and if the processing is successful, obtaining task processing results of each task to be processed, and feeding back the task processing results to the corresponding request end.
The task processing method provided in the present specification will be further described with reference to fig. 5 by taking an application of the task processing method in an inference scenario as an example. Fig. 5 is a process flow chart of a task processing method applied to an inference scenario according to an embodiment of the present disclosure, where the process flow chart includes the following specific steps:
step 502: and receiving task processing requests sent by a plurality of request ends, wherein the task processing requests carry reasoning tasks.
Step 504: and storing task processing requests sent by a plurality of request ends into an inference task queue.
Step 506: at least one reasoning task is selected from a plurality of reasoning tasks in the reasoning task queue, the reasoning tasks are screened according to parameters of task processing requests, the reasoning tasks meeting preset parameter detection rules are obtained, and the reasoning tasks meeting the preset parameter detection rules are combined to obtain a reasoning task group.
Step 508: and aiming at the target reasoning task in each reasoning task, calling a search engine to obtain a search result, and updating task information of the target reasoning task in the reasoning task group based on the search result.
Step 510: and identifying whether search results for each target reasoning task are obtained or not, and whether task information of each target reasoning task in the reasoning task group is updated or not.
Step 512: if the search result of any target reasoning task in the target reasoning tasks is not obtained, the search engine is continuously called to obtain the search result aiming at any target reasoning task.
Step 514: and counting the search time, and stopping executing the step of calling the search engine to obtain the search result when the search time reaches the preset duration, wherein initial task information is used for the task.
Step 516: under the condition that the search results aiming at all the target reasoning tasks are obtained and the task information of all the target reasoning tasks in the reasoning task group is updated, the task information of all the reasoning tasks in the reasoning task group is processed by utilizing a large language model, so that the reasoning results of all the reasoning tasks are obtained.
Step 518: and feeding back the reasoning results of each reasoning task to the corresponding request end.
In the embodiment of the specification, the plurality of reasoning tasks are combined to obtain the reasoning task group, and then the search engine is called for searching, so that the situation that the target reasoning task which needs to be called for searching by the search engine does not enter the current reasoning task group and cannot be processed by a large language model together with task information of other reasoning tasks is avoided, the fact that the reasoning task group is processed synchronously by the reasoning model is ensured, a request end corresponding to the target reasoning task can timely obtain a reasoning result and feed back the reasoning result to the corresponding request end is avoided, delay of task reasoning is reduced, high concurrency of task reasoning is improved, and user experience of the request end is improved. And, the search engine is not stripped from the server, so that the complexity of the architecture is avoided.
Corresponding to the method embodiment, the present disclosure further provides an embodiment of a task processing device, and fig. 6 shows a schematic structural diagram of the task processing device provided in one embodiment of the present disclosure. As shown in fig. 6, the apparatus includes:
A first receiving module 602 configured to receive a plurality of task processing requests, where the task processing requests carry tasks to be processed;
a first combination module 604, configured to combine task information of each task to be processed to obtain at least one task group to be processed;
the first search module 606 is configured to call a search engine to obtain a search result for a target task to be processed in each task to be processed, and update task information of the target task to be processed in at least one task group to be processed based on the search result;
the first processing module 608 is configured to process task information of each task to be processed in at least one task group to be processed by using a text processing model, so as to obtain a task processing result of each task to be processed, wherein the text processing model is a deep learning model trained according to sample task information of a sample task;
the first feedback module 610 is configured to feed back a task processing result of each task to be processed to a corresponding request end.
Optionally, the target task to be processed is at least one;
correspondingly, the device further comprises:
the identification module is configured to identify whether the search results for each target task to be processed are obtained, whether the task information of each target task to be processed in at least one task group to be processed is updated, and whether the search time reaches a preset duration;
Accordingly, the first processing module 608 is further configured to:
under the condition that the search results for all target tasks to be processed are obtained and the task information of all target tasks to be processed in at least one task group to be processed is updated, or under the condition that the search time reaches a preset duration, processing the task information of all tasks to be processed in at least one task group to be processed by using a text processing model, and obtaining the task processing results of all tasks to be processed.
Optionally, the apparatus further comprises:
and the continuous searching module is configured to continuously call the search engine to obtain the search result aiming at any target task to be processed if the search result of any target task to be processed in each target task to be processed is not obtained.
Optionally, the apparatus further comprises:
the searching stopping module is configured to count searching time; and stopping executing the step of calling the search engine to obtain the search result under the condition that the search time reaches the preset duration.
Optionally, the apparatus further comprises:
and the screening module is configured to screen the plurality of tasks to be processed according to the parameters of the plurality of task processing requests to obtain the tasks to be processed which meet the preset parameter detection conditions.
Optionally, the apparatus further comprises:
the screening feedback module is configured to analyze parameters of the tasks to be processed by utilizing a text processing model aiming at the tasks to be processed, so as to obtain a parameter analysis result, wherein the tasks to be processed are tasks to be processed which do not meet preset parameter detection conditions; and feeding back the parameter analysis result to the corresponding request end.
Optionally, the apparatus further comprises:
the model selection module is configured to acquire task processing states of a plurality of initial text processing models;
and determining the initial text processing model with the task processing state being the idle state as the text processing model according to the task processing states of the plurality of initial text processing models.
Optionally, the apparatus further comprises:
and the third processing module is configured to return to executing the step of acquiring the task processing states of the plurality of initial text processing models in the case that processing of task information of any task to be processed in at least one task group to be processed fails by using the text processing models.
Optionally, the apparatus further comprises:
the queue storage module is configured to store a plurality of task processing requests to a task queue to be processed;
Accordingly, the first combining module 604 is further configured to:
selecting at least two tasks to be processed from a plurality of tasks to be processed in a task queue to be processed; and combining task information of at least two tasks to be processed to obtain at least one task group to be processed.
Optionally, the apparatus further comprises:
the processing feedback module is configured to receive processing feedback information sent by the second request end; based on the processing feedback information, invoking a search engine to execute an optimized search task aiming at the task to be processed, and obtaining a target search result; based on the target search result, updating by using a text processing model to obtain an updating task processing result; and feeding back the update task processing result to the second request end.
Optionally, the process feedback module is further configured to:
updating task information of the tasks to be processed in at least one task group to be processed based on the target search result; and processing the task information by using the text processing model to obtain an updated task processing result of the task to be processed.
In the embodiment of the specification, a plurality of task processing requests are received, wherein the task processing requests carry tasks to be processed; combining task information of each task to be processed to obtain at least one task group to be processed; aiming at target tasks to be processed in each task to be processed, a search engine is called to obtain a search result, and task information of the target tasks to be processed in at least one task group to be processed is updated based on the search result; processing task information of each task to be processed in at least one task group to be processed by using a text processing model to obtain task processing results of each task to be processed, wherein the text processing model is a deep learning model trained according to sample task information of sample tasks; and feeding back task processing results of the tasks to be processed to the corresponding request ends. The method has the advantages that the plurality of tasks to be processed are combined to obtain the task groups to be processed, then the search engine is called for searching, the situation that the target task to be processed, which is required to be searched by the search engine, does not enter the current task groups to be processed is avoided, further, the task groups to be processed cannot be processed by the text processing model together with task information of other tasks to be processed is avoided, at least one task group to be processed synchronously by the text processing model is guaranteed, a request end corresponding to the target task to be processed can timely obtain a task processing result and feed back the task processing result to the corresponding request end, delay of task processing is reduced, high concurrency of task processing is improved, and user experience of the request end is improved.
The above is a schematic solution of a task processing device of the present embodiment. It should be noted that, the technical solution of the task processing device and the technical solution of the task processing method belong to the same concept, and details of the technical solution of the task processing device, which are not described in detail, can be referred to the description of the technical solution of the task processing method.
Corresponding to the method embodiment, the present disclosure further provides an embodiment of a question-answering task processing device, and fig. 7 shows a schematic structural diagram of the question-answering task processing device provided in one embodiment of the present disclosure. As shown in fig. 7, the apparatus includes:
a second receiving module 702 configured to receive a plurality of task processing requests, wherein the task processing requests carry question-answering tasks;
a second combination module 704 configured to combine the question text of the questions and answers tasks to obtain at least one question and answer task group;
a second search module 706 configured to call a search engine to obtain a search result for a target question-answer task of the question-answer tasks, and update a question text of the target question-answer task of at least one question-answer task group based on the search result;
a second processing module 708, configured to process the question text of each question-answer task in at least one question-answer task group by using a large language model, to obtain a answer text of each question-answer task, where the large language model is a deep learning model trained according to sample question text of a sample question-answer task;
And the second feedback module 710 is configured to feed back the reply text of each question-answer task to the corresponding request end.
In the embodiment of the specification, a plurality of task processing requests are received, wherein the task processing requests carry question-answering tasks; combining the question text of each question-answer task to obtain at least one question-answer task group; aiming at target question-answering tasks in each question-answering task, calling a search engine to obtain search results, and updating the question text of the target question-answering task in at least one question-answering task group based on the search results; processing the question text of each question-answer task in at least one question-answer task group by using a large language model to obtain a answer text of each question-answer task, wherein the large language model is a deep learning model trained according to sample question text of a sample question-answer task; and feeding back the reply text of each question and answer task to the corresponding request end. The method has the advantages that the multiple question-answering tasks are combined to obtain the question-answering task group, then the search engine is called for searching, the problem that the target question-answering task which needs to be called for searching does not enter the current question-answering task group, and further the question text of other question-answering tasks cannot be processed by the text processing model, so that at least one question-answering task group is synchronously processed by the question-answering model, a request end corresponding to the target question task can be timely provided with a response text, delay of processing the question-answering task is reduced, high concurrency of processing the question-answering task is improved, and user experience of the request end is improved.
The above is a schematic scheme of a question-answering task processing device of the present embodiment. It should be noted that, the technical solution of the question-answering task processing device and the technical solution of the question-answering task processing method belong to the same concept, and details of the technical solution of the question-answering task processing device which are not described in detail can be referred to the description of the technical solution of the question-answering task processing method.
Corresponding to the above method embodiments, the present disclosure further provides a task processing system embodiment, and fig. 8 shows a schematic structural diagram of a task processing system provided in one embodiment of the present disclosure. As shown in fig. 8, the system includes a request end 802 and a service end 804;
a request end 802, configured to send a task processing request to a server end, where the task processing request carries a task to be processed;
the server 804 is configured to receive a plurality of task processing requests, combine task information of each task to be processed to obtain at least one task group to be processed, call a search engine to obtain a search result for a target task to be processed in each task to be processed, update task information of the target task to be processed in the at least one task group to be processed based on the search result, and process task information of each task to be processed in the at least one task group to be processed by using a text processing model to obtain task processing results of each task to be processed, where the text processing model is a deep learning model trained according to sample task information of a sample task, and feed back the task processing results of each task to be processed to the corresponding request 802.
The request end 802 is further configured to receive a corresponding task processing result fed back by the server end 804.
In the embodiment of the specification, the task processing system comprises a request end and a service end; the request end is used for sending a task processing request to the server end, wherein the task processing request carries a task to be processed; the server is used for receiving a plurality of task processing requests, combining task information of each task to be processed to obtain at least one task group to be processed, calling a search engine to obtain a search result aiming at a target task to be processed in each task to be processed, updating task information of the target task to be processed in the at least one task group to be processed based on the search result, and processing the task information of each task to be processed in the at least one task group to be processed by utilizing a text processing model to obtain task processing results of each task to be processed, wherein the text processing model is a deep learning model trained according to sample task information of a sample task, and feeding the task processing results of each task to be processed back to a corresponding request end. The request end is also used for receiving the corresponding task processing result fed back by the server end. The method has the advantages that the task groups to be processed are obtained by combining the tasks to be processed sent by the request ends, then the search engine is called for searching, the situation that the target task to be processed, which is required to be searched by the search engine, does not enter the current task groups to be processed is avoided, and further cannot be processed by the text processing model together with task information of other tasks to be processed is avoided, the fact that at least one task group to be processed is processed synchronously by the text processing model is guaranteed, the request ends corresponding to the target tasks to be processed can timely obtain task processing results and feed back the task processing results to the corresponding request ends is avoided, delay of task processing is reduced, high concurrency of task processing is improved, and user experience of the request ends is improved.
The above is a schematic solution of a task processing system of the present embodiment. It should be noted that, the technical solution of the task processing system and the technical solution of the task processing method belong to the same concept, and details of the technical solution of the task processing system, which are not described in detail, can be referred to the description of the technical solution of the task processing method.
FIG. 9 illustrates a block diagram of a computing device provided by one embodiment of the present description. The components of computing device 900 include, but are not limited to, memory 910 and processor 920. Processor 920 is coupled to memory 910 via bus 930 with database 950 configured to hold data.
Computing device 900 also includes an access device 940, access device 940 enabling computing device 900 to communicate via one or more networks 960. Examples of such networks include public switched telephone networks (PSTN, public Switched Telephone Network), local area networks (LAN, local Area Network), wide area networks (WAN, wide Area Network), personal area networks (PAN, personal Area Network), or combinations of communication networks such as the internet. Access device 940 may include one or more of any type of network interface, wired or wireless, such as a network interface card (NIC, network interface controller), such as an IEEE802.11 wireless local area network (WLAN, wireless Local Area Network) wireless interface, a worldwide interoperability for microwave access (Wi-MAX, worldwide Interoperability for Microwave Access) interface, an ethernet interface, a universal serial bus (USB, universal Serial Bus) interface, a cellular network interface, a bluetooth interface, near field communication (NFC, near Field Communication).
In one embodiment of the present description, the above-described components of computing device 900 and other components not shown in FIG. 9 may also be connected to each other, for example, by a bus. It should be understood that the block diagram of the computing device illustrated in FIG. 9 is for exemplary purposes only and is not intended to limit the scope of the present description. Those skilled in the art may add or replace other components as desired.
Computing device 900 may be any type of stationary or mobile computing device including a mobile computer or mobile computing device (e.g., tablet, personal digital assistant, laptop, notebook, netbook, etc.), mobile phone (e.g., smart phone), wearable computing device (e.g., smart watch, smart glasses, etc.), or other type of mobile device, or a stationary computing device such as a desktop computer or personal computer (PC, personal Computer). Computing device 900 may also be a mobile or stationary server.
The processor 920 is configured to execute computer-executable instructions that, when executed by the processor, implement the steps of the task processing method or the question-answering task processing method described above.
The foregoing is a schematic illustration of a computing device of this embodiment. It should be noted that, the technical solution of the computing device belongs to the same concept as the technical solution of the task processing method and the question-answering task processing method, and details of the technical solution of the computing device, which are not described in detail, can be referred to the description of the technical solution of the task processing method or the question-answering task processing method.
An embodiment of the present disclosure also provides a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the steps of the task processing method or the question-answering task processing method described above.
The above is an exemplary version of a computer-readable storage medium of the present embodiment. It should be noted that, the technical solution of the storage medium and the technical solutions of the task processing method and the question-answering task processing method belong to the same concept, and details of the technical solution of the storage medium which are not described in detail can be referred to the description of the technical solutions of the task processing method or the question-answering task processing method.
An embodiment of the present specification also provides a computer program, wherein the computer program, when executed in a computer, causes the computer to execute the steps of the task processing method or the question-answering task processing method described above.
The above is an exemplary version of a computer program of the present embodiment. It should be noted that, the technical solution of the computer program and the technical solutions of the task processing method and the question-answering task processing method belong to the same concept, and details of the technical solution of the computer program, which are not described in detail, can be referred to the description of the technical solutions of the task processing method or the question-answering task processing method.
The foregoing describes specific embodiments of the present disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims can be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
The computer instructions include computer program code that may be in source code form, object code form, executable file or some intermediate form, etc. The computer readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), an electrical carrier signal, a telecommunications signal, a software distribution medium, and so forth. It should be noted that the content of the computer readable medium can be increased or decreased appropriately according to the requirements of the patent practice, for example, in some areas, according to the patent practice, the computer readable medium does not include an electric carrier signal and a telecommunication signal.
It should be noted that, for the sake of simplicity of description, the foregoing method embodiments are all expressed as a series of combinations of actions, but it should be understood by those skilled in the art that the present embodiment is not limited by the order of actions described, as some steps may be performed in other order or simultaneously according to the present embodiment. Further, those skilled in the art will appreciate that the embodiments described in the specification are all preferred embodiments, and that the acts and modules referred to are not necessarily all required for the embodiments described in the specification.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and for parts of one embodiment that are not described in detail, reference may be made to the related descriptions of other embodiments.
The preferred embodiments of the present specification disclosed above are merely used to help clarify the present specification. Alternative embodiments are not intended to be exhaustive or to limit the invention to the precise form disclosed. Obviously, many modifications and variations are possible in light of the teaching of the embodiments. The embodiments were chosen and described in order to best explain the principles of the embodiments and the practical application, to thereby enable others skilled in the art to best understand and utilize the invention. This specification is to be limited only by the claims and the full scope and equivalents thereof.

Claims (14)

1. A task processing method, comprising:
receiving a plurality of task processing requests, wherein the task processing requests carry tasks to be processed;
combining task information of each task to be processed to obtain at least one task group to be processed;
aiming at target to-be-processed tasks in each to-be-processed task, calling a search engine to obtain a search result, and updating task information of the target to-be-processed task in the at least one to-be-processed task group based on the search result;
processing task information of each task to be processed in the at least one task group to be processed by using a text processing model to obtain task processing results of each task to be processed, wherein the text processing model is a deep learning model trained according to sample task information of sample tasks;
and feeding back task processing results of the tasks to be processed to the corresponding request ends.
2. The method of claim 1, the target task to be processed being at least one;
before the processing the task information of each task to be processed in the at least one task group to be processed by using the text processing model to obtain the task processing result of each task to be processed, the method further comprises:
Identifying whether search results for each target task to be processed are obtained, whether task information of each target task to be processed in the at least one task group to be processed is updated, and whether the search time reaches a preset duration;
the processing task information of each task to be processed in the at least one task group to be processed by using the text processing model to obtain a task processing result of each task to be processed, including:
and under the condition that the search results for the target tasks to be processed are obtained and the task information of the target tasks to be processed in the at least one task group is updated, or under the condition that the search time reaches the preset duration, processing the task information of the tasks to be processed in the at least one task group by using a text processing model to obtain the task processing results of the tasks to be processed.
3. The method of claim 2, further comprising, after said identifying whether search results for each of said target pending tasks have been obtained and whether task information for each of said target pending tasks in said at least one set of pending tasks has been updated:
If the search result of any target task to be processed in the target tasks to be processed is not obtained, continuously calling a search engine to obtain the search result aiming at any target task to be processed.
4. A method according to any one of claims 1-3, further comprising, after said calling a search engine to obtain search results for a target one of said tasks to be processed:
counting search time;
and stopping executing the step of calling the search engine to obtain the search result under the condition that the search time reaches the preset duration.
5. The method according to claim 1, further comprising, before said combining task information of each of said tasks to be processed to obtain at least one task group to be processed:
and screening the tasks to be processed according to the parameters of the task processing requests to obtain the tasks to be processed meeting the preset parameter detection conditions.
6. The method of claim 5, further comprising, after said filtering the plurality of said tasks to be processed according to the parameters of the plurality of said tasks to be processed:
aiming at a screening task to be processed, analyzing parameters of the screening task to be processed by using the text processing model to obtain a parameter analysis result, wherein the screening task to be processed is a task to be processed which does not meet the preset parameter detection condition;
And feeding back the parameter analysis result to the corresponding request end.
7. The method according to claim 1, further comprising, before processing task information of each of the tasks to be processed in the at least one task group to be processed using the text processing model, obtaining a task processing result of each of the tasks to be processed:
acquiring task processing states of a plurality of initial text processing models;
and determining the initial text processing model with the task processing state of idle state as the text processing model according to the task processing states of the plurality of initial text processing models.
8. The method of claim 7, the method further comprising:
and returning to the step of acquiring the task processing states of the plurality of initial text processing models under the condition that processing of task information of any task to be processed in the at least one task group to be processed fails by utilizing the text processing models.
9. The method of claim 1, further comprising, after said receiving a plurality of task processing requests:
storing the plurality of task processing requests to a task queue to be processed;
combining task information of each task to be processed to obtain at least one task group to be processed, including:
Selecting at least two tasks to be processed from a plurality of tasks to be processed in the task queue to be processed;
and combining task information of the at least two tasks to be processed to obtain at least one task group to be processed.
10. The method according to claim 1, further comprising, after feeding back the task processing result of each task to be processed to the corresponding request end:
receiving processing feedback information sent by a second request end;
based on the processing feedback information, a search engine is called to execute an optimized search task aiming at the task to be processed, and a target search result is obtained;
based on the target search result, updating by using the text processing model to obtain an updating task processing result;
and feeding back the update task processing result to the second request end.
11. The method of claim 10, wherein the updating with the text processing model based on the target search result to obtain an updated task processing result comprises:
updating task information of the task to be processed in the at least one task group to be processed based on the target search result;
and processing the task information by using the text processing model to obtain an updated task processing result of the task to be processed.
12. A question-answering task processing method comprises the following steps:
receiving a plurality of task processing requests, wherein the task processing requests carry question-answering tasks;
combining the question text of each question-answering task to obtain at least one question-answering task group;
aiming at target question-answering tasks in the question-answering tasks, calling a search engine to obtain search results, and updating the question text of the target question-answering task in the at least one question-answering task group based on the search results;
processing the question text of each question-answer task in the at least one question-answer task group by using a large language model to obtain a answer text of each question-answer task, wherein the large language model is a deep learning model trained according to sample question text of a sample question-answer task;
and feeding back the reply text of each question-answer task to the corresponding request end.
13. A computing device, comprising:
a memory and a processor;
the memory is configured to store computer executable instructions, the processor being configured to execute the computer executable instructions, which when executed by the processor, implement the steps of the method of any one of claims 1 to 12.
14. A computer readable storage medium storing computer executable instructions which when executed by a processor implement the steps of the method of any one of claims 1 to 12.
CN202310975985.9A 2023-08-03 2023-08-03 Task processing method, question-answer task processing method and computing device Pending CN117312502A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310975985.9A CN117312502A (en) 2023-08-03 2023-08-03 Task processing method, question-answer task processing method and computing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310975985.9A CN117312502A (en) 2023-08-03 2023-08-03 Task processing method, question-answer task processing method and computing device

Publications (1)

Publication Number Publication Date
CN117312502A true CN117312502A (en) 2023-12-29

Family

ID=89248724

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310975985.9A Pending CN117312502A (en) 2023-08-03 2023-08-03 Task processing method, question-answer task processing method and computing device

Country Status (1)

Country Link
CN (1) CN117312502A (en)

Similar Documents

Publication Publication Date Title
EP3885966B1 (en) Method and device for generating natural language description information
CN117332072B (en) Dialogue processing, voice abstract extraction and target dialogue model training method
CN116756576B (en) Data processing method, model training method, electronic device and storage medium
CN116431316B (en) Task processing method, system, platform and automatic question-answering method
CN117313837A (en) Large model prompt learning method and device based on federal learning
CN117193964A (en) Task processing method and automatic question-answering method
WO2023142451A1 (en) Workflow generation methods and apparatuses, and electronic device
CN116415597A (en) Speech translation and simultaneous interpretation method
CN117312502A (en) Task processing method, question-answer task processing method and computing device
CN114969544A (en) Hot data-based recommended content generation method, device, equipment and medium
CN112632241A (en) Method, device, equipment and computer readable medium for intelligent conversation
CN112948251A (en) Automatic software testing method and device
CN117170837A (en) Task processing method, task processing system and reasoning method
CN116595154B (en) Task processing method and automatic question-answering method
CN116578423B (en) Task processing method, automatic question answering method and image generation method
CN116822632B (en) Reasoning method and device of text data, storage medium and electronic equipment
CN113656573B (en) Text information generation method, device and terminal equipment
CN117648079B (en) Task processing, code completion, code question answering and task processing model training method
CN117633540B (en) Sample data construction method and device
CN116610781A (en) Task model training method and device
CN116823358A (en) Task screening model generation method and device, electronic equipment and storage medium
CN117348986A (en) Task processing method, question-answering method and task processing platform
CN117724786A (en) Interactive data processing method and system
CN117312855A (en) Method, apparatus, electronic device and medium for selecting training data
CN117971420A (en) Task processing, traffic task processing and task processing model training method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination