Training method of large language model and related method, device, equipment and medium

By constructing tag node strings through hierarchical traversal and node splitting methods, and training a large language model, the redundancy and limitations of node string serialization description are resolved, the accuracy of logical relationship understanding and reasoning of the large language model is improved, and the quality and computational efficiency of generative reasoning are enhanced.

CN123068944APending Publication Date: 2026-11-10TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510599646.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-09
Publication Date
2026-11-10

AI Technical Summary

Technical Problem

Existing technologies have redundancy and limitations in the serialization description of node strings in directed acyclic graphs, which makes it difficult for large language models to accurately understand the processing logic relationships between data processing tasks and easily leads to reasoning errors.

Method used

By employing hierarchical traversal and node splitting methods, a label node string of a directed acyclic graph of samples is constructed, and a large language model is trained using the target loss value to improve the accuracy and robustness of node string generation.

Benefits of technology

It improves the accuracy of large language models in understanding the logical relationships between data processing tasks, enhances the quality and computational efficiency of generative reasoning, and reduces the waste of computing resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123068944A_ABST
    Figure CN123068944A_ABST
Patent Text Reader

Abstract

The present disclosure provides a large language model training method and related method, device, equipment and medium. Including: obtaining a sample directed acyclic graph, performing hierarchical traversal processing on the sample directed acyclic graph to obtain a graph hierarchy corresponding to each graph node in the graph; performing layer description processing on the graph nodes of each graph hierarchy in ascending order of the graph hierarchy to obtain layer description content corresponding to each graph hierarchy, connecting each layer description content in ascending order of the graph hierarchy to obtain a label node string; performing node splitting processing on the sample directed acyclic graph, performing node reconstruction processing based on the initial node set obtained by splitting to obtain a sample node set; inputting the sample node set into a preset large language model to perform node string generation processing and obtain a predicted node string; training the preset large language model according to a target loss value determined based on the difference between the predicted node string and the label node string to obtain a target large language model. The method can improve the quality of the large language model in generating the node string.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of natural language processing technology, and more specifically, to a training method and related methods, apparatus, devices and media for a large language model. Background Technology

[0002] A Directed Acyclic Graph (DAG) is an acyclic graph structure composed of graph nodes and directed edges. Due to its directed and acyclic properties, DAG can accurately represent structural information such as task dependencies, resource scheduling, and knowledge associations. Therefore, in reasoning scenarios of large language models, DAG is often used to represent and process complex structured information to help the model understand and reason about specific tasks.

[0003] As a serialized description of a directed acyclic graph (DAG), a node string can linearly arrange the graph nodes in a DAG according to topological order, transforming them into a sequence that conforms to the input format of a large language model. This facilitates the large language model's understanding and learning of the structural information contained in the graph, and allows it to capture the processing logic relationships between the data processing tasks (such as image generation or dictionary retrieval) represented by the graph nodes based on this structural information, thereby enabling reasoning and analysis of the task processing results.

[0004] Because the relationships between the data processing tasks represented by graph nodes are mostly ambiguous—for example, the processing logic between creative design, campaign planning, and budget adjustment in an advertising scenario is not intuitive—the model needs to transform the graph nodes corresponding to the data processing tasks into understandable node strings. However, existing technologies for transforming node strings have redundancy and limitations, which can easily lead to large language models failing to accurately understand the processing logic relationships between data processing tasks, resulting in inference errors. Summary of the Invention

[0005] This disclosure provides a training method for a large language model, as well as related methods, apparatus, devices, and media, which can improve the accuracy of the large language model in serializing directed acyclic graphs, thereby improving the generation quality of node strings.

[0006] According to one aspect of this disclosure, a method for training a large language model is provided. The method includes: acquiring a sample directed acyclic graph (DAG), and performing a hierarchical traversal on the DAG to obtain a graph hierarchy corresponding to each graph node in the DAG, where each graph node represents a corresponding data processing task; performing layer description processing on the graph nodes corresponding to each graph hierarchy in the DAG according to the ascending order of the graph hierarchy to obtain layer description content corresponding to each graph hierarchy, and connecting each layer description content according to the ascending order of the graph hierarchy to obtain a string of label nodes corresponding to the DAG; performing node splitting on the DAG, and performing node reconstruction processing based on the initial node set obtained from the splitting to obtain a sample node set; inputting the sample node set into a preset large language model for node string generation processing to obtain a predicted node string; determining a target loss value based on the difference between the predicted node string and the label node string, and training the preset large language model using the target loss value to obtain a trained target large language model.

[0007] According to another aspect of this disclosure, a task processing method is provided, the method comprising: obtaining a set of nodes to be organized, wherein each node in the set of nodes to be organized represents a data processing task corresponding to a trained target large language model; inputting the set of nodes to be organized into the trained target large language model for node string generation processing to obtain a target node string corresponding to the set of nodes to be organized; and, based on the target node string, sequentially executing the data processing task represented by each node in the set of nodes to be organized to obtain a task processing result; wherein the trained target large language model is obtained according to the above-described large language model training method.

[0008] According to another aspect of this disclosure, a training apparatus for a large language model is provided, the apparatus comprising: a hierarchy determination module, a label determination module, a node splitting module, a model prediction module, and a model training module.

[0009] The hierarchy determination module is used to obtain the sample directed acyclic graph and perform hierarchical traversal processing on the sample directed acyclic graph to obtain the graph hierarchy corresponding to each graph node in the sample directed acyclic graph, wherein the graph node represents the corresponding data processing task.

[0010] The label determination module is used to perform layer description processing on the graph nodes corresponding to each graph level in the sample directed acyclic graph according to the ascending order of the graph hierarchy, to obtain the layer description content corresponding to each graph level, and to connect each layer description content according to the ascending order of the graph hierarchy to obtain the label node string corresponding to the sample directed acyclic graph.

[0011] The node splitting module is used to split the sample directed acyclic graph into nodes and reconstruct the nodes based on the initial node set obtained from the splitting to obtain the sample node set.

[0012] The model prediction module is used to input the sample node set into a preset large language model for node string generation processing to obtain the predicted node string;

[0013] The model training module is used to determine the target loss value based on the difference between the predicted node string and the label node string, and to train the preset large language model using the target loss value to obtain the trained target large language model.

[0014] Optionally, the label determination module may include: a hierarchy determination submodule, a content determination submodule, and a content output submodule. The hierarchy determination submodule is used to determine the initial graph hierarchy and the final graph hierarchy corresponding to the sample directed acyclic graph based on the graph hierarchy corresponding to each graph node in the sample directed acyclic graph, and to determine the initial graph hierarchy as the target graph hierarchy. The content determination submodule is used to perform layer description processing on the target graph node and its corresponding child nodes for each target graph node in the target graph hierarchy to obtain the layer description content corresponding to the target graph hierarchy, and to associate and store the target graph hierarchy and its corresponding layer description content. The content output submodule is used to, when detecting that the target graph hierarchy is less than the final graph hierarchy, determine the next graph hierarchy in ascending order as the new target graph hierarchy, and return to execute layer description processing on the target graph node and its corresponding child nodes for each target graph node in the target graph hierarchy to store the new layer description content, until the target graph hierarchy is equal to the final graph hierarchy, and output the stored layer description content corresponding to each graph hierarchy of the sample directed acyclic graph.

[0015] Optionally, the content determination submodule may include a node detection unit and a content generation unit. The node detection unit is used to perform child node detection on each graph node in the target graph hierarchy, determining graph nodes with at least one child node as target graph nodes and skipping graph nodes without child nodes. The content generation unit is used to perform layer description processing on each target graph node in the target graph hierarchy, including the target graph node and its corresponding set of child nodes, to obtain the layer description content corresponding to the target graph hierarchy.

[0016] Optionally, the content generation unit may include: a set acquisition subunit, an analysis and processing subunit, a relationship processing subunit, and a description processing subunit. The set acquisition subunit is used to acquire the set of child nodes corresponding to the target graph node; the analysis and processing subunit is used to perform relationship analysis processing on the set of child nodes to obtain the node relationships between each child node and other child nodes; the relationship processing subunit is used to perform child node description processing on each child node in the set of child nodes based on the node relationships between each child node and other child nodes to obtain child node description content; the description processing subunit is used to perform layer description processing on the target graph node and the child node description content using layer description characters to obtain layer description content corresponding to the target graph layer.

[0017] Optionally, the node relationship includes at least a hierarchical classification relationship, and the relationship processing subunit can be specifically used to: select classification sub-nodes under each hierarchical classification from the set of sub-nodes based on the hierarchical classification relationship between each sub-node and other sub-nodes; and perform sub-node description processing based on the classification sub-nodes under each hierarchical classification by merging hierarchical characters to obtain the sub-node description content.

[0018] Optionally, the node relationships include at least sibling classification relationships, and the relationship processing subunit can be further specifically used to: select reference classification subnodes and non-reference classification subnodes from the set of subnodes based on the sibling classification relationships between each subnode and other subnodes; perform description update processing on the non-reference classification subnodes according to the reference classification subnodes to obtain the summary description subnodes corresponding to the non-reference classification subnodes; and perform subnode description processing on the summary description subnodes, the corresponding non-reference classification subnodes, and the reference classification subnodes through description update characters to obtain the subnode description content.

[0019] Optionally, the node relationship includes at least a context relationship, and the relationship processing subunit can also be specifically used to: generate extended child nodes based on the context relationship between each child node and other child nodes; and perform child node description processing on the extended child nodes and each child node through node extension characters to obtain child node description content.

[0020] Optionally, the hierarchy determination module may include: an initial processing submodule, a start acquisition submodule, and a hierarchy traversal submodule. The initial processing submodule is used to perform hierarchy initialization processing on each graph node in the sample directed acyclic graph, assigning a preset value to the graph hierarchy corresponding to each graph node. The start acquisition submodule is used to acquire each start graph node with an in-degree of zero in the sample directed acyclic graph, assigning an initial value to the graph hierarchy corresponding to each start graph node. The hierarchy traversal submodule is used to perform hierarchy traversal processing on the sample directed acyclic graph based on the graph hierarchy corresponding to each start graph node assigned an initial value, to obtain the graph hierarchy corresponding to each graph node in the sample directed acyclic graph.

[0021] Optionally, the node splitting module may include: a node splitting submodule, a deletion processing submodule, and an addition processing submodule. The node splitting submodule is used to split the sample directed acyclic graph into nodes to obtain an initial node set; the deletion processing submodule is used to partially delete nodes from the initial node set to obtain a partial node set; and the addition processing submodule is used to add noise to the partial node set to insert noisy graph nodes, thus obtaining a sample node set.

[0022] Optionally, the node splitting submodule can be specifically used to: obtain key information of the sample task corresponding to the sample directed acyclic graph; perform node splitting processing on the sample directed acyclic graph to obtain a split node set; calculate the correlation between the key information and each sample graph node in the split node set to obtain the information correlation degree corresponding to each sample graph node; and perform node annotation processing on the associated sample graph node corresponding to the maximum information correlation degree in the split node set based on the key information to obtain an initial node set.

[0023] Optionally, the training device for the large language model may further include a label update module, specifically used for: performing noise description processing on the noise graph nodes to obtain noise description content; performing node annotation processing on the associated sample graph nodes corresponding to the key information to obtain annotation description content; and adding the noise description content and annotation description content to the label node string to obtain the updated label node string.

