Information generation method and device, electronic equipment and computer readable storage medium

By splitting large tasks into small tasks and using task processing models to process each small task, the problem of limited output quality and scale of large models in complex tasks is solved, and the accuracy of review information is improved.

CN120010952APending Publication Date: 2025-05-16SHENZHEN FALCON NETWORK MEDIA CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510099198.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-21
Publication Date
2025-05-16

AI Technical Summary

Technical Problem

When large models deal with complex tasks, there are problems with limited quality and scale of output answers, resulting in a decline in performance when facing complex tasks.

Method used

The large generation task is split into multiple small generation subtasks, and each generation subtask is processed separately using the task processing model, reducing the task size required to be processed by each model, thereby fully leveraging the model's processing capabilities.

Benefits of technology

By processing the review tasks of the target components, the accuracy of the generated target review information is improved, and the output results are inaccurate due to exceeding the upper limit of the model processing capacity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120010952A_ABST
    Figure CN120010952A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses an information generation method and device, electronic equipment and a computer readable storage medium, and the method comprises the steps: responding to a review information generation request for a target component, and determining a generation task corresponding to the review information generation request; splitting the generation task into at least one generation sub-task, and determining a task processing model corresponding to each generation sub-task; and calling each task processing model to process each generation sub-task to obtain target review information for the target component. According to the method, the large generation task is divided into the small generation sub-tasks, and the task processing models are respectively utilized to process the generation sub-tasks, so that the size of the task needing to be processed by each model is reduced, the processing capability of the models can be brought into full play, and inaccurate output results caused by exceeding the upper limit of the processing capability of the models can be avoided. According to the embodiment of the invention, by processing the review task of the target component, the accuracy of the generated target review information is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of artificial intelligence technology, and specifically to an information generation method, device, electronic device, and computer-readable storage medium. Background Art

[0002] In recent years, large models (LLMs) have emerged in the field of AI and shined in all walks of life. Since the emergence of large models, practitioners have applied them in the field of programming because of their excellent understanding and output capabilities. For example, large models are used to generate review results for existing components (codes), that is, to review the problems in this code to evaluate its quality, helping developers or testers quickly locate component abnormalities.

[0003] However, there is an upper limit to the processing power of large models. The input and output that can be received at one time are limited, and the attention in a round of conversation is also limited, resulting in the quality and scale of the output answers being limited. Especially when faced with complex tasks, the performance of large models deteriorates significantly. Summary of the invention

[0004] The embodiments of the present application provide an information generation method, device, electronic device and computer-readable storage medium, which can improve the accuracy of review information generation.

[0005] In a first aspect, an embodiment of the present application provides an information generation method, the method comprising:

[0006] In response to a review information generation request for a target component, determining a generation task corresponding to the review information generation request;

[0007] Splitting the generation task into at least one generation subtask, and determining a task processing model corresponding to each of the generation subtasks;

[0008] Each of the task processing models is called to process each of the generated subtasks to obtain target review information for the target component.

[0009] In a second aspect, an embodiment of the present application further provides an information generating device, the device comprising:

[0010] A response module, configured to respond to a review information generation request for a target component and determine a generation task corresponding to the review information generation request;

[0011] A determination module, used for splitting the generation task into at least one generation subtask, and determining the task processing model corresponding to each generation subtask;

[0012] The generation module is used to call each of the task processing models to process each of the generated subtasks to obtain target review information for the target component.

[0013] Optionally, in some embodiments of the present application, the task processing model includes an agent, and each of the agents processes a corresponding generation subtask respectively;

[0014] The generating subtask includes at least one of a target component obtaining subtask, a component grouping subtask, a preliminary review subtask, a review verification subtask, or a review information generating subtask, wherein the target component includes a newly added component.

[0015] Optionally, in some embodiments of the present application, calling each of the task processing models to process each of the generated subtasks to obtain target review information for the target component includes:

[0016] Determining processing timing information of each of the generated subtasks;

[0017] Calling each of the task processing models in sequence according to the processing timing information, and, for any of the generated subtasks, processing the generated subtask according to the task processing model corresponding to the generated subtask and a previous processing result to obtain a model processing result;

[0018] The model processing result of the last generated subtask is used as the target review information, and the previous processing result includes the model processing result of the previous task processing model.

[0019] Optionally, in some embodiments of the present application, for any of the generation subtasks, processing the generation subtask according to the task processing model corresponding to the generation subtask and a previous processing result to obtain a model processing result includes:

[0020] If the generating subtask includes a component grouping subtask, obtaining a component calling relationship of the target component;

[0021] According to the component call relationship and the preset component quantity, the target component is divided into at least one component group, and each component group is processed according to the task processing model corresponding to the component grouping subtask to obtain the model processing subresult of each component group;

[0022] The model processing sub-results of each of the component groups are combined to obtain a model processing result.

[0023] Optionally, in some embodiments of the present application, calling each of the task processing models in sequence according to the processing timing information includes:

[0024] Determine the flow arrangement information corresponding to the processing timing information, where the flow arrangement information is obtained by arranging the execution flow of each of the generated subtasks in the form of task nodes;

