A training task combination recommendation method based on large language model
Through the training task combination recommendation method based on large language model, multimodal information is integrated and model fine-tuning is performed, the "cold start" problem of traditional recommendation algorithms in rehabilitation training is solved, and the accuracy and timeliness of personalized recommendations are improved.
Patent Information
- Application Number
- CN202510731389.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-03
- Publication Date
- 2025-08-26
- Estimated Expiration
- 2045-06-03
AI Technical Summary
When facing newly developed rehabilitation training tasks, traditional recommendation algorithms are difficult to make effective recommendations due to lack of sufficient user interaction data, resulting in "cold start" problems, affecting the accuracy and timeliness of personalized recommendations. Large language models have limitations in dealing with multimodal information fusion and recommendation.
The training task combination recommendation method based on large language model is adopted, and second-order knowledge expression and graph knowledge alignment are performed by obtaining user information and historical training data, fine-tuning is performed with graph structure alignment, text and heterogeneous graph features are integrated, and LightGCN model is used for encoding, and the recommended probability distribution is output through multi-task learning and progressive learning strategies.
It realizes the effective integration of multimodal information, improves the performance and accuracy of the recommendation system, alleviates the problem of "cold start", can better meet users' personalized needs at different stages of rehabilitation, and improves the overall effect of the recommendation system.
Smart Images