[0024] According to another aspect of this disclosure, a task processing apparatus is provided, the apparatus comprising: a node acquisition module, a target generation module, and a task processing module.

[0025] The node acquisition module is used to acquire a set of nodes to be organized, wherein each node in the set of nodes to be organized represents the data processing task corresponding to the trained target large language model.

[0026] The target generation module is used to input the set of nodes to be organized into the trained target large language model to generate node strings, thereby obtaining the target node strings corresponding to the set of nodes to be organized.

[0027] The task processing module is used to execute the data processing task represented by each node in the set of nodes to be organized, based on the target node string, and obtain the task processing result.

[0028] The trained target large language model is obtained by the large language model training method described in the above embodiments.

[0029] Optionally, the target generation module can be specifically used to: input the set of nodes to be organized into the trained target large language model for node string generation processing to obtain the initial node string corresponding to the set of nodes to be organized; obtain the task description information corresponding to the set of nodes to be organized; and add the task description information to the head position of the initial node string to obtain the target node string.

[0030] Optionally, adding the task description information to the head of the initial node string to obtain the target node string includes: calculating the description weight of each target layer description content in the initial node string according to the task description information to obtain the description weight corresponding to each target layer description content; reconnecting each target layer description content in descending order of the description weights to obtain a weighted connection node string; and adding the task description information to the head of the weighted connection node string to obtain the target node string.

[0031] According to another aspect of this disclosure, a computer-readable storage medium is provided that stores a computer program, wherein the above-described training method and related methods for a large language model are executed when the computer program is run by a processor.

[0032] According to another aspect of this disclosure, a computer device is provided, the computer device including a processor and a memory, the memory storing a computer program, which, when invoked by the processor, executes the above-described training method and related methods for a large language model.

[0033] According to another aspect of this disclosure, a computer program product is provided, comprising a computer program stored in a storage medium; a processor of a computer device reads the computer program from the storage medium and executes the computer program, causing the computer device to execute the above-described training method and related methods for a large language model.

[0034] Node strings, as a serialized description of a directed acyclic graph (DAG), can linearly arrange graph nodes in a DAG according to topological order, transforming them into sequential descriptive text that conforms to the input format of a large language model. The large language model can then understand and learn the structural information contained in the DAG based on the input node strings, capturing the processing logic relationships between data processing tasks (such as image generation or dictionary retrieval) represented by the graph nodes, and achieving reasoning analysis for task processing. However, in practical applications, the data processing tasks represented by graph nodes are often in a state of ambiguous logical relationships and unclear structure. Therefore, this disclosure proposes a supervised training method to train a large language model to learn to organize scattered graph nodes into regular node strings that conform to the structure of a DAG. Thus, it is necessary to construct training data for supervised training, i.e., given input and label data.

[0035] The process of constructing training data may include: acquiring a sample directed acyclic graph (DAG), and performing a hierarchical traversal on the DAG to obtain the graph hierarchy corresponding to each graph node in the DAG. This graph hierarchy refers to the "topological depth" from the initial graph node with an in-degree of zero to the current graph node based on the dependencies between nodes (i.e., the direction of the edges). Then, according to the ascending order of the graph hierarchy, perform layer description processing on the graph nodes corresponding to each graph hierarchy in the sample DAG to obtain the layer description content for each graph hierarchy. Connect each layer description content according to the ascending order of the graph hierarchy to obtain the label node string corresponding to the sample DAG. This label node string is the label data in the training data and can be used as the "correct answer" to tell the model to learn during subsequent training. Further, perform node splitting processing on the sample DAG, and perform node reconstruction processing based on the initial node set obtained from the splitting to obtain the sample node set, which is the given input in the training data. The sample node set is then input into a pre-defined large language model for node string generation to obtain predicted node strings. A target loss value is determined based on the difference between the predicted node strings and the label node strings. This target loss value measures the gap between the model's output predicted node strings and the label node strings, thus evaluating the model's learning performance. The pre-defined large language model is then trained using the target loss value to obtain the trained target large language model. The graph structure description method used to construct the label node strings of the training data is a layer description method for directed acyclic graphs of samples proposed in this embodiment.

[0036] Compared to single-path sequence description methods and preceding sequence path sequence description methods in related technologies, the redundancy and limitations of these methods easily lead to a large amount of redundant information in the described node strings and the loss of local structural relationships between nodes. However, the layer description method of this disclosure only describes the paths between parent and child nodes at each graph level in the directed acyclic graph of the sample. This avoids shared paths that occur in single-path sequence descriptions, thereby reducing redundant information. Furthermore, since the layer description content of each graph level describes both the preceding node (parent node) and the subsequent node (child node), the dependency relationships between parent and child nodes at each graph level are explicitly expressed. This preserves the local structural relationships in the directed acyclic graph of the sample that are lost in preceding sequence path sequence descriptions. Therefore, this layer description method can effectively improve the accuracy of graph structure description of directed acyclic graphs of samples, thereby improving the quality of label node strings. Based on this, training a large language model with high-quality label node strings can improve the accuracy of the large language model in generating node strings. In the context of large language models, this can improve the accuracy of the large language model in understanding the processing logic relationship between data processing tasks based on node strings, thereby improving the quality of generative reasoning of large language models.

[0037] Furthermore, since the layer description method for directed acyclic graphs in this embodiment is layer-by-layer, meaning that the layer description content corresponding to each graph layer is relatively independent, if a reasoning error occurs locally during the inference process based on node strings, it will not affect the reasoning of other graph layers, thereby improving the robustness and stability of the overall reasoning computation. Moreover, compared with the preorder path sequence description method of related technologies, the result is a graph structure description containing all graph nodes in the directed acyclic graph. When the computer device performs reasoning computation based on the relatively independent layer description content, it can effectively save computing resources and improve computing efficiency.

[0038] Other features and advantages of this disclosure will be set forth in the following description and will be apparent in part from the description or may be learned by practicing the disclosure. The objectives and other advantages of this disclosure may be realized and obtained by means of the structures particularly pointed out in the description, claims and drawings. Attached Figure Description

[0039] To more clearly illustrate the technical solutions in the embodiments of this disclosure, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0040] Figure 1This diagram illustrates a system architecture provided by an embodiment of the present disclosure.

[0041] Figure 2 This diagram illustrates a system deployment according to an embodiment of the present disclosure.

[0042] Figure 3 This diagram illustrates an application scenario of a multilingual news classification system provided by an embodiment of the present disclosure.

[0043] Figure 4 This diagram illustrates an application scenario of a video generation scenario provided by an embodiment of the present disclosure.

[0044] Figure 5 The diagram illustrates a flowchart of a training method for a large language model provided in an embodiment of this disclosure.

[0045] Figure 6 This diagram illustrates a directed acyclic graph of a task in a medical assistance scenario provided by an embodiment of this disclosure.

[0046] Figure 7 This diagram illustrates a directed acyclic graph of data in a multimodal question-answering scenario provided by an embodiment of this disclosure.

[0047] Figure 8 This diagram illustrates the training of a large language model provided in an embodiment of the present disclosure.

[0048] Figure 9 This diagram illustrates a method for determining the hierarchy of a graph according to an embodiment of the present disclosure.

[0049] Figure 10 This diagram illustrates the construction of training data according to an embodiment of the present disclosure.

[0050] Figure 11 This diagram illustrates a flowchart of a task processing method provided in an embodiment of the present disclosure.

[0051] Figure 12 This diagram illustrates a block diagram of a training apparatus for a large language model provided in an embodiment of the present disclosure.

[0052] Figure 13 This is a block diagram of a task processing device provided in an embodiment of this disclosure.

[0053] Figure 14 This is a block diagram of a computer device provided in an embodiment of the present disclosure.

[0054] Figure 15 This is a block diagram of a computer-readable storage medium provided in an embodiment of this disclosure. Detailed Implementation

[0055] To enable those skilled in the art to better understand the solutions disclosed herein, the technical solutions in the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of this disclosure, and not all embodiments. The implementation methods described with reference to the accompanying drawings are exemplary and are only used to explain this disclosure, and should not be construed as limiting this disclosure. Based on the embodiments in this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.

[0056] In some processes described in the specification, claims, and the foregoing drawings, multiple steps are included in a specific order. However, it should be clearly understood that these steps may not be performed in the order they appear herein, or may be performed in parallel. The step numbers are merely used to distinguish different steps and do not themselves represent any execution order. Furthermore, descriptions such as "first," "second," or "objective" in this document are used to distinguish similar objects and are not necessarily used to describe a specific order, sequence, or quantity.

[0057] It is worth noting that in the specific embodiments of this disclosure, task description information and other related data are involved. When the above embodiments of this disclosure are applied to specific products or technologies, permission or consent from the target is required, and the collection, use, and processing of related data must comply with relevant laws, regulations, and standards. For example, when an embodiment of this disclosure needs to obtain task description information, separate permission or consent for the task description information can be obtained through pop-up windows or redirection to a confirmation page. After obtaining separate permission or consent, the necessary related data for enabling the embodiments of this disclosure to operate normally can then be obtained.

[0058] The Large Language Model (LLM) disclosed in this embodiment is a language model composed of an artificial neural network with many parameters (typically billions or more weights), trained on a large amount of unlabeled text using self-supervised or semi-supervised learning. LLMs are general-purpose models that perform well on a wide range of tasks, rather than being trained for a specific task. Pre-trained on massive amounts of text data, LLMs excel in understanding grammatical structures, semantic relationships, and reasoning about complex problems. LLMs can be Transformer-based generative models. They can be widely applied to tasks such as translation, dialogue generation, classification / clustering, and explanation.

[0059] Directed acyclic graphs (DAGs) are commonly used in reasoning scenarios of large language models to represent and process complex, structured tasks or resources, aiding in model understanding and reasoning. Node strings, as a serialized description of a DAG, can linearly arrange nodes in a topological order, transforming them into a sequence that conforms to the input format of a large language model. This facilitates the model's understanding and learning of the structural information contained within the graph. Through this structural information, the logical relationships between the data processing tasks represented by the nodes can be obtained, enabling reasoning and analysis of the task processing results. Since the relationships between the data processing tasks represented by the nodes are often ambiguous, the large language model needs to transform the nodes corresponding to these tasks into understandable node strings.

[0060] Currently, technologies for serializing node strings during node transformation suffer from redundancy and limitations. Common description methods include single-path description and preorder sequence path description. Single-path description, similar to depth-first traversal, simply describes the node string along a single path. For example, node A has two child nodes (nodes B and C), node B has two child nodes (nodes D and E), and node C also has two child nodes (nodes F and G). Using single-path description, the node string would require multiple paths: [A,B,D], [A,B,E], [A,C,F], and [A,C,G]. This method results in duplicate paths, such as [A,B] and [A,C]. Such descriptions lead to significant redundancy in practical applications.

[0061] Preorder traversal path description generates a string of path description nodes sequentially according to the idea of ​​global traversal. Taking the example of nodes A to G above, if preorder traversal path description is used, the node string would be described by a single path: [A, B, C, D, E, F, G]. This description method cannot accommodate non-tree-like structural relationships between nodes. In practical applications, the structural relationships between nodes representing tasks usually do not have a strict tree structure, but rather complex relationships such as cross connections, making it difficult to describe the local features of the structural relationships between nodes, thus presenting limitations. If a large language model experiences a task execution error or missing node (e.g., C) in the sequence, it may cause the execution of tasks corresponding to subsequent nodes (e.g., D, E, F, G), thereby affecting the overall task processing.

