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

By utilizing the collaborative processing between multiple blocks in the large language model and vertically integrating the processing results of different blocks, the problem of low inference efficiency of complex tasks in the existing MoE mode is solved, and the inference efficiency and solution of the large language model are improved Problem ability.

CN119129749APending Publication Date: 2024-12-13BEIJING ZHONGKE JINDEZHU INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411269872.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-11
Publication Date
2024-12-13

AI Technical Summary

Technical Problem

Existing large language models based on integrated Mixture-of-Experts (MoE) pattern are inefficient in inference on complex tasks.

Method used

By obtaining instructions for the target complex task, input them into the large language model, and using the coordinated processing between multiple blocks, we obtain the word element sequence output by the block according to the layer sequence and the word element output by the last layer, and vertically integrate different blocks Process the results to make the optimal decision.

Benefits of technology

Improve the inference efficiency and problem-solving ability of large language models on complex tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119129749A_ABST
    Figure CN119129749A_ABST
Patent Text Reader

Abstract

The invention provides a task processing method and device, equipment, a storage medium and a program product, and relates to the technical field of natural language processing. The method comprises the steps of obtaining a first instruction of a target first-class task, wherein the target first-class task comprises a plurality of target second-class tasks with a logical relationship; a first instruction of the target first-class task is input into the first large language model, a target block of the first large language model is obtained, the target block comprises a plurality of first blocks, different first blocks correspond to different target second-class tasks, and the first blocks comprise at least one layer of the first large language model; a target output result is obtained through cooperative processing of the multiple first blocks, and the target output result comprises a lexical element sequence output by the target block of the first large language model according to the layer sequence and lexical elements output by the last layer of the first large language model. According to the method, the reasoning efficiency and the problem solving capability of the large language model on complex tasks can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of natural language processing technology, and in particular to a task processing method, device, equipment, storage medium and program product. Background Art

[0002] At present, the update and iteration speed of large language models has gradually slowed down. The main reason is the scaling law. If we want to quickly expand the capabilities of large language models, we can use a model that integrates multiple experts, namely the Mixture-of-Experts (MoE) model, to mix multiple large models of comparable sizes. In the existing corpus, we can classify knowledge, train multiple large models with different capability dimensions, and integrate them through the MoE model. However, this will result in low reasoning efficiency for complex tasks. Summary of the invention

[0003] The purpose of the present invention is to provide a task processing method, device, equipment, storage medium and program product to solve the problem of low reasoning efficiency for complex tasks of the existing large language model based on the integrated MoE mode.

[0004] In order to achieve the above objectives, in a first aspect, an embodiment of the present invention provides a task processing method, comprising:

[0005] Acquire a first instruction of a target first-category task, wherein the target first-category task includes a plurality of target second-category tasks having a logical relationship, and the difficulty of solving the target first-category task is greater than the difficulty of solving the target second-category task;

[0006] Inputting a first instruction of the target first-category task into a first large language model to obtain a target block of the first large language model, wherein the target block includes a plurality of first blocks, different first blocks correspond to different target second-category tasks, and the first block includes at least one layer of the first large language model;

[0007] A target output result is obtained through collaborative processing among multiple first blocks, and the target output result includes: a word unit sequence output by the target block of the first large language model according to the layer sequence and a word unit output by the last layer of the first large language model.

[0008] In some embodiments, the method further comprises:

[0009] For each of the plurality of first-category tasks, obtaining a plurality of blocks of a preset large language model, wherein the plurality of blocks correspond to one first-category task, the first-category task includes a plurality of second-category tasks having a logical relationship, different blocks correspond to different second-category tasks, and the difficulty of solving the first-category task is greater than the difficulty of solving the second-category task;

[0010] Based on the multiple blocks corresponding to each first-category task, obtaining an instruction set for each first-category task, where the instructions in the instruction set for the first-category task include reasoning information for the first-category task;

[0011] Based on the instruction set of all first-category tasks, the preset large language model is trained to obtain the first large language model.

[0012] In some embodiments, for each of the first-category tasks, obtaining a plurality of blocks of a preset large language model includes:

[0013] For each of the plurality of first-category tasks, obtaining an instruction set of a plurality of second-category tasks in the first-category tasks;