[0025] The calling of each of the task processing models is controlled based on the flow orchestration information.

[0026] Optionally, in some embodiments of the present application, the configuration of the flow arrangement information includes:

[0027] Generate task nodes for each generation subtask;

[0028] Determine the association relationship between the task nodes based on the processing timing information;

[0029] The flow arrangement information is generated according to the task nodes and the association relationship between the task nodes.

[0030] Optionally, in some embodiments of the present application, generating the flow arrangement information according to each of the task nodes and the association relationship between the task nodes includes:

[0031] Determine an edge dictionary between each of the task nodes according to the association relationship;

[0032] Constructing a node graph according to the node dictionary of each task node and the edge dictionary;

[0033] Flow orchestration information is generated according to the node graph.

[0034] In a third aspect, an embodiment of the present application further provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and which implements the steps in the above-mentioned information generation method when the computer program is executed by the processor.

[0035] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps in the above-mentioned information generation method are implemented.

[0036] In a fifth aspect, the embodiments of the present application further provide a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. The processor of the computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the method provided in various optional implementations described in the embodiments of the present application.

[0037] The embodiment of the present application responds to a request for generating review information for a target component, determines a generation task corresponding to the review information generation request; splits the generation task into at least one generation subtask, and determines a task processing model corresponding to each generation subtask; calls each task processing model to process each generation subtask to obtain target review information for the target component.

[0038] Among them, by splitting a large generation task into multiple small generation subtasks, and using the task processing model to process each generation subtask, the size of the task that each model needs to process is reduced, which helps to give full play to the processing capacity of the model and also helps to avoid exceeding the upper limit of the model's processing capacity and causing inaccurate output results. The embodiment of the present application improves the accuracy of the generated target review information by processing the review task of the target component. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the technical solutions in the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0040] Figure 1 It is a schematic diagram of a scenario in which a terminal device according to an embodiment of the present application executes the information generating method;

[0041] Figure 2 It is a flowchart of the information generation method provided in the embodiment of the present application;

[0042] Figure 3 is another flow chart of the information generation method provided in an embodiment of the present application;

[0043] Figure 4 It is a schematic diagram of a code block relationship diagram provided in an embodiment of the present application;

[0044] Figure 5 It is a structural schematic diagram of an information generating device provided in an embodiment of the present application;

[0045] Figure 6 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0046] The following will be combined with the drawings in this application to clearly and completely describe the technical solutions in this application. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. Based on the embodiments in the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0047] The embodiment of the present application provides an information generation method, device, electronic device and computer-readable storage medium. Specifically, the embodiment of the present application provides an information generation device suitable for electronic devices, which is used to split the generation task of generating target review information into multiple generation subtasks, and process each generation subtask through a task processing model respectively, so as to improve the accuracy of the generated target review information. Specifically, the electronic device includes a terminal device or a server, and the terminal device includes but is not limited to mobile phones, tablet computers, laptop computers or desktop computers. The server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content distribution networks (CDN, Content Delivery Network), and cloud servers for basic cloud computing services such as big data and artificial intelligence platforms, etc. The server can be directly or indirectly connected via wired or wireless communication.

[0048] See also Figure 1 , Figure 1 : is a schematic diagram of a scenario in which a terminal device according to an embodiment of the present application executes the information generation method, wherein the specific execution process of the terminal device executing the information generation method is as follows:

[0049] The terminal device 10 responds to a review information generation request for a target component, determines a generation task corresponding to the review information generation request; splits the generation task into at least one generation subtask, and determines a task processing model corresponding to each generation subtask; calls each task processing model to process each generation subtask to obtain target review information for the target component.

[0050] In summary, the embodiment of the present application reduces the size of the tasks that each model needs to process by splitting a large generation task into multiple small generation subtasks and using the task processing model to process each generation subtask, which helps to give full play to the processing capacity of the model and also helps to avoid exceeding the upper limit of the model's processing capacity and causing inaccurate output results. The embodiment of the present application improves the accuracy of the generated target review information by processing the review task of the target component.

[0051] It should be noted that the order of description of the following embodiments is not intended to limit the priority order of the embodiments.

[0052] See also Figure 2 , Figure 2A flowchart of an information generation method provided in an embodiment of the present application. Although a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in an order different from that shown in the flowchart. Specifically, the process of the information generation method specifically includes:

[0053] 101. In response to a review information generation request for a target component, determine a generation task corresponding to the review information generation request.

[0054] The target component refers to the code in programming. For the target component to be reviewed, the target component is usually a piece of code, such as a function or method. In addition, the code is usually edited in the form of files, so the target component also includes the code in files. For example, after creating or modifying a class file, the code in the class file is used as the target component.

[0055] Among them, the review information generation request is a request to generate the target review information of the target component, and the request can be triggered by a user operation or by a device or program automation. For example, in an embodiment of the present application, the review information generation request can be automatically generated during a code merge operation, for example, for a certain development project, multiple developers collaborate on development, and merge the separate development content of each developer through code submission merging (such as Git), thereby completing the development of the entire project. In order to ensure the quality of the merged code, the information generation method of the embodiment of the present application can be used, and when it is detected that there is a code submission merge, the information generation method of the present application is executed to detect the quality of the submitted code for merging.