[0062] Therefore, existing technologies have redundancy and limitations in their node string transformation methods, which can easily lead to large language models failing to accurately understand the processing logic relationships between data processing tasks, resulting in inference errors. To address these issues, embodiments of this disclosure propose training methods and related methods for large language models. The system implementation environment and related application scenarios of the methods involved in this disclosure will be described below.

[0063] Please see Figure 1 , Figure 1 A schematic diagram of a system architecture is shown. The training method and related methods for the large language model provided in this disclosure can be applied to system 100. The data acquisition device 110 is used to acquire a large amount of training data, i.e., a sample directed acyclic graph (DAG). This sample DAG can be obtained by the data acquisition device 110 node-based on the acquired tasks with processing logical relationships. For example, for tasks such as compiling code, running tests, and generating documents in a software development project, node-based methods are used to obtain the sample DAG corresponding to the software development project. The data acquisition device 110 can store the sample DAG in a database 120. The training device 130 can perform supervised fine-tuning of the preset large language model based on the training data in the database 120 to obtain the final target large language model, i.e., target model 101.

[0064] The execution device 140 can deploy the target model 101 trained by the training device 130. During the computation and other related processing in the processing module 141 of the execution device 140, the execution device 140 can call data, programs, etc. in the data storage system 142 for corresponding computational processing, and store the processing results and instructions obtained from the computational processing into the data storage system 142. Data transmission between the execution device 140 and the user device 150 can be performed through an input / output (I / O) interface. For example, when the execution device 140 receives a task processing request sent by the user device 150, it calls the target large language model to perform node string generation processing on the set of nodes to be organized in the task processing request, obtains the target node string corresponding to the set of nodes to be organized, and, based on the target node string, sequentially executes the data processing task represented by each node in the set of nodes to be organized, obtains the task processing result, and returns the task processing result to the user device 150 for display.

[0065] The aforementioned training device 130, execution device 140, and user device 150 can be computer devices such as servers or terminals. The server can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), blockchain, and big data and artificial intelligence platforms. The terminal can be a smartphone, laptop, tablet, desktop computer, etc.

[0066] It should be noted that, Figure 1This is merely a schematic diagram of a system architecture provided by an embodiment of this disclosure. The system architecture described in this disclosure is for the purpose of more clearly illustrating the technical solutions of this disclosure and does not constitute a limitation on the technical solutions provided by this disclosure. For example, Figure 1 The execution device 140 can be used to deploy the trained target model 101. In other cases, the user device 150 can also directly deploy the trained target model 101 and perform task processing locally.

[0067] Please see Figure 2 , Figure 2 A schematic diagram of a system deployment is shown. Exemplarily, the training method and related methods for the large language model provided in this disclosure embodiment can also be deployed on, for example, Figure 2 The system shown is a C / S (Client / Server) architecture system. This system may include servers, gateways, the internet, and computer equipment.

[0068] A server is a computer system that provides certain services to the server-side. Compared to ordinary computer equipment, servers have higher requirements in terms of stability, security, and performance. Figure 2 As shown, server 210 can be a single high-performance computer, a cluster of multiple high-performance computers, a portion of a single high-performance computer (e.g., a virtual machine), or a combination of portions of multiple high-performance computers (e.g., virtual machines) within a network platform. A gateway is also known as an internetwork connector or protocol converter. For example... Figure 2 As shown, gateway 220 achieves network interconnection at the transport layer via Internet 230, and is a computer system or device that acts as a translator. Between two systems using different communication protocols, data formats, or languages, or even completely different architectures, a gateway is a translator. At the same time, a gateway can also provide filtering and security functions.

[0069] Computer devices can send requests to servers, requesting access to or use resources, data, or services on the server. For example... Figure 2 As shown, the computer device can include various forms such as a tablet computer 240a, a desktop computer 240b, a laptop computer 240c, and a personal digital assistant (not identified). Furthermore, it can be a single computer device or a collection of multiple computer devices. The computer device is capable of communicating with the Internet 230 via wired or wireless means. Figure 2 As shown, tablet computer 240a can communicate with the Internet 230 via wireless router 250. Similarly, messages sent by desktop computer 240b to server 210 can be transmitted to the corresponding server 210 via gateway 220. Messages sent by server 210 to computer devices can also be transmitted to the corresponding laptop computer 240c via gateway 220.

[0070] In some embodiments, the training method and task processing method of the large language model provided in this disclosure can be implemented partly on a server and partly on a computer device. For example, the training step of the large language model is performed on the server, a target large language model is obtained by training based on the sample directed acyclic graph, and the target large language model is deployed on the server. When the server receives a task processing request sent by the computer device, it generates a corresponding target node string for the set of nodes to be organized based on the target large language model, and performs the data processing task represented by each node in the set of nodes to be organized based on the target node string to obtain the task processing result, and then returns the task processing result to the computer device.

[0071] It should be noted that, Figure 2 This is merely a schematic diagram of a system deployment provided by an embodiment of this disclosure. The system deployment scheme described in this disclosure is only for the purpose of more clearly illustrating the technical solutions of this disclosure and does not constitute a limitation on the technical solutions provided by this disclosure. For example, in some other embodiments, the training method and related methods of the large language model provided by this disclosure can all be implemented on a computer device, that is, the training steps of the large language model and the related steps of task processing are completed locally by the computer device. As those skilled in the art will understand, with the evolution of system deployment schemes, the technical solutions provided by the embodiments of this invention are also applicable to similar technical problems.

[0072] The training method and related methods of the large language model disclosed herein can be applied in a variety of scenarios, such as... Figure 3 The multilingual news categorization scenarios shown and Figure 4 The video generation scenario shown is an example.

[0073] (1) Multilingual news classification scenario.

[0074] The application goal of multilingual news classification is to classify news content from multiple different language sources (such as sports, education, and entertainment). This process is not just a simple text classification; it requires handling multiple stages, such as language detection, text preprocessing, feature extraction, and classification model training. These tasks have complex dependencies on each other. To ensure clarity regarding the preconditions and subsequent relationships between tasks, prevent omissions, misunderstandings, or task failures due to incorrect execution, and improve overall task execution efficiency, a large language model can be used to construct a node string of a directed acyclic graph (DAG) for the scenario before executing any tasks. Therefore, the training method for the large language model provided in this embodiment can be used to develop a task relationship generation system. The various tasks required for the multilingual news classification scenario are then input into the task relationship generation system, which generates the corresponding node string of the DAG for the multilingual news classification scenario.

[0075] In some embodiments, such as Figure 3 As shown, the task relationship generation system 300 may include a server 311 deployed on a cloud server 310 and a client 321 deployed on a computer 320. The server 311 can mainly perform complex calculations or logical processing. The client 321 can mainly provide an interactive interface, sending node string generation requests to the server 311 and displaying the processing results returned by the server 311 on the interactive interface. In multilingual news classification scenarios, staff can add the required task name (e.g., language detection, text preprocessing, feature extraction, classification model training, model evaluation and tuning, prediction classification) and task-related information on the interactive interface of the client 321. After completing the task addition, they can click the "Start Generation" button.

[0076] Furthermore, client 321 responds to the click operation by generating a node string generation request and sends this request to server 311 on cloud server 310. Server 311 then uses the target large language model to process the node string generation request for each task, obtaining the corresponding task node string and directed acyclic graph (DAG). This task node string and DAG are returned to client 321 on computer 320, where client 321 displays them to the worker on the interactive node. Optionally, the worker can also click the task processing button to enter the task processing interface. In this interface, the task node string and specific data to be processed (e.g., news reports in different languages) can be input into the general language model. The general language model then performs multilingual news classification based on the task node string.

[0077] (2) Video generation scenario.

[0078] Large language models can be used for multimodal content generation tasks, such as... Figure 4 As shown, the large language model automatically generates personalized short videos based on user-provided materials. A video generation system can be developed using the training method of the large language model provided in this embodiment. This system is deployed on a server 411 of a cloud server 410 and a client (video creation app) 320 on a mobile phone 330. Users can tell the creation assistant (large language model) the desired video via chat on the video creation assistant interface of the client 320, for example, to produce a short video for a product. After receiving the video cover image, product introduction text, and product usage video clips uploaded by the user via the mobile phone 330, the cloud server 410 can call the server 411 to generate the video based on these materials.

[0079] For example, server 411 can obtain video preference data corresponding to the user based on the user's account, such as language style, music intensity, and text density. Further, this data is represented in the form of graph nodes, for example, node A: video cover image, node B: product introduction text, node C: product usage video clip, node D: product review text (obtained from social media), node E: background music clip (user-selected style), and node G: video preference data. The target large language model provided in this embodiment is then invoked to generate a corresponding target node string based on these nodes. Further, the video creation large language model can generate a target video based on the target node string and the data corresponding to these nodes.

[0080] It should be noted that, Figure 3 and Figure 4 These are merely illustrative diagrams illustrating two application scenarios provided by embodiments of this disclosure. The application scenarios described in these embodiments are only for clearer explanation of the technical solutions provided by these embodiments and do not constitute a limitation on the technical solutions provided by these embodiments. The training method and related methods for large language models provided by these embodiments can also be applied to other application scenarios that require generating node strings for related tasks. As those skilled in the art will understand, with the evolution of application scenarios, the technical solutions provided by the embodiments of this invention are also applicable to similar technical problems.

[0081] According to one embodiment of this disclosure, a method for training a large language model is provided. This method can be executed by a computer device (e.g., a desktop computer, laptop computer, or other terminal device with certain processing capabilities), which at least has storage, computation, and communication functions. Figure 5 This embodiment illustrates a flowchart of the training method for a large language model. Figure 5 As shown, the training method for this large language model can include the following execution steps.

[0082] To facilitate understanding of the solution, the relevant concepts of directed acyclic graphs (DAGs) involved in this disclosure are first introduced. In the generative reasoning process of a large language model, the DAG serves as a structured representation to describe the processing logic relationships between various data processing tasks. Each graph node (vertex) in the DAG represents a data processing task, including task units and data units, serving as the basic objects for model reasoning and execution. A task unit refers to the action performed by the large language model to execute a specific processing operation, such as text classification, image generation, identity recognition, and data acquisition. A data unit refers to the resources that the large language model needs to access when performing a specific processing operation, such as text, software code, images to be enhanced, and sensor data. The directed edge connecting two graph nodes in the DAG represents the processing logic relationship between the data processing tasks corresponding to the two graph nodes, including task execution logic and data access logic. By understanding the corresponding DAGs, the large language model can efficiently reason about task content and schedule data resources in practical applications, thereby ensuring the accuracy and reliability of sequential generative reasoning.

