Training task combination recommendation method based on large language model
By applying large language models and graph convolutional neural networks in the rehabilitation training field, combining heterogeneous graph features and text features, the problem of traditional recommendation algorithms being "cold-started" in the recommendation of new training tasks is solved, and more accurate and timely personalized recommendations are achieved.
Patent Information
- Application Number
- CN202510731389.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-03
- Publication Date
- 2025-07-01
- Estimated Expiration
- 2045-06-03
AI Technical Summary
When facing newly developed training tasks, traditional recommendation algorithms are difficult to make effective recommendations due to lack of sufficient user interaction data, resulting in a "cold start" problem, affecting the accuracy and timeliness of personalized recommendations.
Using the training task combination recommendation method based on large language model, the initial training task combination is constructed by obtaining user's personal information and historical training data, and the second-order knowledge expression is performed on each task. Then, a large language model is used to align graph knowledge and align graph structures to form a large language fine-tuning model. Combining heterogeneous graph features and text features, encoding is performed through graph convolution neural networks and embedded layers of large language models, and finally forming fusion features through adapter networks for recommendation of tasks in recommendation systems.
Through multimodal fusion and model fine-tuning, the model's performance in training task recommendations has been significantly improved, the "cold start" problem has been alleviated, and the newly developed training tasks have been quickly found to match target user groups, improving the accuracy and timeliness of personalized recommendations.
Smart Images