[0056] Among them, the target review information refers to the review results of the target component, including the abnormal problems existing in the target component, the types of abnormal problems, the belonging files, the related components involved in the abnormal problems, the locations of the related components, etc. Optionally, the target review information can also include solutions to the abnormal problems, that is, after determining the abnormal problems of the target components, solutions to the abnormal problems are automatically generated to provide solutions for users' reference.

[0057] It should be noted that the generation task is a task of generating target review information of target components, which includes the actions required to be performed in the process of generating target review information, such as obtaining target components, grouping target components, preliminary review, review verification, and generating final review information.

[0058] In the embodiment of the present application, after detecting a review information generation request, the request type of the review information generation request can be identified, and the generation task corresponding to the current review information generation request can be determined based on the correspondence between the request type and the task.

[0059] 102. Split the generation task into at least one generation subtask, and determine a task processing model corresponding to each generation subtask.

[0060] It should be noted that in the traditional solution, the target component is directly input into the large model, and the review information of the target component is output through the large model. However, since the processing capacity of the large model has an upper limit and the content of the review information generation task is large, the quality of the output results of the large model is poor and the accuracy cannot meet the requirements.

[0061] Therefore, in an embodiment of the present application, splitting a generation task with a large amount of generating target review information into multiple generation subtasks with smaller task amounts helps to accurately process each generation subtask with a smaller task amount.

[0062] The task processing model is for generating subtasks. For example, each task processing model processes one or more generating subtasks. By splitting the generating subtasks with smaller task amounts, the demand for models with large task amounts is reduced. At the same time, it also helps to give full play to the processing capabilities of the task processing model and improve the accuracy of the processing results of the task processing model.

[0063] In an embodiment of the present application, the task processing model includes a large model based on artificial intelligence, a deep learning model or a machine learning model, etc.

[0064] 103. Call each of the task processing models to process each of the generated subtasks to obtain target review information for the target component.

[0065] Among them, through the processing of the generated subtasks by each task processing model, the target review information for the target component is obtained. Among them, the target review information includes the review results of the target component, and the review results include the abnormal problems existing in the target component, the types of abnormal problems, the files to which they belong, the related components involved in the abnormal problems, the locations of the related components, etc. Optionally, the target review information can also include solutions to the abnormal problems, that is, after determining the abnormal problems of the target components, the solutions to the abnormal problems are automatically generated, and the solutions are provided for the user's reference.

[0066] In summary, the embodiment of the present application reduces the size of the tasks that each model needs to process by splitting a large generation task into multiple small generation subtasks and using the task processing model to process each generation subtask, which helps to give full play to the processing capacity of the model and also helps to avoid exceeding the upper limit of the model's processing capacity and causing inaccurate output results. The embodiment of the present application improves the accuracy of the generated target review information by processing the review task of the target component.

[0067] Among them, in order to ensure that the capacity of the task processing model can be fully utilized, avoid wasting model resources due to too small a task volume, and avoid exceeding the upper limit of the model's processing capacity, it is necessary to control the splitting of the generated subtasks to avoid splitting the generated subtasks too large or too small. In the embodiments of the present application, in order to achieve the above-mentioned purpose or effect, the splitting of the generated tasks can be controlled based on the size of the task volume and the task type, that is, optionally, in some embodiments of the present application, the step of "splitting the generated task into at least one generated subtask" includes:

[0068] Splitting the generation task into at least one generation subtask based on the task splitting reference information;

[0069] The task splitting reference information includes at least one of the task size, task type, or processing task feature information of each of the task processing models.

[0070] Among them, the task splitting reference information is the information used as a reference or basis for splitting the generated tasks, corresponding to the capability range of the task processing model. For example, the task size reflects the size of the generated subtasks, taking into account the input size, output size, and difficulty of the task to be solved of the task processing model.

[0071] Among them, task type refers to the type of task. For example, task types include information acquisition type, grouping type, preliminary assessment type, verification reflection type and assessment content refinement type, etc. Different task types can use corresponding task processing models to utilize the characteristics of the task processing model that is more focused in a single field to process and generate sub-tasks, thereby improving the quality of the output results of the task processing model.

[0072] The processing task characteristic information refers to the characteristic information of the tasks that the model is suitable for processing, that is, the characteristics of the tasks that the model is good at processing. For example, the processing task characteristic information includes batch processing, efficient and complex calculations, feasibility judgment, and merge processing, etc. Therefore, the generation subtasks for batch processing can be processed by the task processing model that is good at batch processing; the generation subtasks for efficient and complex calculations can be processed by the task processing model that is good at processing efficient and complex calculations.

[0073] Optionally, in the embodiment of the present application, the task processing model can select an agent, and use multiple agents to process the generation subtasks respectively. In the embodiment of the present application, for the generation task of target review information, the corresponding generation subtask includes at least one of the following: obtaining target component subtask, component grouping subtask, preliminary review subtask, review verification subtask, or generating review information subtask, wherein the target component includes a newly added component.