[0014] For each instruction in the instruction set of each second-category task, input the instruction into the preset large language model, obtain the word unit token output by each layer in the preset large language model, and visualize and display it;

[0015] Based on the visually displayed token, obtaining a block related to the second type of task in the preset large language model;

[0016] The obtained multiple blocks corresponding to the multiple second-type tasks are determined as the multiple blocks corresponding to the first-type tasks in the preset large language model.

[0017] In some embodiments, the step of obtaining an instruction set of a plurality of second-category tasks in the first-category tasks includes:

[0018] For each of the second-category tasks in the first-category tasks, obtaining a pre-constructed first seed instruction, wherein the first seed instruction includes a first preset text related to the second-category task, a first preset instruction for the first preset text, and a format for outputting the first preset instruction;

[0019] The first seed instructions are learned to generate an instruction set for the second type of task.

[0020] In some embodiments, the acquiring the instruction set of each first-category task based on the multiple blocks corresponding to each first-category task includes:

[0021] For each of the first-category tasks of the plurality of first-category tasks, obtaining a pre-constructed second seed instruction, wherein the second seed instruction includes a second preset text related to the first-category task, a second preset instruction for the second preset text, an output format for the second preset instruction, and reasoning information of the first-category task, wherein the reasoning information of the first-category task is determined based on tokens output by the plurality of blocks corresponding to the first-category task according to a layer sequence;

[0022] The second seed instructions are learned to generate an instruction set for the first type of task.

[0023] In a second aspect, an embodiment of the present invention further provides a task processing device, including:

[0024] A first acquisition module is used to acquire a first instruction of a target first-category task, wherein the target first-category task includes a plurality of target second-category tasks having a logical relationship, and the difficulty of solving the target first-category task is greater than the difficulty of solving the target second-category task;

[0025] A first processing module, configured to input a first instruction of the target first-category task into a first large language model to obtain a target block of the first large language model, wherein the target block includes a plurality of first blocks, different first blocks correspond to different target second-category tasks, and the first block includes at least one layer of the first large language model;

[0026] The second processing module is used to obtain a target output result through collaborative processing between multiple first blocks, and the target output result includes: a word sequence output by the target block of the first large language model according to the layer sequence and a word output by the last layer of the first large language model.

[0027] In a third aspect, an embodiment of the present invention further provides a task processing device, including a processor and a transceiver, wherein the transceiver receives and sends data under the control of the processor, and the processor is used to perform the following operations:

[0028] Acquire a first instruction of a target first-category task, wherein the target first-category task includes a plurality of target second-category tasks having a logical relationship, and the difficulty of solving the target first-category task is greater than the difficulty of solving the target second-category task;

[0029] Inputting a first instruction of the target first-category task into a first large language model to obtain a target block of the first large language model, wherein the target block includes a plurality of first blocks, different first blocks correspond to different target second-category tasks, and the first block includes at least one layer of the first large language model;

[0030] A target output result is obtained through collaborative processing among multiple first blocks, and the target output result includes: a word unit sequence output by the target block of the first large language model according to the layer sequence and a word unit output by the last layer of the first large language model.

[0031] In a fourth aspect, an embodiment of the present invention further provides a task device, comprising a memory, a processor, and a program stored in the memory and executable on the processor; when the processor executes the program, the task processing method as described in the first aspect above is implemented.

[0032] In a fifth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in the task processing method described in the first aspect above.

[0033] In a sixth aspect, an embodiment of the present invention further provides a computer program product, comprising computer instructions, which, when executed by a processor, implement the steps in the task processing method described in the first aspect above.

[0034] The above technical solution of the present invention has at least the following beneficial effects:

[0035] In an embodiment of the present invention, a first instruction of a target first-category task is obtained, wherein the target first-category task includes a plurality of target second-category tasks having a logical relationship, and the difficulty of solving the target first-category task is greater than the difficulty of solving the target second-category task; then, the first instruction of the target first-category task is input into a first large language model to obtain a target block of the first large language model, wherein the target block includes a plurality of first blocks, different first blocks correspond to different target second-category tasks, and the first block includes at least one layer of the first large language model; finally, a target output result is obtained through collaborative processing among the plurality of first blocks, wherein the target output result includes: a word unit sequence output by the target block of the first large language model according to a layer sequence and a word unit output by the last layer of the first large language model, so that the plurality of blocks corresponding to the complex task (i.e., the target first-category task) in the large language model are used to process the complex task from different angles, and the processing results of different blocks are vertically integrated into a decision layer of a high-level layer to make the best reasoning decision, thereby improving the reasoning efficiency and problem-solving ability of the large language model on complex tasks. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 A schematic diagram showing a flow chart of a task processing method provided by an embodiment of the present invention;