[0083] Taking intelligent medical assistance scenarios as an example, the generative reasoning process of a large language model for patient disease diagnosis and treatment can be represented by a directed acyclic graph. For example... Figure 6 This diagram illustrates a directed acyclic graph (DAG) for a medical assistance scenario. After acquiring a patient's medical records and clinical test data, the large language model (MLM) can perform medical record analysis and clinical test analysis tasks, obtaining analytical results (e.g., frequent cough, mainly dry cough, occasional small amount of white sputum, fever two days ago, with a maximum temperature of 39.2 degrees Celsius, no obvious respiratory distress) and test analysis results (e.g., positive for Mycoplasma pneumoniae IgM). Further, the MLM can perform preliminary disease inference tasks based on the analytical and test analysis results, obtaining inference results (e.g., preliminary diagnosis of mycoplasma pneumonia, requiring lung imaging). Then, the MLM acquires the patient's lung X-ray image and performs diagnosis and treatment tasks, outputting the final diagnosis and treatment results. It can be seen that throughout the entire disease diagnosis and treatment process, the MLM executes the specific tasks represented by each node in the DAG based on the task execution logic relationships represented by the DAG.

[0084] Taking a multimodal question-answering scenario as an example, the generative reasoning process of a large language model interacting with a user in multimodal question answering can be represented by a directed acyclic graph. For example... Figure 7This diagram illustrates a directed acyclic graph (DAG) in a multimodal question-answering scenario. Imagine a user submitting a question to a large language model: "I noticed my tire is XXXXXXXX, this is a picture I took of the tire, is it leaking air?" When the large language model receives the user's question, it retrieves the tire image and the speech-recognized dialogue text. Based on these images, it performs task processing and compares the tire image with a normal reference image to obtain analysis results (e.g., the differences between the two tire images). Furthermore, the large language model can access maintenance knowledge documents and combine them with the analysis results to generate a response for the user. It can be seen that throughout the dialogue process, the large language model invokes the specific data represented by each node in the directed acyclic graph according to the data access logic.

[0085] The foregoing explains the definition and application of directed acyclic graphs (DAGs) and their nodes in this disclosure. In practical applications, the specific tasks and data resources represented by graph nodes are often in a state of ambiguous logical relationships and unclear structure, which corresponds to the following in the graph space: loosely distributed nodes and a lack of obvious connection dependencies. This disorder makes it impossible for graph nodes to directly support the generative reasoning process of large language models. To address this, this disclosure proposes to train large language models specifically to enable them to organize scattered nodes into regular layered descriptions (node ​​strings) that conform to the structure of a directed acyclic graph, thereby clarifying the preceding relationships (parent nodes) and subsequent relationships (child nodes) of each task or data, and improving the accuracy and efficiency of the large language model's understanding of reasoning task content and data resource scheduling.

[0086] In this embodiment of the disclosure, specialized training for a large language model refers to supervised training of the large language model using training data, such as... Figure 8 The diagram illustrating the training of a large language model shows how to split a given directed acyclic graph (DAG) into node sets. Then, a layered description is performed on the DAG to obtain a string of labeled nodes. These node sets and labeled nodes are used as training data, with the node sets serving as the given input and the labeled nodes as the ground truth. The node sets are then fed into a pre-defined large language model for node string generation, resulting in predicted node strings. The model's parameters are then updated using a target loss constructed from the labeled and predicted node strings—a process known as supervised training. In this way, the large language model learns to organize scattered nodes into layered descriptions conforming to the structure of a DAG, i.e., node strings. The specific training process of the large language model can be found in the following sections.

[0087] Step 110: Obtain the sample directed acyclic graph and perform a level-order traversal on the sample directed acyclic graph to obtain the graph level corresponding to each graph node in the sample directed acyclic graph.

[0088] The sample directed acyclic graph (DAG) refers to the DAG used to train the large language model in this embodiment. The graph nodes in the sample DAG represent corresponding data processing tasks, including task units and data units, serving as the basic objects for model inference and execution. This has been explained in detail above and will not be repeated here. For example, the sample DAG can be obtained through database calls and data collection / generation.

[0089] The database call can involve obtaining large-scale directed acyclic graphs (DAGs) from a publicly available graph database and adapting these DAGs to the training scenario of the large language model disclosed herein. Data collection and generation refers to collecting logically related tasks or data from the daily processing data of the large language model to generate sample DAGs. Embodiments of this disclosure can construct a set of sample DAGs, Graph = {G1, G2, ..., G...}, based on the obtained sample DAGs. n}, where n is the number of sample directed acyclic graphs in the sample directed acyclic graph set, n>1 & n∈N * This is to provide large-scale training data to meet the needs of supervised training.

[0090] Node strings, as a serialized description of directed acyclic graphs (DAGs), can linearly arrange the graph nodes in a topological order and transform them into sequential descriptive text that conforms to the input format of large language models. Related techniques include single-path description and preorder sequence path description, both of which have redundancy and limitations. This is because single-path description describes each path from a zero-in-degree node to a leaf node in the DAG as a separate path, forming a node string. This easily leads to multiple paths sharing a starting segment (prefix node), causing large language models to repeatedly encode the shared starting segment when reading the node string, resulting in data redundancy. Preorder sequence path description is based on a "traversal" idea, treating the entire DAG as a string of nodes accessed sequentially. In practical tasks, graph nodes form a graph structure, meaning there are cross connections (such as shared child nodes). Preorder sequences cannot express such complex dependencies or many-to-many relationships, lacking structural expressive power. Although emphasizing global order, it lacks local structural features; therefore, if a graph node in the node string is processed incorrectly, the entire process will fail.

[0091] Considering that traditional single-path description methods easily lead to a large amount of redundant information in complex node structures, while preorder sequence descriptions tend to lose structural relationships between nodes, especially when dealing with non-tree-shaped directed acyclic graph structures, this disclosure proposes a layered description method. The core of this method is to explicitly describe the path between parent and child nodes at each graph level in the directed acyclic graph. This clearly shows the predecessor (parent node) and successor (child node) of each graph node at each graph level, avoiding shared starting segments and reducing redundant information. Simultaneously, the layered description method can explicitly express parent-child connections, preserving the local structural features of the graph structure and meeting the practical needs of large language models for local reasoning in directed acyclic graphs. Since the layered description method of this disclosure requires explicitly describing the connection relationship between parent and child nodes at each graph level, it is first necessary to obtain the graph level corresponding to each graph node in the sample directed acyclic graph.

[0092] In some embodiments, the computer device can perform hierarchical initialization processing on each graph node in the sample directed acyclic graph (DAG), assigning a preset value to the graph hierarchy corresponding to each graph node, and obtaining each starting graph node with an in-degree of zero in the sample DAG, assigning an initial value to the graph hierarchy corresponding to each starting graph node. Further, based on the graph hierarchy corresponding to each starting graph node with the assigned initial value, a hierarchical traversal of the sample DAG is performed to obtain the graph hierarchy corresponding to each graph node in the sample DAG. The preset value is used to mark graph nodes, indicating that the graph hierarchy of that node has not been determined.

[0093] Graph level refers to the "topological depth" from the starting node to the current node in a sample directed acyclic graph (DAG), based on the dependencies between nodes (edge ​​directions). For example, the process of a computer device determining the graph level may include: initializing the sample DAG by setting the graph level of all nodes to "-1", indicating that their graph level has not yet been determined. Creating an empty queue to store the graph nodes to be processed. Next, finding all starting nodes in the sample DAG (nodes without predecessors, representing the beginning of the DAG), setting the graph level of each starting node to 0, and adding them to the created queue. Then, retrieving a node from the queue and traversing all its child nodes. For each child node, if its graph level is -1, setting its graph level to the current node's level plus 1, and adding the child node to the queue. In this way, through level-order traversal, the graph level corresponding to all nodes in the sample DAG can be determined step by step.

[0094] For example, Figure 9 The diagram illustrates the determination of the graph hierarchy. When performing a hierarchical traversal of the sample directed acyclic graph, each time a graph node is taken from the queue, its child nodes are added to the queue. Taking the hierarchical traversal of graph node 1 as an example, at the start of the hierarchical traversal, graph node 1 and graph node 2, which are the starting graph nodes, are first added to the queue (i.e., enqueued). Then, graph node 1 is dequeued, and all its child nodes, graph nodes 3 and 4, are traversed. At this point, the graph hierarchy of graph node 3 is -1, indicating that the graph hierarchy has not yet been determined. The graph hierarchy of graph node 3 is set to the graph hierarchy of graph node 1 [0] plus 1, i.e., the graph hierarchy is 1. The same process is repeated for graph node 4, which is also set to 1. Thus, by hierarchically traversing all graph nodes, the graph hierarchy of each graph node in the sample directed acyclic graph can be determined.

[0095] Step 120: Based on the ascending order of the graph hierarchy, perform layer description processing on the graph nodes corresponding to each graph hierarchy in the sample directed acyclic graph to obtain the layer description content corresponding to each graph hierarchy. Then, connect each layer description content according to the ascending order of the graph hierarchy to obtain the label node string corresponding to the sample directed acyclic graph.

[0096] Layer descriptions refer to textual content that describes the hierarchical structure between parent and child nodes. Layer descriptions can be obtained by connecting parent nodes and their corresponding child nodes using the layer description character "→", for example, the layer description "parent→C1,C2", where "parent" represents the parent node in the graph hierarchy, and "C1,C2" represents the child nodes corresponding to that parent node. The large language model can clearly understand the parent-child relationships and hierarchical structure between nodes in a directed acyclic graph through layer descriptions. In this embodiment, the node string generated from the sample directed acyclic graph to serve as label data is the label node string, which is obtained by connecting the layer descriptions corresponding to each graph hierarchy in the sample directed acyclic graph.

[0097] In some embodiments, since the graph hierarchy of a graph node refers to the "topological depth" from the starting graph node in the sample directed acyclic graph to that node based on the dependencies between nodes (edge ​​directions), that is, from the initial graph hierarchy to the final graph hierarchy of the sample directed acyclic graph, the graph hierarchy gradually increases with the increase of topological depth. Therefore, after determining the graph hierarchy of each graph node, the computer device can generate the layer description content corresponding to each graph hierarchy in ascending order according to the determined graph hierarchy. The computer device can start layer description processing from the initial graph hierarchy of the sample directed acyclic graph until it reaches the final graph hierarchy, and then output the layer description content corresponding to each graph hierarchy. The generation process of the layer description content corresponding to each graph hierarchy may include:

[0098] (1) Based on the graph hierarchy corresponding to each graph node in the sample directed acyclic graph, determine the initial graph hierarchy and the final graph hierarchy corresponding to the sample directed acyclic graph, and determine the initial graph hierarchy as the target graph hierarchy.

[0099] As an example, with Figure 9 Taking the sample directed acyclic graph as an example, after determining the graph level of each graph node in the sample directed acyclic graph, the initial graph level "0" and the final graph level "3" corresponding to the sample directed acyclic graph can be determined, and the initial graph level can be determined as the target graph level.

[0100] (2) For each target graph node in the target graph hierarchy, perform layer description processing on the target graph node and its corresponding child nodes to obtain the layer description content corresponding to the target graph hierarchy, and store the target graph hierarchy and its corresponding layer description content in association.

[0101] As an example, child node detection is performed on each graph node in the target graph hierarchy. Graph nodes with at least one child node are identified as target graph nodes, and graph nodes without child nodes are skipped. For each target graph node in the target graph hierarchy, layer description processing is performed on the target graph node and its corresponding set of child nodes to obtain the layer description content corresponding to the target graph hierarchy. For example... Figure 9 As shown, when the target graph level is 2, the graph level includes graph node 5, graph node 6, and graph node 7. Because graph node 5 and graph node 7 are found to have no child nodes, and graph node 6 is found to have child nodes, graph node 6 is determined as the target graph node. Layer description processing is performed on graph node 6 and the set of child nodes corresponding to graph node 6 to obtain the layer description content "6→8" corresponding to graph level "2".