[0074] An agent is an entity that can perceive the environment, make decisions, and perform actions to achieve a specific goal. An agent can be a software program, a robot, or any other form of autonomous system.

[0075] The subtask of obtaining the target component is used to obtain the target component to be reviewed, specifically: extracting the newly added code block or the newly added code file to obtain the newly added code block or the newly added code file. For example, the agent corresponding to the subtask of obtaining the target executes the script file using the python interpreter to extract the newly added code block or the newly added code file.

[0076] Among them, the component grouping subtask is used to group the target components so that the subsequent intelligent agents can review each grouped component group to avoid the problem of poor review quality due to the large amount of data of the target components.

[0077] The preliminary review subtask is used to review each component group obtained by grouping to obtain the review results of each component group.

[0078] The review verification subtask is used to verify the review results obtained by the preliminary review subtask to determine the accuracy of the review results and eliminate some invalid or erroneous review results.

[0079] Among them, the review information generation subtask is used to obtain the target review information based on the screened review results obtained by the review verification subtask, refine the content according to the specifications, and output the target review information, for example, output the abnormal problems of the target components, the types of abnormal problems, the files to which they belong, the related components involved in the abnormal problems, the locations of the related components, and solutions to the abnormal problems, etc.

[0080] Among them, in the embodiment of the present application, for each intelligent agent, each intelligent agent can also be called in combination with a prompt project, for example, prompt information is constructed for each intelligent agent, and each intelligent agent is guided to perform a corresponding generation subtask based on the prompt information.

[0081] Among them, when the target review information generation task corresponds to multiple generation subtasks, each generation subtask can be executed based on the processing sequence to ensure the effectiveness of the execution of each generation subtask, that is, optionally, in some embodiments of the present application, the step of "calling each of the task processing models to process each of the generation subtasks to obtain the target review information for the target component" includes:

[0082] Determining processing timing information of each of the generated subtasks;

[0083] Calling each of the task processing models in sequence according to the processing timing information, and, for any of the generated subtasks, processing the generated subtask according to the task processing model corresponding to the generated subtask and a previous processing result to obtain a model processing result;

[0084] The model processing result of the last generated subtask is used as the target review information, and the previous processing result includes the model processing result of the previous task processing model.

[0085] Among them, the processing timing information is also the processing order information of each generation subtask, such as executing generation subtask A first, and then executing generation subtask B. It also corresponds to the processing dependency relationship between each generation subtask. For example, if the current generation subtask needs to wait for the execution result of another generation subtask before it can be executed, it is necessary to execute the other generation subtask first and then execute the current generation subtask.

[0086] Further, taking the generation subtask including the five generation subtasks of obtaining target component subtask, component grouping subtask, preliminary review subtask, review verification subtask or generating review information subtask as an example, please refer to Figure 3 , Figure 3 : is another flow chart of the information generation method provided in the embodiment of the present application. Specifically, the information generation method specifically includes:

[0087] 111. In response to detecting a code merge operation, generating a review information generation request;

[0088] 112. Determine a generation task in response to the review information generation request;

[0089] 113. Split the generation task into multiple generation subtasks, each of which includes, in sequence, a target component acquisition subtask, a component grouping subtask, a preliminary review subtask, a review verification subtask, or a review information generation subtask;

[0090] 114. Determine the processing timing information of each generated subtask;

[0091] 115. Based on the processing timing information, the task processing models corresponding to the respective generation subtasks are sequentially called to process the respective corresponding generation subtasks.

[0092] For example, the subtask of obtaining target components, the subtask of grouping components, the subtask of preliminary review, the subtask of review verification, or the subtask of generating review information are executed in sequence.

[0093] Among them, for each generation subtask, the generation subtask is processed according to the task processing model corresponding to the generation subtask and the previous processing result to obtain the model processing result, and the model processing result of the last generation subtask is used as the target review information, and the previous processing result includes the model processing result of the previous task processing model.

[0094] Among them, when the component grouping subtask is executed, the component call relationship of the target component is obtained, and grouping is performed based on the component call relationship, so as to divide the associated components into one group as much as possible, so as to improve the accuracy and effectiveness of the review results. That is, optionally, in some embodiments of the present application, the step of "for any of the generation subtasks, the generation subtask is processed according to the task processing model corresponding to the generation subtask and the previous processing result to obtain the model processing result" includes:

[0095] If the generating subtask includes a component grouping subtask, obtaining a component calling relationship of the target component;

[0096] According to the component call relationship and the preset component quantity, the target component is divided into at least one component group, and each component group is processed according to the task processing model corresponding to the component grouping subtask to obtain the model processing subresult of each component group;

[0097] The model processing sub-results of each of the component groups are combined to obtain a model processing result.

[0098] The preset component amount refers to the amount of component data that is preset as a reference standard. For example, the preset component amount includes 5K tokens, where a token is the smallest language unit in natural language processing, which can be a word, subword or character. It is understandable that when the amount of data processed by the agent at a time is large, it is easy to produce more hallucination problems. Controlling the size of the grouped data based on the preset component amount helps reduce the hallucination problems generated by the agent when processing each component group.