[0037] Figure 2 A schematic diagram showing a module of a task processing device provided by an embodiment of the present invention;

[0038] Figure 3 A schematic diagram showing the hardware structure of a task processing device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0039] In order to make the technical problems, technical solutions and advantages to be solved by the present invention more clear, a detailed description will be given below with reference to the accompanying drawings and specific embodiments.

[0040] like Figure 1 FIG. 1 is a flow chart of a task processing method provided by an embodiment of the present invention, and the method may include:

[0041] Step 101, obtaining a first instruction of a target first category task, wherein the target first category task includes a plurality of target second category tasks having a logical relationship, and the difficulty of solving the target first category task is greater than the difficulty of solving the target second category task.

[0042] Here, the difficulty of solving the first type of target task is greater than that of solving the second type of target task. It should be understood that the first type of target task is a complex task, and the corresponding reasoning logic for solving the complex task is complex; the second type of target task is a simple task, and the corresponding reasoning logic for solving the simple task is simple. The first type of target task includes multiple second type of target tasks with logical relationships, that is, the complex task is composed of multiple simple tasks with logical relationships. After solving multiple simple tasks, the complex task is solved.

[0043] Among them, logical relationships include but are not limited to causal relationships, progressive relationships, parallel relationships, and opposing relationships.

[0044] Step 102: input the first instruction of the target first category task into the first large language model to obtain a target block of the first large language model, wherein the target block includes multiple first blocks, different first blocks correspond to different target second category tasks, and the first block includes at least one layer of the first large language model.

[0045] It should be noted that the target block corresponds to the target first type of task, and the target block includes multiple first blocks, and different first blocks correspond to different target second type of tasks. When solving the target first type of task, it is necessary to utilize the collaborative processing between the multiple first blocks in the first large language model to achieve it.

[0046] Among them, different complex tasks correspond to different blocks in the first language model, and have been obtained in advance. The specific implementation can be referred to in the subsequent embodiments. The block here refers to multiple blocks, that is, one complex task corresponds to multiple blocks.

[0047] Step 103, obtaining a target output result through collaborative processing among multiple first blocks, wherein the target output result includes: a word unit sequence output by the target block of the first large language model according to a layer sequence and a word unit output by the last layer of the first large language model.

[0048] Here, the first instruction of the target first category task is input into the first large language model and processed according to the corresponding reasoning logic. When processing the corresponding first block, the bit layer within the first block is processed based on the reasoning logic of the corresponding target second category task, that is, the target first category task (that is, the complex task) is processed from different angles, and the processing results of different first blocks are vertically integrated into the decision layer of the high-level layer to give full play to the capability advantages of the first large language model. Finally, the processing angles of different first blocks are summarized and a comprehensive understanding is obtained at the high-level layer to make the best reasoning decision and improve the reasoning efficiency and problem-solving ability of the large language model on complex tasks.

[0049] The word sequence output by the target block according to the layer sequence is used to represent the reasoning logic of the large language model when solving the first complex task. Here, the layer sequence refers to a sequence sorted from low-level layers to high-level layers.

[0050] The word unit output by the last layer of the first language model is the result of vertical integration of the word unit sequence output by the target block of the first language model according to the layer sequence into the high-level layer decision.

[0051] In an optional embodiment, the method of the present invention further comprises:

[0052] Step a1, for each of the multiple first-category tasks, obtain multiple blocks of a preset large language model, the multiple blocks correspond to one first-category task, the first-category task includes multiple second-category tasks with logical relationships, different blocks correspond to different second-category tasks, and the difficulty of solving the first-category task is greater than the difficulty of solving the second-category task.

[0053] The purpose of this step is to find multiple blocks corresponding to each of the multiple complex tasks (first type of tasks). Optionally, this step a1 includes:

[0054] Step a11, for each of the plurality of first-category tasks, obtaining an instruction set of the plurality of second-category tasks in the first-category tasks;

[0055] Optionally, for each first-category task, obtaining an instruction set of multiple second-category tasks in the first-category task can be achieved by the following steps:

[0056] ① For each of the second-category tasks in the first-category tasks, obtain a pre-constructed first seed instruction, wherein the first seed instruction includes a first preset text related to the second-category task, a first preset instruction for the first preset text, and an output format for the first preset instruction.

[0057] It should be noted that the first sub-instruction may be an artificially constructed instruction to ensure the rigor of the task. Generally, there are multiple first sub-instructions.

[0058] In one example, the second type of task is a NER task, and the first preset text is: The weather in Shanghai is really hot. The first preset instruction for the first preset text is: Please extract entities in the text. The output format of the first preset instruction is JSON format, that is, {'entity': [entity name]}.

[0059] ② Learn the first seed instructions and generate an instruction set for the second type of task.

[0060] The first type of instructions can be learned through a larger model with stronger capabilities (such as GPT4o) to generate a large number of instructions as the instruction set corresponding to the second type of task.

[0061] It should be noted that in order to ensure the rigor of the task, the instructions generated in step ② can be manually reviewed, that is, after a large number of instructions are generated, they are manually reviewed to obtain the instruction set corresponding to the second type of task.

[0062] Step a12, for each instruction in the instruction set of each second type of task, input the instruction into the preset large language model, obtain the word unit token output by each layer in the preset large language model, and visualize and display it;

[0063] For example, the command (prompt) input to the preset large language model is: Please extract entities from the text. \nText: The weather in Shanghai is really hot. \nPlease output the JSON format {'entity': [entity name]}. After that, the word unit token output by each layer in the large language model is visualized, as shown in Table 1 below:

[0064] Table 1

[0065]

[0066]

[0067] Step a13, based on the visually displayed token, obtaining the block related to the second type of task in the preset large language model;

[0068] Here, after a token is visually displayed by a preset large language model for an instruction, an expert can analyze the token through the visual display to identify and determine the block in the preset large language model that is strongly related to the second type of task (i.e., simple task). This block can be defined as a strong capability block for the second type of task. For example, in the above example, when the token of "Shanghai" is inferred, "things" is output at the 17th layer, "entity" is output at the 18th to 26th layers, "place" is output at the 27th to 29th layers, and "Shanghai" is output at the 30th to 40th layers. The reasoning process has a certain logic from abstract to concrete, so the 17th to 40th layers are defined as blocks that are strongly related to the task of this case (instruction). It should be noted that each instruction in the instruction set for the second type of task is processed according to the above steps to obtain multiple blocks in the preset large language model that are strongly related to the second type of task; then based on multiple blocks, the block in the preset large language model that is ultimately related to the second type of task is determined. Specifically, a common block may be determined based on a plurality of blocks, and the common block may be determined as the final block for the second type of task in the preset large language model.

[0069] Among them, the instruction set of each second-category task is processed according to the above steps, and finally multiple blocks of the preset large language model are obtained. Different blocks correspond to different second-category tasks, that is, multiple blocks correspond to one first-category task (complex task).

[0070] Step a14, determining the obtained multiple blocks corresponding to the multiple second-type tasks as the multiple blocks corresponding to the first-type tasks in the preset large language model.

[0071] That is, a first-category task (which includes multiple second-category tasks) corresponds to multiple blocks. That is, for each first-category task, there will be multiple blocks corresponding thereto.

[0072] Step a2: based on the multiple blocks corresponding to each first-category task, obtain an instruction set of each first-category task, wherein the instructions in the instruction set of the first-category task include reasoning information of the first-category task.

[0073] Optionally, this step a2 includes:

[0074] Step a21, for each first-category task of multiple first-category tasks, obtain a pre-constructed second seed instruction, wherein the second seed instruction includes a second preset text related to the first-category task, a second preset instruction for the second preset text, an output format for the second preset instruction, and reasoning information of the first-category task, wherein the reasoning information of the first-category task is determined based on tokens output by multiple blocks corresponding to the first-category task in a layer sequence.