[0102] In various large language model reasoning scenarios, such as knowledge graph construction, product system classification, bioinformatics modeling, and recommender system design, the directed acyclic graphs (DAGs) corresponding to these reasoning scenarios exhibit dynamic evolutionary characteristics in their local structures. This is because nodes at the same graph level have different node relationships, such as hierarchical classification relationships, sibling classification relationships, and contextual relationships. These node relationships make the understanding of DAGs by large language models diverse. Therefore, static layer description methods for DAGs can easily prevent large language models from accurately understanding the dynamically evolving local structure of the graph. To address this, this disclosure proposes a dynamic layer description method based on the node relationships between each child node and other child nodes, describing each child node in the child node set. This method aims to meet the need for diverse layer descriptions of DAGs with dynamic evolutionary characteristics.

[0103] As an example, when performing layer description processing on the target graph nodes and their corresponding child nodes, firstly, the set of child nodes corresponding to the target graph nodes is obtained, and the child node set is subjected to relationship analysis processing to obtain the node relationship between each child node and other child nodes. Further, based on the node relationship between each child node and other child nodes, each child node in the child node set is subjected to child node description processing to obtain the child node description content. Then, layer description processing is performed on the target graph nodes and child node description content through layer description characters to obtain the layer description content corresponding to the target graph layer.

[0104] Relationship analysis processing refers to analyzing the node relationships between each graph node and other child nodes in the child node set. These relationships can include at least hierarchical classification relationships, sibling classification relationships, and contextual relationships. Hierarchical classification relationships refer to the hierarchical subordinate classification relationships between graph node categories in a classification system. For example, graph node A represents mobile phone products, and graph node B represents smartphone products; there is a hierarchical classification relationship between graph node A and graph node B. Sibling classification relationships refer to the same-level classification relationships between graph node categories in a classification system. For example, graph node A represents cats, and graph node B represents canines; both graph node A and graph node B belong to the animal category, and there is a hierarchical classification relationship between graph node A and graph node B. Contextual relationships refer to the semantic or structural connections between graph nodes, such as causal reasoning relationships. New extended nodes can be generated through the contextual relationship large language model. The following will explain the process of generating child node descriptions based on hierarchical classification relationships, sibling classification relationships, and contextual relationships.

[0105] Within a set of child nodes, there may be hierarchical classification relationships between them. In this case, child nodes with hierarchical classification relationships can be uniformly grouped into a higher-level parent category. To this end, embodiments of this disclosure propose child node descriptions with hierarchical merging characters, which can be represented by "(·)".

[0106] As one implementation method, the node relationship includes at least a hierarchical classification relationship. Based on the hierarchical classification relationship between each child node and other child nodes, category child nodes under each level of classification are selected from the child node set, and the child node description content is obtained by performing child node description processing based on the category child nodes under each level of classification through hierarchical character merging.

[0107] For example, consider a directed acyclic graph (DAG) representing product categories. At a certain graph level, the target node, acting as the parent node, represents "electronic products." Child node C1 represents "mobile phone," child node M1 represents "smartphone," child node M2 ​​represents "feature phone," and child node C2 represents "computer." Since child nodes M1 and M2 both belong to the higher-level "mobile phone" category, they can be merged using a hierarchy merging character to generate the child node description "C1(M1,M2),C2." Further, by applying layer description characters to the target node and child node descriptions, the corresponding layer description for the target graph level is obtained as "parent→C1(M1,M2),C2," which translates to "electronic products → mobile phone (smartphone, feature phone), computer."

[0108] By merging child nodes in a hierarchical classification system, character merging reduces node redundancy, improves the compactness of expression, and preserves fine-grained structural information, thus enhancing information expression efficiency. This enables large language models to possess stronger structural compression and generalization capabilities during inference, while also improving inference efficiency.

[0109] In a set of child nodes, there may be sibling classification relationships among the child nodes. In this case, for child nodes with sibling classification relationships, the description of the child node with the lower semantic level is updated to a description with a relatively higher semantic level. To this end, embodiments of this disclosure propose child node description content with description update characters, which can be represented by "[·]".

[0110] As another implementation, the node relationships include at least sibling classification relationships. Based on the sibling classification relationships between each child node and other child nodes, reference classification child nodes and non-reference classification child nodes are selected from the child node set respectively; the descriptions of the non-reference classification child nodes are updated according to the reference classification child nodes to obtain the summary description child nodes corresponding to the non-reference classification child nodes; through description update characters, the summary description child nodes, their corresponding non-reference classification child nodes, and the reference classification child nodes are described to obtain the child node description content.

[0111] For example, consider a directed acyclic graph representing biological classifications. At a certain graph level, the target graph node, acting as the parent node, represents "animal," with child node C1 representing "domestic cat" and child node C2 representing "canine." However, in a classification task based on specific biological characteristics, it needs to be updated to a generalized expression child node T1, "feline," belonging to the same semantic level as "canine." Therefore, the generalized expression child node, its corresponding non-reference classification child node, and the reference classification child node can be described using expression update characters to obtain the child node description content: "T1[C1],C2". Further, by using layer description characters to perform layer description processing on the target graph node and its child node description content, the corresponding layer description content for the target graph level is obtained: "parent→T1[C1],C2", which is "Animal→feline [domestic cat], canine".

[0112] In practical applications, depending on different tasks or perspectives, it is necessary to re-represent or abstract certain nodes by updating characters through description. This can enhance the semantic adaptability and flexibility of graph structure representation, enabling large language models to dynamically adjust the expression granularity of nodes according to the needs of the current task. It can achieve semantic upsimplification while preserving the original node information, thus providing support for subsequent multi-layer semantic reasoning of large language models.

[0113] Within a set of child nodes, contextual relationships may exist between them. In this case, new extended nodes can be generated during the large language model inference process based on child nodes with contextual relationships. To this end, embodiments of this disclosure propose child node descriptions with node extension characters, which can be represented by "|".

[0114] As another implementation method, node relationships include at least contextual relationships. Based on the contextual relationships between each child node and other child nodes, extended child nodes are generated. Then, by extending the node characters, child node description processing can be performed on the extended child nodes and each child node to obtain the child node description content.

[0115] For example, in a directed acyclic graph representing a gene regulatory network, the parent node of a certain layer is "cellular stress response pathway," and its existing child nodes include: child node C1 "heat shock protein HSP70" and child node C2 "oxidoreductase SOD1." Based on their co-regulatory relationships in multiple stress responses, the large language model infers a potential extended child node ext "NRF2 signaling factor," which serves as the master controller for regulating multiple antioxidant and stress response genes. At this point, by using node extension characters, the extended child node and each child node can be described, resulting in the child node description "C1,C2|NRF2." Further, by using layer description characters, the target graph node and its child node descriptions are described, resulting in the layer description corresponding to the target graph layer: "parent→C1,C2|ext," which is "cellular stress response pathway → heat shock protein HSP70, oxidoreductase SOD1|NRF2."

[0116] By modeling the contextual relationships between existing child nodes, potential semantic or structural associations can be inferred, thereby generating new extended nodes to supplement new information in the original directed acyclic graph (DAG) structure that is not explicitly present but has reasonable semantic connections. This layered description, which generates new information through reasoning, makes the layered description of DAG not only limited to static representation but also possesses dynamic evolution and semantic extensibility, effectively enhancing the expressiveness and adaptability of large language models in dynamic task scenarios.

[0117] In some embodiments, in order to obtain the layer description content of each graph level corresponding to the sample directed acyclic graph, during the process of performing layer description processing on the graph nodes corresponding to each graph level in the sample directed acyclic graph according to the ascending order of the graph levels, when the layer description content corresponding to the target graph level is obtained, the target graph level and the layer description content corresponding to the target graph level can be stored together.

[0118] (3) When the target graph level is detected to be lower than the end graph level, the next graph level in ascending order of the target graph level is determined as the new target graph level, and the process is returned to perform layer description processing on each target graph node in the target graph level and the corresponding child nodes of the target graph node to store the new layer description content, until the target graph level is equal to the end graph level, and the layer description content of each graph level of the stored sample directed acyclic graph is output.

[0119] In some embodiments, after each traversal of the target graph levels, the computer device can detect whether the target graph level is less than the last graph level. If it is not less, the next graph level in ascending order of the target graph level is determined as the new target graph level. For example, if the current target graph level is "2", the newly determined target graph level is "3". Then, the execution step (2) is returned to store the new layer description content until the target graph level is equal to the last graph level, and the stored layer description content of each graph level corresponding to the sample directed acyclic graph is output.

[0120] After obtaining the layer descriptions for each graph level, the computer device can connect these layer descriptions in ascending order to obtain the label node string corresponding to the directed acyclic graph of the sample. For example... Figure 9 The sample directed acyclic graph (DAG) is shown. The layer description content corresponding to graph level "0" is 1→3,4, 2→4; the layer description content corresponding to graph level "1" is 3→5,6, 4→7; and the layer description content corresponding to graph level "2" is 6→8. According to the ascending order of the graph levels, each layer description content can be connected by a newline character to obtain the label node string corresponding to the sample DAG: 1→3,4, 2→4\n 3→5,6, 4→7\n 6→8\n.

[0121] Step 130: Perform node splitting on the sample directed acyclic graph, and reconstruct the nodes based on the initial node set obtained from the splitting to obtain the sample node set.

[0122] To enable a large language model to learn to convert loose graph nodes into a layered description structure of a directed acyclic graph of samples, i.e., a string of label nodes, the directed acyclic graph of samples needs to be split into a set of nodes, i.e., a set of sample nodes. This allows the model to be trained using the sample graph nodes from the set of sample nodes as input.

[0123] As an example, computer devices can directly split the sample directed acyclic graph into nodes to generate a sample node set. To enhance the generalization, robustness, and structure recovery capabilities of large language models in graph structure understanding and reasoning, after splitting the sample directed acyclic graph into nodes, node reconstruction can be performed on the initial node set obtained from the splitting.

[0124] In some embodiments, the computer device may perform node splitting on the sample directed acyclic graph to obtain an initial node set, and perform partial deletion on the initial graph nodes in the initial node set to obtain a partial node set. Further, noise addition processing is performed on the partial node set to insert noisy graph nodes to obtain the sample node set.

[0125] For example, such as Figure 10The diagram shows the construction of the training data. All nodes on the directed acyclic graph of the samples are selected, shuffled, and some nodes are deleted. For example, "technical copywriting" is deleted, and "noise" nodes are added. "Code" nodes are added, and nodes similar to existing nodes can also be added. For example, "promotional copywriting" similar to marketing copywriting is added. This yields the sample node set.

[0126] By shuffling the order of all nodes, the large language model can learn to autonomously identify reasonable structural dependencies even in the absence of a clear topological order, thus improving its structural reconstruction capabilities. By deleting some nodes, the large language model can learn to automatically complete missing nodes based on context or structural information, improving its structural completion capabilities. By adding noisy nodes, the large language model can identify and eliminate interference from irrelevant nodes, maintaining the processing logic of the original data processing task and improving its anti-interference capabilities and tolerance to structural noise. By adding similar nodes, the large language model can learn to judge semantic redundancy or synonymous substitution relationships between nodes and effectively merge or unify their understanding, improving its ability to fuse similar nodes.