[0099] The component call relationship refers to the call or reference relationship between components. For example, if component A needs to call component B when executing, there is a component call relationship between component A and component B. Grouping based on component call relationships helps to divide components with associated relationships into one component group.

[0100] In the embodiment of the present application, the target components can be grouped by means of a graph segmentation algorithm. For example, the calling relationship between the code blocks in the target component is determined based on syntax analysis, and a code block relationship graph is generated based on the calling relationship. For example, see Figure 4 , Figure 4is a schematic diagram of a code block relationship diagram provided in an embodiment of the present application. In the diagram, each dot is a code block, and the lines between the dots represent the call relationship between the code blocks. Based on the density of the lines, the code blocks can be grouped by a graph segmentation algorithm. For example, Figure 4 Different color areas in the graph correspond to a component group. The graph segmentation algorithm includes but is not limited to a spectrum partitioning algorithm, a multi-level graph segmentation algorithm, or a random walk algorithm.

[0101] Among them, in the embodiments of the present application, in order to ensure the smooth execution of each generated subtask, a process orchestration process can also be performed based on each generated subtask, and flow orchestration information is obtained based on the process orchestration process, and then the execution of each generated subtask is controlled based on the flow orchestration information, that is, optionally, in some embodiments of the present application, the step of "calling each of the task processing models in sequence according to the processing timing information" includes:

[0102] Determine the flow arrangement information corresponding to the processing timing information, where the flow arrangement information is obtained by arranging the execution flow of each of the generated subtasks in the form of task nodes;

[0103] The calling of each of the task processing models is controlled based on the flow orchestration information.

[0104] The flow orchestration information refers to the orchestration and planning of the generation subtasks in the form of task nodes, and when the process is executed, the execution of the generation subtasks corresponding to each node is controlled.

[0105] For example, configuring the task nodes corresponding to each generation subtask, determining the association relationship between each generation subtask, and constructing the flow orchestration information based on the task nodes and the association relationship between each task node, that is, optionally, in some embodiments of the present application, the configuration of the flow orchestration information includes:

[0106] Generate task nodes for each generation subtask;

[0107] Determine the association relationship between the task nodes based on the processing timing information;

[0108] The flow arrangement information is generated according to the task nodes and the association relationship between the task nodes.

[0109] For example, each generation subtask is configured as a task node, and the flow orchestration information is obtained by arranging the association relationship between the task nodes. The association relationship is also called the node connection relationship, which can be determined based on the processing timing information between the generation subtasks. For example, if there is a processing sequence between the generation subtasks, there is a node connection relationship between the task nodes corresponding to the two generation subtasks.

[0110] Among them, in the embodiments of the present application, based on the flow orchestration information, it can be designed in the form of a node graph, for example, the node graph includes a directed acyclic graph. And the nodes and edges of the node graph can be described by a dictionary, for example, the node information of the task node is configured by a dictionary (including node identification, node type, etc.), and the edges between the task nodes are configured by nodes (corresponding to the node connection relationship, i.e., edges). That is, optionally, in some embodiments of the present application, the step of "generating flow orchestration information according to each of the task nodes and the association relationship between each of the task nodes" includes:

[0111] Determine an edge dictionary between each of the task nodes according to the association relationship;

[0112] Constructing a node graph according to the node dictionary of each task node and the edge dictionary;

[0113] Flow orchestration information is generated according to the node graph.

[0114] Among them, a dictionary is a data structure, also known as a map or hash table. A dictionary is used to store key-value pairs, where each key is unique and is used to quickly find, insert, and delete the corresponding value.

[0115] For example, a node graph includes nodes (corresponding to node information) and edges (corresponding to edge information), wherein the node information includes a unique identifier (id) and detailed data, and the detailed data includes the node's title information, description (desc) information, and type (type) information, etc. The edge information includes a unique identifier (id), a source node (source), a target node (target), and a condition (condition), etc.

[0116] Among them, nodes is the dictionary representation corresponding to the task node, also called the node dictionary; edges is the dictionary representation corresponding to the edge dictionary, also called the edge dictionary.

[0117] Among them, since each task node can point to multiple other task nodes, the information used to express the edge dictionary (edges) between task nodes can be a list. For example, if a task node points to n branches, then there will be n json data about this task node in the list. For example, task node A points to task node B, task node C and task node D, then the edges list includes three node pointing data, respectively for task node B, task node C and task node D, among which the pointing data pointing to task node B includes a unique identifier (1), a source node (task node A), a target node (task node B) and a condition (true), the pointing data pointing to task node C includes a unique identifier (2), a source node (task node A), a target node (task node C) and a condition (true), and the pointing data pointing to task node D includes a unique identifier (3), a source node (task node A), a target node (task node D) and a condition (true).

[0118] Among them, source represents the current task node, and target represents the target node or the end node. From the above, we can see that the task node A has three branches, pointing to task node B, task node C and task node D respectively.