[0075] That is, a seed instruction for a complex task (first type of task) is constructed, namely, a second seed instruction. The second seed instruction may be an instruction constructed manually to ensure the rigor of the task. Generally, there are multiple second seed instructions.

[0076] Step a22, learning the second seed instructions to generate an instruction set for the first type of task.

[0077] The second type of instructions can be learned through a larger model with stronger capabilities (such as GPT4o) to generate a large number of instructions as the instruction set corresponding to the first type of tasks.

[0078] It should be noted that, in order to ensure the rigor of the task, the instructions generated in step a22 may be manually reviewed, that is, after a large number of instructions are generated, they are manually reviewed to obtain an instruction set corresponding to the first type of task.

[0079] The first type of task described in the method of the present invention is a complex task. In business applications, a complex task can be a task involving business processes such as telemarketing tasks, customer service tasks, and collection tasks. The complex task needs to complete a series of simple tasks (second type of tasks) under the corresponding process before the complex task can be solved. The instruction set of the first type of task constructed includes multiple instructions, and the specific examples can be referred to as follows:

[0080] The instructions for case 1 are:

[0081] Input: Please extract entities from the following text. Text: The weather in Beijing is really hot! \nPlease output in JSON format.

[0082] Output (according to the reasoning process of Shanghai): {Inference information: {17th floor: East and West, 18th to 26th floors: Entity, 27th to 29th floors: Location, 30th to 40th floors: Beijing}, Entity: Beijing}.

[0083] The instructions for case 2 are:

[0084] Input: Please extract entities from the following text. Text: The weather in Shanghai is really hot! \nPlease output in Json format.

[0085] Output (according to the reasoning process of Shanghai): {Reasoning information: {17th floor: east and west, 18th to 26th floors: entity, 27th to 29th floors: location, 30th to 40th floors: Shanghai}, entity: Shanghai}.

[0086] Of course, the instructions in the above examples are relatively simple. The instructions for complex tasks actually constructed are more complex. For example, if the instructions for complex tasks are: What is the weather in Beijing? You need to first perform the keyword extraction task to assist the entity recognition task and identify Beijing and weather; then query the weather in Beijing, including temperature, humidity, etc., as well as the weather conditions in the next N days and corresponding travel reminders.

[0087] Step a3: Based on the instruction set of all first-category tasks, the preset large language model is trained to obtain the first large language model.

[0088] After discovering multiple blocks corresponding to each first-category task through step a1, in order to strengthen the multiple blocks corresponding to each first-category task and enhance the ability of the preset large language model, the instruction set of each first-category task (complex task) constructed through step a2 is used to execute step a3, that is, train the preset large language model to obtain the first large language model.

[0089] It should be noted that the method of the present invention enhances the vertical dimension of the large language model, which changes the inherent capabilities of the large language model rather than the external additional mode. The enhancement of different layers will have a gain effect on other layers, forming an effective mutual gain snowball effect.

[0090] like Figure 2 As shown, an embodiment of the present invention further provides a task processing device, the device comprising:

[0091] A first acquisition module 201 is used to acquire a first instruction of a target first-category task, wherein the target first-category task includes a plurality of target second-category tasks having a logical relationship, and the difficulty of solving the target first-category task is greater than the difficulty of solving the target second-category task;

[0092] A first processing module 202 is used to input the first instruction of the target first-type task into a first large language model to obtain a target block of the first large language model, wherein the target block includes a plurality of first blocks, different first blocks correspond to different target second-type tasks, and the first block includes at least one layer of the first large language model;

[0093] The second processing module 203 is used to obtain a target output result through collaborative processing between multiple first blocks, and the target output result includes: a word sequence output by the target block of the first large language model according to the layer sequence and a word output by the last layer of the first large language model.

[0094] Optionally, the device in the embodiment of the present invention further includes:

[0095] A second acquisition module is used to acquire, for each of the plurality of first-category tasks, a plurality of blocks of a preset large language model, wherein the plurality of blocks correspond to one first-category task, the first-category task includes a plurality of second-category tasks having a logical relationship, different blocks correspond to different second-category tasks, and the difficulty of solving the first-category task is greater than the difficulty of solving the second-category task;

[0096] A third acquisition module, configured to acquire an instruction set of each first-category task based on a plurality of blocks corresponding to each first-category task, wherein the instructions in the instruction set of the first-category task include reasoning information of the first-category task;