[0127] As an example, the process of constructing an initial node set by a computer device may also include: obtaining key information of the sample task corresponding to the sample directed acyclic graph, splitting the sample directed acyclic graph into nodes to obtain a split node set, calculating the correlation between the key information and each sample graph node in the split node set to obtain the information correlation degree corresponding to each sample graph node, and based on the key information, performing node annotation processing on the associated sample graph node corresponding to the maximum information correlation degree in the split node set to obtain the initial node set.

[0128] Here, key information refers to the data processing task corresponding to the directed acyclic graph (DAG) of the samples, i.e., the key information of the sample task. This key information can provide additional explanations and clarifications for the large language model, helping it to better understand the meaning and function of specific parts in the DAG. Therefore, by calculating the correlation between the key information and each sample graph node in the split node set, and based on the information correlation degree corresponding to each sample graph node, the key information can be annotated on the sample graph node with the highest information correlation degree, so as to facilitate subsequent model learning.

[0129] While the topological structure of directed acyclic graphs (DAGs) can express dependencies between tasks or data, the node string itself is often just a short string of characters, lacking semantic detail. Furthermore, although large language models possess reasoning capabilities, they may lack sufficient discernment for certain key regions within complex structures. Therefore, embodiments of this disclosure propose explicitly adding human-readable semantic annotations to guide large language models to understand local graph structures more accurately and meticulously, thereby enhancing their ability to reason about, generate, and complete the overall task graph.

[0130] Optionally, noise description processing is performed on the noisy graph nodes to obtain noise description content, and node annotation processing is performed on the associated sample graph nodes corresponding to the key information to obtain annotation description content. Further, the noise description content and annotation description content are added to the label node string to obtain the updated label node string. Thus, during subsequent training, the model can generate a label node string with annotation description content based on the key information of the input annotations in the sample graph nodes.

[0131] For example, the "#" symbol is used to describe annotations. These annotations provide additional explanations and clarifications, helping the large language model better understand the meaning and function of specific parts in a directed acyclic graph (DAG). For instance, when describing a DAG representing a software system architecture, a graph node representing a key module could be described using an annotation like "#This module is responsible for the core business logic processing of the system." The "root→A" symbol is used to describe noise. This description indicates that node A does not belong to the current DAG hierarchy. Through noise descriptions, the large language model can treat graph nodes that do not belong to the same DAG hierarchy as relative noise nodes when dealing with complex multi-graph structures or needing to distinguish nodes from different hierarchies. For example, in a set of DAGs containing multiple independent business modules, there may be some global configuration nodes or temporary nodes that do not belong to any specific business module's DAG. In this case, the form "root→A" can be used to represent these nodes, avoiding confusion with nodes within other hierarchies.

[0132] Step 140: Input the sample node set into the preset large language model to generate node strings and obtain the predicted node strings.

[0133] In some embodiments, a computer device can input a set of sample nodes into a pre-defined large language model for node string generation processing to obtain a predicted node string. This pre-defined large language model can be a generative pre-trained Transformer model. The pre-defined large language model can perform inference analysis on the sample node set to generate corresponding predicted node strings for the sample nodes in the set.

[0134] Step 150: Determine the target loss value based on the difference between the predicted node string and the label node string, and train the preset large language model using the target loss value to obtain the trained target large language model.

[0135] In some embodiments, the computer device can determine the target loss function based on the difference between the predicted node string and the label node string, and calculate the target loss value based on the target loss function. Optionally, the form of the target loss function can be any loss function used for supervised learning, such as the cross-entropy loss function. As an example, the training of the preset large language model can be supervised learning. Optionally, when optimizing the model parameters, full-fine-tuning or parameter-efficient fine-tuning can be used, without limitation. It should be noted that although the trained target large language model has the ability to generate node strings, it still retains the ability to process data in general domains.

[0136] This embodiment explicitly describes only the connections between parent and child nodes at each graph level in the sample directed acyclic graph. This avoids shared paths that occur in single-path sequence descriptions, thus reducing redundant information. Furthermore, since the layer descriptions at each graph level clearly show the preceding (parent) and subsequent (child) nodes, the dependencies between parent and child nodes at each graph level are explicitly expressed, preserving the local structural relationships within the sample directed acyclic graph. This layer description method effectively improves the accuracy of graph structure descriptions of the sample directed acyclic graph, thereby improving the quality of the labeled node strings. Based on this, training a large language model with high-quality labeled node strings can improve the accuracy of the node string generation by the large language model. This, in large language model scenarios, enhances the accuracy of the large language model's understanding of the processing logic relationships between data processing tasks based on node strings, thereby improving the quality of generative reasoning in the large language model.

[0137] Another embodiment of this disclosure provides a task processing method. This task processing method can be executed by a computer device (e.g., a desktop computer, laptop computer, or other terminal device with certain processing capabilities) after step 150 of the above embodiment. This computer device has at least storage, computing, and communication functions. Please refer to... Figure 11 , Figure 11 This diagram illustrates a task processing method provided in this embodiment. The following will describe the method in conjunction with... Figure 11 The specific steps of this task processing method are explained below:

[0138] Step 210: Obtain the set of nodes to be organized.

[0139] In this embodiment, each node in the node set to be organized represents a data processing task corresponding to the trained target large language model, including task units and data units, serving as the basic objects for model inference and execution. A task unit refers to the action performed by the large language model to execute a specific processing operation, such as text classification, image generation, identity recognition, and data acquisition. A data unit refers to the resources that the large language model needs to access when performing a specific processing operation, such as text, software code, images to be enhanced, and sensor data.

[0140] In some embodiments, the cloud server, acting as an execution device for a task processing method, can receive a set of nodes to be organized sent by a user through a terminal device. For example, Figure 3 In the multilingual news classification scenario shown, the user sends a node string generation request to the cloud server via computer, and then the cloud server receives the set of nodes to be organized in the node string generation request.

[0141] Step 220: Input the set of nodes to be organized into the trained target large language model to generate node strings, and obtain the target node strings corresponding to the set of nodes to be organized.

[0142] In some embodiments, a computer device can input the set of nodes to be organized into a trained target large language model for node string generation processing to obtain the target node string corresponding to the set of nodes to be organized. To improve the large language model's accuracy in identifying task types and targets, avoid misinterpreting the purpose of the graph structure, and guide the large language model to generate outputs with the expected style and format, thereby improving the consistency and standardization of the generated results, embodiments of this disclosure propose adding task description information to the node string.

[0143] In other embodiments, the computer device can input the set of nodes to be organized into a trained target large language model to generate a node string, obtaining an initial node string corresponding to the set of nodes to be organized. Further, it can obtain task description information corresponding to the set of nodes to be organized and add the task description information to the beginning of the initial node string to obtain the target node string. The task description information can be edited by the user and pre-stored in a database.

[0144] When large language models perform data processing tasks based on target node strings, they typically execute the tasks in ascending order of the graph hierarchy. Considering that the task importance corresponding to the description content of each target layer in the node string is different, in order to improve the efficiency and quality of task execution, this disclosure proposes to reorder and connect the description content of each target layer according to its weight.

[0145] As an example, a computer device can calculate the description weight of each target layer description in the initial node string based on the task description information, obtain the description weight corresponding to each target layer description, and reconnect each target layer description based on the descending order of the description weights to obtain a weighted connection node string. Then, the task description information is added to the head position of the weighted connection node string to obtain the target node string.

[0146] High-weighted node strings often represent the parts of the task path that have the greatest impact on the overall goal and will bring the most benefits upon completion. By assigning a corresponding description weight to each target layer description based on task description information, and reconnecting each target layer description in descending order of description weight, the large language model prioritizes executing target layer descriptions with relatively higher weights, improving the overall efficiency of the data processing task. Furthermore, when server resources and time are limited, completing the most critical parts first reduces the risk of wasting resources on edge or delayed tasks. In practical applications: for server computing resource scheduling, prioritize executing sub-task paths that contribute the most to accuracy improvement in model training tasks; for marketing campaign execution, prioritize generating / delivering strategy content most likely to convert customers (e.g., high-potential user groups); for R&D project management, prioritize modules with the most dependent paths or the highest technical barriers to ensure that core project progress is not hindered.

[0147] Step 230: Based on the target node string, execute the data processing tasks represented by each node in the set of nodes to be organized in sequence to obtain the task processing results.

[0148] In some embodiments, a computer device can input a target node string and the data processing tasks represented by each node in the set of nodes to be organized into a general-purpose large language model or a specialized large language model tailored to the device. The large language model then executes the data processing tasks represented by each node in the set of nodes to be organized sequentially based on the target node string, obtaining the task processing results. Because the large language model can accurately analyze the processing logic relationships between each data processing task from the target node string, it can obtain accurate task processing results by utilizing these processing logic relationships to execute the data processing tasks represented by each node.

[0149] As one implementation method, with Figure 4Taking the video generation scenario shown as an example, the video generation system developed using the target large language trained in this embodiment can generate personalized short videos based on user-provided materials. Specifically, after the cloud server obtains the (video cover image, product introduction text, product usage video clip, product review text, background music clip, and video preference data) uploaded by the mobile phone, it can represent these materials with graph nodes, resulting in: Node A (video cover image), Node B (product introduction text), Node C (product usage video clip), Node D (product review text), Node E (background music clip), and Node G (video preference data).

[0150] Furthermore, the cloud server can construct a set of nodes to be organized {node A, node B, node C, node D, node E, node G} based on these nodes, and input this set into the trained target large language model for node string generation processing, obtaining the target node string "G→A,B,E\n A→C\nB→C,D\n" corresponding to the set of nodes to be organized. Then, the video creation large language model is used to call these materials based on the target node string to generate the target video. First, the cloud server uses the video creation large language model to call the video preference data corresponding to node G according to the target node string, providing style guidance and parameter initialization for subsequent video generation tasks.

[0151] Furthermore, the cloud server utilizes a large language model for video creation. Based on the data call logic in the layer description content "G→A,B,E" of the target node string, it can call nodes A, B, and E respectively. It calls the video cover image corresponding to node A to generate a video cover; it calls the product introduction text corresponding to node B to provide basic text material for video subtitles and audio content generation; and it calls the background music segment corresponding to node E to synthesize the video's background music. Further, the cloud server utilizes the large language model for video creation. Based on the data call logic in the layer description content "A→C" and "B→C,D" of the target node string, it can call the product usage video segment corresponding to node C to generate an initial video segment with a video cover and background music (such as an "image + slogan" animation). It also calls the product evaluation text corresponding to node D to generate some bullet comments and likes for the initial video segment (enhancing immersion). Based on this, the final target video is obtained.

[0152] In video generation scenarios, this embodiment can accurately analyze the data calling logic relationship between video materials corresponding to each node in the target node string constructed based on video materials through the target large language model. Based on this, the video creation large language model can accurately call the video materials represented by each node by utilizing the data calling logic relationship, so as to create the target video based on these accurately called video materials, thereby effectively improving the video generation quality in video generation scenarios.