[0119] Among them, in the embodiment of the present application, after the task nodes and the edges between the task nodes are represented based on the dictionary, the dictionary data can be transformed, and the unified encapsulation of the node data and the field verification in the dictionary can be realized through inheritance and polymorphism. Among them, in the conversion process, the complex logics such as loops, conditional judgments, multi-way calls, reflections, etc. are encapsulated into each logical node, and the undirected graph and the cyclic graph are uniformly converted into a directed acyclic graph, so that the graph operation logic is simple enough, and the Map data structure is used to map the id and the node, which is convenient for the subsequent connection and compilation of the nodes.

[0120] Among them, loop logic refers to the logic of node loop execution, for example, task node A is executed n times in a loop, or it is executed until a certain condition is met and then stops; condition judgment logic refers to judging which branch the task node points to when there are multiple branches, for example, if there are task node A and task node B, judge which branch to take; multi-way call logic refers to executing multiple generated tasks in parallel, etc.; reflection logic refers to the round-trip execution between two task nodes, such as executing task node B after task node A is executed, and returning to task node A after task node B is executed.

[0121] Among them, after the embodiment of the present application encapsulates the above-mentioned more complex functional logic into the basic task node, these basic task nodes can be nested and used, so as to achieve the effect of realizing all complex logics and simplify the number of nodes. For example, a number 1 is added 10,000 times. At this time, there is a task node A (corresponding to the above-mentioned basic task node) to realize the addition of one to the number. If the task node A is not encapsulated, 10,000 task nodes A need to be connected. If the encapsulated loop node B (corresponding to the above-mentioned logical node) is used, it is only necessary to put the task node A into the task node B and set the number of cycles n=10,000 to achieve the above process. For another example, if it is necessary to call a large model to generate 100 stories (there is no association between the stories), since there is no association between the stories at this time (the tasks have no dependency management), we can run 100 story generation nodes at the same time to generate stories, without waiting for the previous story to be generated and then calling the large model to generate the next story, thereby greatly reducing the workflow running time and achieving the characteristics of multi-way parallel calling.

[0122] Among them, since we encapsulate complex logic into the logic node, there will be n child nodes in the logic node, each child node is an object, and the object has an id member. The relationship between the logic node and the internal node is represented by the mapping data structure of {"node_id":"node object"}. For example, there are three task nodes B, C, and D in the logic node A. At this time, the mapping data in the logic node A includes {"B node id":"B object", "C node id":"C object", "D node id":"D object"}.

[0123] Among them, after the logical nodes are obtained by simplifying the logic based on the dictionary data conversion, a node graph can be constructed based on the task nodes represented by each dictionary. For example, taking the four task nodes ABCD as an example, the edge information includes four pointing data. The first pointing data is: unique identifier (1), source node (task node A), target node (task node B) and condition (true); the second pointing data is: unique identifier (2), source node (task node A), target node (task node C) and condition (true); the third pointing data is: unique identifier (3), source node (task node B), target node (task node D) and condition (true); the fourth pointing data is: unique identifier (4), source node (task node C), target node (task node D) and condition (true).

[0124] Correspondingly, the mapping data includes {"A node id":"A object", "B node id":"B object", "C node id":"C object", "D node id":"D object"}.

[0125] Then, a node graph can be configured in which task node A points to task node B and task node C respectively, and task node B and task node C point to task node D. Among the four task nodes ABCD, task node A is the start node with an in-degree of 0, and task node D is the end node with an out-degree of 0.

[0126] In the embodiment of the present application, each task node is configured based on a finite state machine FSM. When an error occurs during the operation of a task node, there are corresponding exception handling and retry operations. If the task node runs successfully, the operation result is passed to the next task node. The task nodes communicate with each other using the same encapsulated Messages data structure, that is, the message transmission between task nodes is realized through a message passing mechanism.

[0127] Correspondingly, in an embodiment of the present application, node message transmission can be performed in the form of multi-coroutine asynchronous broadcast, and message filtering can be performed using conditional edges. For each task node, only when the conditional edge is True, the target node will receive the message and enter the running state. Among them, the conditional edge refers to the field "condition" of the edge dictionary described based on the dictionary. If the value of the field "condition" is True, it means that the task node can process the message transmitted by the previous task node, and then it can enter the running state. Among them, in an embodiment of the present application, "condition" can be a bool type, or it can be any lambda expression with a return value of bool type.

[0128] Among them, in the embodiment of the present application, the task nodes and workflow running results can also be streamed output through the callback function. In addition to passing the message to the next task node, each task node can also call back the result to the caller and maintain the message queue to realize the streaming output of the message so that the caller can quickly know the execution result of the task node.

[0129] In summary, the embodiment of the present application reduces the size of the tasks that each model needs to process by splitting a large generation task into multiple small generation subtasks and using the task processing model to process each generation subtask, which helps to give full play to the processing capacity of the model and also helps to avoid exceeding the upper limit of the model's processing capacity and causing inaccurate output results. The embodiment of the present application improves the accuracy of the generated target review information by processing the review task of the target component.

[0130] Among them, by grouping the target components and reviewing the component groups obtained from each group, it is helpful to improve the accuracy of the component group review based on the characteristic of small component data volume.