[0097] The model training module is used to train the preset large language model based on the instruction set of all first-category tasks to obtain the first large language model.

[0098] Optionally, the second acquisition module includes:

[0099] A first acquisition unit, configured to acquire, for each of the plurality of first-category tasks, an instruction set of the plurality of second-category tasks in the first-category tasks;

[0100] a first processing unit, configured to input each instruction in the instruction set of each second-category task into the preset large language model, obtain a word unit token outputted by each layer in the preset large language model, and visualize the token;

[0101] A second acquisition unit, configured to obtain a block related to the second type of task in the preset large language model based on the visually displayed token;

[0102] The third acquisition unit is used to determine the obtained multiple blocks corresponding to the multiple second-type tasks as the multiple blocks corresponding to the first-type tasks in the preset large language model.

[0103] Optionally, the first acquiring unit is specifically configured to:

[0104] For each of the second-category tasks in the first-category tasks, obtaining a pre-constructed first seed instruction, wherein the first seed instruction includes a first preset text related to the second-category task, a first preset instruction for the first preset text, and a format for outputting the first preset instruction;

[0105] The first seed instructions are learned to generate an instruction set for the second type of task.

[0106] Optionally, the third acquisition module includes:

[0107] a fourth acquisition unit, configured to acquire, for each first-category task of a plurality of first-category tasks, a pre-constructed second seed instruction, wherein the second seed instruction includes a second preset text related to the first-category task, a second preset instruction for the second preset text, an output format for the second preset instruction, and reasoning information of the first-category task, wherein the reasoning information of the first-category task is determined based on tokens output by a plurality of blocks corresponding to the first-category task according to a layer sequence;

[0108] The fifth acquisition unit is used to learn the second seed instructions and generate an instruction set for the first type of task.

[0109] The task processing device of the embodiment of the present invention obtains a first instruction of a target first-category task, wherein the target first-category task includes a plurality of target second-category tasks having a logical relationship, and the difficulty of solving the target first-category task is greater than the difficulty of solving the target second-category task; then, the first instruction of the target first-category task is input into a first large language model to obtain a target block of the first large language model, wherein the target block includes a plurality of first blocks, different first blocks correspond to different target second-category tasks, and the first block includes at least one layer of the first large language model; finally, a target output result is obtained through collaborative processing among the plurality of first blocks, wherein the target output result includes: a word unit sequence output by the target block of the first large language model according to a layer sequence and a word unit output by the last layer of the first large language model, so that the plurality of blocks corresponding to the complex task (i.e., the target first-category task) in the large language model are used to process the complex task from different angles, and the processing results of different blocks are vertically integrated into a decision layer of a high-level layer to make the best reasoning decision, thereby improving the reasoning efficiency and problem-solving ability of the large language model on complex tasks.

[0110] In order to better achieve the above goals, Figure 3 As shown, an embodiment of the present invention further provides a task processing device, including a processor 300 and a transceiver 310, wherein the transceiver 310 receives and sends data under the control of the processor 300, and the processor 300 is used to perform the following process:

[0111] Acquire a first instruction of a target first-category task, wherein the target first-category task includes a plurality of target second-category tasks having a logical relationship, and the difficulty of solving the target first-category task is greater than the difficulty of solving the target second-category task;

[0112] Inputting a first instruction of the target first-category task into a first large language model to obtain a target block of the first large language model, wherein the target block includes a plurality of first blocks, different first blocks correspond to different target second-category tasks, and the first block includes at least one layer of the first large language model;

[0113] A target output result is obtained through collaborative processing among multiple first blocks, and the target output result includes: a word unit sequence output by the target block of the first large language model according to the layer sequence and a word unit output by the last layer of the first large language model.

[0114] Optionally, the processor 300 is further configured to:

[0115] For each of the plurality of first-category tasks, obtaining a plurality of blocks of a preset large language model, wherein the plurality of blocks correspond to one first-category task, the first-category task includes a plurality of second-category tasks having a logical relationship, different blocks correspond to different second-category tasks, and the difficulty of solving the first-category task is greater than the difficulty of solving the second-category task;

[0116] Based on the multiple blocks corresponding to each first-category task, obtaining an instruction set for each first-category task, where the instructions in the instruction set for the first-category task include reasoning information for the first-category task;

