Bilingual semantic modeling recommendation method and system based on large language model
By constructing a dual-semantic recommendation model and utilizing a dual LoRA design and alternating training strategy, the problems of noise and semantic gap in the fusion of item IDs and text information in large-scale language model recommendation systems are solved. Stable and accurate fusion of item IDs and text semantics is achieved, thereby improving the performance of the recommendation system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-03
- Publication Date
- 2026-03-10
AI Technical Summary
Existing recommendation systems based on large language models face challenges in integrating item IDs and textual information, including noise fusion and cross-semantic modeling, making it difficult to achieve fine-grained alignment and effective fusion.
A dual LoRA design and alternating training strategy are adopted. By constructing a dual semantic recommendation model including a pre-trained large language model, a first low-rank adaptation module, a second low-rank adaptation module, and a fusion module, the model processes item ID and text semantic information respectively, and performs adaptive fusion during the inference stage to avoid direct noise and gradient conflicts during the training stage.
It achieves stable and accurate fusion of item IDs and text semantics, improves the performance of the recommendation system, solves the problems of fusion noise and semantic gap, and enhances the fine alignment capability of the recommendation system.
Smart Images

Figure CN121636818A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of recommendation systems, in particular to a dual semantic modeling recommendation method and system based on a large language model. BACKGROUND
[0002] Sequence recommendation systems (SRS) predict users' potential interests by analyzing their historical interaction sequences, and have been widely applied in online shopping, music streaming and other fields. In recent decades, with the development of deep learning technology, SRS has made significant progress. However, traditional deep learning models are limited by their size and data, and have weak understanding of contextual information such as item descriptions, making it difficult to utilize extensive world knowledge.
[0003] The emergence of large language models (LLMs) provides a new approach to solving this problem. The powerful language understanding ability and rich world knowledge of LLMs enable them to better handle text information in recommendation systems. Current research mainly attempts to combine ID-based collaborative signals and item text information to enhance the recommendation effect based on LLMs.
[0004] However, existing semantic fusion methods have the following shortcomings: Early fusion methods: fuse ID and text embeddings before the learning module. Due to the semantic gap between ID and text, fusion noise is easily introduced; Late fusion methods: fuse hidden representations after the learning module. Although it avoids fusion noise, it faces challenges in cross-semantic modeling, such as learning imbalance between different modules, increased model size, and difficulty in preserving fine-grained cross-semantic associations.
[0005] Therefore, there is an urgent need for an innovative method that can effectively integrate both semantics, avoid fusion noise, and achieve fine-grained alignment. SUMMARY
[0006] To address the above problems, the present application proposes a dual semantic modeling recommendation method and system based on a large language model, which builds a dual semantic recommendation model including a pre-trained large language model, a first low-rank adaptation module, a second low-rank adaptation module, and a fusion module. Through unique dual LoRA design and alternating training strategy, and adaptive fusion in the inference stage, the method achieves effective fusion of ID semantics and text semantics, significantly improves the performance of LLM-based recommendation systems without introducing complex alignment processes, and can achieve fine-grained cross-semantic alignment while effectively handling the semantic gap of mixed fusion, solving the problems of fusion noise and semantic gap in existing LLM-based recommendation methods.
[0007] On the one hand, the dual semantic modeling recommendation method based on a large language model has the following specific steps:
[0008] S1, obtain the user's historical interaction sequence; each interactive item constituting the interaction sequence is represented by an item ID and an item text;
[0009] S2, construct a dual-semantic recommendation model including a hybrid embedding layer, a pre-trained large language model, a first low-rank adaptation module, a second low-rank adaptation module, and a fusion module;
[0010] The hybrid embedding layer maps item IDs to item ID embeddings and converts item text into item text embeddings.
[0011] The first low-rank adaptation module is a LoRA network attached to a pre-trained large language model. The trainable parameters in the first low-rank adaptation module are updated when training the item text representation, and the trainable parameters are frozen when training the item ID representation.
[0012] The second low-rank adaptation module is a LoRA network attached to a pre-trained large language model. The trainable parameters in the second low-rank adaptation module are updated when training the item ID representation, and the trainable parameters are frozen when training the item text representation.
[0013] The pre-trained large-scale language model outputs a semantic representation of the item text when the input is an item text embedding; and outputs a semantic representation of the item ID when the input is an item ID embedding.
[0014] The fusion module merges the semantic representation of the item text and the semantic representation of the item ID to generate a recommendation prediction score;
[0015] S3, perform semantic alignment training on the dual semantic recommendation model to achieve semantic alignment of the pre-trained large language model with item ID and item text, and then alternately train item text representation and item ID representation to obtain the trained dual semantic recommendation model;
[0016] S4: Input the user's historical interaction sequence into the trained dual semantic recommendation model to generate a recommendation prediction score, and then recommend items based on the recommendation prediction score.
[0017] Preferably, the loss function for training the item text representation is expressed as:
[0018]
[0019] in, This represents the loss function during the training of the first low-rank adaptation module. The cross-entropy loss function representing the item text; The KL divergence represents the alignment of the item text probability distribution with the item ID probability distribution. This indicates the "relative" sign used in KL divergence calculations. This represents the probability distribution of the predicted next item ID. The probability distribution representing the predicted text of the next item; This indicates that the hyperparameters are adjustable; Indicates user ; Indicates the first Items.
[0020] Preferably, the cross-entropy loss function of the item text is expressed as:
[0021]
[0022]
[0023] in, This represents the number of items interacted with by the u-th user; A one-hot encoding representing the actual item ID; Indicates user The Item ID; The probability distribution representing the predicted text of the next item; This represents the softmax function; Indicates the object's projection layer; Indicates using The labeled item text represents the hidden state obtained after inputting into a large pre-trained language model.
[0024] Preferably, the loss function for training based on item ID is expressed as:
[0025]
[0026] in, This represents the loss function of the second low-rank adaptation module; The cross-entropy loss function represents the item ID; The KL divergence represents the alignment of the item ID probability distribution with the item text probability distribution. This indicates the "relative" sign used in KL divergence calculations. This represents the probability distribution of the predicted next item ID. The probability distribution representing the predicted next item text; This indicates that the hyperparameters are adjustable; Indicates user ; Indicates the first Items.
[0027] Preferably, the cross-entropy loss function of the item ID is expressed as:
[0028]
[0029]
[0030] in, This represents the number of items interacted with by the u-th user; Represents user u; Indicates the first One item, Indicates the first One item; A one-hot encoding representing the actual item ID; Indicates user The Item ID; This represents the probability distribution of the next item ID; This represents the softmax function; Indicates the object's projection layer; Indicates using The labeled item ID represents the hidden state obtained after inputting into a large pre-trained language model.
[0031] Preferably, the step of fusing the semantic representation of the item text and the semantic representation of the item ID to generate a recommendation prediction score is as follows:
[0032] The semantic representation of item IDs is normalized to obtain normalized item ID features;
[0033] The normalized item ID features are mapped to the (0,1) interval using the Sigmoid function to obtain the confidence score;
[0034] The normalized item ID features are numerically adjusted using linear translation to obtain the numerically adjusted ID features.
[0035] The calibrated ID enhancement representation is calculated based on the confidence score and the numerically adjusted ID features, and is represented as follows:
[0036]
[0037] in, This indicates the calibrated ID enhancement representation; A parameter representing the strength of the contribution to controlling ID semantics; This represents the ID feature after numerical adjustment; This indicates element-wise multiplication; Indicates the confidence score;
[0038] The recommended prediction score is obtained by adding the semantic representation of the item text to the calibrated ID-enhanced representation.
[0039] Preferably, the loss function for semantic alignment training is expressed as:
[0040]
[0041]
[0042] in, The loss function representing semantic alignment; The one-hot code representing the actual item ID. Indicates the first The ID of the item; This represents the probability distribution of mappings to item IDs; Indicates the object's projection layer; Indicates using The hidden states are obtained by inputting the text description of the marked item into a large pre-trained language model. This represents the softmax function.
[0043] Preferably, the hybrid embedding layer maps item IDs to item ID embeddings and converts item text into item text embeddings, as follows:
[0044] Use word embedding layers in a pre-trained large language model to convert item text into text embeddings;
[0045] The item ID is input into the embedding layer of a pre-trained sequence recommendation system to obtain the item ID representation. Then, a trainable projection layer is used to map the item ID representation to the semantic space of a pre-trained large language model to obtain the item ID embedding.
[0046] On the other hand, dual-semantic modeling recommendation systems based on large-scale language models include the following:
[0047] The historical interaction sequence acquisition module is used to acquire the user's historical interaction sequence; each interactive item that constitutes the user's interaction sequence is represented by an item ID and an item text.
[0048] The dual semantic recommendation model building module is used to build a dual semantic recommendation model that includes a hybrid embedding layer, a pre-trained large language model, a first low-rank adaptation module, a second low-rank adaptation module, and a fusion module.
[0049] The hybrid embedding layer maps item IDs to item ID embeddings and converts item text into item text embeddings.
[0050] The first low-rank adaptation module is a LoRA network attached to a pre-trained large language model. The trainable parameters in the first low-rank adaptation module are updated when training the item text representation, and the trainable parameters are frozen when training the item ID representation.
[0051] The second low-rank adaptation module is a LoRA network attached to a pre-trained large language model. The trainable parameters in the second low-rank adaptation module are updated when training the item ID representation, and the trainable parameters are frozen when training the item text representation.
[0052] The pre-trained large-scale language model outputs a semantic representation of the item text when the input is an item text embedding; and outputs a semantic representation of the item ID when the input is an item ID embedding.
[0053] The fusion module merges the semantic representation of the item text and the semantic representation of the item ID to generate a recommendation prediction score;
[0054] The dual semantic recommendation model training module is used to perform semantic alignment training on the dual semantic recommendation model to achieve semantic alignment of the pre-trained large language model with item ID and item text. Then, the training of item text representation and item ID representation is performed alternately to obtain the trained dual semantic recommendation model.
[0055] The score prediction and item recommendation module is used to input the user's historical interaction sequence into the trained bi-semantic recommendation model, generate a recommendation prediction score, and make item recommendations based on the recommendation prediction score.
[0056] Compared with the prior art, the present invention has the following beneficial effects:
[0057] (1) The present invention employs two independent LoRA processes on a shared LLM decoder, each process specifically processing one type of semantic information to achieve independent optimization, thereby avoiding direct fusion of noise during the training phase; and introduces an alternating training (DLA) strategy to resolve gradient conflicts caused by simultaneous training of the two LoRA processes on the shared decoder by sequentially updating parameters.
[0058] (2) The present invention performs dedicated fusion only in the reasoning stage. This mechanism uses a strong text representation as the main signal and is adaptively enhanced by a unique collaborative signal from ID semantics, thereby ensuring a stable and accurate final prediction. Attached Figure Description
[0059] The present invention will now be described in further detail with reference to the accompanying drawings;
[0060] Figure 1 This is a flowchart of a bi-semantic modeling recommendation method based on a large language model, according to an embodiment of the present invention.
[0061] Figure 2 This is an overview diagram of the bi-semantic modeling recommendation method based on a large language model according to an embodiment of the present invention; wherein, (a) represents the overall architecture; (b) represents the embedding layer; (c) represents the training process; and (d) represents the fusion in the inference stage.
[0062] Figure 3 This is a comparative diagram of the dual semantic modeling recommendation method based on a large language model according to an embodiment of the present invention and the fusion method of existing technologies; wherein, (a) represents the existing technology that only uses item ID; (b) represents the existing technology that only uses item text; (c) represents the existing technology that performs early fusion of item ID and item text; (d) represents the existing technology that performs late fusion of item ID and item text; and (e) represents the fusion method of the present invention.
[0063] Figure 4 This is a schematic diagram of semantic alignment instructions for the bi-semantic modeling recommendation method based on a large language model according to an embodiment of the present invention.
[0064] Figure 5 This is a schematic diagram illustrating the "next item instruction via text link" of the bi-semantic modeling recommendation method based on a large language model, as described in an embodiment of the present invention.
[0065] Figure 6 This is a schematic diagram illustrating the method of recommending the next item via ID using a dual semantic modeling approach based on a large language model, as described in an embodiment of the present invention.
[0066] Figure 7 This is a schematic diagram comparing the alternating training of the bi-semantic modeling recommendation method based on a large language model according to an embodiment of the present invention with the simultaneous training of existing technologies; wherein, (a) represents joint training with gradient conflict; and (b) represents alternating training without gradient conflict.
[0067] Figure 8 This is a structural block diagram of a dual semantic modeling recommendation system based on a large language model, according to an embodiment of the present invention. Detailed Implementation
[0068] The present invention will be further described below through specific embodiments.
[0069] like Figure 1 As shown, the specific steps of the dual semantic modeling recommendation method (HDRec) based on a large language model are as follows:
[0070] S1, obtain the user's historical interaction sequence.
[0071] Each interactive item that makes up the user interaction sequence is represented by an item ID and an item text feature.
[0072] S2 constructs a dual-semantic recommendation model that includes a hybrid embedding layer, a pre-trained large language model, a first low-rank adaptation module, a second low-rank adaptation module, and a fusion module.
[0073] like Figure 2 As shown, the first and second low-rank adaptation modules are attached to the LoRA network of the pre-trained large language model. LoRA (low-rank adaptation) is applied throughout the model training process for efficient parameter fine-tuning to minimize interference with the original knowledge of the large language model's LLM. This embodiment employs two independent LoRA processes on a shared LLM decoder, each process specifically handling one type of semantic information, achieving independent optimization and thus avoiding direct fusion of noise during the training phase.
[0074] The hybrid embedding layer is used to obtain text embeddings and ID embeddings, as detailed below.
[0075] Obtaining text embeddings: For text tags, the text embeddings are obtained directly using the LLM pre-trained word embedding layer. .
[0076]
[0077] Obtaining ID Embeddings: To preserve collaborative knowledge, item ID representations are first obtained from the embedding layer of a pre-trained sequence recommendation system (SRS, such as SASRec). Then, these ID representations are mapped to the semantic space of an LLM using a separate, trainable projection layer (Proj), yielding the ID embeddings. The SRS embedding layer remains frozen during training.
[0078]
[0079] The fusion module is used to fuse the semantic representation of the item text and the semantic representation of the item ID to generate a recommendation prediction score, as detailed below.
[0080] Figure 3 This is a comparison diagram of different fusion methods. To leverage the complementary advantages of the two semantics and generate a more stable and accurate final prediction, this embodiment employs a dedicated fusion mechanism during the inference phase. This mechanism is based on text representation and adaptively enhanced using ID representation. The fusion steps are as follows:
[0081] (1) Feature normalization: Calculate ID representation average As a reference, the ID features are standardized.
[0082]
[0083] (2) Confidence calibration: The normalized ID features are mapped to the (0,1) interval using the Sigmoid function to obtain the confidence score. At the same time, the ID feature is numerically adjusted. This is to prevent numerical instability caused by negative or small values.
[0084]
[0085]
[0086] (3) Adaptive enhancement: final predicted score Predicting distribution from text and calibrated ID enhancement representation Adding them together, we get: .in, ,parameter Control the contribution strength of ID semantics.
[0087] Finally, all candidate items The scores are sorted in descending order, and the top-ranked items are recommended to the user.
[0088] S3. The dual semantic recommendation model is semantically aligned during training to achieve semantic alignment between the pre-trained large language model and the item ID and item text. Then, the item text representation and item ID representation are trained alternately to obtain the trained dual semantic recommendation model.
[0089] Two datasets were used for training: one for semantic alignment training and the other for alternating training strategies.
[0090] Using loss function Semantic alignment is implemented to align the LLM's understanding of item IDs and item text, since item IDs are typically not in the LLM's training corpus.
[0091] For each item Construct the input sequence ,in, It is the text description of the item. It is a learnable special marker; see instruction diagram. Figure 4 As shown. Input this sequence into an LLM and obtain... Mark the hidden state in the last layer of LLM .
[0092]
[0093] This hidden state is mapped to a probability distribution of item IDs through a shared item projection layer (IPL, a multi-layer feedforward network). During optimization, the cross-entropy loss function is used. To measure One-hot encoding of the actual item ID The differences.
[0094]
[0095]
[0096] Cross-semantic alignment is achieved using a loss function.
[0097] This embodiment constructs a loss function using bidirectional Kullback–Leibler (KL) divergence, achieving mutual alignment of the two semantic representations during training without requiring physical fusion during the training phase. When optimizing the LoRA process for text processing, the loss function includes... and This causes the text distribution to align with the ID distribution. Conversely, when optimizing the LoRA process for ID processing, the loss function includes... and This prompts the ID distribution to align with the text distribution.
[0098]
[0099]
[0100]
[0101]
[0102] Specifically, the cross-entropy loss function is used. By linking the next item to a text message, LLM is given the ability to predict the next item based on a text sequence.
[0103] For the user's historical interaction sequence to represent its item text Series, and with Marked delimiters form a sequence of text input. .Will Input LLM to get the end of each item's text. The hidden state corresponding to the marker See the instruction diagram. Figure 5 As shown.
[0104]
[0105] This hidden state is mapped to the probability distribution of the next item ID via IPL. During optimization, the cross-entropy loss function is used. This measures the difference between the predicted distribution and the one-hot encoding of the actual next item ID. It is represented as:
[0106]
[0107]
[0108] Specifically, by linking the next item by ID, LLM can capture collaborative filtering patterns in the ID sequence and use the cross-entropy loss function. Optimize.
[0109] Input sequence It consists of embedded item IDs. These embedded IDs are also used... Label separation. After processing the sequence, LLM uses IPL to generate a probability distribution for the next item ID. See the instruction diagram. Figure 6 As shown.
[0110]
[0111] Using cross-entropy loss function Optimize.
[0112]
[0113] Figure 7 The diagram illustrates different training methods. To address the gradient conflict and mutual interference issues caused by simultaneous training of two independent LoRA processes on a shared LLM decoder, a dual low-rank adaptive alternating training strategy (DLA) is introduced. The specific process is as follows:
[0114] In each training batch, the strategy executes the following two phases sequentially:
[0115] Text representation phase: Freeze ID adapter The parameters activate the text adapter. Calculate text loss and only for Perform reverse propagation and updates.
[0116] ID representation phase: Freezing the text adapter The parameters activate the ID adapter. Calculate ID loss. and only for Perform reverse propagation and updates.
[0117] This alternating update mechanism ensures that only one adapter is optimized at any given time, completely eliminating gradient conflicts while maintaining the frozen state of the LLM base model, thus effectively utilizing its world knowledge.
[0118] S4: Input the user's historical interaction sequence into the trained dual-semantic recommendation model to generate a recommendation prediction score, and then recommend items based on the recommendation prediction score.
[0119] Table 1 shows the performance of our method compared to existing methods on five real-world datasets: Arts, Scientific, Instruments, Pantry, and Games. It can be seen that our method has a significant improvement over existing methods.
[0120] Table 1: Comparison of the performance of our method (HDRec) with other methods on five real datasets.
[0121]
[0122] like Figure 8 As shown, this invention also discloses a dual-semantic modeling recommendation system based on a large-scale language model, comprising:
[0123] The historical interaction sequence acquisition module 801 is used to acquire the user's historical interaction sequence; each interactive item constituting the user's interaction sequence is represented by an item ID and an item text.
[0124] The dual semantic recommendation model building module 802 is used to build a dual semantic recommendation model that includes a hybrid embedding layer, a pre-trained large language model, a first low-rank adaptation module, a second low-rank adaptation module, and a fusion module.
[0125] The hybrid embedding layer maps item IDs to item ID embeddings and converts item text into item text embeddings.
[0126] The first low-rank adaptation module is a LoRA network attached to a pre-trained large language model. The trainable parameters in the first low-rank adaptation module are updated when training the item text representation, and the trainable parameters are frozen when training the item ID representation.
[0127] The second low-rank adaptation module is a LoRA network attached to a pre-trained large language model. The trainable parameters in the second low-rank adaptation module are updated when training the item ID representation, and the trainable parameters are frozen when training the item text representation.
[0128] The pre-trained large-scale language model outputs a semantic representation of the item text when the input is an item text embedding; and outputs a semantic representation of the item ID when the input is an item ID embedding.
[0129] The fusion module merges the semantic representation of the item text and the semantic representation of the item ID to generate a recommendation prediction score;
[0130] The dual semantic recommendation model training module 803 is used to perform semantic alignment training on the dual semantic recommendation model to achieve semantic alignment of the pre-trained large language model with the item ID and item text. Then, the item text representation training and item ID representation training are performed alternately to obtain the trained dual semantic recommendation model.
[0131] The score prediction and item recommendation module 804 is used to input the user's historical interaction sequence into the trained bi-semantic recommendation model, generate a recommendation prediction score, and make item recommendations based on the recommendation prediction score.
[0132] The specific implementation of the bi-semantic modeling recommendation system based on a large language model is the same as that of the bi-semantic modeling recommendation method based on a large language model, and will not be described again in this embodiment.
[0133] The above are merely specific embodiments of the present invention, but the design concept of the present invention is not limited thereto. Any non-substantial modifications made to the present invention using this concept shall be considered as infringing upon the protection scope of the present invention.
Claims
1. A method for bilingual semantic modeling recommendation based on a large language model, characterized in that, The method comprises the following steps: S1, obtaining a historical interaction sequence of a user; each interaction item constituting the historical interaction sequence is represented by an item ID and an item text; S2, constructing a dual semantic recommendation model comprising a hybrid embedding layer, a pre-trained large language model, a first low-rank adaptation module, a second low-rank adaptation module, and a fusion module; The hybrid embedding layer maps the item ID into an item ID embedding and converts the item text into an item text embedding; The first low-rank adaptation module is a LoRA network attached to the pre-trained large language model, and the trainable parameters in the first low-rank adaptation module are updated during item text representation training, and the trainable parameters are frozen during item ID representation training; The second low-rank adaptation module is a LoRA network attached to the pre-trained large language model, and the trainable parameters in the second low-rank adaptation module are updated during item ID representation training, and the trainable parameters are frozen during item text representation training; The pre-trained large language model outputs an item text semantic representation when the input is an item text embedding, and outputs an item ID semantic representation when the input is an item ID embedding; The fusion module fuses the item text semantic representation and the item ID semantic representation to generate a recommendation prediction score; S3, performing semantic alignment training on the dual semantic recommendation model to achieve semantic alignment of the pre-trained large language model to the item ID and the item text, and then alternately performing item text representation training and item ID representation training to obtain a trained dual semantic recommendation model; S4, inputting the historical interaction sequence of the user into the trained dual semantic recommendation model to generate a recommendation prediction score, and performing item recommendation according to the recommendation prediction score. 2.The large language model based bi-semantics modeling recommendation method according to claim 1, wherein, The loss function of the item text representation training is represented as: wherein, represents the loss function during training of the first low-rank adaptation module; represents the cross-entropy loss function for the item text; represents the KL divergence of the item text probability distribution aligning to the item ID probability distribution, represents the "relative" sign in the KL divergence calculation, represents the probability distribution of the predicted next item ID, represents the probability distribution of the predicted next item text; represents an adjustable hyper-parameter; represents a user ; represents the first item. 3.The large language model based bi-semantics modeling recommendation method according to claim 2, characterized in that, The cross-entropy loss function of the item text is represented as: in, This represents the number of items interacted with by the u-th user; A one-hot encoding representing the actual item ID; Indicates user The Item ID; The probability distribution representing the predicted text of the next item; This represents the softmax function; Indicates the object's projection layer; Indicates using The labeled item text represents the hidden state obtained after inputting into a large pre-trained language model. 4.The method of claim 1, wherein, The loss function of the item ID representation training is represented as: wherein, represents the loss function of the second low-rank adaptation module; represents the cross-entropy loss function of the item ID; represents the KL divergence of the item ID probability distribution aligning to the item text probability distribution, represents the "relative" sign in the KL divergence calculation, represents the probability distribution of the predicted next item ID, represents the probability distribution of the predicted next item text; represents the adjustable hyperparameters; represents the user ; represents the first item. 5.The large language model based bi-semantics modeling recommendation method according to claim 4, characterized in that, The cross-entropy loss function of the item ID is represented as: in, This represents the number of items interacted with by the u-th user; Represents user u; Indicates the first One item, Indicates the first One item; A one-hot encoding representing the actual item ID; Indicates user The Item ID; This represents the probability distribution of the next item ID; This represents the softmax function; Indicates the object's projection layer; Indicates using The labeled item ID represents the hidden state obtained after inputting into a large pre-trained language model. 6.The method of claim 1, wherein, The fusion of the item text semantic representation and the item ID semantic representation to generate a recommendation prediction score is as follows: Feature normalization is performed on the item ID semantic representation to obtain normalized item ID features; The normalized item ID features are mapped to the (0, 1) interval through a Sigmoid function to obtain a confidence score; The normalized item ID features are numerically adjusted using linear translation to obtain numerically adjusted ID features; Based on the confidence score and the numerically adjusted ID features, a calibrated ID enhanced representation is calculated and represented as: wherein, represents a calibrated ID-enhanced representation; represents a parameter controlling the strength of contribution of the ID semantics; represents an ID feature adjusted by a numerical value; represents an element-wise multiplication; represents a confidence score; The item text semantic representation and the calibrated ID enhanced representation are added to obtain a recommendation prediction score. 7.The large language model based bi-semantics modeling recommendation method according to claim 1, characterized in that, The loss function of the semantic alignment training is represented as: wherein, represents a loss function for semantic alignment; represents one-hot encoding of actual item IDs, represents the ID of the th item; represents the probability distribution mapped to the item ID; represents the item projection layer; represents the hidden state obtained after inputting the text description of the item marked with a large language model pre-trained; represents a softmax function. 8.The method of claim 1, wherein, The hybrid embedding layer maps the item ID into an item ID embedding and converts the item text into an item text embedding, and the specific process is as follows: The item text is converted into a text embedding using the word embedding layer in the pre-trained large language model; An item ID is input into an embedding layer of a pre-trained sequence recommendation system to obtain an item ID representation, and then a trainable projection layer is used to map the item ID representation to a semantic space of a pre-trained large language model to obtain an item ID embedding.
9. A bi-semantic modeling recommendation system based on a large language model, comprising the following: a historical interaction sequence acquisition module configured to acquire a historical interaction sequence of a user; each interaction item constituting the historical interaction sequence being represented by an item ID and an item text; a bi-semantic recommendation model construction module configured to construct a bi-semantic recommendation model comprising a hybrid embedding layer, a pre-trained large language model, a first low-rank adaptation module, a second low-rank adaptation module, and a fusion module; the hybrid embedding layer is configured to map the item ID into an item ID embedding and convert the item text into an item text embedding; the first low-rank adaptation module is a LoRA network attached to the pre-trained large language model, and the trainable parameters in the first low-rank adaptation module are updated during item text representation training and are frozen during item ID representation training; the second low-rank adaptation module is a LoRA network attached to the pre-trained large language model, and the trainable parameters in the second low-rank adaptation module are updated during item ID representation training and are frozen during item text representation training; the pre-trained large language model is configured to output an item text semantic representation when the input is the item text embedding, and output an item ID semantic representation when the input is the item ID embedding; the fusion module is configured to fuse the item text semantic representation and the item ID semantic representation to generate a recommendation prediction score; a bi-semantic recommendation model training module configured to perform semantic alignment training on the bi-semantic recommendation model to achieve semantic alignment of the pre-trained large language model to the item ID and the item text, and then alternately perform item text representation training and item ID representation training to obtain a trained bi-semantic recommendation model; a score prediction and item recommendation module configured to input the historical interaction sequence of the user into the trained bi-semantic recommendation model to generate a recommendation prediction score, and perform item recommendation according to the recommendation prediction score.