[0131] The flow orchestration information is constructed based on the processing timing information of the generated subtasks, and the execution of each generated subtask is controlled based on the flow orchestration information, thereby improving the accuracy of the generated target review information.

[0132] In order to better implement the information generation method of the present application, the present application also provides an information generation device based on the above information generation method. The meanings of the terms are the same as those in the above information generation method, and the specific implementation details can refer to the description in the method embodiment.

[0133] See also Figure 5 , Figure 5 : is a schematic diagram of the structure of the information generating device provided in the embodiment of the present application, and the information generating device can be specifically as follows:

[0134] A response module 201 is used to respond to a review information generation request for a target component and determine a generation task corresponding to the review information generation request;

[0135] A determination module 202 is used to split the generation task into at least one generation subtask and determine the task processing model corresponding to each generation subtask;

[0136] The generation module 203 is used to call each of the task processing models to process each of the generated subtasks to obtain target review information for the target component.

[0137] Optionally, in some embodiments of the present application, the task processing model includes an agent, and each of the agents processes a corresponding generation subtask respectively;

[0138] The generating subtask includes at least one of a target component obtaining subtask, a component grouping subtask, a preliminary review subtask, a review verification subtask, or a review information generating subtask, wherein the target component includes a newly added component.

[0139] Optionally, in some embodiments of the present application, calling each of the task processing models to process each of the generated subtasks to obtain target review information for the target component includes:

[0140] Determining processing timing information of each of the generated subtasks;

[0141] Calling each of the task processing models in sequence according to the processing timing information, and, for any of the generated subtasks, processing the generated subtask according to the task processing model corresponding to the generated subtask and a previous processing result to obtain a model processing result;

[0142] The model processing result of the last generated subtask is used as the target review information, and the previous processing result includes the model processing result of the previous task processing model.

[0143] Optionally, in some embodiments of the present application, for any of the generation subtasks, processing the generation subtask according to the task processing model corresponding to the generation subtask and a previous processing result to obtain a model processing result includes:

[0144] If the generating subtask includes a component grouping subtask, obtaining a component calling relationship of the target component;

[0145] According to the component call relationship and the preset component quantity, the target component is divided into at least one component group, and each component group is processed according to the task processing model corresponding to the component grouping subtask to obtain the model processing subresult of each component group;

[0146] The model processing sub-results of each of the component groups are combined to obtain a model processing result.

[0147] Optionally, in some embodiments of the present application, calling each of the task processing models in sequence according to the processing timing information includes:

[0148] Determine the flow arrangement information corresponding to the processing timing information, where the flow arrangement information is obtained by arranging the execution flow of each of the generated subtasks in the form of task nodes;

[0149] The calling of each of the task processing models is controlled based on the flow orchestration information.

[0150] Optionally, in some embodiments of the present application, the configuration of the flow arrangement information includes:

[0151] Generate task nodes for each generation subtask;

[0152] Determine the association relationship between the task nodes based on the processing timing information;

[0153] The flow arrangement information is generated according to the task nodes and the association relationship between the task nodes.

[0154] Optionally, in some embodiments of the present application, generating the flow arrangement information according to each of the task nodes and the association relationship between the task nodes includes:

[0155] Determine an edge dictionary between each of the task nodes according to the association relationship;

[0156] Constructing a node graph according to the node dictionary of each task node and the edge dictionary;

[0157] Flow orchestration information is generated according to the node graph.

[0158] The embodiment of the present application comprises a response module 201, which is used to respond to a review information generation request for a target component, determine a generation task corresponding to the review information generation request, a determination module 202 splits the generation task into at least one generation subtask, and determines a task processing model corresponding to each generation subtask, and a generation module 203 calls each task processing model to process each generation subtask to obtain target review information for the target component.

[0159] Among them, the embodiment of the present application reduces the size of the task that each model needs to process by splitting a large generation task into multiple small generation subtasks and using the task processing model to process each generation subtask respectively, which helps to give full play to the processing capacity of the model and also helps to avoid exceeding the upper limit of the model's processing capacity and causing inaccurate output results. The embodiment of the present application improves the accuracy of the generated target review information by processing the review task of the target component.

[0160] In addition, the present application also provides an electronic device, such as Figure 6 As shown, it shows a schematic diagram of the structure of the electronic device involved in this application, specifically:

[0161] The electronic device may include components such as a processor 301 with one or more processing cores, a memory 302 with one or more computer-readable storage media, a power supply 303, and an input unit 304. Those skilled in the art will appreciate that Figure 6 The electronic device structure shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0162] The processor 301 is the control center of the electronic device. It uses various interfaces and lines to connect various parts of the entire electronic device. By running or executing software programs and / or modules stored in the memory 302, and calling data stored in the memory 302, it executes various functions of the electronic device and processes data, thereby monitoring the electronic device as a whole. Optionally, the processor 301 may include one or more processing cores; preferably, the processor 301 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 301.

[0163] The memory 302 can be used to store software programs and modules. The processor 301 executes various functional applications and data processing by running the software programs and modules stored in the memory 302. The memory 302 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 302 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 302 may also include a memory controller to provide the processor 301 with access to the memory 302.