[0117] Based on the instruction set of all first-category tasks, the preset large language model is trained to obtain the first large language model.

[0118] Optionally, the processor 300 is further configured to:

[0119] For each of the plurality of first-category tasks, obtaining an instruction set of a plurality of second-category tasks in the first-category tasks;

[0120] For each instruction in the instruction set of each second-category task, input the instruction into the preset large language model, obtain the word unit token output by each layer in the preset large language model, and visualize and display it;

[0121] Based on the visually displayed token, obtaining a block related to the second type of task in the preset large language model;

[0122] The obtained multiple blocks corresponding to the multiple second-type tasks are determined as the multiple blocks corresponding to the first-type tasks in the preset large language model.

[0123] Optionally, the processor 300 is further configured to:

[0124] For each of the second-category tasks in the first-category tasks, obtaining a pre-constructed first seed instruction, wherein the first seed instruction includes a first preset text related to the second-category task, a first preset instruction for the first preset text, and a format for outputting the first preset instruction;

[0125] The first seed instructions are learned to generate an instruction set for the second type of task.

[0126] Optionally, the processor 300 is further configured to:

[0127] For each of the first-category tasks of the plurality of first-category tasks, obtaining a pre-constructed second seed instruction, wherein the second seed instruction includes a second preset text related to the first-category task, a second preset instruction for the second preset text, an output format for the second preset instruction, and reasoning information of the first-category task, wherein the reasoning information of the first-category task is determined based on tokens output by the plurality of blocks corresponding to the first-category task according to a layer sequence;

[0128] The second seed instructions are learned to generate an instruction set for the first type of task.

[0129] The task processing device of the embodiment of the present invention obtains a first instruction of a target first-category task, wherein the target first-category task includes a plurality of target second-category tasks having a logical relationship, and the difficulty of solving the target first-category task is greater than the difficulty of solving the target second-category task; then, the first instruction of the target first-category task is input into a first large language model to obtain a target block of the first large language model, wherein the target block includes a plurality of first blocks, different first blocks correspond to different target second-category tasks, and the first block includes at least one layer of the first large language model; finally, a target output result is obtained through collaborative processing among the plurality of first blocks, wherein the target output result includes: a word unit sequence output by the target block of the first large language model according to a layer sequence and a word unit output by the last layer of the first large language model, so that the plurality of blocks corresponding to the complex task (i.e., the target first-category task) in the large language model are used to process the complex task from different angles, and the processing results of different blocks are vertically integrated into a decision layer of a high-level layer to make the best reasoning decision, thereby improving the reasoning efficiency and problem-solving ability of the large language model on complex tasks.

[0130] An embodiment of the present invention also provides a task processing device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the various processes in the task processing method embodiment described above are implemented, and the same technical effect can be achieved. To avoid repetition, they will not be described here.

[0131] The embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, each process in the task processing method embodiment described above is implemented, and the same technical effect can be achieved. To avoid repetition, it is not described here. The computer-readable storage medium is, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0132] An embodiment of the present invention further provides a computer program product, including computer instructions, which implement the steps in the task processing method as described above when executed by a processor.

[0133] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-readable storage media (including but not limited to disk storage and optical storage, etc.) containing computer-usable program code.

[0134] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A device that specifies functions in one or more processes and / or one or more blocks.

[0135] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable storage medium produce a paper product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0136] These computer program instructions may also be loaded onto a computer or other programmable data processing device so that the computer or other programmable device executes a series of operating steps to produce a computer-implemented process, thereby providing instructions executed on the computer or other programmable device for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0137] The above is a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A task processing method, characterized in that: include: Acquire a first instruction of a target first-category task, wherein the target first-category task includes a plurality of target second-category tasks having a logical relationship, and the difficulty of solving the target first-category task is greater than the difficulty of solving the target second-category task; Inputting a first instruction of the target first-category task into a first large language model to obtain a target block of the first large language model, wherein the target block includes a plurality of first blocks, different first blocks correspond to different target second-category tasks, and the first block includes at least one layer of the first large language model; A target output result is obtained through collaborative processing among multiple first blocks, and the target output result includes: a word unit sequence output by the target block of the first large language model according to the layer sequence and a word unit output by the last layer of the first large language model.