Figure CN120234478B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a training task combination recommendation method based on a large language model, belonging to the technical field of computer personalized recommendation. Background Art
[0002] In the field of rehabilitation training, users' rehabilitation needs are often complex and diverse, and their needs change significantly as the rehabilitation process progresses. In the early stages of rehabilitation, users usually need to perform some basic exercises, simple cognitive training, and relaxation exercises to help their physical and mental health recover gradually. In the later stages of rehabilitation, users require more challenging advanced training and specialized skills training to further improve their rehabilitation effects and quality of life. With its excellent semantic analysis capabilities, the large language model can accurately recommend appropriate training combinations based on the user's stage of rehabilitation, providing users with personalized rehabilitation advice, thereby significantly improving rehabilitation efficiency and effectiveness.
[0003] However, traditional recommendation algorithms often struggle to make effective recommendations when faced with newly developed training tasks due to a lack of sufficient user interaction data. This "cold start" problem not only limits the promotion and application of new training tasks but also impacts the accuracy and timeliness of personalized recommendations. Although large language models (LLMs) possess extensive knowledge and sophisticated reasoning capabilities, they have significant limitations when applied directly. For example, they cannot effectively handle the fusion of information from multiple modalities, such as text, images, and audio, nor can they organically combine and recommend training tasks across different modalities.
[0004] To address these issues, large language models must be specifically adapted and optimized. By designing effective strategies that enable large language models to process multimodal information and achieve synergy between different modalities, the model's performance in training task recommendations can be significantly improved. At the same time, introducing scientific optimization strategies to rationally bundle and recommend multimodal information can not only alleviate the "cold start" problem but also help newly developed training tasks quickly find matching target user groups, thereby promoting innovation and development in the field of rehabilitation training and better meeting the personalized needs of users at different stages of rehabilitation. Summary of the Invention
[0005] The technical problem to be solved by the present invention is to provide a training task combination recommendation method based on a large language model.
[0006] In order to achieve the above technical objectives, the present invention adopts the following technical solutions:
[0007] A training task combination recommendation method based on a large language model includes the following steps:
[0008] Obtain user's personal information and historical training data;
[0009] Based on the user's historical training data, 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;
[0010] For the initial training task combination, performing second-order knowledge expression on each training task;
[0011] Based on the second-order knowledge expression of each training task, the large language model is aligned with graph knowledge and graph structure through natural language description and question answering, and then the large language model is fine-tuned through adaptive learning to form a large language fine-tuning model;
[0012] Dividing the user's personal information, the initial training task combination, and the second-order knowledge expression of each training task into text data and heterogeneous graph data;
[0013] Encoding the text data through the embedding layer of the large language fine-tuning model to obtain a text encoding; and encoding the heterogeneous graph data through the collaborative filtering model to obtain a heterogeneous graph encoding;
[0014] For each of the training tasks, the text encoding and the heterogeneous graph encoding are concatenated to form a fusion feature;
[0015] Inputting the fused features of each of the training tasks into the large language fine-tuning model to output a recommendation probability distribution of a candidate task;
[0016] Based on the recommendation probability distribution of all candidate tasks, a candidate task with the highest recommendation probability is obtained, and is combined with the first N training tasks to form a new training task combination, which is pushed to the user for cognitive training.
[0017] Preferably, the initial training task combination is obtained by:
[0018] Based on the historical training data of the user, classify each historical training task according to the cognitive function to be improved by the user to form multiple groups of training tasks;
[0019] For each set of training tasks, obtain the training scores of each historical training task and sort them according to the score;
[0020] The historical training tasks with the smallest scores in each group of training tasks are obtained respectively, so as to jointly form an initial training task combination for improving the cognitive functions to be improved of the user.
[0021] Preferably, for the initial training task combination, a second-order knowledge expression is performed on each training task, specifically including:
[0022] 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;
[0023] Extracting a plurality of related first keywords from the task introduction information; and extracting a plurality of related second keywords from the user interaction information;
[0024] Embedding mean normalization is performed based on the multiple first keywords and the multiple second keywords to obtain special word elements used to replace the task introduction information and user interaction information as the second-order knowledge expression of the training task.
[0025] The best approach is to align the graph knowledge and graph structure of the large language model based on the second-order knowledge expression of each training task through natural language description and question answering. Specifically, the following steps are involved:
[0026] For the second-order knowledge expression of each training task, the first prompt word is used to obtain the project description of the special word in the large language model. Then, the large language model is fine-tuned by LoRA to make the project description close to the natural language description, thereby performing graph knowledge alignment for each training task.
[0027] Based on the project descriptions of each training task, a theoretical relationship between the project descriptions output by the large language model is obtained through a second prompt word, and the large language model is fine-tuned by LoRA to make the theoretical relationship close to the actual relationship between the project descriptions, thereby performing graph structure alignment for each training task;
[0028] Among them, the large language model after LoRA fine-tuning is the large language fine-tuning model.
[0029] Preferably, encoding the text data through the embedding layer of the large language fine-tuning model to obtain text encoding specifically includes:
[0030] Obtaining an embedded representation of the text data; wherein the text data includes task introduction information and user interaction information of the training task, as well as personal information of the user;
[0031] Inputting the embedded 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 a text encoding Et;
[0032]
[0033] in, a sequence of text representing text data, Represents a word segmenter, represents the embedding layer of the large language model, Represents function composition operation.
[0034] Preferably, the collaborative filtering model is a LightGCN model; encoding is performed using the LightGCN model to obtain heterogeneous graph encoding, specifically including:
[0035] At the message construction layer, the LightGCN model updates the embedding of each node through the information of neighboring nodes. The specific formula is as follows:
[0036] ;
[0037] in, and Respectively represent User nodes in the layer and item nodes The embedding vector of and Represents user nodes respectively and item nodes The set of neighbor nodes of and Indicates the size of the corresponding neighbor node set;
[0038] At the message aggregation layer, the LightGCN model aggregates the embeddings of all layers to obtain the user node representation , the specific formula is as follows:
[0039] , Indicates the total number of layers of the LightGCN model;
[0040] Based on the existing training task combination and the affiliation of the training tasks in the combination, the same method is used to obtain the item node representation ;
[0041] The user node represents and item node representation Perform feature stitching to form initial stitching features , ;
[0042] Calculate the query, key, and value of layer l; ; 、 and are the weight matrices for query, key, and value at layer l, respectively;
[0043] Calculate the attention score through the softmax function ,
[0044] , d k Represents the dimension of the key;
[0045] The residual connection is used to add the attention output to the feature representation of the previous layer, and then update the feature representation , ;
[0046] The final feature representation E is obtained by summing the attention outputs of all layers g , , L represents the total number of attention layers;
[0047] Based on the final feature representation Eg after fusion, it is mapped to the embedding layer understood by the large model to obtain heterogeneous graph encoding , ;in, It is a two-layer MLP network model: .
[0048] Preferably, the fused features of each training task are input into the large language fine-tuning model to output a recommendation probability distribution of a candidate task, specifically including:
[0049] The text encoding Et and the heterogeneous graph encoding Eg are spliced to obtain the fusion feature E, , where Concat represents the concatenation operation;
[0050] pass The function converts the fused feature E and the candidate item into a prompt template that can be understood by the large language fine-tuning model;
[0051] Based on the prompt template, the recommendation probability distribution of each candidate task and historical training task output by the large language fine-tuning model is obtained , Represents the candidate tasks and historical training tasks corresponding to the fusion feature E.
[0052] Preferably, LoRA fine-tuning is performed on the large language model, specifically including:
[0053] Decompose the weight matrix W of the large language model into two low-rank matrices A and B;
[0054] The weight matrix W is fine-tuned by two low-rank matrices A and B to obtain a fine-tuned weight matrix ;
[0055] in, is the fine-tuned weight matrix; A and B are low-rank matrices and satisfy ;
[0056] Based on the fine-tuned weight matrix Perform LoRA fine-tuning on the large language model.
[0057] Preferably, in the cognitive training process of the same user, the cognitive training is divided into multiple training stages in chronological order;
[0058] In the initial training phase, 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 single-modal training task combination to the user;
[0059] In other training phases, the user's corresponding text data and heterogeneous graph data are obtained through the user's personal information and historical training data, so as to push a multimodal training task combination to the user;
[0060] Furthermore, during the user 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.
[0061] Preferably, when the large language fine-tuning model outputs the recommendation probability distribution of the candidate tasks, multiple reasoning branches are generated by constructing a tree structure;
[0062] For each of the reasoning branches, generating multiple alternative reasoning paths respectively;
[0063] For each of the alternative reasoning paths, the process reward model outputs a reasoning score, so as to obtain a final score of each of the reasoning branches by accumulating points;
[0064] Based on the final score of each of the reasoning branches, the reasoning branch with the highest score is selected as the optimal reasoning path, and a corresponding recommendation probability distribution is output based on the optimal reasoning path.
[0065] Compared with the prior art, the present invention has the following technical effects:
[0066] (1) This paper adopts a multimodal fusion method that integrates heterogeneous graph features and text features. Specifically, the heterogeneous graph features include the user's preference interaction network diagram and the affiliation diagram of the training tasks and combinations, while the text features cover the descriptive information of the training tasks and the basic information of the 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 splices the two together through an adapter network. This multimodal fusion method can more comprehensively capture the personalized needs of users and provide richer data support for the recommendation system.
[0067] (2) This invention transforms the traditional combinatorial retrieval task into a generative task. In traditional methods, inner product calculations are inefficient in large-scale data environments. This method restructures the retrieval task into a generative task by fine-tuning instructions and improves generation efficiency through carefully designed instructions. At the same time, combined with efficient fine-tuning of model parameters, the accuracy of the generated results is ensured, thereby significantly improving the performance of the recommendation system.
[0068] (3) This 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 designed, such as the description of training tasks and user characteristics, the analysis of the affiliation between training tasks and combinations, the analysis of the interactive relationship between training tasks and users, and the explanation of the recommendation system. By jointly learning these tasks, the model can gain a deeper understanding of the complex relationships between data, thereby improving the recommendation effect.
[0069] (4) In the reasoning stage, the present invention introduces a slow reasoning strategy, specifically the thought chaining technique. This technique allows the model to output multiple reasoning paths and selects the optimal one from them through a 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.
[0070] (5) This invention uses the concept 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 in the process. This training strategy not only optimizes the performance of the model, but also improves the overall effectiveness of the entire recommendation system, achieving full process optimization from personalized demand understanding to accurate recommendations. BRIEF DESCRIPTION OF THE DRAWINGS
[0071] Figure 1 A flowchart of a method for recommending a combination of training tasks based on a large language model provided by the first embodiment of the present invention;
[0072] Figure 2 This is a model principle diagram for using a large language model to push tasks in the first embodiment of the present invention;
[0073] Figure 3 A structural diagram of a training task combination recommendation system based on a large language model provided in the second embodiment of the present invention;
[0074] Figure 4 This is a structural diagram of a training task combination recommendation system based on a large language model provided in the third embodiment of the present invention. DETAILED DESCRIPTION
[0075] The technical content of the present invention is described in detail below with reference to the accompanying drawings and specific embodiments.
[0076] The technical concept of the embodiment of the present invention is to use multimodal fusion, model fine-tuning, multi-task learning and other technologies to achieve accurate recommendation of training tasks. First, by obtaining user personal information and historical training data, an initial training task combination is constructed, and second-order knowledge expression is performed for each task. Then, a large language model is used in combination with graph knowledge alignment and graph structure alignment for fine-tuning to form a model adapted to the recommendation task. At the same time, the 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-tuning model to output the recommendation probability distribution. The highest probability task is filtered and combined with the initial task to form a new recommendation combination and pushed to the user.
[0077] First embodiment
[0078] like Figure 1 As shown, the first embodiment of the present invention provides a method for recommending a combination of training tasks based on a large language model, which specifically includes the following steps:
[0079] Step S1: Obtain the user's personal information and historical training data.
[0080] In this embodiment, based on the user's historical training data, new task combinations are generated according to the user's personal information (for example, disease information, gender, age, and historical interaction information with training tasks, etc.), and then pushed to the user for cognitive training.
[0081] 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 push.
[0082] Step S2: Obtain the user's initial training task combination.
[0083] After completing data collection based on step S1, proceed to step S2 to sort the historical training tasks according to the preset logic, and select the first N training tasks as the initial training task combination, where N is a positive integer.
[0084] Specifically, it includes steps S21 to S23:
[0085] S21: Based on the user's historical training data, classify each historical training task according to the user's cognitive function to be improved to form multiple groups of training tasks.
[0086] It is understood that different training tasks can enhance specific cognitive functions. Therefore, based on the user's historical training data, it is possible to determine which of the user's cognitive functions are impaired, i.e., the cognitive functions to be improved. Once the user's cognitive functions to be improved are determined, for each cognitive function to be improved, all training tasks that can improve that cognitive function are grouped together, thereby forming multiple groups of training tasks based on the multiple cognitive functions to be improved.
[0087] S22: For each group of training tasks, obtain the training scores of each historical training task respectively, and sort them according to the score.
[0088] S23: Obtain the historical training tasks with the smallest scores in each group of training tasks, thereby forming an initial training task combination for improving the user's cognitive functions to be improved.
[0089] It is understood that the historical training task with the lowest score in a group of training tasks indicates that it can significantly improve the user's corresponding cognitive function. Therefore, the historical training tasks with the lowest scores in each group of training tasks are combined to form an initial training task combination. This initial training task combination can significantly enhance the user's cognitive functions to be improved.
[0090] Step S3: For the initial training task combination, perform second-order knowledge expression for each training task.
[0091] Specifically, such as Figure 2 As shown, it includes steps S31 to S33:
[0092] S31: 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;
[0093] S32: extracting a plurality of related first keywords from the task introduction information; and extracting a plurality of related second keywords from the user interaction information.
[0094] S33: Perform embedding mean normalization based on multiple first keywords and multiple second keywords to obtain special word units used to replace task introduction information and user interaction information as the second-order knowledge expression of the training task.
[0095] Step S4: Fine-tune the large language model through adaptive learning to form a large language fine-tuning model.
[0096] like Figure 2 As shown, after each training task is represented by corresponding second-order knowledge based on step S3, the training task can be replaced by its corresponding special word. Thus, by designing prompts, the large language model can be aligned with both graph knowledge and graph structure, and then fine-tuned through adaptive learning to form a large language fine-tuning model.
[0097] Specifically, it includes steps S41 to S42:
[0098] S41: Graph knowledge alignment.
[0099] For each training task's second-order knowledge expression, the large language model uses the first prompt word to obtain a project description for the special word. Specifically, in this embodiment, the first prompt word is: In the GBR concept, what project does this special word belong to? Correspondingly, the large language model outputs the corresponding project description. It is understandable that this project description is generated by the large language model and therefore may differ from the natural language description of the training task in step S31.
[0100] Therefore, in this embodiment, LoRA fine-tuning is performed on the large language model to make the project description close to the natural language description, thereby performing graph knowledge alignment on each training task.
[0101] S42: Graph structure alignment.
[0102] After the large language model obtains the project descriptions for each training task through step S41, the theoretical relationship between the project descriptions output by the large language model is obtained through a second prompt word. Specifically, the second prompt word is: In the GBR concept, do the project description and other project descriptions belong to the same group? Accordingly, the result output by the large language model is yes or no. It is understandable that this result is generated by the large language model and may differ from the actual relationship between the project descriptions.
[0103] Therefore, by fine-tuning the large language model with LoRA, the theoretical relationship is made close to the actual relationship between the descriptions of each item, thereby aligning the graph structure of each training task.
[0104] In addition, in this embodiment, performing LoRA fine-tuning on the large language model specifically includes:
[0105] ① Decompose the weight matrix W of the large language model into two low-rank matrices A and B;
[0106] ② Fine-tune the weight matrix W through two low-rank matrices A and B to obtain the fine-tuned weight matrix ;
[0107] in, is the fine-tuned weight matrix; A and B are low-rank matrices and satisfy ;
[0108] ③ Based on the fine-tuned weight matrix Fine-tuning LoRA on large language models.
[0109] It can be understood that the large language model after two LoRA fine-tunings of graph knowledge alignment and graph structure alignment is the large language fine-tuning model.
[0110] Step S5: Data classification.
[0111] 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. The text data includes at least the training task description and the user's personal information; the heterogeneous graph data includes at least the user's historical preference interaction network diagram and the affiliation diagram between training tasks and combinations.
[0112] Step S6: Data encoding.
[0113] After data classification is completed based on step S5, different data types require different data encoding methods. In this embodiment, text data is encoded using 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, but not limited to, the LightGCN model) is used to encode the data to obtain heterogeneous graph encoding (corresponding to step S62).
[0114] 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 the NGCF (Neural Graph Collaborative Filtering) model and the UltraGCN model, which will not be explained in detail here.
[0115] S61: Text encoding.
[0116] Specifically, the following steps are included:
[0117] S611: Obtain an embedded representation of text data; wherein the text data includes task introduction information and user interaction information of the training task, as well as user personal information;
[0118] S612: Inputting the embedded 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 the text encoding Et;
[0119]
[0120] in, a sequence of text representing text data, Represents a word segmenter, represents the embedding layer of the large language model, Represents function composition operation.
[0121] S62: Heterogeneous graph coding.
[0122] Specifically, the following steps are included:
[0123] S621: At the message construction layer, the LightGCN model updates the embedding of each node through the information of neighboring nodes. The formula is as follows:
[0124] ;
[0125] in, and Respectively represent User nodes in the layer and item nodes The embedding vector of and Represents user nodes respectively and item nodes The set of neighbor nodes of and Indicates the size of the corresponding neighbor node set;
[0126] S622: At the message aggregation layer, the LightGCN model aggregates the embeddings of all layers to obtain the user node representation , the formula is as follows:
[0127] , Indicates the total number of layers of the LightGCN model.
[0128] S623: Based on the existing training task combination and the affiliation of the training tasks in the combination, the item node representation is obtained in the same way ;
[0129] S624: Based on user node representation and item node representation , self-attention mechanism is used for feature fusion.
[0130] Specifically, the following steps are included:
[0131] S6241: Splicing initial features.
[0132] Specifically, the user node is represented by and item node representation Perform feature stitching to form initial stitching features , Among them, concat represents the concatenation operation.
[0133] S6242: Calculate the query (Query), key (Key), and value (Value) of the lth layer.
[0134] ;
[0135] in, 、 and are the weight matrices of query, key and value of layer l respectively. Multiply these weight matrices respectively to obtain the query, key and value of the lth layer.
[0136] S6243: Calculate attention score.
[0137] .
[0138] Among them, d k Indicates the dimension of the key. Specifically, by first calculating the dot product of the query and the key, and then dividing by To scale the dot product result, we then use the softmax function to convert the result into a probability distribution, and finally combine this probability distribution with the value matrix Multiply them together to get the attention output.
[0139] S6244: Update feature representation.
[0140] Specifically, the residual connection is used to add the attention output to the feature representation of the previous layer, and then update the feature representation , .
[0141] S6245: Final feature representation.
[0142] Specifically, by summing the attention outputs of all layers, we get the final feature representation E g , , L represents the total number of attention layers.
[0143] S625: Obtaining heterogeneous graph encoding .
[0144] Specifically, based on the final feature representation E after fusion g ,pass The function maps it to the embedding layer understood by the large model to obtain the heterogeneous graph encoding , ;in, is a two-layer MLP: .
[0145] Step S7: For each training task, the text encoding and the heterogeneous graph encoding are concatenated to form a fusion feature.
[0146] Specifically, encode the text E t and heterogeneous graph encoding Splicing is performed to obtain the fusion feature E, , where Concat represents the concatenation operation.
[0147] Step S8: Input the fused features of each training task into the large language fine-tuning model to output a recommendation probability distribution of candidate tasks.
[0148] Specifically, first, through The function converts the fused features E and the candidate items into a prompt template that can be understood by the large language fine-tuning model;
[0149] Then, based on the prompt template, we obtain the recommendation 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 fusion feature E.
[0150] like Figure 2 As shown, in this embodiment, it is preferred to use the thought chain technology to allow the model to output multiple reasoning paths to obtain the answer, and use the Monte Carlo tree search strategy to obtain the optimal reasoning path. Specifically including:
[0151] ① When the large language fine-tuning model outputs the recommendation probability distribution of candidate tasks, multiple reasoning branches are generated by building a tree structure;
[0152] ② For each reasoning branch, generate multiple alternative reasoning paths;
[0153] ③ For each alternative reasoning path, the process reward model outputs a reasoning score, and the final score of each reasoning branch is obtained by accumulating points;
[0154] ④ Based on the final score of each reasoning branch, select the reasoning branch with the highest score as the optimal reasoning path, and output the corresponding recommendation probability distribution based on the optimal reasoning path, that is, the recommendation probability distribution of the candidate task.
[0155] Step S9: forming a new training task combination and pushing it to the user for cognitive training.
[0156] Specifically, after obtaining the recommendation probability distribution of all candidate tasks based on the above step S8, a candidate task with the highest recommendation probability is obtained and combined with the first N training tasks to form a new training task combination to be pushed to the user for cognitive training.
[0157] Furthermore, in an embodiment of the present invention, preferably, within the cognitive training process of the same user, cognitive training is divided into multiple training phases in chronological order. Thus, in the initial training phase, only the user's corresponding text data is obtained through the user's personal information and historical training data, for use in pushing a unimodal training task combination to the user. In other training phases, only the user's corresponding text data and heterogeneous graph data are obtained through the user's personal information and historical training data, for use in pushing a multimodal training task combination to the user.
[0158] At the same time, a multi-task learning strategy will be adopted during training, and auxiliary task modules will be added to enable the large language fine-tuning model to fully learn and deeply understand various types of knowledge related to the training tasks, including the intrinsic connection between users and training tasks, and the specific impact of different task combination modes on users.
[0159] Second embodiment
[0160] like Figure 3 As shown, based on the above-mentioned 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.
[0161] Specifically, the data collection unit 1 is used to obtain the user's personal information and historical training data. The second-order knowledge representation unit 2 is connected to the data collection unit 1 and is used to sort the historical training tasks according to the user's historical training data according to a preset logic and select the top N training tasks as the initial training task combination, where N is a positive integer.
[0162] The task generation unit 3 is connected to the second-order knowledge expression unit 2 and has a built-in large language model 31 and LightGCN model 32. The large language model 31 can be fine-tuned through adaptive learning to form a large language fine-tuning model, thereby performing 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 heterogeneous graph data. Then, the text encoding and the heterogeneous graph encoding are spliced to form a fusion feature; and then the fusion feature is input into the large language fine-tuning model to output a recommendation probability distribution of a candidate task.
[0163] The push unit 4 is connected to the task generation unit 3 to obtain a candidate task with the highest recommendation probability based on the recommendation probability distribution of all candidate tasks, and combine it with the first N training tasks to form a new training task combination to push to the user for cognitive training.
[0164] It can be understood that the combination of the above-mentioned module units is only a specific implementation method for realizing the various steps in the above-mentioned first embodiment. In other embodiments, the functions and combination forms of each module unit can be adjusted as needed to realize the training task combination recommendation method in the above-mentioned first embodiment, and no specific limitation is made here.
[0165] Third embodiment
[0166] like Figure 4 As 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. The memory is coupled to the processor and is used to store one or more programs. When the programs are executed by the processor, the processor implements the training task combination recommendation method based on a large language model in the above-mentioned embodiment.
[0167] 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 large language model-based training task combination recommendation method. 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. This data may include, for example, instructions for any application or method operating on the training task combination recommendation system, as well as application-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 storage, flash memory, etc.
[0168] In an exemplary embodiment, the training task combination recommendation system can be implemented by a computer chip or entity, or by a product with a certain function, for executing the above-mentioned large language model-based training task combination recommendation method and achieving the same technical effect as the above-mentioned method. A typical embodiment is a computer. Specifically, the computer can be, for example, a personal computer, a laptop computer, an in-vehicle human-computer 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.
[0169] In another exemplary embodiment, the present invention further provides a computer-readable storage medium comprising program instructions, which, when executed by a processor, implement the steps of the method for recommending a training task combination based on a large language model in any of the aforementioned embodiments. For example, the computer-readable storage medium may be the aforementioned memory comprising the program instructions, which may be executed by a processor of a training task combination recommendation system to perform the aforementioned method for recommending a training task combination based on a large language model and achieve the same technical effects as the aforementioned method.
[0170] In summary, the method and system for recommending training task combinations based on a large language model provided by the embodiments of the present invention have the following beneficial effects:
[0171] (1) This paper adopts a multimodal fusion method that integrates heterogeneous graph features and text features. Specifically, the heterogeneous graph features include the user's preference interaction network diagram and the affiliation diagram of the training tasks and combinations, while the text features cover the descriptive information of the training tasks and the basic information of the 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 splices the two together through an adapter network. This multimodal fusion method can more comprehensively capture the personalized needs of users and provide richer data support for the recommendation system.
[0172] (2) This invention transforms the traditional combinatorial retrieval task into a generative task. In traditional methods, inner product calculations are inefficient in large-scale data environments. This method restructures the retrieval task into a generative task by fine-tuning instructions and improves generation efficiency through carefully designed instructions. At the same time, combined with efficient fine-tuning of model parameters, the accuracy of the generated results is ensured, thereby significantly improving the performance of the recommendation system.
[0173] (3) This 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 designed, such as the description of training tasks and user characteristics, the analysis of the affiliation between training tasks and combinations, the analysis of the interactive relationship between training tasks and users, and the explanation of the recommendation system. By jointly learning these tasks, the model can gain a deeper understanding of the complex relationships between data, thereby improving the recommendation effect.
[0174] (4) In the reasoning stage, the present invention introduces a slow reasoning strategy, specifically the thought chaining technique. This technique allows the model to output multiple reasoning paths and selects the optimal one from them through a 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.
[0175] (5) This invention uses the concept 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 in the process. This training strategy not only optimizes the performance of the model, but also improves the overall effectiveness of the entire recommendation system, achieving full process optimization from personalized demand understanding to accurate recommendations.
[0176] It should be noted that the above embodiments are merely examples, and the technical solutions of the various embodiments may be combined and are all within the scope of protection of the present invention.
[0177] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of the technical features being referred to. Thus, a feature identified as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, "plurality" means two or more, unless otherwise specifically defined.
[0178] The above describes in detail the large language model-based training task combination recommendation method provided by the present invention. For those skilled in the art, any obvious modification to this invention without departing from its essence would constitute an infringement of the present invention's patent rights and would incur corresponding legal liability.
Claims
1. A training task combination recommendation method based on a large language model, characterized by The steps include: Obtain user's personal information and historical training data; Based on the user's historical training data, 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; For the initial training task combination, performing second-order knowledge expression for each training task; Based on the second-order knowledge expression of each training task, the large language model is aligned with graph knowledge and graph structure through natural language description and question answering, and then the large language model is fine-tuned through adaptive learning to form a large language fine-tuning model; Dividing the user's personal information, the initial training task combination, and the second-order knowledge expression of each training task into text data and heterogeneous graph data; Encoding the text data through the embedding layer of the large language fine-tuning model to obtain a text encoding; and encoding the heterogeneous graph data through the collaborative filtering model to obtain a heterogeneous graph encoding; For each of the training tasks, the text encoding and the heterogeneous graph encoding are concatenated to form a fusion feature; Inputting the fused features of each of the training tasks into the large language fine-tuning model to output a recommendation probability distribution of a candidate task; Based on the recommendation probability distribution of all candidate tasks, a candidate task with the highest recommendation probability is obtained, and is combined with the first N training tasks to form a new training task combination, which is pushed 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 historical training data of the user, 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 set of training tasks, obtain the training scores of each historical training task and sort them according to the score; The historical training tasks with the smallest scores in each group of training tasks are obtained respectively, so as to jointly form an initial training task combination for improving the cognitive functions to be improved of the user.
3. The training task combination recommendation method according to claim 1, characterized in that For the initial training task combination, a second-order knowledge expression is performed for each training task, specifically including: 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; Extracting a plurality of related first keywords from the task introduction information; and extracting a plurality of related second keywords from the user interaction information; Embedding mean normalization is performed based on the multiple first keywords and the multiple second keywords to obtain special word elements used to replace 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, characterized in that Based on the second-order knowledge expression of each training task, the large language model is aligned with graph knowledge and graph structure through natural language description and question answering. Specifically, the following steps are performed: For the second-order knowledge expression of each training task, the first prompt word is used to obtain the project description of the special word in the large language model. Then, the large language model is fine-tuned by LoRA to make the project description close to the natural language description, thereby performing graph knowledge alignment for each training task. Based on the project descriptions of each training task, a theoretical relationship between the project descriptions output by the large language model is obtained through a second prompt word, and the large language model is fine-tuned by LoRA to make the theoretical relationship close to the actual relationship between the project descriptions, thereby performing graph structure alignment 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 The text data is encoded using the embedding layer of the large language fine-tuning model to obtain a text encoding, specifically including: Obtaining an embedded representation of the text data; wherein the text data includes task introduction information and user interaction information of the training task, as well as personal information of the user; Inputting the embedded 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 a text encoding Et; in, a sequence of text representing text data, Represents a word segmenter, represents the embedding layer of the large language model, Represents function composition operation.
6. The training task combination recommendation method according to claim 1, characterized in that The collaborative filtering model is a LightGCN model; encoding is performed using the LightGCN model to obtain heterogeneous graph encoding, specifically including: At the message construction layer, the LightGCN model updates the embedding of each node through the information of neighboring nodes. The formula is as follows: ; in, and Respectively represent User nodes in the layer and item nodes The embedding vector of and Represents user nodes respectively and item nodes The set of neighbor nodes of and Indicates the size of the corresponding neighbor node set; At the message aggregation layer, the LightGCN model aggregates the embeddings of all layers to obtain the user node representation , the formula is as follows: , Indicates the total number of layers of the LightGCN model; Based on the existing training task combination and the affiliation of the training tasks in the combination, the same method is used to obtain the item node representation ; The user node represents and item node representation Perform feature stitching to form initial stitching features , ; Compute the query, key, and value at level l, ; 、 and are the weight matrices for query, key, and value at layer l, respectively; Calculate the attention score through the softmax function , , d k Represents the dimension of the key; The residual connection is used to add the attention output to the feature representation of the previous layer, and then update the feature representation , ; The final feature representation E is obtained by summing the attention outputs of all layers g , , L represents the total number of attention layers; Based on the final feature representation Eg after fusion, it is mapped to the embedding layer understood by the large model to obtain heterogeneous graph encoding , ;in, It is a two-layer MLP network model: .
7. The training task combination recommendation method according to claim 6, characterized in that Inputting the fused features of each training task into the large language fine-tuning model to output a recommendation probability distribution for a candidate task, specifically including: The text encoding Et and the heterogeneous graph encoding Eg are spliced to obtain the fusion feature E, , where Concat represents the concatenation operation; pass The function converts the fused feature E and the candidate item into a prompt template that can be understood by the large language fine-tuning model; Obtain the recommendation probability distribution of each candidate task and historical training task output by the large language fine-tuning model based on the prompt template , Represents the candidate tasks and historical training tasks corresponding to the fusion feature E.
8. The training task combination recommendation method according to claim 1, characterized in that By performing LoRA fine-tuning on the large language model, specifically including: Decompose the weight matrix W of the large language model into two low-rank matrices A and B; The weight matrix W is fine-tuned by two low-rank matrices A and B to obtain a fine-tuned weight matrix ; in, 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.
9. The training task combination recommendation method according to claim 1, wherein: In the cognitive training process of the same user, cognitive training is divided into multiple training stages according to the chronological order; In the initial training phase, 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 single-modal training task combination to the user; In other training phases, the user's corresponding text data and heterogeneous graph data are obtained through the user's personal information and historical training data, so as to push a multimodal training task combination to the user; Furthermore, during the user 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.
10. The training task combination recommendation method according to claim 7, wherein: When the large language fine-tuning model outputs a recommendation probability distribution of a candidate task, generating multiple reasoning branches by constructing a tree structure; For each of the reasoning branches, generating multiple alternative reasoning paths respectively; For each of the alternative reasoning paths, the process reward model outputs a reasoning score, so as to obtain a final score of each of the reasoning branches by accumulating points; Based on the final score of each of the reasoning branches, the reasoning branch with the highest score is selected as the optimal reasoning path, and a corresponding recommendation probability distribution is output based on the optimal reasoning 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