[0164] The electronic device also includes a power supply 303 for supplying power to various components. Preferably, the power supply 303 can be logically connected to the processor 301 through a power management system, so as to manage charging, discharging, and power consumption through the power management system. The power supply 303 can also include any components such as one or more DC or AC power supplies, recharging systems, power supply device debugging circuits, power converters or inverters, and power status indicators.

[0165] The electronic device may further include an input unit 304, which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.

[0166] Although not shown, the electronic device may further include a display unit, etc., which will not be described in detail herein. Specifically in this embodiment, the processor 301 in the electronic device will load the executable files corresponding to the processes of one or more application programs into the memory 302 according to the following instructions, and the processor 301 will run the application programs stored in the memory 302, thereby implementing the steps in any one of the information generation methods provided in the embodiments of the present application.

[0167] The embodiment of the present application responds to a request for generating review information for a target component, determines a generation task corresponding to the review information generation request; splits the generation task into at least one generation subtask, and determines a task processing model corresponding to each generation subtask; calls each task processing model to process each generation subtask to obtain target review information for the target component.

[0168] Among them, by splitting a large generation task into multiple small generation subtasks, and using the task processing model to process each generation subtask, the size of the task that each model needs to process is reduced, which helps to give full play to the processing capacity of the model and also helps to avoid exceeding the upper limit of the model's processing capacity and causing inaccurate output results. The embodiment of the present application improves the accuracy of the generated target review information by processing the review task of the target component.

[0169] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.

[0170] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.

[0171] To this end, the present application provides a computer-readable storage medium, on which a computer program is stored. The computer program can be loaded by a processor to execute the steps in any information generation method provided in the present application.

[0172] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.

[0173] The computer-readable storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0174] Since the instructions stored in the computer-readable storage medium can execute the steps in any information generation method provided in the present application, the beneficial effects that can be achieved by any information generation method provided in the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.

[0175] The above is a detailed introduction to an information generation method, device, electronic device and computer-readable storage medium provided by the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for technical personnel in this field, according to the idea of ​​the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A method for generating information, characterized in that: The method comprises: In response to a review information generation request for a target component, determining a generation task corresponding to the review information generation request; Splitting the generation task into at least one generation subtask, and determining a task processing model corresponding to each of the generation subtasks; Each of the task processing models is called to process each of the generated subtasks to obtain target review information for the target component.

2. The information generation method according to claim 1, characterized in that: The task processing model includes agents, each of which processes a corresponding generation subtask; The generating subtask includes at least one of a target component obtaining subtask, a component grouping subtask, a preliminary review subtask, a review verification subtask, or a review information generating subtask, wherein the target component includes a newly added component.

3. The information generation method according to claim 1, characterized in that: The calling of each of the task processing models to process each of the generated subtasks to obtain target review information for the target component includes: Determining processing timing information of each of the generated subtasks; Calling each of the task processing models in sequence according to the processing timing information, and, for any of the generated subtasks, processing the generated subtask according to the task processing model corresponding to the generated subtask and a previous processing result to obtain a model processing result; The model processing result of the last generated subtask is used as the target review information, and the previous processing result includes the model processing result of the previous task processing model.

4. The information generation method according to claim 3, characterized in that: For any of the generation subtasks, the generation subtask is processed according to the task processing model corresponding to the generation subtask and the previous processing result to obtain the model processing result, including: If the generating subtask includes a component grouping subtask, obtaining a component calling relationship of the target component; According to the component call relationship and the preset component quantity, the target component is divided into at least one component group, and each component group is processed according to the task processing model corresponding to the component grouping subtask to obtain the model processing subresult of each component group; The model processing sub-results of each of the component groups are combined to obtain a model processing result.

5. The information generation method according to claim 3, characterized in that: The calling each of the task processing models in sequence according to the processing timing information includes: Determine the flow arrangement information corresponding to the processing timing information, where the flow arrangement information is obtained by arranging the execution flow of each of the generated subtasks in the form of task nodes; The calling of each of the task processing models is controlled based on the flow orchestration information.

6. The information generating method according to claim 5, characterized in that: The configuration of the flow arrangement information includes: Generate task nodes for each generation subtask; Determine the association relationship between the task nodes based on the processing timing information; The flow arrangement information is generated according to the task nodes and the association relationship between the task nodes.

7. The information generating method according to claim 6, characterized in that: The generating flow arrangement information according to each of the task nodes and the association relationship between the task nodes includes: Determine an edge dictionary between each of the task nodes according to the association relationship; Constructing a node graph according to the node dictionary of each task node and the edge dictionary; Flow orchestration information is generated according to the node graph.

8. An information generating device, characterized in that: The device comprises: A response module, configured to respond to a review information generation request for a target component and determine a generation task corresponding to the review information generation request; A determination module, used for splitting the generation task into at least one generation subtask, and determining the task processing model corresponding to each generation subtask; The generation module is used to call each of the task processing models to process each of the generated subtasks to obtain target review information for the target component.

9. An electronic device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the information generating method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the information generating method according to any one of claims 1 to 7 are implemented.