2. The method according to claim 1, characterized in that The method further comprises: For each of the plurality of first-category tasks, obtaining a plurality of blocks of a preset large language model, wherein the plurality of blocks correspond to one first-category task, the first-category task includes a plurality of second-category tasks having a logical relationship, different blocks correspond to different second-category tasks, and the difficulty of solving the first-category task is greater than the difficulty of solving the second-category task; Based on the multiple blocks corresponding to each first-category task, obtaining an instruction set for each first-category task, where the instructions in the instruction set for the first-category task include reasoning information for the first-category task; Based on the instruction set of all first-category tasks, the preset large language model is trained to obtain the first large language model.

3. The method according to claim 2, characterized in that For each of the first-category tasks of the plurality of first-category tasks, obtaining a plurality of blocks of a preset large language model includes: For each of the plurality of first-category tasks, obtaining an instruction set of a plurality of second-category tasks in the first-category tasks; For each instruction in the instruction set of each second-category task, input the instruction into the preset large language model, obtain the word unit token output by each layer in the preset large language model, and visualize and display it; Based on the visually displayed token, obtaining a block related to the second type of task in the preset large language model; The obtained multiple blocks corresponding to the multiple second-type tasks are determined as the multiple blocks corresponding to the first-type tasks in the preset large language model.

4. The method according to claim 3, characterized in that The instruction set for obtaining a plurality of second-category tasks in the first-category tasks includes: For each of the second-category tasks in the first-category tasks, obtaining a pre-constructed first seed instruction, wherein the first seed instruction includes a first preset text related to the second-category task, a first preset instruction for the first preset text, and a format for outputting the first preset instruction; The first seed instructions are learned to generate an instruction set for the second type of task.

5. The method according to claim 2, characterized in that: The step of obtaining an instruction set for each first-category task based on a plurality of blocks corresponding to each first-category task includes: For each of the first-category tasks of the plurality of first-category tasks, obtaining a pre-constructed second seed instruction, wherein the second seed instruction includes a second preset text related to the first-category task, a second preset instruction for the second preset text, an output format for the second preset instruction, and reasoning information of the first-category task, wherein the reasoning information of the first-category task is determined based on tokens output by the plurality of blocks corresponding to the first-category task according to a layer sequence; The second seed instructions are learned to generate an instruction set for the first type of task.

6. A task processing device, characterized in that: include: A first acquisition module is used to acquire a first instruction of a target first-category task, wherein the target first-category task includes a plurality of target second-category tasks having a logical relationship, and the difficulty of solving the target first-category task is greater than the difficulty of solving the target second-category task; A first processing module, configured to input a first instruction of the target first-category task into a first large language model to obtain a target block of the first large language model, wherein the target block includes a plurality of first blocks, different first blocks correspond to different target second-category tasks, and the first block includes at least one layer of the first large language model; The second processing module is used to obtain a target output result through collaborative processing between multiple first blocks, and the target output result includes: a word sequence output by the target block of the first large language model according to the layer sequence and a word output by the last layer of the first large language model.

7. A task processing device, comprising a processor and a transceiver, wherein the transceiver receives and sends data under the control of the processor, characterized in that: The processor is configured to perform the following operations: Acquire a first instruction of a target first-category task, wherein the target first-category task includes a plurality of target second-category tasks having a logical relationship, and the difficulty of solving the target first-category task is greater than the difficulty of solving the target second-category task; Inputting a first instruction of the target first-category task into a first large language model to obtain a target block of the first large language model, wherein the target block includes a plurality of first blocks, different first blocks correspond to different target second-category tasks, and the first block includes at least one layer of the first large language model; A target output result is obtained through collaborative processing among multiple first blocks, and the target output result includes: a word unit sequence output by the target block of the first large language model according to the layer sequence and a word unit output by the last layer of the first large language model.

8. A task device, comprising a memory, a processor, and a program stored in the memory and executable on the processor; characterized in that: When the processor executes the program, the task processing method according to any one of claims 1 to 5 is implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the task processing method according to any one of claims 1 to 5 are implemented.

10. A computer program product, characterized in that The method comprises computer instructions, which, when executed by a processor, implement the steps in the task processing method according to any one of claims 1 to 5.