[0153] Please see Figure 12 The diagram illustrates a structural block diagram of a training device 300 for a large language model provided in an embodiment of this disclosure. The training device 300 may include: a hierarchy determination module 310, a label determination module 320, a node splitting module 330, a model prediction module 340, and a model training module 350.

[0154] The hierarchy determination module 310 is used to obtain the sample directed acyclic graph and perform hierarchical traversal processing on the sample directed acyclic graph to obtain the graph hierarchy corresponding to each graph node in the sample directed acyclic graph, wherein the graph node represents the corresponding data processing task.

[0155] The label determination module 320 is used to perform layer description processing on the graph nodes corresponding to each graph level in the sample directed acyclic graph according to the ascending order of the graph levels, to obtain the layer description content corresponding to each graph level, and to connect each layer description content according to the ascending order of the graph levels to obtain the label node string corresponding to the sample directed acyclic graph.

[0156] The node splitting module 330 is used to split the sample directed acyclic graph into nodes and reconstruct the nodes based on the initial node set obtained by splitting to obtain the sample node set.

[0157] Model prediction module 340 is used to input the sample node set into a preset large language model for node string generation processing to obtain a predicted node string;

[0158] The model training module 350 is used to determine the target loss value based on the difference between the predicted node string and the label node string, and to train the preset large language model using the target loss value to obtain the trained target large language model.

[0159] In some embodiments, the tag determination module 320 may include: a hierarchy determination submodule, a content determination submodule, and a content output submodule.

[0160] The hierarchy determination submodule is used to determine the initial graph hierarchy and the final graph hierarchy corresponding to the sample directed acyclic graph based on the graph hierarchy corresponding to each graph node in the sample directed acyclic graph, and to determine the initial graph hierarchy as the target graph hierarchy.

[0161] The content determination submodule is used to perform layer description processing on each target graph node and its corresponding child nodes for each target graph node in the target graph hierarchy, to obtain the layer description content corresponding to the target graph hierarchy, and to store the target graph hierarchy and the layer description content corresponding to the target graph hierarchy in association.

[0162] The content output submodule is used to determine the next graph level in ascending order of the target graph level as the new target graph level when the target graph level is detected to be lower than the end graph level. It then returns to perform layer description processing on each target graph node in the target graph level and its corresponding child nodes to store the new layer description content, until the target graph level is equal to the end graph level. Finally, it outputs the stored layer description content of each graph level of the sample directed acyclic graph.

[0163] In some embodiments, the content determination submodule may include a node detection unit and a content generation unit.

[0164] The node detection unit is used to perform child node detection for each graph node in the target graph hierarchy, determine graph nodes with at least one child node as target graph nodes, and skip graph nodes without child nodes.

[0165] The content generation unit is used to perform layer description processing on each target graph node and the set of child nodes corresponding to the target graph node for each target graph node in the target graph hierarchy, so as to obtain the layer description content corresponding to the target graph hierarchy.

[0166] In some embodiments, the content generation unit may include: a set acquisition subunit, an analysis and processing subunit, a relationship processing subunit, and a description processing subunit.

[0167] The set acquisition sub-unit is used to acquire the set of child nodes corresponding to the target graph node;

[0168] The analysis and processing subunit is used to perform relationship analysis and processing on the set of child nodes to obtain the node relationship between each child node and other child nodes in the set of child nodes.

[0169] The relationship processing subunit is used to perform sub-node description processing on each sub-node in the set of sub-nodes based on the node relationship between each sub-node and other sub-nodes, so as to obtain the sub-node description content;

[0170] The description processing subunit is used to perform layer description processing on the target graph node and the description content of the child node through layer description characters to obtain the layer description content corresponding to the target graph layer.

[0171] In some embodiments, the node relationship includes at least a hierarchical classification relationship, and the relationship processing subunit may be specifically used to: select classification sub-nodes under each hierarchical classification from the set of sub-nodes based on the hierarchical classification relationship between each sub-node and other sub-nodes; and perform sub-node description processing based on the classification sub-nodes under each hierarchical classification by using hierarchical merging characters to obtain the sub-node description content.

[0172] In some embodiments, the node relationships include at least sibling classification relationships, and the relationship processing subunit may be specifically used to: select reference classification subnodes and non-reference classification subnodes from the set of subnodes based on the sibling classification relationships between each subnode and other subnodes; perform description update processing on the non-reference classification subnodes according to the reference classification subnodes to obtain the summary description subnodes corresponding to the non-reference classification subnodes; and perform subnode description processing on the summary description subnodes, the corresponding non-reference classification subnodes, and the reference classification subnodes through description update characters to obtain subnode description content.

[0173] In some embodiments, the node relationship includes at least a context relationship, and the relationship processing subunit may be specifically used to: generate extended child nodes based on the context relationship between each child node and other child nodes; and perform child node description processing on the extended child nodes and each child node through node extension characters to obtain child node description content.

[0174] In some embodiments, the hierarchy determination module 310 may include: an initial processing submodule, a start acquisition submodule, and a hierarchy traversal submodule.

[0175] The initial processing submodule is used to perform hierarchical initialization processing on each graph node in the directed acyclic graph of the sample, so as to assign a preset value to the graph hierarchy corresponding to each graph node.

[0176] The initial acquisition submodule is used to acquire each initial graph node with an in-degree of zero in the directed acyclic graph of the sample, and assign the graph level corresponding to each initial graph node to an initial value;

[0177] The hierarchical traversal submodule is used to perform hierarchical traversal processing on the sample directed acyclic graph based on the graph hierarchy corresponding to each starting graph node assigned an initial value, so as to obtain the graph hierarchy corresponding to each graph node in the sample directed acyclic graph.

[0178] In some embodiments, the node splitting module 330 may include a node splitting submodule, a deletion processing submodule, and an addition processing submodule.

[0179] The node splitting submodule is used to split the sample directed acyclic graph into nodes to obtain an initial node set.

[0180] The deletion processing submodule is used to perform partial deletion processing on the initial graph nodes in the initial node set to obtain a partial node set;

[0181] An additional processing submodule is added to perform noise addition processing on the partial node set to insert noise graph nodes and obtain a sample node set.

[0182] In some embodiments, the node splitting submodule can be specifically used to: obtain key information of the sample task corresponding to the sample directed acyclic graph; perform node splitting processing on the sample directed acyclic graph to obtain a split node set; perform correlation calculation on the key information with each sample graph node in the split node set to obtain the information correlation degree corresponding to each sample graph node; and perform node annotation processing on the associated sample graph node corresponding to the maximum information correlation degree in the split node set based on the key information to obtain an initial node set.

[0183] In some embodiments, the training device 300 for the large language model may further include a label update module, specifically configured to: perform noise description processing on the noise graph nodes to obtain noise description content; perform node annotation processing on the associated sample graph nodes corresponding to the key information to obtain annotation description content; and add the noise description content and the annotation description content to the label node string to obtain the updated label node string.

[0184] Please see Figure 13 The diagram illustrates a structural block diagram of a task processing device 400 provided in an embodiment of this disclosure. The task processing device 400 may include: a node acquisition module 410, a target generation module 420, and a task processing module 430.

[0185] The node acquisition module 410 is used to acquire a set of nodes to be organized, wherein each node to be organized in the set of nodes to be organized represents the data processing task corresponding to the trained target large language model.

[0186] The target generation module 420 is used to input the set of nodes to be organized into the trained target large language model to perform node string generation processing to obtain the target node string corresponding to the set of nodes to be organized.

[0187] The task processing module 430 is used to execute the data processing task represented by each node in the set of nodes to be organized based on the target node string, and obtain the task processing result.

[0188] The trained target large language model is obtained by the large language model training method described in the above embodiments.

[0189] In some embodiments, the target generation module 420 may be specifically used to: input the set of nodes to be organized into the trained target large language model for node string generation processing to obtain the initial node string corresponding to the set of nodes to be organized; obtain the task description information corresponding to the set of nodes to be organized; and add the task description information to the head position of the initial node string to obtain the target node string.

[0190] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the described devices, modules, etc., can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0191] In the several embodiments provided in this disclosure, the coupling between modules can be electrical, mechanical, or other forms of coupling.

[0192] Furthermore, the functional modules in the various embodiments of this disclosure can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The integrated modules described above can be implemented in hardware or as software functional modules.

[0193] like Figure 14 As shown in the figures, this disclosure also provides a computer device 500, which can be in various forms such as a desktop computer or a laptop computer. The computer device 500 includes a processor 510, a memory 520, a power supply 530, and an input unit 540. The memory 520 stores a computer program, which, when called by the processor 510, can execute the various method steps provided in the above embodiments. Those skilled in the art will understand that the structure of the computer device shown in the figures does not constitute a limitation on the computer device, and may include more or fewer components than shown, or combine certain components, or have different component arrangements. Wherein:

[0194] Processor 510 may include one or more processing cores. Processor 510 connects to various parts of the entire battery management system using various interfaces and lines. It executes instructions, programs, instruction sets, or program sets stored in memory 520, calls data stored in memory 520, performs various functions and processes data within the battery management system, and performs various functions and processes data within the computer device, thereby providing overall control of the computer device. Optionally, processor 510 may be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). Processor 510 may integrate one or more of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the displayed content; and the modem handles wireless communication. It is understood that the modem may also not be integrated into processor 510 and may be implemented separately using a communication chip.

[0195] The memory 520 may include random access memory (RAM) or read-only memory (ROM). The memory 520 can be used to store instructions, programs, instruction sets, or program assemblies. The memory 520 may include a program storage area and a data storage area. The program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as touch functionality, sound playback functionality, image playback functionality, etc.), and instructions for implementing the various method embodiments described above. The data storage area may also store data created during the use of the computer device (such as phonebook and audio / video data). Accordingly, the memory 520 may also include a memory controller to provide the processor 510 with access to the memory 520.

[0196] The power supply 530 can be logically connected to the processor 510 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. The power supply 530 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.

[0197] The input unit 540 can be used to receive input digital or character information, and to generate keyboard, mouse, joystick, optical or trackball signal inputs related to object setting and function control.

[0198] Although not shown, the computer device 500 may also include an output unit, a display unit, etc., which will not be described in detail here. Specifically, in the embodiments of this disclosure, the processor 510 of the computer device loads the executable files corresponding to the processes of one or more computer programs into the memory 520 according to the following instructions, and the processor 510 runs the data stored in the memory 520, such as telephone books and audio / video data, thereby implementing the various method steps provided in the foregoing embodiments.

[0199] like Figure 15 As shown, this disclosure also provides a computer-readable storage medium 600, which stores a computer program 610. The computer program 610 can be invoked by a processor of a computer device to execute various method steps provided in this disclosure.

[0200] Computer-readable storage media can be electronic storage devices such as flash memory, electrically erasable programmable read-only memory (EEPROM), hard disks, or ROM. Optionally, the computer-readable storage medium can also be a non-volatile computer-readable storage medium. The computer-readable storage medium 600 has storage space for a computer program that performs any of the method steps in the above embodiments. These computer programs can be read from or written to one or more computer program products. The computer programs can be compressed in an appropriate form.

[0201] According to one aspect of this disclosure, a computer program product is provided, comprising a computer program stored in a computer-readable storage medium. A processor of a computer device reads the computer program from the computer-readable storage medium and executes the computer program, causing the computer device to perform the various method steps provided in the above embodiments.

