Recommendation methods and systems that integrate content similarity and neural collaborative filtering models
By integrating content similarity with a neural collaborative filtering model, the problems of low recommendation accuracy and poor adaptability under data sparsity and cold start conditions are solved, enabling personalized recommendations on e-commerce and content distribution platforms.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- INSPUR SOFTWARE TECH CO LTD
- Filing Date
- 2026-01-14
- Publication Date
- 2026-04-21
AI Technical Summary
Existing recommendation methods suffer from low accuracy and poor adaptability in scenarios with sparse data or cold start, making it difficult to capture short-term changes in user behavior and insufficient for mining implicit feedback data.
This paper integrates content similarity with a neural collaborative filtering model, extracts item features through a TF-IDF vector machine, constructs an item feature matrix, and generates a recommendation model by combining user profile analysis and neural collaborative filtering model training. It also utilizes user behavior data for in-depth analysis and integrates content similarity and interaction probability scores.
In scenarios with sparse data or cold start, it improves recommendation accuracy and adaptability, enabling rapid adaptation to new users and projects. The recommendation results are more accurate and diverse, and are applicable to multiple platforms such as e-commerce and content distribution.
Smart Images

Figure CN121502100B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence technology, specifically to a recommendation method and system that integrates content similarity with a neural collaborative filtering model. Background Technology
[0002] Traditional personalized recommendation methods have the following problems:
[0003] 1. When using collaborative filtering with a single dependency, it is difficult to capture the semantic relationships behind the behavior because it only relies on user-project interaction data, and it lacks support for content features for new projects without interaction records.
[0004] 2. When recommending solely based on content, it is easy to be limited to known attributes and ignore group collaboration, leading to homogenized recommendations;
[0005] 3. Existing hybrid recommendation systems mostly involve simple concatenation of features, failing to effectively integrate interactive behavior and item semantic features, thus the accuracy and generalization ability of recommendations need to be improved.
[0006] 4. Relying on static user profiles or fixed-period update mechanisms, it is impossible to capture short-term changes in user behavior in real time, and the recommendation results lag behind the user's current interests and preferences.
[0007] The aforementioned problems result in existing methods exhibiting low accuracy and poor adaptability in scenarios with sparse data or cold starts. Most existing traditional recommendation algorithms rely excessively on explicit feedback data such as user ratings, while failing to adequately mine and utilize implicit feedback data. When explicit feedback data is sparse, the model struggles to accurately capture user preferences, leading to a decrease in the relevance and accuracy of the recommendation results.
[0008] Overcoming the problems of low recommendation accuracy and poor adaptability in data-sparse cold start scenarios is a technical problem that needs to be solved. Summary of the Invention
[0009] The technical objective of this invention is to address the above-mentioned shortcomings by providing a recommendation method and system that integrates content similarity and a neural collaborative filtering model, in order to overcome the technical problems of low recommendation accuracy and poor adaptability in data-sparse cold-start scenarios.
[0010] In a first aspect, the present invention provides a recommendation method that integrates content similarity and a neural collaborative filtering model, comprising the following steps:
[0011] Data preprocessing: Collect project attribute data and user-project interaction data, merge project attribute data and user-project interaction data corresponding to the same project to form project attribute aggregate data, extract features from the project attribute aggregate data, and construct a project feature matrix based on the extracted project feature vectors;
[0012] User profile analysis: Extract the set of historical interaction items for each user based on user-item interaction data, match all item feature vectors corresponding to the historical item interaction set from the item feature matrix, and calculate the mean vector of all item feature vectors as the user profile vector.
[0013] Sample construction: For each user, based on user-item interaction data, select items that interact with the user to construct positive samples, select items that do not interact with the user to construct negative samples, construct a sample set based on positive and negative samples, and divide the sample set into a training sample set and a test sample set. The sample set includes user index, item index, and interaction tags that reflect the relationship between user and item exchange.
[0014] Model training: A recommendation model is constructed based on a neural collaborative filtering model, and the recommendation model is trained and tested based on a sample set to generate a trained recommendation model. The recommendation model takes users and items as inputs, learns the interaction patterns between users and items, and predicts the probability values of interaction between users and items.
[0015] Hybrid recommendation: For each user, a matching score for each item is calculated based on the similarity between the user profile vector and the item feature vector. The probability of interaction between the user and each item is predicted by the trained recommendation model as the predicted score. The matching score and the predicted score are weighted and fused to generate the final recommendation score. A list of recommended items is formed based on the recommendation score.
[0016] Preferably, data preprocessing includes the following operations:
[0017] Collect project attribute data and user-project interaction data. Project attribute data includes textual descriptions of the project, and user-project interaction data includes user identifiers, project identifiers, and interaction behavior records.
[0018] Perform data cleaning on project attribute data to remove invalid and duplicate data.
[0019] Based on the project identifier, the project attribute data and user-project interaction data corresponding to the same project are merged into multi-dimensional attribute text to form project attribute aggregated data;
[0020] Feature extraction is performed on the aggregated project attribute data using a TF-IDF vector generator, and a project feature matrix is constructed based on the extracted project feature vectors.
[0021] The feature extraction of the aggregated project attribute data using a TF-IDF vector generator includes the following operations:
[0022] Based on the project identifier, the aggregated data of project attributes are grouped, and the aggregated data of project attributes of the same project are concatenated into a string to form a sequence of project attribute text.
[0023] The project attribute text sequence is processed by a TF-IDF vector generator. The minimum document frequency (min_df) and maximum document frequency (max_df) are set. Feature words are filtered based on the minimum and maximum document frequencies. The project attribute text sequence is converted into project feature vectors. A project feature matrix is constructed based on the project feature vectors. In the project feature matrix, the project identifier is used as the matrix row index and the feature words are used as the column index.
[0024] Preferably, sample construction includes the following operations:
[0025] Construct user and project indexes, mapping user identifiers and project identifiers to consecutive integer indices respectively;
[0026] For each user, the items they have interacted with in the past are obtained as positive samples and labeled with an interaction label of 1. Items that the user has already interacted with are excluded from all candidate items. A predetermined number of uninterrupted items are randomly selected as negative samples and labeled with an interaction label of 0. A sample set is constructed based on the positive and negative samples.
[0027] The GroupShuffleSplit method is used to divide the sample set into user groups, selecting samples corresponding to a predetermined proportion of users as the training sample set, and samples corresponding to the remaining users as the test sample set.
[0028] Preferably, the recommendation model includes an embedding layer, a feature fusion layer, a fully connected network, and an output layer. The embedding layer takes user index and item index as input and maps them to low-dimensional vectors to obtain user embedding vectors and item embedding vectors, respectively. The embedding layer uses L2 regularization. The feature fusion layer concatenates the user embedding vector and the item embedding vector to obtain a concatenated feature vector. The fully connected network includes multiple neurons, a ReLU activation function, and a Dropout layer, which performs deep feature fusion on the concatenated feature vector to form fused features. The output layer takes the fused features as input and predicts the user-item interaction pattern based on the fused features, predicting the output interaction label and interaction probability.
[0029] When training the recommendation model based on the sample set, the sample set is divided into a training sample set and a test sample set. The training parameters are configured, and the Adam optimizer with a learning rate of 0.0001 is used. The mean squared error (MSE) is used as the loss function, and the model is trained using the early stopping strategy. The model is fitted using the training sample set and the model performance is evaluated using the root mean square error (RMSE) on the test sample set. The optimal model parameters are then saved.
[0030] As a preferred approach, during hybrid recommendation, for each user, a matching score is calculated based on the cosine similarity between the user profile vector and the item feature vector. The calculation formula is:
[0031] ,
[0032] in, Represents a user profile vector. Represents the feature vector of the project. This represents the L2 norm of the user profile vector and the project feature vector.
[0033] Secondly, the present invention provides a recommendation system that integrates content similarity and neural collaborative filtering models, including a data preprocessing module, a user profile analysis module, a sample construction module, a model training module, and a hybrid recommendation module;
[0034] The data preprocessing module is used to perform the following: collect project attribute data and user-project interaction data, merge project attribute data and user-project interaction data corresponding to the same project to form project attribute aggregate data, extract features from the project attribute aggregate data, and construct a project feature matrix based on the extracted project feature vectors;
[0035] The user profile analysis module is used to perform the following: extract the set of historical interaction items for each user based on user-item interaction data, match all item feature vectors corresponding to the historical item interaction set from the item feature matrix, and calculate the mean vector of all item feature vectors as the user profile vector.
[0036] The sample construction module is used to perform the following: For each user, based on user-item interaction data, select items that have interacted with the user to construct positive samples, select items that have not interacted with the user to construct negative samples, construct a sample set based on the positive and negative samples, and divide the sample set into a training sample set and a test sample set. The sample set includes user index, item index, and interaction tags that reflect the relationship between user and item exchange.
[0037] The model training module is used to perform the following: build a recommendation model based on the neural collaborative filtering model, and train and test the recommendation model based on the sample set to generate a trained recommendation model. The recommendation model takes users and items as input, learns the interaction patterns between users and items, and predicts the probability values of interaction between users and items.
[0038] The hybrid recommendation module performs the following: For each user, it calculates the matching score for each item based on the similarity between the user profile vector and the item feature vector, and uses the trained recommendation model to predict the interaction probability between the user and each item as the predicted score. The matching score and the predicted score are weighted and fused to generate the final recommendation score, and an item recommendation list is formed based on the recommendation score.
[0039] Preferably, the data preprocessing module is used to perform the following operations:
[0040] Collect project attribute data and user-project interaction data. Project attribute data includes textual descriptions of the project, and user-project interaction data includes user identifiers, project identifiers, and interaction behavior records.
[0041] Perform data cleaning on project attribute data to remove invalid and duplicate data.
[0042] Based on the project identifier, the project attribute data and user-project interaction data corresponding to the same project are merged into multi-dimensional attribute text to form project attribute aggregated data;
[0043] Feature extraction is performed on the aggregated project attribute data using a TF-IDF vector generator, and a project feature matrix is constructed based on the extracted project feature vectors.
[0044] The feature extraction of the aggregated project attribute data using a TF-IDF vector generator includes the following operations:
[0045] Based on the project identifier, the aggregated data of project attributes are grouped, and the aggregated data of project attributes of the same project are concatenated into a string to form a sequence of project attribute text.
[0046] The project attribute text sequence is processed by a TF-IDF vector generator. The minimum document frequency (min_df) and maximum document frequency (max_df) are set. Feature words are filtered based on the minimum and maximum document frequencies. The project attribute text sequence is converted into project feature vectors. A project feature matrix is constructed based on the project feature vectors. In the project feature matrix, the project identifier is used as the matrix row index and the feature words are used as the column index.
[0047] Preferably, the sample construction module is used to perform the following operations:
[0048] Construct user and project indexes, mapping user identifiers and project identifiers to consecutive integer indices respectively;
[0049] For each user, the items they have interacted with in the past are obtained as positive samples and labeled with an interaction label of 1. Items that the user has already interacted with are excluded from all candidate items. A predetermined number of uninterrupted items are randomly selected as negative samples and labeled with an interaction label of 0. A sample set is constructed based on the positive and negative samples.
[0050] The GroupShuffleSplit method is used to divide the sample set into user groups, selecting samples corresponding to a predetermined proportion of users as the training set, and samples corresponding to the remaining users as the test set.
[0051] Preferably, the recommendation model includes an embedding layer, a feature fusion layer, a fully connected network, and an output layer. The embedding layer takes user index and item index as input and maps them to low-dimensional vectors to obtain user embedding vectors and item embedding vectors, respectively. The embedding layer uses L2 regularization. The feature fusion layer concatenates the user embedding vector and the item embedding vector to obtain a concatenated feature vector. The fully connected network includes multiple neurons, a ReLU activation function, and a Dropout layer, which performs deep feature fusion on the concatenated feature vector to form fused features. The output layer takes the fused features as input and predicts the user-item interaction pattern based on the fused features, predicting the output interaction label and interaction probability.
[0052] When training the recommendation model based on the sample set, the sample construction module performs the following: configuring training parameters, using the Adam optimizer with a learning rate of 0.0001, using the mean squared error (MSE) as the loss function, training the model using the early stopping strategy, fitting the model using the training sample set, evaluating the model performance using the root mean square error (RMSE) through the test sample set, and saving the optimal model parameters.
[0053] Preferably, for each user, the hybrid recommendation module performs the following: calculates a matching score for each item based on the cosine similarity between the user profile vector and the item feature vector. The calculation formula is:
[0054] ,
[0055] in, Represents a user profile vector. Represents the feature vector of the project. This represents the L2 norm of the user profile vector and the project feature vector.
[0056] The recommendation method and system of the present invention, which integrates content similarity and neural collaborative filtering models, has the following advantages:
[0057] 1. Solve the problem of data sparsity: By integrating content similarity and neural collaborative filtering, recommendation accuracy can still be maintained when user behavior data is sparse;
[0058] 2. Alleviate the cold start problem: Quickly adapt to new users and new projects by leveraging content features to improve recommendation effectiveness;
[0059] 3. Improve recommendation relevance: By taking into account both explicit user preferences and implicit interests, recommendations are more accurate and diverse;
[0060] 4. Enhanced generalization ability: Overfitting is suppressed through optimizations such as regularization, adapting to multiple scenarios and providing stable recommendations;
[0061] 5. High versatility: Applicable to multiple platforms such as e-commerce and content distribution, it can achieve personalized recommendations based solely on implicit behavior without explicit scoring. Attached Figure Description
[0062] To more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0063] The invention will be further described below with reference to the accompanying drawings.
[0064] Figure 1 This is a flowchart of a recommendation method that integrates content similarity and a neural collaborative filtering model, as described in Example 1. Detailed Implementation
[0065] The present invention will be further described below with reference to the accompanying drawings and specific embodiments, so that those skilled in the art can better understand and implement the present invention. However, the embodiments are not intended to limit the present invention. In the absence of conflict, the embodiments of the present invention and the technical features in the embodiments can be combined with each other.
[0066] This invention provides a recommendation method and system that integrates content similarity and a neural collaborative filtering model to address the technical problems of low recommendation accuracy and poor adaptability in scenarios with sparse data and cold starts.
[0067] Example 1: The present invention provides a recommendation method that integrates content similarity and neural collaborative filtering models, comprising five steps: data preprocessing, user profile analysis, sample construction, model training, and hybrid recommendation.
[0068] Step S100 Data Preprocessing: Collect project attribute data and user-project interaction data, merge the project attribute data and user-project interaction data corresponding to the same project to form project attribute aggregate data, extract features from the project attribute aggregate data, and construct a project feature matrix based on the extracted project feature vectors.
[0069] As a specific implementation of data preprocessing, the following operations are included:
[0070] (1) Collect project attribute data and user-project interaction data. Project attribute data includes text description information of the project, and user-project interaction data includes user identifier, project identifier and interaction behavior records;
[0071] (2) Perform data cleaning on the project attribute data to remove invalid and duplicate data;
[0072] (3) Based on the project identifier, merge the project attribute data and user-project interaction data corresponding to the same project into multi-dimensional attribute text to form project attribute aggregate data;
[0073] (4) Use the TF-IDF vector generator to extract features from the aggregated project attribute data and construct the project feature matrix based on the extracted project feature vectors.
[0074] The feature extraction of the aggregated project attribute data using a TF-IDF vector generator includes the following operations:
[0075] (1) Based on the project identifier, the project attribute aggregated data is grouped, and the project attribute aggregated data of the same project is concatenated into a string to form a project attribute text sequence;
[0076] (2) The project attribute text sequence is processed by the TF-IDF vector generator. The minimum document frequency min_df and the maximum document frequency max_df are set. Feature words are filtered based on the minimum document frequency and the maximum document frequency. The project attribute text sequence is converted into project feature vectors. The project feature matrix is constructed based on the project feature vectors. In the project feature matrix, the project identifier is used as the matrix row index and the feature words are used as the column index.
[0077] Step S200 User Profile Analysis: Extract the set of historical interaction items for each user based on user-item interaction data, match all item feature vectors corresponding to the historical item interaction set from the item feature matrix, and calculate the mean vector of all item feature vectors as the user profile vector.
[0078] Step S300 Sample Construction: For each user, based on user-item interaction data, select items that interact with the user to construct positive samples, select items that do not interact with the user to construct negative samples, construct a sample set based on the positive and negative samples, and divide the sample set into a training sample set and a test sample set. The sample set includes user index, item index, and interaction tags that reflect the relationship between user and item exchange.
[0079] As a specific implementation of sample construction, this step includes the following operations:
[0080] (1) Construct user index and project index, and map user identifier and project identifier to consecutive integer indexes respectively;
[0081] (2) For each user, the items they have interacted with in the past are obtained as positive samples and the interaction label is marked as 1. The items that the user has interacted with are excluded from all candidate items. A predetermined number of uninterrupted items are randomly selected as negative samples and the interaction label is marked as 0. A sample set is constructed based on the positive and negative samples.
[0082] (3) The sample set is divided into groups according to users using the GroupShuffleSplit method. Samples corresponding to a predetermined proportion of users are selected as the training sample set, and samples corresponding to the remaining users are selected as the test sample set.
[0083] Step S400 Model Training: Construct a recommendation model based on the neural collaborative filtering model, and train and test the recommendation model based on the sample set to generate a trained recommendation model. The recommendation model takes users and items as inputs, learns the interaction patterns between users and items, and predicts the probability values of interaction between users and items.
[0084] In this embodiment, the recommended model includes an embedding layer, a feature fusion layer, a fully connected network, and an output layer. The embedding layer takes user and item indices as input and maps them to low-dimensional vectors, resulting in user embedding vectors and item embedding vectors, respectively. The embedding layer uses L2 regularization to suppress overfitting. The feature fusion layer concatenates the user and item embedding vectors to obtain a concatenated feature vector. The fully connected network includes multiple neurons, a ReLU activation function, and a Dropout layer, which performs deep feature fusion on the concatenated feature vector to form fused features. The output layer takes the fused features as input and predicts the user-item interaction pattern based on the fused features, predicting the output interaction label and interaction probability.
[0085] When training the recommendation model based on the sample set, the training parameters are configured, the Adam optimizer with a learning rate of 0.0001 is used, the mean squared error (MSE) is used as the loss function, the model is trained using the early stopping strategy, the model is fitted using the training sample set, and the model performance is evaluated using the root mean squared error (RMSE) on the test sample set, and the optimal model parameters are saved.
[0086] Step S500 Hybrid Recommendation: For each user, calculate the matching score for each item based on the similarity between the user profile vector and the item feature vector, and use the trained recommendation model to predict the interaction probability between the user and each item as the predicted score. The matching score and the predicted score are weighted and fused to generate the final recommendation score, and an item recommendation list is formed based on the recommendation score.
[0087] As a specific implementation of hybrid recommendation, for each user, a matching score for each item is calculated based on the cosine similarity between the user profile vector and the item feature vector. The calculation formula is:
[0088] ,
[0089] Among them, Represents a user profile vector. Represents the feature vector of the project. This represents the L2 norm of the user profile vector and the project feature vector.
[0090] This embodiment utilizes TF-IDF vectors to construct content features for items, generates user profiles based on user behavior records, calculates the content similarity between user profiles and items, and simultaneously constructs a Neural Collaborative Filtering (NCF) model to perform in-depth analysis of implicit user behavior data to obtain predicted scores. The content similarity and predicted scores are then fused according to weights to generate the final recommendation result. This method not only improves the relevance of recommendation results but also fully considers users' implicit behavioral characteristics, further optimizing personalized recommendation effects and enhancing user satisfaction.
[0091] Example 2: The present invention provides a recommendation system that integrates content similarity and neural collaborative filtering models, including a data preprocessing module, a user profile analysis module, a sample construction module, a model training module, and a hybrid recommendation module.
[0092] The data preprocessing module is used to perform the following: collect project attribute data and user-project interaction data, merge project attribute data and user-project interaction data corresponding to the same project to form project attribute aggregate data, extract features from the project attribute aggregate data, and construct a project feature matrix based on the extracted project feature vectors.
[0093] As a specific implementation of the data preprocessing module, this module is used to perform the following operations:
[0094] (1) Collect project attribute data and user-project interaction data. Project attribute data includes text description information of the project, and user-project interaction data includes user identifier, project identifier and interaction behavior records;
[0095] (2) Perform data cleaning on the project attribute data to remove invalid and duplicate data;
[0096] (3) Based on the project identifier, merge the project attribute data and user-project interaction data corresponding to the same project into multi-dimensional attribute text to form project attribute aggregate data;
[0097] (4) Use the TF-IDF vector generator to extract features from the aggregated project attribute data and construct the project feature matrix based on the extracted project feature vectors.
[0098] The feature extraction of the aggregated project attribute data using a TF-IDF vector generator includes the following operations:
[0099] (1) Based on the project identifier, the project attribute aggregated data is grouped, and the project attribute aggregated data of the same project is concatenated into a string to form a project attribute text sequence;
[0100] (2) The project attribute text sequence is processed by the TF-IDF vector generator. The minimum document frequency min_df and the maximum document frequency max_df are set. Feature words are filtered based on the minimum document frequency and the maximum document frequency. The project attribute text sequence is converted into project feature vectors. The project feature matrix is constructed based on the project feature vectors. In the project feature matrix, the project identifier is used as the matrix row index and the feature words are used as the column index.
[0101] The user profile analysis module performs the following: extracts the set of historical interaction items for each user based on user-item interaction data, matches all item feature vectors corresponding to the historical item interaction set from the item feature matrix, and calculates the mean vector of all item feature vectors as the user profile vector.
[0102] The sample construction module is used to perform the following: For each user, based on user-item interaction data, select items that have interacted with the user to construct positive samples, select items that have not interacted with the user to construct negative samples, construct a sample set based on the positive and negative samples, and divide the sample set into a training sample set and a test sample set. The sample set includes a user index, an item index, and interaction tags that reflect the relationship between the user and the item.
[0103] As a specific implementation of the sample construction module, this module is used to perform the following operations:
[0104] (1) Construct user index and project index, and map user identifier and project identifier to consecutive integer indexes respectively;
[0105] (2) For each user, the items they have interacted with in the past are obtained as positive samples and the interaction label is marked as 1. The items that the user has interacted with are excluded from all candidate items. A predetermined number of uninterrupted items are randomly selected as negative samples and the interaction label is marked as 0. A sample set is constructed based on the positive and negative samples.
[0106] (3) The sample set is divided into groups according to users using the GroupShuffleSplit method. Samples corresponding to a predetermined proportion of users are selected as the training sample set, and samples corresponding to the remaining users are selected as the test sample set.
[0107] The model training module is used to perform the following: build a recommendation model based on the neural collaborative filtering model, and train and test the recommendation model based on the sample set to generate a trained recommendation model. The recommendation model takes users and items as input, learns the interaction patterns between users and items, and predicts the probability values of interaction between users and items.
[0108] In this embodiment, the recommended model includes an embedding layer, a feature fusion layer, a fully connected network, and an output layer. The embedding layer takes user and item indices as input and maps them to low-dimensional vectors, resulting in user embedding vectors and item embedding vectors, respectively. The embedding layer uses L2 regularization to suppress overfitting. The feature fusion layer concatenates the user and item embedding vectors to obtain a concatenated feature vector. The fully connected network includes multiple neurons, a ReLU activation function, and a Dropout layer, which performs deep feature fusion on the concatenated feature vector to form fused features. The output layer takes the fused features as input and predicts the user-item interaction pattern based on the fused features, predicting the output interaction label and interaction probability.
[0109] When training the recommendation model based on the sample set, the model training module performs the following: configuring training parameters, using the Adam optimizer with a learning rate of 0.0001, using the mean squared error (MSE) as the loss function, training the model using the early stopping strategy, fitting the model using the training sample set, evaluating the model performance using the root mean square error (RMSE) through the test sample set, and saving the optimal model parameters.
[0110] The hybrid recommendation module performs the following: For each user, it calculates the matching score for each item based on the similarity between the user profile vector and the item feature vector, and uses the trained recommendation model to predict the interaction probability between the user and each item as the predicted score. The matching score and the predicted score are weighted and fused to generate the final recommendation score, and an item recommendation list is formed based on the recommendation score.
[0111] As a specific implementation of the hybrid recommendation module, for each user, this module calculates a matching score for each item based on the cosine similarity between the user profile vector and the item feature vector. The calculation formula is:
[0112] ,
[0113] in, Represents a user profile vector. Represents the feature vector of the project. This represents the L2 norm of the user profile vector and the project feature vector.
[0114] The system in this embodiment can implement user recommendations by simply executing the method disclosed in Embodiment 1.
[0115] The above provides a detailed description of the recommendation method and system for fusing content similarity and neural collaborative filtering models provided by this invention. Specific examples have been used to illustrate the principles and implementation methods of this invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this invention. Therefore, the content of this specification should not be construed as a limitation of this invention.
Claims
1. A recommendation method that integrates content similarity and a neural collaborative filtering model, characterized in that, Includes the following steps: Data preprocessing: Collect project attribute data and user-project interaction data, merge project attribute data and user-project interaction data corresponding to the same project to form project attribute aggregate data, extract features from the project attribute aggregate data, and construct a project feature matrix based on the extracted project feature vectors; User profile analysis: Extract the set of historical interaction items for each user based on user-item interaction data, match all item feature vectors corresponding to the historical item interaction set from the item feature matrix, and calculate the mean vector of all item feature vectors as the user profile vector. Sample construction: For each user, based on user-item interaction data, select items that interact with the user to construct positive samples, select items that do not interact with the user to construct negative samples, construct a sample set based on the positive and negative samples, and divide the sample set into a training sample set and a test sample set. The sample set includes user index, item index, and interaction tags that reflect the relationship between user and item exchange. Model training: A recommendation model is constructed based on a neural collaborative filtering model, and the recommendation model is trained and tested based on a sample set to generate a trained recommendation model. The recommendation model takes users and items as inputs, learns the interaction patterns between users and items, and predicts the probability values of interaction between users and items. Hybrid recommendation: For each user, a matching score for each item is calculated based on the similarity between the user profile vector and the item feature vector. The probability of interaction between the user and each item is predicted by the trained recommendation model as the predicted score. The matching score and the predicted score are weighted and fused to generate the final recommendation score. A list of recommended items is formed based on the recommendation score.
2. The recommendation method according to claim 1, which integrates content similarity and a neural collaborative filtering model, is characterized in that... Data preprocessing includes the following operations: Collect project attribute data and user-project interaction data. Project attribute data includes textual descriptions of the project, and user-project interaction data includes user identifiers, project identifiers, and interaction behavior records. Perform data cleaning on project attribute data to remove invalid and duplicate data. Based on the project identifier, the project attribute data and user-project interaction data corresponding to the same project are merged into multi-dimensional attribute text to form project attribute aggregated data; Feature extraction is performed on the aggregated project attribute data using a TF-IDF vector generator, and a project feature matrix is constructed based on the extracted project feature vectors. The feature extraction of the aggregated project attribute data using a TF-IDF vector generator includes the following operations: Based on the project identifier, the aggregated data of project attributes are grouped, and the aggregated data of project attributes of the same project are concatenated into a string to form a sequence of project attribute text. The project attribute text sequence is processed by a TF-IDF vector generator. The minimum document frequency (min_df) and maximum document frequency (max_df) are set. Feature words are filtered based on the minimum and maximum document frequencies. The project attribute text sequence is converted into project feature vectors. A project feature matrix is constructed based on the project feature vectors. In the project feature matrix, the project identifier is used as the matrix row index and the feature words are used as the column index.
3. The recommendation method according to claim 1, which integrates content similarity and a neural collaborative filtering model, is characterized in that... Sample construction includes the following operations: Build user and project indexes, mapping user identifiers and project identifiers to consecutive integer indices respectively; For each user, the items they have interacted with in the past are obtained as positive samples and labeled with an interaction label of 1. Items that the user has already interacted with are excluded from all candidate items. A predetermined number of uninterrupted items are randomly selected as negative samples and labeled with an interaction label of 0. A sample set is constructed based on the positive and negative samples. The GroupShuffleSplit method is used to divide the sample set into user groups, selecting samples corresponding to a predetermined proportion of users as the training sample set, and samples corresponding to the remaining users as the test sample set.
4. The recommendation method according to claim 1, which integrates content similarity and a neural collaborative filtering model, is characterized in that... The recommendation model comprises an embedding layer, a feature fusion layer, a fully connected network, and an output layer. The embedding layer takes user and item indices as input and maps them to low-dimensional vectors, resulting in user embedding vectors and item embedding vectors, respectively. L2 regularization is applied to the embedding layer. The feature fusion layer concatenates the user and item embedding vectors to obtain a concatenated feature vector. The fully connected network, including multiple neurons, a ReLU activation function, and a Dropout layer, performs deep feature fusion on the concatenated feature vector to form fused features. The output layer takes the fused features as input and predicts the user-item interaction pattern based on these features, outputting interaction labels and interaction probabilities. When training the recommendation model based on the sample set, the sample set is divided into a training sample set and a test sample set. The training parameters are configured, and the Adam optimizer with a learning rate of 0.0001 is used. The mean squared error (MSE) is used as the loss function, and the model is trained using the early stopping strategy. The model is fitted using the training sample set and the model performance is evaluated using the root mean square error (RMSE) on the test sample set. The optimal model parameters are then saved.
5. The recommendation method according to claim 1, which integrates content similarity and a neural collaborative filtering model, is characterized in that... In hybrid recommendation, for each user, a matching score is calculated based on the cosine similarity between the user profile vector and the item feature vector. The calculation formula is: , in, Represents a user profile vector. Represents the feature vector of the project. This represents the L2 norm of the user profile vector and the project feature vector.
6. A recommendation system that integrates content similarity and a neural collaborative filtering model, characterized in that, It includes a data preprocessing module, a user profile analysis module, a sample construction module, a model training module, and a hybrid recommendation module; The data preprocessing module is used to perform the following: collect project attribute data and user-project interaction data, merge project attribute data and user-project interaction data corresponding to the same project to form project attribute aggregate data, extract features from the project attribute aggregate data, and construct a project feature matrix based on the extracted project feature vectors; The user profile analysis module is used to perform the following: extract the set of historical interaction items for each user based on user-item interaction data, match all item feature vectors corresponding to the historical item interaction set from the item feature matrix, and calculate the mean vector of all item feature vectors as the user profile vector. The sample construction module is used to perform the following: For each user, based on user-item interaction data, select items that have interacted with the user to construct positive samples, select items that have not interacted with the user to construct negative samples, construct a sample set based on the positive and negative samples, and divide the sample set into a training sample set and a test sample set. The sample set includes user index, item index, and interaction tags that reflect the relationship between user and item exchange. The model training module is used to perform the following: build a recommendation model based on the neural collaborative filtering model, and train and test the recommendation model based on the sample set to generate a trained recommendation model. The recommendation model takes users and items as input, learns the interaction patterns between users and items, and predicts the probability values of interaction between users and items. The hybrid recommendation module performs the following: For each user, it calculates the matching score for each item based on the similarity between the user profile vector and the item feature vector, and uses the trained recommendation model to predict the interaction probability between the user and each item as the predicted score. The matching score and the predicted score are weighted and fused to generate the final recommendation score, and an item recommendation list is formed based on the recommendation score.
7. The recommendation system based on the fusion of content similarity and neural collaborative filtering model according to claim 6, characterized in that, The data preprocessing module is used to perform the following operations: Collect project attribute data and user-project interaction data. Project attribute data includes textual descriptions of the project, and user-project interaction data includes user identifiers, project identifiers, and interaction behavior records. Perform data cleaning on project attribute data to remove invalid and duplicate data. Based on the project identifier, the project attribute data and user-project interaction data corresponding to the same project are merged into multi-dimensional attribute text to form project attribute aggregated data; Feature extraction is performed on the aggregated project attribute data using a TF-IDF vector generator, and a project feature matrix is constructed based on the extracted project feature vectors. The feature extraction of the aggregated project attribute data using a TF-IDF vector generator includes the following operations: Based on the project identifier, the aggregated data of project attributes are grouped, and the aggregated data of project attributes of the same project are concatenated into a string to form a sequence of project attribute text. The project attribute text sequence is processed by a TF-IDF vector generator. The minimum document frequency (min_df) and maximum document frequency (max_df) are set. Feature words are filtered based on the minimum and maximum document frequencies. The project attribute text sequence is converted into project feature vectors. A project feature matrix is constructed based on the project feature vectors. In the project feature matrix, the project identifier is used as the matrix row index and the feature words are used as the column index.
8. The recommendation system that integrates content similarity and a neural collaborative filtering model according to claim 6, characterized in that, The sample construction module is used to perform the following operations: Build user and project indexes, mapping user identifiers and project identifiers to consecutive integer indices respectively; For each user, the items they have interacted with in the past are obtained as positive samples and labeled with an interaction label of 1. Items that the user has already interacted with are excluded from all candidate items. A predetermined number of uninterrupted items are randomly selected as negative samples and labeled with an interaction label of 0. A sample set is constructed based on the positive and negative samples. The GroupShuffleSplit method is used to divide the sample set into user groups, selecting samples corresponding to a predetermined proportion of users as the training set, and samples corresponding to the remaining users as the test set.
9. The recommendation system that integrates content similarity and a neural collaborative filtering model according to claim 6, characterized in that, The recommendation model comprises an embedding layer, a feature fusion layer, a fully connected network, and an output layer. The embedding layer takes user and item indices as input and maps them to low-dimensional vectors, resulting in user embedding vectors and item embedding vectors, respectively. L2 regularization is applied to the embedding layer. The feature fusion layer concatenates the user and item embedding vectors to obtain a concatenated feature vector. The fully connected network, including multiple neurons, a ReLU activation function, and a Dropout layer, performs deep feature fusion on the concatenated feature vector to form fused features. The output layer takes the fused features as input and predicts the user-item interaction pattern based on these features, outputting interaction labels and interaction probabilities. When training the recommendation model based on the sample set, the sample construction module performs the following: configuring training parameters, using the Adam optimizer with a learning rate of 0.0001, using the mean squared error (MSE) as the loss function, training the model using the EarlyStopping strategy, fitting the model using the training sample set, evaluating the model performance using the root mean square error (RMSE) through the test sample set, and saving the optimal model parameters.
10. The recommendation system that integrates content similarity and a neural collaborative filtering model according to claim 6, characterized in that, For each user, the hybrid recommendation module performs the following: Calculates a matching score for each item based on the cosine similarity between the user profile vector and the item feature vector. The calculation formula is: , in, Represents a user profile vector. Represents the feature vector of the project. This represents the L2 norm of the user profile vector and the project feature vector.
Citation Information
Patent Citations
Hybrid collaborative filtering recommendation algorithm based on project attributes
CN109783734A
Recommendation method and device, electronic equipment and readable storage medium
CN118349738A