Learner intention semantic modeling method based on large language model enhancement
The learner intent semantic modeling method enhanced by large language models solves the problems of incomplete semantic representation of learning resources and insufficient fine-grained modeling of learner intent in online education resource recommendation systems, and achieves more efficient personalized resource recommendation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-10
- Publication Date
- 2026-03-31
AI Technical Summary
In online education resource recommendation systems, the textual semantic information of learning resource entities and their relationships is missing, and the integration of learner intent expression and learning resource semantic information is insufficient, resulting in low recommendation accuracy, weak generalization ability of recommendation models, and difficulty in capturing the multi-level, fine-grained features and complex semantic relationships of learner intent.
We adopt a learner intent semantic modeling method based on large language model enhancement. We generate semantic embeddings of learning resources and relations by pre-training a large language model, construct a semantic intent graph and introduce a multi-intent contrastive learning mechanism. We combine graph neural networks to perform multi-layer aggregation on the intent graph and knowledge graph to generate high-order semantic representations of learners and learning resources. We optimize the model through BPR loss and multi-intent contrastive loss.
It improves the recommendation accuracy and personalization of online education resource recommendation systems, accurately captures learners' multidimensional preferences, enhances the model's semantic understanding and modeling ability of complex relationship paths, and improves the overall performance of the recommendation system.
Smart Images