[0202] The terms "comprising" and "including," and any variations thereof, in this disclosure and the foregoing drawings are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not necessarily limited to those explicitly listed, but may include other steps or units not explicitly listed or inherent to such process, method, product, or apparatus. "At least one" means one or more, and "more than" means two or more. "Greater than," "less than," "exceeding," etc., are understood to exclude the number itself. "Above," "below," "within," etc., are understood to include the number itself. The terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined objective, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) may be used to implement one or more modules or units. Furthermore, each module or unit may be part of a larger module or unit that includes the functionality of that module or unit.

[0203] In the several embodiments provided in this disclosure, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, or indirect coupling or communication connection between apparatuses or units, and may be electrical, mechanical, or other forms.

[0204] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs. Furthermore, the functional units in the various embodiments of this disclosure can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated units described above can be implemented in hardware or as software functional units.

[0205] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this disclosure, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a program product. This computer program product is stored in a storage medium and includes several computer programs to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the various embodiments of this disclosure. It should also be understood that the various implementation methods provided by the embodiments of this disclosure can be arbitrarily combined to achieve different technical effects.

[0206] The above are merely preferred embodiments of this disclosure and are not intended to limit this disclosure in any way. Although this disclosure has been disclosed above with reference to preferred embodiments, it is not intended to limit this disclosure. Any person skilled in the art can make some modifications or alterations to the above-disclosed technical content to create equivalent embodiments without departing from the scope of the technical solution of this disclosure. Any simple modifications, equivalent changes and alterations made to the above embodiments based on the technical essence of this disclosure without departing from the content of the technical solution of this disclosure shall still fall within the scope of the technical solution of this disclosure.

Claims

1. A training method for a large language model, characterized in that, The method includes: Obtain a sample directed acyclic graph and perform a hierarchical traversal on the sample directed acyclic graph to obtain the graph hierarchy corresponding to each graph node in the sample directed acyclic graph. The graph node represents the corresponding data processing task. Based on the ascending order of the graph hierarchy, the graph nodes corresponding to each graph hierarchy in the sample directed acyclic graph are processed by layer description to obtain the layer description content corresponding to each graph hierarchy. Then, each layer description content is connected according to the ascending order of the graph hierarchy to obtain the label node string corresponding to the sample directed acyclic graph. The sample directed acyclic graph is split into nodes, and the initial node set obtained from the split is reconstructed to obtain the sample node set. The sample node set is input into a preset large language model for node string generation processing to obtain the predicted node string; The target loss value is determined based on the difference between the predicted node string and the label node string, and the preset large language model is trained using the target loss value to obtain the trained target large language model.

2. The method according to claim 1, characterized in that, The process involves performing layer description processing on the graph nodes corresponding to each graph level in the sample directed acyclic graph according to the ascending order of the graph hierarchy, to obtain the layer description content corresponding to each graph level, including: Based on the graph hierarchy corresponding to each graph node in the sample directed acyclic graph, determine the initial graph hierarchy and the final graph hierarchy corresponding to the sample directed acyclic graph, and determine the initial graph hierarchy as the target graph hierarchy; For each target graph node in the target graph hierarchy, layer description processing is performed on the target graph node and its corresponding child nodes to obtain the layer description content corresponding to the target graph hierarchy, and the target graph hierarchy and its corresponding layer description content are stored together. When it is detected that the target graph level is less than the end graph level, the next graph level in ascending order of the target graph level is determined as the new target graph level, and the process returns to perform layer description processing on each target graph node in the target graph level, the target graph node and its corresponding child nodes, to store the new layer description content, until the target graph level is equal to the end graph level, and the stored layer description content of the sample directed acyclic graph corresponding to each graph level is output.

3. The method according to claim 2, characterized in that, For each target graph node in the target graph hierarchy, layer description processing is performed on the target graph node and its corresponding child nodes to obtain the layer description content corresponding to the target graph hierarchy, including: For each graph node in the target graph hierarchy, child node detection is performed. Graph nodes with at least one child node are identified as target graph nodes, and graph nodes without child nodes are skipped. For each target graph node in the target graph hierarchy, a layer description process is performed on the target graph node and the set of child nodes corresponding to the target graph node to obtain the layer description content corresponding to the target graph hierarchy.

4. The method according to claim 3, characterized in that, The step of performing layer description processing on the target graph nodes and the set of child nodes corresponding to the target graph nodes to obtain the layer description content corresponding to the target graph layer includes: Obtain the set of child nodes corresponding to the target graph node; Perform relational analysis on the set of child nodes to obtain the node relationships between each child node and other child nodes in the set of child nodes; Based on the node relationships between each child node and other child nodes, each child node in the child node set is processed to obtain the child node description content. Layer description processing is performed on the description content of the target graph nodes and the child nodes by layer description characters to obtain the layer description content corresponding to the target graph layer.

5. The method according to claim 4, characterized in that, The node relationships include at least hierarchical classification relationships. Based on the node relationships between each child node and other child nodes, each child node in the child node set is subjected to child node description processing to obtain child node description content, including: Based on the hierarchical classification relationship between each child node and other child nodes, select the classification child nodes under each hierarchical classification from the child node set; By merging characters hierarchically, the sub-node descriptions are processed based on the sub-nodes under each hierarchical category to obtain the sub-node description content.

6. The method according to claim 4, characterized in that, The node relationships include at least sibling classification relationships. Based on the node relationships between each child node and other child nodes, each child node in the child node set is subjected to child node description processing to obtain child node description content, including: Based on the sibling classification relationship between each child node and other child nodes, reference classification child nodes and non-reference classification child nodes are selected from the set of child nodes respectively; Based on the reference classification sub-node, the non-reference classification sub-node is updated to obtain the summary description sub-node corresponding to the non-reference classification sub-node. By updating the character representation, sub-node description processing is performed on the general representation sub-node, the corresponding non-reference category sub-node, and the reference category sub-node to obtain the sub-node description content.

7. The method according to claim 4, characterized in that, The node relationships include at least contextual relationships. Based on the node relationships between each child node and other child nodes, each child node in the child node set is processed to obtain child node description content, including: Based on the contextual relationships between each child node and other child nodes, extended child nodes are generated; By extending the characters through nodes, the extended child nodes and each child node are processed to obtain the child node description content.

8. The method according to claim 1, characterized in that, The step of performing a level-order traversal on the sample directed acyclic graph to obtain the graph hierarchy corresponding to each graph node in the sample directed acyclic graph includes: Each graph node in the directed acyclic graph of the sample is initialized with a hierarchy, so that the graph hierarchy corresponding to each graph node is assigned a preset value. Obtain each starting graph node with an in-degree of zero in the directed acyclic graph of the sample, and assign an initial value to the graph level corresponding to each starting graph node; Based on the graph hierarchy corresponding to each initial graph node with an initial value, a hierarchical traversal is performed on the sample directed acyclic graph to obtain the graph hierarchy corresponding to each graph node in the sample directed acyclic graph.

9. The method according to claim 1, characterized in that, The process of splitting the directed acyclic graph of the samples into nodes and reconstructing the nodes based on the initial set of nodes obtained from the splitting to obtain the sample node set includes: The directed acyclic graph of the sample is split into nodes to obtain an initial node set; Partial deletion of initial graph nodes from the initial node set yields a partial node set. The aforementioned node set is subjected to noise addition processing to insert noise graph nodes, thereby obtaining a sample node set.

10. The method according to claim 9, characterized in that, The node splitting process of the sample directed acyclic graph to obtain an initial node set includes: Obtain key information about the sample task corresponding to the directed acyclic graph of the sample; The directed acyclic graph of the sample is split into nodes to obtain a split node set; The key information is correlated with each sample graph node in the split node set to obtain the information correlation degree corresponding to each sample graph node; Based on the key information, node annotation processing is performed on the associated sample graph nodes corresponding to the maximum information correlation degree in the split node set to obtain the initial node set.

11. The method according to claim 10, characterized in that, After connecting the description content of each layer according to the ascending order of the graph hierarchy to obtain the label node string corresponding to the directed acyclic graph of the sample, the method further includes: The noise graph nodes are subjected to noise description processing to obtain noise description content; Perform node annotation processing on the associated sample graph nodes corresponding to the key information to obtain annotation description content; The noise description and annotation description are added to the tag node string to obtain the updated tag node string.

12. A task processing method, characterized in that, The method includes: Obtain a set of nodes to be organized, wherein each node in the graph to be organized represents the data processing task corresponding to the trained target large language model. The set of nodes to be organized is input into the trained target large language model to generate node strings, thereby obtaining the target node string corresponding to the set of nodes to be organized. Based on the target node string, the data processing tasks represented by each node in the set of nodes to be organized are executed sequentially to obtain the task processing results. The trained target large language model is obtained by the training method of the large language model according to any one of claims 1 to 11.

13. The method according to claim 12, characterized in that, The step of inputting the set of nodes to be organized into the trained target large language model for node string generation processing to obtain the target node string corresponding to the set of nodes to be organized includes: The set of nodes to be organized is input into the trained target large language model to generate node strings, thereby obtaining the initial node strings corresponding to the set of nodes to be organized. Obtain the task description information corresponding to the set of nodes to be organized; The task description information is added to the head of the initial node string to obtain the target node string.

14. A training device for a large language model, characterized in that, The device includes: The hierarchy determination module is used to obtain the sample directed acyclic graph and perform hierarchical traversal processing on the sample directed acyclic graph to obtain the graph hierarchy corresponding to each graph node in the sample directed acyclic graph, wherein the graph node represents the corresponding data processing task. The label determination module is used to perform layer description processing on the graph nodes corresponding to each graph level in the sample directed acyclic graph according to the ascending order of the graph hierarchy, to obtain the layer description content corresponding to each graph level, and to connect each layer description content according to the ascending order of the graph hierarchy to obtain the label node string corresponding to the sample directed acyclic graph. The node splitting module is used to split the sample directed acyclic graph into nodes and reconstruct the nodes based on the initial node set obtained from the splitting to obtain the sample node set. The model prediction module is used to input the sample node set into a preset large language model for node string generation processing to obtain the predicted node string; The model training module is used to determine the target loss value based on the difference between the predicted node string and the label node string, and to train the preset large language model using the target loss value to obtain the trained target large language model.

15. A task processing device, characterized in that, The device includes: The node acquisition module is used to acquire a set of nodes to be organized, wherein each node in the set of nodes to be organized represents the data processing task corresponding to the trained target large language model. The target generation module is used to input the set of nodes to be organized into the trained target large language model to generate node strings, thereby obtaining the target node strings corresponding to the set of nodes to be organized. The task processing module is used to execute the data processing task represented by each node in the set of nodes to be organized based on the target node string, and obtain the task processing result; The trained target large language model is obtained by the training method of the large language model according to any one of claims 1 to 11.

16. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the training method for a large language model as described in any one of claims 1 to 11, or the task processing method as described in any one of claims 12 to 13.

17. A computer device, characterized in that, include: Memory; A processor, wherein a computer program is stored in the memory, and when executed by the processor, the computer program implements the training method for a large language model as described in any one of claims 1 to 11, or the task processing method as described in any one of claims 12 to 13.

18. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the training method for a large language model as described in any one of claims 1 to 11, or the task processing method as described in any one of claims 12 to 13.