Figure CN120234478A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a method for recommending a combination of training tasks based on a large language model, belonging to the technical field of computer personalized recommendation. Background Art
[0002] In the field of rehabilitation training, the rehabilitation needs of users are often complex and diverse. As the rehabilitation process progresses, the needs of users will also change significantly. In the initial stage of rehabilitation, users usually need to perform some basic exercises, simple cognitive training, and relaxation exercises to help the body and mind recover gradually; while in the later stage of rehabilitation, users need more challenging advanced training and special skill training to further improve the rehabilitation effect and quality of life. With its excellent semantic analysis ability, the large language model can accurately recommend suitable training combinations according to the rehabilitation stage of users, provide personalized rehabilitation suggestions for users, and thus significantly improve the rehabilitation efficiency and effect.
[0003] However, when facing newly developed training tasks, traditional recommendation algorithms often have difficulty making effective recommendations due to the lack of sufficient user interaction data. This "cold start" problem not only limits the promotion and application of new training tasks, but also affects the accuracy and timeliness of personalized recommendations. Although large language models (LLMs) have extensive knowledge reserves and complex reasoning abilities, they have obvious limitations in direct applications, such as being unable to effectively process the fusion of multiple modalities of information such as text, images, and audio, and being unable to organically combine and recommend training tasks of different modalities.
[0004] To solve the above problems, it is necessary to carry out targeted adaptation and optimization of the large language model. By designing effective strategies to enable the large language model to process multi-modal information and achieve synergistic effects between different modalities, the performance of the model in training task recommendation can be significantly improved. At the same time, introducing scientific optimization strategies to reasonably bundle and recommend multi-modal information can not only alleviate the "cold start" problem, but also help newly developed training tasks quickly find the matching target user group, thereby promoting innovation and development in the field of rehabilitation training and better meeting the personalized needs of users at different rehabilitation stages. Summary of the Invention
[0005] The technical problem to be solved by the present invention is to provide a method for recommending a combination of training tasks based on a large language model.
[0006] To achieve the above technical objectives, the present invention adopts the following technical solutions: A method for recommending a combination of training tasks based on a large language model, comprising the following steps: Obtain the personal information and historical training data of the user; Sort the historical training tasks according to a preset logic based on the user's historical training data, and select the top N training tasks as the initial training task combination, where N is a positive integer; For each training task in the initial training task combination, perform second-order knowledge expression; Based on the second-order knowledge expression of each training task, perform graph knowledge alignment and graph structure alignment on the large language model in the form of natural language description questions and answers, so as to fine-tune the large language model through adaptive learning to form a large language fine-tuning model; Divide the user's personal information, initial training task combination, and second-order knowledge expression of each training task into text data and heterogeneous graph data; For the text data, encode it through the embedding layer of the large language fine-tuning model to obtain text encoding; and for the heterogeneous graph data, encode it through a collaborative filtering model to obtain heterogeneous graph encoding; For each of the training tasks, splice the text encoding and the heterogeneous graph encoding to form a fused feature; Input the fused feature of each training task into the large language fine-tuning model to output a recommended probability distribution of a candidate task; Based on the recommended probability distributions of all candidate tasks, obtain a candidate task with the highest recommended probability, and jointly combine it with the top N training tasks to form a new training task combination, and push it to the user for cognitive training.
[0007] Preferably, the initial training task combination is obtained in the following manner: Based on the user's historical training data, classify each historical training task according to the cognitive function to be improved by the user to form multiple groups of training tasks; For each group of training tasks, respectively obtain the training scores of each historical training task and sort them according to the score size; Respectively obtain the historical training tasks with the smallest scores in each group of training tasks, so as to jointly form an initial training task combination for improving each cognitive function to be improved by the user.
[0008] Preferably, for the initial training task combination, performing second-order knowledge expression on each training task specifically includes: For each training task in the initial training task combination, describe the task introduction information and user interaction information of the training task in natural language; For the task introduction information, extract multiple relevant first keywords; and for the user interaction information, extract multiple relevant second keywords; Perform embedding mean normalization based on the multiple first keywords and the multiple second keywords to obtain special tokens for replacing the task introduction information and user interaction information, as the second-order knowledge representation of the training task.
[0009] Preferably, based on the second-order knowledge representation of each training task, perform graph knowledge alignment and graph structure alignment on the large language model in the form of natural language description Q&A, specifically including: For the second-order knowledge representation of each training task, obtain the project description of the large language model for the special token through the first prompt word, and perform LoRA fine-tuning on the large language model to make the project description close to the natural language description, so as to perform graph knowledge alignment on each training task; Based on the project descriptions of the training tasks, obtain the theoretical relationships between the project descriptions output by the large language model through the second prompt word, and perform LoRA fine-tuning on the large language model to make the theoretical relationships close to the actual relationships between the project descriptions, so as to perform graph structure alignment on each training task; Among them, the large language model after LoRA fine-tuning is the large language fine-tuning model.
[0010] Preferably, for the text data, perform encoding through the embedding layer of the large language fine-tuning model, specifically including: Obtain the embedding representation of the text data; among them, the text data includes the task introduction information and user interaction information of the training task, as well as the personal information of the user; Input the embedding representation of the text data into the large language fine-tuning model to perform encoding through the embedding layer of the large language fine-tuning model, so as to obtain the text encoding Et; Among them, represents the text sequence of the text data, represents the tokenizer, represents the embedding layer of the large language model, represents the function composition operation.
[0011] Preferably, the collaborative filtering model is the LightGCN model; perform encoding through the LightGCN model to obtain the heterogeneous graph encoding, specifically including: In the message construction layer, the LightGCN model updates the embedding of each node through the information of neighbor nodes, and the specific formula is as follows: ; Among them, and respectively represent the user nodes in the layer and the embedding vectors of item nodes, and respectively represent the set of neighbor nodes of user nodes and item nodes ; and represent the sizes of the corresponding neighbor node sets; In the message aggregation layer, the LightGCN model aggregates the embeddings of all layers to obtain the user node representation , and the specific formula is as follows: , represents the total number of layers of the LightGCN model; Based on the existing training task combinations and the membership relationships of the training tasks in the combinations, the item node representation is obtained in the same way; The user node representation and the item node representation are concatenated in features to form the concatenated initial feature , ; Calculate the query (Query), key (Key), and value (Value) of the l-th layer; ; , and are the weight matrices of the query, key, and value of the l-th layer respectively; Calculate the attention score through the softmax function, , d k represents the dimension of the key; The attention output is added to the feature representation of the previous layer in a residual connection manner to update the feature representation , ; By summing the attention outputs of all layers, the final feature representation E g is obtained, , L represents the total number of layers of the attention layer; Based on the finally fused feature representation Eg, it is mapped to the embedding layer understood by the large model to obtain the heterogeneous graph encoding , ; among them, is a two-layer MLP network model: .
[0012] Preferably, the integrated features of each of the training tasks are input into the large language fine-tuning model to output a recommended probability distribution of candidate tasks, which specifically includes: The text encoding Et and the heterogeneous graph encoding Eg are concatenated to obtain the integrated feature E, , where Concat represents the concatenation operation; Through The function converts the integrated feature E and the candidate items into a prompt template that can be understood by the large language fine-tuning model; Based on the prompt template, obtain the recommended probability distribution of each candidate task and the historical training tasks output by the large language fine-tuning model , represents the candidate tasks corresponding to the integrated feature E and the historical training tasks.
[0013] Preferably, LoRA fine-tuning is performed on the large language model, which specifically includes: The weight matrix W of the large language model is decomposed into two low-rank matrices A and B; The two low-rank matrices A and B are used to fine-tune the weight matrix W to obtain the fine-tuned weight matrix ; Among them, is the fine-tuned weight matrix; A and B are low-rank matrices and satisfy ; Based on the fine-tuned weight matrix Perform LoRA fine-tuning on the large language model.
[0014] Preferably, in the cognitive training process of the same user, the cognitive training is divided into multiple training stages in chronological order; In the initial training stage, only the text data corresponding to the user is obtained through the user's personal information and historical training data, so as to push a unimodal training task combination to the user; In other training stages, the text data and heterogeneous graph data corresponding to the user are obtained through the user's personal information and historical training data, so as to push a multimodal training task combination to the user; Moreover, during the user's cognitive training, a multi-task learning strategy is adopted to add auxiliary tasks, so that the large language fine-tuning model can fully learn and deeply understand various types of knowledge related to the training tasks.
[0015] Preferably, when the large language fine-tuning model outputs the recommended probability distribution of candidate tasks, multiple inference branches are generated by constructing a tree structure; For each of the inference branches, multiple alternative inference paths are generated respectively; For each of the alternative inference paths, an inference score is output by the process reward model, and the final score of each inference branch is obtained by cumulative integration. Based on the final scores of each inference branch, the inference branch with the highest score is selected as the optimal inference path, and the corresponding recommended probability distribution is output based on the optimal inference path.
[0016] Compared with the prior art, the present invention has the following technical effects: (1) The present invention adopts a multi-modal fusion method, which integrates heterogeneous graph features and text features. Specifically, the heterogeneous graph features include the user's preference interaction network graph and the membership relationship graph of training tasks and combinations, while the text features cover the description information of training tasks and the basic information of users. This method pre-trains the heterogeneous graph features through a graph convolutional neural network, encodes the text features using the embedding layer of a large language model, and finally stitches the two together through an adapter network. This multi-modal fusion method can capture the user's personalized needs more comprehensively and provide richer data support for the recommendation system.
[0017] (2) The present invention transforms the traditional combination retrieval task into a generation task. In the traditional method, the inner product calculation is less efficient in a large-scale data environment. This method reconstructs the retrieval task into a generation task through instruction fine-tuning and improves the generation efficiency through carefully designed instructions. At the same time, combined with the efficient fine-tuning of model parameters, the accuracy of the generation result is ensured, thus greatly improving the performance of the recommendation system.
[0018] (3) The present invention also adopts a multi-task learning method based on auxiliary tasks. In addition to the core training task combination recommendation task, multiple auxiliary tasks are additionally designed, such as the description of training tasks and user features, the membership relationship analysis of training tasks and combinations, the interaction relationship analysis of training tasks and users, and the explanation of the recommendation system. By jointly learning these tasks, the model can more deeply understand the complex relationships between data, thereby improving the recommendation effect.
[0019] (4) In the inference stage, the present invention introduces a slow inference strategy, especially the chain of thought technique. This technique allows the model to output multiple inference paths and selects the optimal inference path from them through the Monte Carlo tree search strategy. This not only improves the reliability of the recommendation result but also enhances the logic and interpretability of the system.
[0020] (5) The present invention adopts the idea of progressive learning to train the model. To avoid cumulative errors and coupling errors in large-scale parameter training, the recommendation system gradually transitions from simple tasks to complex tasks and gradually increases the parameter scale of the model during the process. This training strategy not only optimizes the performance of the model but also improves the overall effect of the entire recommendation system, achieving full-process optimization from personalized demand understanding to accurate recommendation. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 is a flowchart of a training task combination recommendation method based on a large language model provided by the first embodiment of the present invention; Figure 2 is a schematic diagram of a model for task pushing using a large language model in the first embodiment of the present invention; Figure 3 is a structural diagram of a training task combination recommendation system based on a large language model provided by the second embodiment of the present invention; Figure 4 is a structural diagram of a training task combination recommendation system based on a large language model provided by the third embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0022] The technical content of the present invention will be described in detail below with reference to the drawings and specific embodiments.
[0023] The technical concept of the embodiments of the present invention is to achieve accurate recommendation of training tasks by using technologies such as multimodal fusion, model fine-tuning, and multi-task learning. First, by obtaining user personal information and historical training data, an initial training task combination is constructed, and second-order knowledge representation is performed on each task. Then, a large language model is used for fine-tuning in combination with graph knowledge alignment and graph structure alignment to form a model adapted to the recommendation task. At the same time, text and heterogeneous graph data are classified and encoded, and fused to form a complete feature representation of the training task, which is input into the fine-tuned model to output a recommendation probability distribution, and the task with the highest probability is selected and combined with the initial task to form a new recommendation combination and pushed to the user.
[0024] First Embodiment As Figure 1 shown, a training task combination recommendation method based on a large language model provided by the first embodiment of the present invention specifically includes the following steps: Step S1: Obtain the user's personal information and historical training data.
[0025] In this embodiment, based on the user's historical training data, on this basis, a new task combination is generated according to the user's personal information (such as: disease information, gender and age, and historical interaction information with training tasks, etc.) and then pushed to the user for cognitive training.
[0026] Therefore, in step S1, it is necessary to first obtain the user's personal information and historical training data to provide data support for subsequent task pushing.
[0027] Step S2: Obtain the user's initial training task combination.
[0028] After the data collection is completed based on step S1, it enters step S2, where the historical training tasks are sorted according to a preset logic, and the first N training tasks are selected as the initial training task combination, where N is a positive integer.
[0029] Specifically, it includes steps S21 to S23: S21: Based on the user's historical training data, classify each historical training task according to the cognitive function to be improved by the user to form multiple groups of training tasks.
[0030] It can be understood that different training tasks can enhance specific cognitive functions. Thus, according to the user's historical training data, it can be obtained which cognitive functions of the user are impaired, that is, the cognitive functions to be improved. After determining the cognitive functions to be improved by the user, for each cognitive function to be improved, all the training tasks that can improve this cognitive function are classified into a group, so as to form multiple groups of training tasks according to multiple cognitive functions to be improved.
[0031] S22: For each group of training tasks, respectively obtain the training scores of each historical training task and sort them according to the score size.
[0032] S23: Respectively obtain the historical training task with the smallest score in each group of training tasks, so as to jointly form an initial training task combination for improving the user's various cognitive functions to be improved.
[0033] It can be understood that the historical training task with the smallest score in a group of training tasks indicates that this historical training task can greatly improve the corresponding cognitive function of the user. Therefore, after combining the historical training tasks with the smallest score in each group of training tasks, an initial training task combination is formed. Using this initial training task combination can greatly enhance the user's various cognitive functions to be improved.
[0034] Step S3: For the initial training task combination, perform second-order knowledge expression on each training task.
[0035] Specifically, as Figure 2 shown, it includes steps S31 to S33: S31: For each training task in the initial training task combination, describe the task introduction information and user interaction information of the training task through natural language; S32: Extract multiple relevant first keywords for the task introduction information; and extract multiple relevant second keywords for the user interaction information.
[0036] S33: Perform embedded mean normalization based on the multiple first keywords and the multiple second keywords to obtain special tokens for replacing the task introduction information and the user interaction information, as the second-order knowledge representation for the training task.
[0037] Step S4: Fine-tune the large language model through adaptive learning to form a large language fine-tuned model.
[0038] As Figure 2 shown, after performing the corresponding second-order knowledge representation for each training task based on the above Step S3, the training task can be replaced by its corresponding special token. Thus, by designing the prompt, the large language model can be aligned with the graph knowledge and the graph structure, and then the large language model can be fine-tuned through adaptive learning to form a large language fine-tuned model.
[0039] Specifically, it includes steps S41 to S42: S41: Graph knowledge alignment.
[0040] For the second-order knowledge representation of each training task, obtain the project description of the special token by the large language model through the first prompt. Specifically, in this embodiment, the first prompt is: In the GBR concept, what project does this special token belong to? Correspondingly, the output of the large language model is the corresponding project description. It can be understood that this project description is formed by the large language model, so there will be a certain difference from the natural language description of this training task in step S31.
[0041] Thus, in this embodiment, perform LoRA fine-tuning on the large language model to make the project description close to the natural language description, so as to perform graph knowledge alignment for each training task.
[0042] S42: Graph structure alignment.
[0043] When obtaining the project descriptions of the large language model for each training task through step S41, obtain the theoretical relationship between the project descriptions output by the large language model through the second prompt. Specifically, the second prompt is: In the GBR concept, does this project description belong to the same combination as other project descriptions? Correspondingly, the result output by the large language model is yes or no. It can be understood that this result is formed by the large language model, so there will be a certain difference from the actual relationship between the project descriptions.
[0044] Thus, by performing LoRA fine-tuning on the large language model to make the theoretical relationships close to the actual relationships between each project description, graph structure alignment is performed for each training task.
[0045] In addition, in this embodiment, the specific steps of performing LoRA fine-tuning on the large language model include: ① Decompose the weight matrix W of the large language model into two low-rank matrices A and B; ② Fine-tune the weight matrix W through the two low-rank matrices A and B to obtain the fine-tuned weight matrix ; where is the fine-tuned weight matrix; A and B are low-rank matrices and satisfy ; ③ Perform LoRA fine-tuning on the large language model based on the fine-tuned weight matrix .
[0046] It can be understood that the large language model after two LoRA fine-tuning of graph knowledge alignment and graph structure alignment is the large language fine-tuning model.
[0047] Step S5: Data classification.
[0048] Specifically, the user's personal information, the initial training task combination, and the second-order knowledge representation of each training task are divided into text data and heterogeneous graph data. Among them, the text data includes at least: training task descriptions and user's personal information; the heterogeneous graph data includes at least: the user's historical preference interaction network graph and the membership relationship graph of the training task and the combination.
[0049] Step S6: Data encoding.
[0050] After the data classification is completed based on step S5, different forms of data encoding need to be performed for different data types. In this embodiment, for text data, encoding is performed through the embedding layer of the large language fine-tuning model itself to obtain text encoding (corresponding to step S61). For heterogeneous graph data, a collaborative filtering model (such as the LightGCN model, but not limited to this) is used for encoding to obtain heterogeneous graph encoding (corresponding to step S62).
[0051] It should be noted that the LightGCN model is a simplified and efficient graph convolutional network model designed specifically for collaborative filtering tasks in recommendation systems. In addition to the LightGCN model, this collaborative filtering model can also be implemented using models such as NGCF (Neural Graph Collaborative Filtering) model and UltraGCN model, which will not be elaborated here.
[0052] S61: Text Encoding.
[0053] Specifically, it includes the following steps: S611: Obtain the embedding representation of the text data; where the text data includes the task introduction information and user interaction information of the training task, as well as the personal information of the user; S612: Input the embedding representation of the text data into the large language fine-tuning model to be encoded through the embedding layer of the large language fine-tuning model, so as to obtain the text encoding Et; Where, represents the text sequence of the text data, represents the tokenizer, represents the embedding layer of the large language model, represents the function composition operation.
[0054] S62: Heterogeneous Graph Encoding.
[0055] Specifically, it includes the following steps: S621: In the message construction layer, the LightGCN model updates the embedding of each node through the information of the neighbor nodes, and the formula is as follows: ; Where, and respectively represent the embedding vectors of the user node and the item node in the layer, and respectively represent the neighbor node sets of the user node and the item node , and represent the sizes of the corresponding neighbor node sets; S622: In the message aggregation layer, the LightGCN model aggregates the embeddings of all layers to obtain the user node representation , and the formula is as follows: , represents the total number of layers of the LightGCN model.
[0056] S623: Based on the existing training task combinations and the membership relationships of the training tasks in the combinations, obtain the item node representation in the same way; S624: Based on the user node representation and the item node representation , the self-attention mechanism is adopted for feature fusion.
[0057] Specifically, it includes the following steps: S6241: Concatenate the initial features.
[0058] Specifically, concatenate the user node representation and the item node representation to form the concatenated initial feature , . Wherein, concat represents the concatenation operation.
[0059] S6242: Calculate the query, key, and value of the l-th layer.
[0060] ; Wherein, , and are the weight matrices of the query, key, and value of the l-th layer respectively. By multiplying the features of the previous layer with these weight matrices respectively, the query, key, and value of the l-th layer are obtained.
[0061] S6243: Calculate the attention scores.
[0062] .
[0063] Wherein, d k represents the dimension of the key. Specifically, by first calculating the dot product of the query and the key, then dividing by to scale the dot product result, then using the softmax function to convert the result into a probability distribution, and finally multiplying this probability distribution by the value matrix , the attention output is obtained.
[0064] S6244: Update the feature representation.
[0065] Specifically, adopt the residual connection method to add the attention output to the feature representation of the previous layer, thereby updating the feature representation , .
[0066] S6245: Final feature representation.
[0067] Specifically, by summing the attention outputs of all layers, the final feature representation E g is obtained, , where L represents the total number of attention layers.
[0068] S625: Obtain the heterogeneous graph encoding .
[0069] Specifically, based on the final fused feature representation E g , through the function maps it to the embedding layer understood by the large model, thereby obtaining the heterogeneous graph encoding , wherein, is a two-layer MLP: .
[0070] Step S7: For each training task, after concatenating the text encoding and the heterogeneous graph encoding, a fused feature is formed.
[0071] Specifically, the text encoding E t and the heterogeneous graph encoding are concatenated to obtain the fused feature E, , where Concat represents the concatenation operation.
[0072] Step S8: Input the fused feature of each training task into the large language fine-tuning model to output a recommended probability distribution for a candidate task.
[0073] Specifically, first, through the function converts the fused feature E and the candidate items into a prompt template that the large language fine-tuning model can understand; Then, based on this prompt template, obtain the recommended probability distribution of each candidate task and historical training task output by the large language fine-tuning model , represents the candidate tasks and historical training tasks corresponding to the fused feature E.
[0074] As Figure 2 shown, in this embodiment, it is preferable to use the chain of thought technique to let the model output multiple inference paths to obtain the answer, and use the Monte Carlo tree search strategy to obtain the optimal inference path. Specifically, it includes: ① When the large language fine-tuning model outputs the recommended probability distribution of candidate tasks, generate multiple inference branches by constructing a tree structure; ② For each inference branch, generate multiple alternative inference paths respectively; ③ For each alternative inference path, the process reward model outputs an inference score to obtain the final score of each inference branch by means of integral accumulation; ④ Based on the final scores of each inference branch, select the inference branch with the highest score as the optimal inference path, and output the corresponding recommended probability distribution based on the optimal inference path, that is: the recommended probability distribution of candidate tasks.
[0075] Step S9: Form a new training task combination and push it to the user for cognitive training.
[0076] Specifically, after obtaining the recommended probability distribution of all candidate tasks based on the above step S8, the candidate task with the highest recommended probability is obtained and combined with the top N training tasks to form a new training task combination for pushing to the user for cognitive training.
[0077] In addition, in the embodiments of the present invention, preferably, during the cognitive training process of the same user, the cognitive training is divided into multiple training stages in chronological order. Thus, in the initial training stage, only the text data corresponding to the user is obtained through the user's personal information and historical training data for pushing a single-modal training task combination to the user. In other training stages, only the text data and heterogeneous graph data corresponding to the user are obtained through the user's personal information and historical training data for pushing a multi-modal training task combination to the user.
[0078] Meanwhile, during the training, a multi-task learning strategy will also be adopted to add an auxiliary task module, enabling the large language fine-tuning model to fully learn and deeply understand various types of knowledge related to the training tasks, including the internal connection between the user and the training tasks, and the specific impact of different task combination modes on the user.
[0079] Second Embodiment As Figure 3 shown, based on the above first embodiment, the second embodiment of the present invention further provides a training task combination recommendation system based on a large language model, including a data acquisition unit 1, a second-order knowledge expression unit 2, a task generation unit 3, and a push unit 4.
[0080] Specifically, the data acquisition unit 1 is used to obtain the user's personal information and historical training data. The second-order knowledge expression unit 2 is connected to the data acquisition unit 1 to sort the historical training tasks according to a preset logic based on the user's historical training data and select the top N training tasks as the initial training task combination, where N is a positive integer.
[0081] The task generation unit 3 is connected to the second-order knowledge expression unit 2 and internally has a large language model 31 and a LightGCN model 32. Among them, the large language model 31 can be fine-tuned through adaptive learning to form a large language fine-tuning model, so as to perform text encoding on the text data based on the embedding layer of the large language fine-tuning model. The LightGCN model 32 can perform heterogeneous graph encoding on the heterogeneous graph data. Then, the text encoding and the heterogeneous graph encoding are spliced to form a fused feature; furthermore, the fused feature is input into the large language fine-tuning model to output the recommended probability distribution of a candidate task.
[0082] The push unit 4 is connected to the task generation unit 3 to obtain a candidate task with the highest recommended probability based on the recommended probability distribution of all candidate tasks, and jointly combine it with the top N training tasks to form a new training task combination, which is then pushed to the user for cognitive training.
[0083] It can be understood that the combination form of the above-mentioned module units is only a specific implementation manner for implementing each step in the above-mentioned first embodiment. In other embodiments, the functions and combination forms of the module units can be adjusted as needed to implement the training task combination recommendation method in the above-mentioned first embodiment, which will not be specifically limited here.
[0084] Third Embodiment As Figure 4 shown, based on the above-mentioned training task combination recommendation method based on a large language model, the present invention further provides a training task combination recommendation system based on a large language model. The training task combination recommendation system includes one or more processors and a memory. Among them, the memory is coupled to the processor and is used to store one or more programs. When the program is executed by the processor, the processor implements the training task combination recommendation method based on a large language model in the above-mentioned embodiment.
[0085] Among them, the processor is used to control the overall operation of the training task combination recommendation system to complete all or part of the steps of the above-mentioned training task combination recommendation method based on a large language model. The processor can be a central processing unit (CPU), a graphics processing unit (GPU), a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a digital signal processing (DSP) chip, etc. The memory is used to store various types of data to support the operation of the training task combination recommendation system. These data can include, for example, instructions for any application program or method operating on the training task combination recommendation system, as well as application program-related data. The memory can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read only memory (EEPROM), erasable programmable read only memory (EPROM), programmable read only memory (PROM), read only memory (ROM), magnetic memory, flash memory, etc.
[0086] In an exemplary embodiment, the training task combination recommendation system may be specifically implemented by a computer chip or an entity, or by a product with certain functions, for executing the above-mentioned training task combination recommendation method based on a large language model and achieving the same technical effects as the above method. A typical embodiment is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, an in-vehicle human-machine interaction device, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0087] In another exemplary embodiment, the present invention also provides a computer-readable storage medium including program instructions, which, when executed by a processor, implement the steps of the training task combination recommendation method based on a large language model in any of the above embodiments. For example, the computer-readable storage medium may be the above-mentioned memory including program instructions, and the above program instructions may be executed by the processor of the training task combination recommendation system to complete the above-mentioned training task combination recommendation method and achieve the same technical effects as the above method.
[0088] In summary, the training task combination recommendation method and system provided by the embodiments of the present invention have the following beneficial effects: (1) The present invention adopts a multi-modal fusion method to integrate heterogeneous graph features and text features. Specifically, the heterogeneous graph features include the user's preference interaction network graph and the membership relationship graph of training tasks and combinations, while the text features cover the description information of training tasks and the basic information of users. This method pre-trains the heterogeneous graph features through a graph convolutional neural network, encodes the text features using the embedding layer of the large language model, and finally stitches the two together through an adapter network. This multi-modal fusion method can more comprehensively capture the personalized needs of users and provide richer data support for the recommendation system.
[0089] (2) The present invention transforms the traditional combination retrieval task into a generation task. In the traditional method, the inner product calculation is inefficient in a large-scale data environment. This method reconstructs the retrieval task into a generation task through instruction fine-tuning and improves the generation efficiency through a carefully designed instruction. At the same time, combined with the efficient fine-tuning of model parameters, the accuracy of the generation result is ensured, thus greatly improving the performance of the recommendation system.
[0090] (3) The present invention also adopts a multi-task learning method based on auxiliary tasks. In addition to the core training task of combined recommendation tasks, multiple auxiliary tasks are additionally designed, such as the description of training tasks and user characteristics, the analysis of the membership relationship between training tasks and combinations, the analysis of the interaction relationship between training tasks and users, and the explanation of the recommendation system. By jointly learning these tasks, the model can more deeply understand the complex relationships between data, thereby improving the recommendation effect.
[0091] (4) In the inference stage, the present invention introduces a slow inference strategy, especially the technique of chain of thought. This technique allows the model to output multiple inference paths and selects the optimal inference path from them through the Monte Carlo tree search strategy. This not only improves the reliability of the recommendation results but also enhances the logic and interpretability of the system.
[0092] (5) The present invention adopts the idea of progressive learning to train the model. To avoid cumulative errors and coupling errors in large-scale parameter training, the recommendation system gradually transitions from simple tasks to complex tasks and gradually increases the parameter scale of the model during the process. This training strategy not only optimizes the performance of the model but also improves the overall effect of the entire recommendation system, achieving the full-process optimization from personalized demand understanding to accurate recommendation.
[0093] It should be noted that the above-mentioned multiple embodiments are only examples. The technical solutions of each embodiment can be combined, and all are within the protection scope of the present invention.
[0094] In addition, the terms "first" and "second" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include one or more of such features. In the description of the present invention, "a plurality of" means two or more unless otherwise specifically defined.
[0095] The above provides a detailed description of the training task combination recommendation method based on the large language model of the present invention. For those of ordinary skill in the art, any obvious changes made without departing from the essence of the present invention will constitute an infringement of the patent right of the present invention and will bear corresponding legal responsibilities.
Claims
1. A training task combination recommendation method based on a large language model, characterized in that The steps are as follows: Obtain the user's personal information and historical training data; Based on the user's historical training data, sort the historical training tasks according to a preset logic, and select the top N training tasks as the initial training task combination, where N is a positive integer; For the initial training task combination, perform second-order knowledge expression on each training task; Based on the second-order knowledge expression of each training task, perform graph knowledge alignment and graph structure alignment on the large language model in the form of natural language description Q&A, so as to fine-tune the large language model through adaptive learning to form a large language fine-tuned model; Divide the user's personal information, initial training task combination, and second-order knowledge expression of each training task into text data and heterogeneous graph data; For the text data, encode it through the embedding layer of the large language fine-tuned model to obtain text encoding; and for the heterogeneous graph data, encode it through a collaborative filtering model to obtain heterogeneous graph encoding; For each of the training tasks, splice the text encoding and the heterogeneous graph encoding to form a fused feature; Input the fused feature of each training task into the large language fine-tuned model to output a recommended probability distribution of a candidate task; Based on the recommended probability distributions of all candidate tasks, obtain a candidate task with the highest recommended probability, and jointly combine it with the top N training tasks to form a new training task combination, and push it to the user for cognitive training.
2. The training task combination recommendation method according to claim 1, characterized in that The initial training task combination is obtained in the following way: Based on the user's historical training data, classify each historical training task according to the cognitive function to be improved by the user to form multiple groups of training tasks; For each group of training tasks, respectively obtain the training scores of each historical training task, and sort them according to the score size; Respectively obtain the historical training task with the smallest score in each group of training tasks, so as to jointly form an initial training task combination for improving each cognitive function to be improved by the user.
3. The training task combination recommendation method according to claim 1, wherein For the initial training task combination, performing second-order knowledge expression on each training task specifically includes: For each training task in the initial training task combination, describe the task introduction information and user interaction information of the training task in natural language; For the task introduction information, extract multiple relevant first keywords; and for the user interaction information, extract multiple relevant second keywords; Based on the multiple first keywords and the multiple second keywords, perform embedding mean normalization to obtain a special token for replacing the task introduction information and user interaction information, as the second-order knowledge expression of the training task.
4. The training task combination recommendation method according to claim 3, wherein Based on the second-order knowledge expression of each training task, performing graph knowledge alignment and graph structure alignment on the large language model in the form of natural language description Q&A specifically includes: For the second-order knowledge representation of each training task, obtain the project description of the large language model for the special token through the first prompt, and fine-tune the large language model using LoRA to make the project description close to the natural language description, thereby aligning the graph knowledge for each training task; Based on the project descriptions of each training task, obtain the theoretical relationships between the project descriptions output by the large language model through the second prompt, and fine-tune the large language model using LoRA to make the theoretical relationships close to the actual relationships between the project descriptions, thereby aligning the graph structure for each training task; Among them, the large language model after LoRA fine-tuning is the large language fine-tuning model.
5. The training task combination recommendation method according to claim 1, characterized in that For the text data, encode it through the embedding layer of the large language fine-tuning model to obtain text encoding, specifically including: Obtain the embedding representation of the text data; among them, the text data includes the task introduction information and user interaction information of the training task, as well as the personal information of the user; Input the embedding representation of the text data into the large language fine-tuning model to be encoded through the embedding layer of the large language fine-tuning model, thereby obtaining text encoding Et; Among them, represents the text sequence of text data, represents the tokenizer, represents the embedding layer of the large language model, represents the function composition operation.
6. The training task combination recommendation method according to claim 1, wherein The collaborative filtering model is the LightGCN model; encode through the LightGCN model to obtain heterogeneous graph encoding, specifically including: In the message construction layer, the LightGCN model updates the embedding of each node through the information of neighbor nodes, and the formula is as follows: ; Among them, and respectively represent the embedding vectors of the user node and the item node in the -th layer, and respectively represent the sets of neighbor nodes of the user node and the item node , and represent the sizes of the corresponding sets of neighbor nodes; In the message aggregation layer, the LightGCN model aggregates the embeddings of all layers to obtain the user node representation , and the formula is as follows: , represents the total number of layers of the LightGCN model; Based on the existing training task combinations and the subordination relationships of the training tasks in the combinations, obtain the item node representations in the same way ; Represent the user node and the item node representation Perform feature splicing to form the initial spliced feature , ; Calculate the query, key, and value of the l-th layer, ; , and are the weight matrices of the query, key, and value of the l-th layer, respectively; Calculate the attention scores through the softmax function , , d k represents the dimension of the key; The attention output is added to the feature representation of the previous layer in a residual connection manner to update the feature representation , ; The final feature representation E is obtained by summing up the attention outputs of all layers g , , where L represents the total number of attention layers Based on the final fused feature representation Eg, map it to the embedding layer understood by the large model to obtain the heterogeneous graph encoding , ; among them, is a two-layer MLP network model: .
7. The training task combination recommendation method according to claim 6, wherein Input the fusion feature of each training task into the large language fine-tuning model to output the recommended probability distribution of a candidate task, specifically including: Concatenate the text encoding Et and the heterogeneous graph encoding Eg to obtain the fused feature E, , where Concat represents the concatenation operation; Through The function converts the fusion feature E and the candidate item into a prompt template that can be understood by the large language fine-tuning model; Obtain the recommended probability distribution of each candidate task and historical training task output by the large language fine-tuning model based on the prompt template , denote the candidate tasks and historical training tasks corresponding to the fused feature E.
8. The training task combination recommendation method according to claim 1, wherein Fine-tune the large language model using LoRA, specifically including: Decompose the weight matrix W of the large language model into two low-rank matrices A and B; Fine-tune the weight matrix W through two low-rank matrices A and B to obtain the fine-tuned weight matrix ; Among them, is the weight matrix after fine-tuning; A and B are low-rank matrices and satisfy ; Based on the fine-tuned weight matrix Perform LoRA fine-tuning on the large language model.
9. The training task combination recommendation method according to claim 1, wherein: During the cognitive training process of the same user, divide the cognitive training into multiple training stages in chronological order; In the initial training stage, only obtain the text data corresponding to the user through the personal information and historical training data of the user for pushing a single-modal training task combination to the user; In other training stages, obtain the text data and heterogeneous graph data corresponding to the user through the personal information and historical training data of the user for pushing a multi-modal training task combination to the user; Moreover, during the user's cognitive training, adopt a multi-task learning strategy to add auxiliary tasks so that the large language fine-tuning model can fully learn and deeply understand various types of knowledge related to the training task.
10. The training task combination recommendation method according to claim 7, wherein: When the large language fine-tuning model outputs the recommended probability distribution of candidate tasks, generate multiple inference branches by constructing a tree structure; For each of the inference branches, generate multiple alternative inference paths; For each of the alternative inference paths, an inference score is output by the process reward model to obtain the final score of each of the inference branches in an accumulative integral manner; Based on the final scores of each of the inference branches, the inference branch with the highest score is selected as the optimal inference path, and a corresponding recommended probability distribution is output based on the optimal inference path.
Citation Information
Patent Citations
Knowledge graph recommendation method, system and equipment based on comparative learning and cooperative signal
CN116776003A
Multi-task processing method and system for large language model fused with LoRA
CN119416143A
Recommendation data enhancement method based on fine tuning large language model
CN119988598A
Method, System and Apparatus for Automatic Keyword Extraction
US20100145678A1
Cited By
Big language model-based reasoning method, training method, device and equipment
CN121279469A