Figure CN121766321A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, specifically to a learner intent semantic modeling method based on large language model enhancement. Background Technology
[0002] Online educational resource recommendation systems are tools that provide personalized educational resource recommendations to online learners. Based on learning needs and preferences, they push suitable resources to learners, thereby helping them efficiently acquire the content they need and improve learning efficiency. However, current online educational resource recommendation systems face the following problems in practical applications: lack of textual semantic information about learning resource entities and their relationships makes it difficult to comprehensively represent resource semantics; insufficient integration of learner intent expression and learning resource semantic information leads to low recommendation accuracy; limitations in the system's understanding of learners' learning needs make it difficult to achieve deep matching; and weak generalization ability of recommendation models, lacking the ability to model complex semantic relationships.
[0003] In existing technologies, most recommendation algorithms used in online education resource recommendation systems are based on knowledge graphs. Knowledge graph recommendation uses structured representations of entities and relationships to help the system understand learners' needs and provide semantically related recommendations. However, existing knowledge graph-based recommendation systems still suffer from cold start problems and insufficient semantic expression. Some technologies transform knowledge graph triples into static embeddings and combine them with graph neural networks to obtain high-order representations of learners and resources, but they do not fully explore the semantic richness and contextual information in the graph, and they also ignore the textual semantics of learning resources and relationships. Some technologies combine large language models with knowledge graphs. While large language models are used to generate dynamic text embeddings to enrich representations and improve recommendation quality, recommendation methods based on large language models still have the following shortcomings: First, the fine-grained modeling of learner intent is insufficient, failing to fully capture the multi-level, fine-grained features of learner intent and the interaction relationships between different intents, affecting the degree of personalization of recommendations; second, it is difficult to capture the semantic depth and dependency of relational paths. Existing methods mostly use unified semantic embedding to process adjacency information, without fully considering the order and dependency of complex relational paths in knowledge graphs, resulting in limitations in the understanding and modeling of multi-level and complex semantic relationships, affecting the overall performance of the recommendation system. Summary of the Invention
[0004] The purpose of this invention is to provide a learner intent semantic modeling method based on large language model enhancement to solve the problems mentioned in the background art.
[0005] To achieve the above objectives, the present invention provides the following technical solution: a learner intent semantic modeling method based on large language model enhancement, comprising the following steps: Step 1, data preparation; Step 2, large language model embedding generation; Step 3, learner intent semantic modeling; Step 4, semantic intent perception aggregation; Step 5, model prediction; Step 6, model optimization.
[0006] In step one above, the interaction data between learners and learning resources, the knowledge graph and text description corresponding to the learning resources are obtained.
[0007] In step two above, based on the knowledge graph and text description corresponding to the learning resources obtained in step one, a pre-trained large language model is used for semantic encoding to generate initial learning resource semantic embeddings and initial relation semantic embeddings. After dimensional alignment and normalization, the learning resource semantic embeddings and relation semantic embeddings are obtained respectively.
[0008] In step three above, a semantic intent graph is constructed based on the relational semantic embedding generated in step two. Semantic representations of each intent are generated through an attention mechanism, and a multi-intent contrastive learning mechanism is introduced to achieve independent modeling of intent representations. The semantic intent graph decomposes the interaction data between learners and learning resources into triples of learner, intent, and learning resource.
[0009] In step four above, based on graph neural networks, multi-layer aggregation operations are performed on the semantic intent graph constructed in step three and the knowledge graph obtained in step one to obtain the high-order semantic representation of the learner and the high-order semantic representation of the learning resources.
[0010] In step five above, the learner's high-order semantic representation and the learning resource's high-order semantic representation obtained in step four are fused together, and the learner's preference probability for the learning resource is calculated through the inner product.
[0011] In step six above, the total loss function is constructed using BPR loss, multi-intent contrast loss, and L2 regularization. The total loss function is minimized using the gradient descent algorithm, and the model parameters are iteratively updated to obtain the trained learner intent semantic modeling model.
[0012] Preferably, in step one, the interaction data is implicit feedback data, and the knowledge graph consists of head entity, relation, and tail entity triples.
[0013] Preferably, step two specifically includes the following steps:
[0014] 2.1 Generate structured text based on attribute information in text descriptions and extract relational text from knowledge graphs;
[0015] 2.2 The Mistrale5 model's token segmenter converts structured text and relational text into token sequences, which are then input into the Mistrale5 model to obtain the last layer's hidden state tensor, denoted as follows: d1 is the embedding dimension of each token;
[0016] 2.3 For the hidden state tensor H i and H r Perform max pooling to obtain the initial learning resource semantic embeddings E. i and initial relation semantic embedding E r The formula for max pooling is as follows:
[0017]
[0018] Among them, H i,j H represents i The embedding vector of the j-th token, H r,j H represents ir The embedding vector of the j-th token;
[0019] 2.4 The initial semantic embedding is L2 normalized. The L2 normalization formula is as follows:
[0020]
[0021] Among them, ||E i ||2 is embedded E i The L2 norm, E i It is the normalized semantic embedding of learning resources, ||E r ||2 is embedded E r The L2 norm, E r It is a normalized relational semantic embedding;
[0022] 2.5 Dimension alignment is achieved through a semantic space alignment mechanism, specifically by introducing a linear layer to reduce the dimensionality of the normalized initial semantic embeddings, ensuring that the semantic embedding dimension of the learning resources matches the embedding dimension of the learning resource IDs, and that the semantic embedding dimension of the relations matches the embedding dimension of the relation IDs, thus completing the dimensional alignment; the formula is as follows:
[0023]
[0024] in To learn resource semantic embeddings, It is the weight matrix, representing the linear mapping between the input vector and the output vector. It is a bias term, and d2 is the learning resource ID embedding dimension; For relational semantic embedding, It is the weight matrix, representing the linear mapping between the input vector and the output vector. It is a bias term, and d3 is the dimension of relation ID embedding.
[0025] Preferably, in step three, the semantic representation of intent Specifically:
[0026]
[0027] Where α(r,κ) represents the attention weight of relation r to intention κ. It is a set of intentions shared by all learners. To enhance relational embedding, the formula for α(r,κ) is as follows:
[0028]
[0029] Among them W rκ Let r be the trainable weights corresponding to the relation and κ. A set of relationships within a knowledge graph;
[0030] The formula is as follows:
[0031]
[0032] in, This represents the ID embedding of relation r. Let r be the semantic embedding of relation r, and ω1 be the semantic weight, which is dynamically generated through a gating mechanism; the formula for ω1 is as follows:
[0033]
[0034] in, It is a learnable weight matrix. It is a bias term.
[0035] Preferably, in step three, the loss function of the multi-intent contrastive learning mechanism is as follows:
[0036]
[0037] Where m is the number of intentions, ρ1 is a predefined boundary parameter used to distinguish between positive and negative sample pairs, and ρ1∈[-1,1], s(·) is the cosine similarity function, as shown in the following formula:
[0038]
[0039] This is the semantic representation of the intent κ corresponding to the positive sample pair. κ represents the semantic representation of the intent corresponding to the negative sample pair. Positive sample pairs are intent representation pairs from the same learner that are semantically similar but have different behaviors. Negative sample pairs are intent representation pairs from different learners or intent representation pairs from the same learner that have significant semantic differences.
[0040] Preferably, in step four, the multi-layer aggregation operation on the semantic intent map is performed as follows:
[0041] 4.1.1 Usage Let u represent the first-order neighbor set of learner u in the semantic intent graph, and let u be the first-order representation of learner u. The formula is as follows:
[0042]
[0043] Among them, f IG (·) represents the intention graph aggregation function. This represents the initial ID embedding of learner u. This represents the initial embedding of learning resource i; The formula is as follows:
[0044]
[0045] in, It is the embedding of the ID of learning resource i. Let ω2 represent the semantic embedding of the learning resource, and let ω2 represent the strength of the semantic enhancement of the large model. It is dynamically generated through a gating mechanism, as shown in the following formula:
[0046]
[0047] in, It is a learnable weight matrix. It is a bias term;
[0048] but It can be expressed using the following formula:
[0049]
[0050] Where ⊙ represents element-wise product, and β(u,κ) represents the attention score of learner u for intention κ; the formula for β(u,κ) is as follows:
[0051]
[0052] Where e u Embed the learner u's ID. This indicates that the large model is augmented with intent embedding, e κ Embedded as intent ID; The formula is as follows:
[0053]
[0054] Where β(κ,r) represents the weight of the relation's influence on the intention; the formula for β(κ,r) is as follows:
[0055]
[0056] 4.1.2 l-order representation of learner u The formula is as follows:
[0057]
[0058] in Let i be the (l-1)th order representation of the learning resource i.
[0059] Preferably, in step four, performing multi-level aggregation operations on the knowledge graph specifically includes:
[0060] 4.2.1 Use This indicates that learning resource i is in the knowledge graph. The first-order neighbor set in the learning resource i is used to learn the first-order representation of resource i. The formula is as follows:
[0061]
[0062] Where f KG (·) represents the knowledge graph aggregation function. Embed the ID of entity v. To enhance relational embedding;
[0063] 4.2.2 l-order representation of learning resource i The formula is as follows:
[0064]
[0065] in Let v be the (l-1)th order representation of entity v;
[0066] 4.2.3 Usage Representing entity v in the knowledge graph The first-order neighbor set in the , the first-order representation of entity v. The formula is as follows:
[0067]
[0068] in Embed the ID of entity t. To enhance relational embedding;
[0069] 4.2.4 l-order representation of entity v The formula is as follows:
[0070]
[0071] in Let be the (l-1)th order representation of entity t;
[0072] but It can be expressed using the following formula:
[0073]
[0074] Preferably, in step five, the fusion operation specifically involves fusing the representations of each order using a jump-by-jump summation method, resulting in the final representation of learner u. The final representation of learning resource i They are respectively:
[0075]
[0076] Where L represents the number of polymer layers.
[0077] Preferably, in step five, the preference probability The formula is as follows:
[0078]
[0079] Preferably, in step six, the total loss function formula is as follows:
[0080]
[0081] in For BPR loss, For multi-intent contrast loss function, Θ is the L2 regularization term, γ1 and γ2 are hyperparameters, and Θ is the set of model parameters;
[0082] The formula is as follows:
[0083]
[0084] in For training dataset and For the observed set of interactions, The set of unobserved interactions, where σ(·) is the Sigmoid function.
[0085] Compared with existing technologies, the beneficial effects of this invention are as follows: This invention utilizes Mistral e5 to generate deep semantic embeddings of learning resources and relationships, and aligns the graph structure embedding representation through a semantic space alignment mechanism to complete the semantic representation of resources; by constructing a learner intent semantic modeling framework enhanced by a large language model, multi-intent contrastive learning is introduced to accurately capture learners' multi-dimensional preferences and improve the personalization of recommendations; by constructing a semantic intent perception aggregation mechanism enhanced by a large language model, multi-layer aggregation is performed on the intent graph and knowledge graph based on graph neural networks to capture the semantics of complex relationship paths and enhance model generalization. Attached Figure Description
[0086] Figure 1 This is a flowchart of the method of the present invention;
[0087] Figure 2 Here is an architecture diagram of the present invention; (A) is a large language model embedding generator; (B) is learner intent semantic modeling enhanced by a large language model; (C) is semantic intent perception aggregation enhanced by a large language model; and (D) is a detailed description of model prediction. Detailed Implementation
[0088] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0089] Please see the appendix Figure 1 -Appendix Figure 2 The present invention provides an embodiment of a learner intent semantic modeling method based on large language model enhancement, comprising the following steps: Step 1, data preparation; Step 2, large language model embedding generation; Step 3, learner intent semantic modeling; Step 4, semantic intent perception aggregation; Step 5, model prediction; Step 6, model optimization.
[0090] In step one above, the interaction data between learners and learning resources, the knowledge graph corresponding to the learning resources, and the text description are obtained; the interaction data is implicit feedback data, and the knowledge graph is composed of head entity, relation, and tail entity triples.
[0091] In step two above, based on the knowledge graph and text description corresponding to the learning resources obtained in step one, a pre-trained large language model is used for semantic encoding to generate initial learning resource semantic embeddings and initial relation semantic embeddings. After dimensional alignment and normalization, the learning resource semantic embeddings and relation semantic embeddings are obtained respectively. Specifically, the steps are as follows:
[0092] 2.1 Generate structured text based on attribute information in text descriptions and extract relational text from knowledge graphs;
[0093] 2.2 The Mistrale5 model's token segmenter converts structured text and relational text into token sequences, which are then input into the Mistrale5 model to obtain the last layer's hidden state tensor, denoted as follows: d1 is the embedding dimension of each token;
[0094] 2.3 For the hidden state tensor H i and H r Perform max pooling to obtain the initial learning resource semantic embeddings E. i and initial relation semantic embedding E r The formula for max pooling is as follows:
[0095]
[0096] Among them, H i,j H represents i The embedding vector of the j-th token, H r,j H represents ir The embedding vector of the j-th token;
[0097] 2.4 The initial semantic embedding is L2 normalized. The L2 normalization formula is as follows:
[0098]
[0099]
[0100] Among them, ||E i ||2 is embedded E i The L2 norm, E i It is the normalized semantic embedding of learning resources, ||E r ||2 is embedded E r The L2 norm, E r It is a normalized relational semantic embedding;
[0101] 2.5 Dimension alignment is achieved through a semantic space alignment mechanism, specifically by introducing a linear layer to reduce the dimensionality of the normalized initial semantic embeddings, ensuring that the semantic embedding dimension of the learning resources matches the embedding dimension of the learning resource IDs, and that the semantic embedding dimension of the relations matches the embedding dimension of the relation IDs, thus completing the dimensional alignment; the formula is as follows:
[0102]
[0103] in To learn resource semantic embeddings, It is the weight matrix, representing the linear mapping between the input vector and the output vector. It is a bias term, and d2 is the learning resource ID embedding dimension; For relational semantic embedding, It is the weight matrix, representing the linear mapping between the input vector and the output vector. It is a bias term, and d3 is the dimension of relation ID embedding;
[0104] In step three above, a semantic intent graph is constructed based on the relational semantic embedding generated in step two. Semantic representations of each intent are generated through an attention mechanism, and a multi-intent contrastive learning mechanism is introduced to achieve independent modeling of intent representations. The semantic intent graph decomposes the interaction data between learners and learning resources into triples of learner, intent, and learning resource. The semantic representation of the intent... Specifically:
[0105]
[0106] Where α(r,κ) represents the attention weight of relation r to intention κ. It is a set of intentions shared by all learners. To enhance relational embedding, the formula for α(r,κ) is as follows:
[0107]
[0108] Among them W rκ Let r be the trainable weights corresponding to the relation and κ. A set of relationships within a knowledge graph;
[0109] The formula is as follows:
[0110]
[0111] in, This represents the ID embedding of relation r. Let r be the semantic embedding of relation r, and ω1 be the semantic weight, which is dynamically generated through a gating mechanism; the formula for ω1 is as follows:
[0112]
[0113] in, It is a learnable weight matrix. It is a bias term;
[0114] The loss function for the multi-intent contrastive learning mechanism is as follows:
[0115]
[0116] Where m is the number of intentions, ρ1 is a predefined boundary parameter used to distinguish between positive and negative sample pairs, and ρ1∈[-1,1], s(·) is the cosine similarity function, as shown in the following formula:
[0117]
[0118] This is the semantic representation of the intent κ corresponding to the positive sample pair. The semantic representation of the intent κ corresponding to the negative sample pair is the semantic representation of the positive sample pair, which is the intention representation pair from the same learner with similar semantics but different behaviors. The negative sample pair is the intention representation pair from different learners or the intention representation pair from the same learner with large semantic differences.
[0119] In step four above, based on graph neural networks, multi-layer aggregation operations are performed on the semantic intent graph constructed in step three and the knowledge graph obtained in step one, respectively, to obtain the high-order semantic representation of the learner and the high-order semantic representation of the learning resources; the specific details of performing multi-layer aggregation operations on the semantic intent graph are as follows:
[0120] 4.1.1 Usage Let u represent the first-order neighbor set of learner u in the semantic intent graph, and let u be the first-order representation of learner u. The formula is as follows:
[0121]
[0122] Among them, f IG (·) represents the intention graph aggregation function. This represents the initial ID embedding of learner u. This represents the initial embedding of learning resource i; The formula is as follows:
[0123]
[0124] in, It is the embedding of the ID of learning resource i. Let ω2 represent the semantic embedding of the learning resource, and let ω2 represent the strength of the semantic enhancement of the large model. It is dynamically generated through a gating mechanism, as shown in the following formula:
[0125]
[0126] in, It is a learnable weight matrix. It is a bias term;
[0127] but It can be expressed using the following formula:
[0128]
[0129] Where ⊙ represents element-wise product, and β(u,κ) represents the attention score of learner u for intention κ; the formula for β(u,κ) is as follows:
[0130]
[0131] Where e u Embed the learner u's ID. This indicates that the large model is augmented with intent embedding, e κ Embedded as intent ID; The formula is as follows:
[0132]
[0133] Where β(κ,r) represents the weight of the relation's influence on the intention; the formula for β(κ,r) is as follows:
[0134]
[0135] 4.1.2 l-order representation of learner u The formula is as follows:
[0136]
[0137] in To learn the (l-1)th order representation of resource i;
[0138] Performing multi-level aggregation operations on knowledge graphs specifically includes:
[0139] 4.2.1 Use This indicates that learning resource i is in the knowledge graph. The first-order neighbor set in the learning resource i is used to learn the first-order representation of resource i. The formula is as follows:
[0140]
[0141] Where f KG (·) represents the knowledge graph aggregation function. Embed the ID of entity v. To enhance relational embedding;
[0142] 4.2.2 l-order representation of learning resource i The formula is as follows:
[0143]
[0144] in Let v be the (l-1)th order representation of entity v;
[0145] 4.2.3 Usage Representing entity v in the knowledge graph The first-order neighbor set in the , the first-order representation of entity v. The formula is as follows:
[0146]
[0147] in Embed the ID of entity t. To enhance relational embedding;
[0148] 4.2.4 l-order representation of entity v The formula is as follows:
[0149]
[0150] in Let be the (l-1)th order representation of entity t;
[0151] but It can be expressed using the following formula:
[0152]
[0153] In step five above, the high-order semantic representation of the learner obtained in step four is fused with the high-order semantic representation of the learning resources. The learner's preference probability for the learning resources is calculated using the inner product. Specifically, the fusion operation involves fusing the representations of each order using a hop-by-hop summation method, resulting in the final representation of learner u. The final representation of learning resource i They are respectively:
[0154]
[0155] Where L is the number of polymer layers;
[0156] Preference probability The formula is as follows:
[0157]
[0158] In step six above, the total loss function is constructed using BPR loss, multi-intent contrast loss, and L2 regularization. The total loss function is then minimized using the gradient descent algorithm, and the model parameters are iteratively updated to obtain the trained learner intent semantic modeling model. The formula for the total loss function is as follows:
[0159]
[0160] in For BPR loss, For multi-intent contrast loss function, Θ is the L2 regularization term, γ1 and γ2 are hyperparameters, and Θ is the set of model parameters;
[0161] The formula is as follows:
[0162]
[0163] in For training dataset and For the observed set of interactions, The set of unobserved interactions, where σ(·) is the Sigmoid function.
[0164] Based on the above, the advantages of this invention are as follows: When used, it designs a large language model embedding generator, utilizes the Mistral e5 model to generate deep semantic embeddings for learning resource text descriptions and relational texts in knowledge graphs, and aligns the graph structure embedding representations through a semantic space alignment mechanism. This overcomes the shortcomings of existing methods that neglect text semantics and have incomplete resource semantic representations, providing a rich and consistent semantic foundation for subsequent modeling. It proposes a large language model-enhanced learner intent semantic modeling framework, combining LLM-generated relational embeddings to generate multi-intent representations, introducing multi-intent contrastive learning to achieve intent independence modeling, and constructing a learner-semantic intent-learning resource graph. This effectively solves the problem of insufficient fine-grained modeling of learner intents, enabling the capture of learners' multi-dimensional and dynamic preference features and improving the personalization of recommendations. Furthermore, it constructs a large language model-enhanced semantic intent perception aggregation mechanism, performing multi-layer aggregation on the intent graph and knowledge graph based on graph neural networks, integrating semantic relations and semantic intent information to obtain high-order representations. This solves the problem that existing methods struggle to capture the semantic depth and dependencies of complex relational paths in knowledge graphs, enhancing the model's ability to capture learner behavior and learning resource features.
[0165] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the invention can be implemented in other specific forms without departing from its spirit or essential characteristics. Therefore, the embodiments should be considered in all respects as exemplary and non-limiting, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be included within the present invention. No reference numerals in the claims should be construed as limiting the scope of the claims.
Claims
1. A learner intent semantic modeling method based on large language model enhancement, comprising the following steps: Step 1, Data Preparation; Step 2, Large Language Model Embedding Generation; Step 3, Learner Intent Semantic Modeling; Step 4, Semantic Intent Awareness Aggregation; Step 5, Model Prediction; Step 6, Model Optimization; Its key features are: In step one above, the interaction data between learners and learning resources, the knowledge graph and text description corresponding to the learning resources are obtained. In step two above, based on the knowledge graph and text description corresponding to the learning resources obtained in step one, a pre-trained large language model is used for semantic encoding to generate initial learning resource semantic embeddings and initial relation semantic embeddings. After dimensional alignment and normalization, the learning resource semantic embeddings and relation semantic embeddings are obtained respectively. In step three above, a semantic intent graph is constructed based on the relational semantic embedding generated in step two. Semantic representations of each intent are generated through an attention mechanism, and a multi-intent contrastive learning mechanism is introduced to achieve independent modeling of intent representations. The semantic intent graph decomposes the interaction data between learners and learning resources into triples of learner, intent, and learning resource. In step four above, based on graph neural networks, multi-layer aggregation operations are performed on the semantic intent graph constructed in step three and the knowledge graph obtained in step one to obtain the high-order semantic representation of the learner and the high-order semantic representation of the learning resources. In step five above, the learner's high-order semantic representation and the learning resource's high-order semantic representation obtained in step four are fused together, and the learner's preference probability for the learning resource is calculated through the inner product. In step six above, the total loss function is constructed using BPR loss, multi-intent contrast loss, and L2 regularization. The total loss function is minimized using the gradient descent algorithm, and the model parameters are iteratively updated to obtain the trained learner intent semantic modeling model.
2. The learner intent semantic modeling method based on large language model enhancement according to claim 1, characterized in that: In step one, the interaction data is implicit feedback data, and the knowledge graph consists of head entity, relation, and tail entity triples.
3. The learner intent semantic modeling method based on large language model enhancement according to claim 1, characterized in that: Step two specifically includes the following steps: 2.1 Generate structured text based on attribute information in text descriptions and extract relational text from knowledge graphs; 2.2 The Mistrale5 model's token segmenter converts structured text and relational text into token sequences, which are then input into the Mistrale5 model to obtain the last layer's hidden state tensor, denoted as follows: d1 is the embedding dimension of each token; 2.3 For the hidden state tensor H i and H r Perform max pooling to obtain the initial learning resource semantic embeddings E. i and initial relation semantic embedding E r The formula for max pooling is as follows: Among them, H i,j H represents i The embedding vector of the j-th token, H r,j H represents ir The embedding vector of the j-th token; 2.4 The initial semantic embedding is L2 normalized. The L2 normalization formula is as follows: Among them, ||E i ||2 is embedded E i The L2 norm, E i It is the normalized semantic embedding of learning resources, ||E r ||2 is embedded E r The L2 norm, E r It is a normalized relational semantic embedding; 2.5 Dimension alignment is achieved through a semantic space alignment mechanism, specifically by introducing a linear layer to reduce the dimensionality of the normalized initial semantic embeddings, ensuring that the semantic embedding dimension of the learning resources matches the embedding dimension of the learning resource IDs, and that the semantic embedding dimension of the relations matches the embedding dimension of the relation IDs, thus completing the dimensional alignment; the formula is as follows: in To learn resource semantic embeddings, It is the weight matrix, representing the linear mapping between the input vector and the output vector. It is a bias term, and d2 is the learning resource ID embedding dimension; For relational semantic embedding, It is the weight matrix, representing the linear mapping between the input vector and the output vector. It is a bias term, and d3 is the dimension of relation ID embedding.
4. The learner intent semantic modeling method based on large language model enhancement according to claim 1, characterized in that: In step three, the semantic representation of intent Specifically: Where α(r,κ) represents the attention weight of relation r to intention κ. It is a set of intentions shared by all learners. To enhance relational embedding, the formula for α(r,κ) is as follows: Among them W rk Let r be the trainable weights corresponding to the relation and κ. A set of relationships within a knowledge graph; The formula is as follows: in, This represents the ID embedding of relation r. Let r be the semantic embedding of relation r, and ω1 be the semantic weight, which is dynamically generated through a gating mechanism; the formula for ω1 is as follows: in, It is a learnable weight matrix. It is a bias term.
5. The learner intent semantic modeling method based on large language model enhancement according to claim 1, characterized in that: In step three, the loss function of the multi-intent contrastive learning mechanism is as follows: Where m is the number of intentions, ρ1 is a predefined boundary parameter used to distinguish between positive and negative sample pairs, and ρ1∈[-1,1], s(·) is the cosine similarity function, as shown in the following formula: This is the semantic representation of the intent κ corresponding to the positive sample pair. κ represents the semantic representation of the intent corresponding to the negative sample pair. Positive sample pairs are intent representation pairs from the same learner that are semantically similar but have different behaviors. Negative sample pairs are intent representation pairs from different learners or intent representation pairs from the same learner that have significant semantic differences.
6. The learner intent semantic modeling method based on large language model enhancement according to claim 1, characterized in that: In step four, the multi-layer aggregation operation on the semantic intent map is performed as follows: 4.1.1 Usage Let u represent the first-order neighbor set of learner u in the semantic intent graph, and let u be the first-order representation of learner u. The formula is as follows: Among them, f IG (·) represents the intention graph aggregation function. This represents the initial ID embedding of learner u. This represents the initial embedding of learning resource i; The formula is as follows: in, It is the embedding of the ID of learning resource i. Let ω2 represent the semantic embedding of the learning resource, and let ω2 represent the strength of the semantic enhancement of the large model. It is dynamically generated through a gating mechanism, as shown in the following formula: in, It is a learnable weight matrix. It is a bias term; but It can be expressed using the following formula: Where ⊙ represents element-wise product, and β(u,κ) represents the attention score of learner u for intention κ; the formula for β(u,κ) is as follows: Where e u Embed the learner u's ID. This indicates that the large model is augmented with intent embedding, e κ Embedded as intent ID; The formula is as follows: Where β(κ,r) represents the weight of the relation's influence on the intention; the formula for β(κ,r) is as follows: 4.1.2 l-order representation of learner u The formula is as follows: in Let i be the (l-1)th order representation of the learning resource i.
7. The learner intent semantic modeling method based on large language model enhancement according to claim 1, characterized in that: In step four, multi-level aggregation operations are performed on the knowledge graph, specifically including: 4.2.1 Use This indicates that learning resource i is in the knowledge graph. The first-order neighbor set in the learning resource i is used to learn the first-order representation of resource i. The formula is as follows: Where f KG (·) represents the knowledge graph aggregation function. Embed the ID of entity v. To enhance relational embedding; 4.2.2 l-order representation of learning resource i The formula is as follows: in Let v be the (l-1)th order representation of entity v; 4.2.3 Usage Representing entity v in the knowledge graph The first-order neighbor set in the , the first-order representation of entity v. The formula is as follows: in Embed the ID of entity t. To enhance relational embedding; 4.2.4 l-order representation of entity v The formula is as follows: in Let be the (l-1)th order representation of entity t; but It can be expressed using the following formula:
8. The learner intent semantic modeling method based on large language model enhancement according to claim 1, characterized in that: In step five, the fusion operation specifically involves fusing the representations of each order using a jump-by-jump summation method to obtain the final representation of learner u. The final representation of learning resource i They are respectively: Where L represents the number of polymer layers.
9. The learner intent semantic modeling method based on large language model enhancement according to claim 1, characterized in that: In step five, the preference probability The formula is as follows:
10. The learner intent semantic modeling method based on large language model enhancement according to claim 1, characterized in that: In step six, the formula for the total loss function is as follows: in For BPR loss, For multi-intent contrast loss function, Θ is the L2 regularization term, γ1 and γ2 are hyperparameters, and Θ is the set of model parameters; The formula is as follows: in For training dataset and For the observed set of interactions, The set of unobserved interactions, where σ(·) is the Sigmoid function.