A user portrait recommendation method and system based on a support vector machine
By using a hypergraph dataset and a support vector machine model, the problem of traditional graph structures being unable to model the multidimensional coupling relationships between users, items, and scenarios is solved, enabling high-precision user profile recommendations and improving recommendation accuracy and personalization.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING HONGTU XINDA TECH CO LTD
- Filing Date
- 2025-05-30
- Publication Date
- 2026-07-31
AI Technical Summary
Traditional graph structures are difficult to effectively model the multidimensional coupling relationships between users, items, and scenarios, resulting in insufficient feature representation and loss of semantic information. Existing recommendation methods have significant shortcomings in handling multimodal and high-order association information.
Using a hypergraph structure dataset, the dataset is generated through hypergraph association preprocessing. A support vector machine model is used to train the dataset using positive and negative samples from log records to generate a personalized recommendation list for user profiles. Radial basis functions and kernel functions are used to improve the separability of features in high-dimensional space, and Platt scaling is combined to output interaction probabilities.
It achieves high-precision prediction of user-item interaction probability, improves recommendation accuracy and personalization, enhances user experience, and improves the ability to express user behavior patterns, item attributes, and scene-related interaction relationships.
Smart Images

Figure CN120653834B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of machine learning technology, and in particular to a user profile recommendation method and system based on support vector machines. Background Technology
[0002] With the rapid development of internet technology and the continuous expansion of user scale, personalized recommendation systems have become an important means to improve user experience and platform commercial value. Early recommendation systems were mainly based on collaborative filtering methods, which made recommendations by analyzing the similarity between users or items. However, these methods showed obvious limitations when facing sparse data, the cold start problem, and the inability to effectively model complex multidimensional interaction relationships. In recent years, the combination of graph structures and deep learning technology has brought new breakthroughs to recommendation systems, especially the use of graph neural networks (GNNs) to model user-item interaction relationships, which has improved recommendation accuracy and generalization ability. In addition, the development of embedding learning technology has enabled high-dimensional discrete features to be effectively mapped to low-dimensional continuous vector spaces, thereby supporting more efficient feature fusion and model training.
[0003] Although existing recommendation methods have been optimized in multiple dimensions, they still have significant shortcomings in handling multimodal and high-order relational information. Especially in complex scenarios, traditional graph structures are difficult to effectively model the multidimensional coupling relationship between users, items and scenes, resulting in problems such as insufficient feature expression and loss of semantic information. Existing technologies usually adopt multi-graph fusion or heterogeneous graph modeling strategies, which construct multiple subgraphs to characterize binary relationships such as user-item and item-scene, and then integrate features through simple splicing or attention mechanisms. Summary of the Invention
[0004] In view of the aforementioned existing problems, the present invention is proposed.
[0005] Therefore, this invention provides a user profile recommendation method based on support vector machines to solve the problem that traditional graph structures are difficult to effectively model the multidimensional coupling relationship between users, items, and scenarios.
[0006] To solve the above-mentioned technical problems, the present invention provides the following technical solution:
[0007] In a first aspect, the present invention provides a user profile recommendation method based on support vector machine, which includes acquiring user profile recommendation data and preprocessing it, wherein the user profile recommendation data includes user unique identifier, item unique identifier, operation type, timestamp, item category, item price, item description text and scene tag;
[0008] Using hypergraph associations to preprocess user profile recommendation data, a hypergraph structure dataset is generated;
[0009] Transform the hypergraph structure dataset into embedding vectors for users, items, and scenes;
[0010] The embedded vectors of users, items, and scenes are concatenated to generate enhanced feature vectors. These vectors are then combined with positive and negative samples from log records to train a support vector machine model, predicting the probability of user-item interactions and generating a personalized recommendation list for user profiles.
[0011] As a preferred embodiment of the user profile recommendation method based on support vector machines described in this invention, the step of generating a hypergraph structure dataset by using the preprocessed user profile recommendation data associated with a hypergraph is as follows.
[0012] Define user nodes, item nodes, and scene nodes;
[0013] A hyperedge is formed by connecting a user with multiple items under the same scene label.
[0014] The weight of hyperedges is determined based on the frequency of operation type and the importance of scene label, and low-frequency hyperedges are filtered out.
[0015] Statistically count the frequency of operation types after preprocessing to generate user node feature vectors;
[0016] The item category field is processed using one-hot encoding to generate a category feature vector;
[0017] The item description text is processed by a pre-trained word embedding model to generate word vectors, which are then concatenated with the category feature vectors to form the item node feature vectors.
[0018] The scene label field is converted into a scene node category feature vector through one-hot encoding;
[0019] The dataset is formed by integrating user nodes, item nodes, scene nodes, hyperedges, hyperedge weights, user node feature vectors, item node feature vectors, and scene node category feature vectors.
[0020] As a preferred embodiment of the user profiling recommendation method based on support vector machines described in this invention, the step of converting the hypergraph structure dataset into embedding vectors for users, items, and scenes refers to processing the hypergraph structure dataset through an input layer, two message passing layers, and an output layer to generate embedding vectors for users, items, and scenes, thereby capturing user behavior patterns, item attributes, and the interactive relationships associated with scenes.
[0021] As a preferred embodiment of the user profiling recommendation method based on support vector machines described in this invention, the process of processing the hypergraph structure dataset through an input layer, two message passing layers, and an output layer is as follows.
[0022] The input layer takes into account the feature vectors of user nodes, item nodes, scene node categories, and hyperedge weights from the hypergraph structure dataset.
[0023] The first message passing layer aggregates the feature vectors of user nodes, item nodes, and scene node categories within the same hyperedge, and generates the first layer intermediate feature vector through nonlinear transformation.
[0024] The second message passing layer receives the intermediate feature vector from the first layer, aggregates the neighbor hyperedge features of the same user node in the hypergraph, and generates the second layer intermediate feature vector through nonlinear transformation.
[0025] The output layer transforms and compresses the intermediate feature vectors from the second layer to generate user embedding vectors, item embedding vectors, and scene embedding vectors.
[0026] As a preferred embodiment of the user profile recommendation method based on support vector machine described in this invention, the hyperedge feature is a weighted combination of the feature vectors of user nodes, item nodes, and scene node categories within the hyperedge.
[0027] As a preferred embodiment of the user profiling recommendation method based on support vector machines described in this invention, the training of the support vector machine model is specifically as follows:
[0028] Positive and negative samples are extracted from log records and combined with the concatenated enhanced feature vectors to form a training set;
[0029] A kernel function is used to map the enhanced feature vectors in the training set to a high-dimensional space, and user-item interaction patterns are learned based on positive and negative samples;
[0030] The classification hyperplane is optimized using the sequence minimum optimization algorithm.
[0031] As a preferred embodiment of the user profile recommendation method based on support vector machine described in this invention, the log record consists of user unique identifier, item unique identifier, operation type, and timestamp in the user profile recommendation data;
[0032] The positive and negative samples are determined based on the operation type;
[0033] The classification hyperplane is the boundary line that separates positive and negative samples in a high-dimensional space.
[0034] Secondly, this invention provides a user profile recommendation system based on support vector machines, comprising,
[0035] The acquisition module is used to acquire and preprocess user profile recommendation data, which includes user unique identifier, item unique identifier, operation type, timestamp, item category, item price, item description text, and scene tags.
[0036] The association module is used to generate a hypergraph structure dataset by using the hypergraph to associate preprocessed user profile recommendation data.
[0037] The transformation module is used to transform hypergraph structure datasets into embedding vectors for users, items, and scenes;
[0038] The prediction module is used to concatenate the embedding vectors of users, items, and scenes to generate enhanced feature vectors, and combine them with positive and negative samples from log records to train a support vector machine model to predict the probability of user-item interactions and generate a personalized recommendation list for user profiles.
[0039] Thirdly, the present invention provides a computer device including a memory and a processor, wherein the memory stores a computer program, wherein when the computer program is executed by the processor, it implements any step of the user profile recommendation method based on support vector machine as described in the first aspect of the present invention.
[0040] Fourthly, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein: when the computer program is executed by a processor, it implements any step of the user profile recommendation method based on support vector machine as described in the first aspect of the present invention.
[0041] The beneficial effects of this invention are as follows: This invention generates enhanced feature vectors by concatenating user, item, and scene embedding vectors, and then inputs these vectors into a support vector machine (SVM) model for training, achieving high-precision prediction of user-item interaction probabilities. By utilizing radial basis function kernels to map features to a high-dimensional space, the separability of positive and negative samples is enhanced, improving the generalization ability of the SVM model. Combining Platt scaling of the output interaction probabilities and introducing scene weights for dynamic adjustment makes the recommendation results more closely match the needs of actual scenarios. Compared to traditional models, it exhibits greater robustness in handling high-dimensional sparse data, improving recommendation accuracy and personalization, and enhancing the user experience. Attached Figure Description
[0042] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. 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.
[0043] Figure 1This is a flowchart of a user profiling recommendation method based on support vector machines.
[0044] Figure 2 This is a schematic diagram of a user profile recommendation system based on support vector machines.
[0045] Figure 3 Build a flowchart for the hypergraph.
[0046] Figure 4 Generate neural network structure diagrams for embedding. Detailed Implementation
[0047] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0048] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.
[0049] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a single or selective embodiment that is mutually exclusive with other embodiments.
[0050] Reference Figures 1-4 This is one embodiment of the present invention, which provides a user profile recommendation method based on support vector machines, including the following steps:
[0051] S1. Obtain user profile recommendation data and preprocess it.
[0052] Furthermore, a data collection program is run on the user interaction platform to query the platform's log records, item attribute database, and application scenario tag rules to collect user profile recommendation data, as detailed below:
[0053] Query the log records of the user interaction platform to extract the user's unique identifier, item's unique identifier, operation type (click, purchase, and favorite), and timestamp;
[0054] Query the item attribute database to extract item category, item price, and item description text;
[0055] Application scenario tagging rules generate scenario tags; among them, scenario tagging rules include timestamp rules: determining weekdays (Monday to Friday) and weekends (Saturday to Sunday) based on timestamps; promotion calendar rules: determining promotional activity dates based on promotion calendars; and user location rules: inferring home scenarios based on user location and home address.
[0056] User unique identifiers, item unique identifiers, operation types, timestamps, item categories, item prices, item description texts, and scene tags are combined to form user profile recommendation data. Among them, user unique identifiers reflect user identity, item unique identifiers reflect the recommended object, operation types reflect interaction behavior, timestamps reflect interaction time, item categories reflect recommendation level, item prices reflect economic characteristics, item description texts reflect content characteristics, and scene tags reflect the context.
[0057] The collected user profile recommendation data is transmitted to the central control center via Internet protocol;
[0058] After receiving user profile recommendation data, the central control center standardizes the item price, item description text, and operation type frequency to ensure consistency in the three metrics. The item price and operation type frequency are standardized using Z-Score (Z-score standardization), while the item description text is first processed using a pre-trained word embedding model and then standardized using Z-Score. The word embedding model is an existing model, such as the Word2Vec model, which is well-known to those skilled in the art and widely used in the field of natural language processing. The operation type frequency is determined based on the sum of the user's clicks, purchases, and favorites.
[0059] It should be noted that a pre-trained Word2Vec model was used to process the item description text, as follows:
[0060] Enter the item description text (e.g., "Smartphone, 8GB RAM, Black");
[0061] Use a word segmentation tool (such as Jieba or NLTK) to break down the item description text into words (such as "smartphone", "8GB", "RAM", "black");
[0062] For each word, query the Word2Vec model's vocabulary to obtain a 300-dimensional word vector; if the word is not in the Word2Vec model's vocabulary (e.g., "8GB"), ignore words not in the vocabulary; output the set of 300-dimensional word vectors obtained from the query.
[0063] The average of all 300-dimensional word vectors found is used to generate a 300-dimensional text vector. If no 300-dimensional word vectors are found (i.e., all words are not in the vocabulary of the Word2Vec model), then a 300-dimensional 0 text vector (i.e., [0, 0, ..., 0]) is generated to ensure that subsequent steps such as Z-Score normalization and hypergraph construction do not report errors due to the lack of a 300-dimensional text vector.
[0064] S2. Use the hypergraph to associate the preprocessed user profile recommendation data to generate a hypergraph structure dataset.
[0065] Based on the standardized user profile recommendation data, a hypergraph is constructed to link the user profile recommendation data, as follows:
[0066] Define user nodes based on user-unique identifiers;
[0067] Define item nodes based on the item's unique identifier;
[0068] Define scene nodes based on scene tags;
[0069] The hyperedge connects the user's unique identifier and multiple item unique identifiers under the same scene label. For example, if user 001 clicks on item 101 and buys item 102 in the weekend shopping scene, the generated hyperedge contains user 001, item 101, item 102 and the scene label "weekend shopping".
[0070] The superedge weight is calculated by multiplying the frequency of the operation type by the importance of the scene label, and is expressed as:
[0071] W e =F o ×I s ;
[0072] Among them, W e F represents the hyperedge weight, indicating the strength of the hyperedge and reflecting the importance of user interaction with items in a specific scenario. A larger value indicates a higher influence of the hyperedge in the hypergraph dataset. e is the index of the hyperedge, and F... o Here, 'o' represents the frequency of the operation type, and 'i' represents the index of the operation type. s The importance of scene tags is based on a preset weight for the recommendation target, ranging from 0.5 to 2.0, and is stored in a configuration file in the central control center. It reflects the relative importance of different scene tags (such as promotional activities and weekend shopping) to the recommendation. For example, if the importance of promotional activities is 1.5 and the importance of weekend shopping is 1.0, then promotional activities take priority. s is the index of the scene tag.
[0073] Filter the weights of superedges and remove those with an operation type frequency of less than 2 to reduce computational costs;
[0074] Click, purchase, and favorite frequencies are extracted from the standardized operation type frequencies, and click, purchase, and favorite frequencies are directly combined to generate a three-dimensional feature vector of the user node;
[0075] One-hot encoding is used to convert the item category field in user profile recommendation data into a category feature vector for item nodes. Specifically, the conversion involves extracting a set of categories from an item attribute database, for example, five categories: electronics, clothing, books, food, and furniture. A five-dimensional category feature vector is constructed for each item, with each dimension corresponding to a category. If an item belongs to electronics, the electronics dimension is set to 1, and the clothing, books, food, and furniture dimensions are set to 0. If an item belongs to clothing, the clothing dimension is set to 1, and the electronics, books, food, and furniture dimensions are set to 0. One-hot encoding is a common technique widely used in machine learning, data processing, and other fields.
[0076] The standardized item description text is processed using a pre-trained word embedding model (Word2Vec model) to generate word vectors for item nodes;
[0077] The category feature vector and word vector of the item node are directly concatenated to generate the node feature vector of the item node, for example, 305-dimensional; where the category feature vector of the item node is a 5-dimensional vector generated based on the one-hot encoding of the item category, representing the category affiliation; the node feature vector of the item node is a 305-dimensional comprehensive vector after concatenating the category feature vector and the 300-dimensional word vector, representing the complete attributes of the item.
[0078] The scene tag field in the user profile recommendation data is converted into a category feature vector of scene nodes through one-hot encoding. The conversion is as follows: extract the scene tag set from the scene tag rules, for example, 4 categories, including weekday, weekend shopping, promotional activities and family scene; construct a 4-dimensional category feature vector for each scene tag, with each dimension corresponding to a scene; if it is a weekday, the weekday dimension is set to 1, and the dimensions of weekend shopping, promotional activities and family scene are set to 0; if it is weekend shopping, the weekend shopping dimension is set to 1, and the dimensions of weekday, promotional activities and family scene are set to 0.
[0079] Based on the 3D feature vectors of user nodes, the node feature vectors of item nodes, the category feature vectors of scene nodes, user nodes, item nodes, scene nodes, hyperedges, and hyperedge weights, a hypergraph is constructed, generating a hypergraph structure dataset.
[0080] It should be noted that this step effectively integrates multi-dimensional information about users, items, and scene labels by constructing a hypergraph structure dataset. The design of the hyperedges not only represents the complex interaction relationships between users and multiple items in a specific scene, but also highlights the importance of high-value interactions by combining the frequency of operation types and the importance of the scene to calculate weights; removing low-frequency interactions reduces computational costs while maintaining core relational information. In addition, by applying one-hot encoding to item categories and combining it with a pre-trained word embedding model to process item description text and generate comprehensive node feature vectors, item attributes are expressed more comprehensively; scene labels are also transformed into feature vectors through one-hot encoding, enhancing the understanding of the context; finally, the completed hypergraph construction provides a high-quality data foundation for user profile recommendations, helping to improve the accuracy and relevance of personalized recommendations.
[0081] S3. Transform the hypergraph dataset into embedding vectors for users, items, and scenes.
[0082] Furthermore, the central control center receives the hypergraph structure dataset and constructs a hypergraph neural network model based on the hypergraph structure dataset;
[0083] The Hypergraph Neural Network Model is based on a multi-layer neural network model, including an input layer, two message passing layers, and an output layer, which is used to generate a comprehensive set of embedding vectors.
[0084] The input layer receives node feature vectors (3D feature vectors of user nodes, node feature vectors of item nodes, and category feature vectors of scene nodes) and hyperedge weights from the hypergraph structure dataset.
[0085] The first message passing layer aggregates the node feature vectors of user nodes, item nodes, and scene nodes within the same hyperedge in the hypergraph. For example, in the hyperedge (user 001, item 101, item 102, and weekend shopping), the node feature vectors of item 101, item 102, and the scene node "weekend shopping" are weighted and aggregated to user 001 to generate the first-layer 64-dimensional intermediate feature vector. Here, the hyperedge feature is a weighted combination of the feature vectors of user nodes, item nodes, and scene node categories within the hyperedge.
[0086] The second message passing layer receives the 64-dimensional intermediate feature vector from the first layer, aggregates the neighbor hyperedge features of the same user node in the hypergraph, enhances the context information, and generates the second 64-dimensional intermediate feature vector.
[0087] Each message-passing layer uses the ReLU activation function for non-linear transformation to ensure the expressive power of the features;
[0088] The output layer transforms and compresses the 64-dimensional intermediate feature vector from the second layer to generate a 32-dimensional user embedding vector for user nodes (based on clicks, purchases, and favorites recorded in logs, encoding user behavior preferences, such as choosing electronic products), a 32-dimensional item embedding vector for item nodes (based on category, price, description text, and co-occurrence relationships in logs, encoding item attributes and interaction relationships, such as mobile phones often being selected together with headphones), and a 32-dimensional scene embedding vector for scene nodes (based on scene tags recorded in logs, encoding scene associations, such as weekend shopping), which are used to recommend and match users and items.
[0089] Log records from user profile recommendation data are used as training samples for the hypergraph neural network model. The <user, item> corresponding to the operation type is extracted from the log records as positive samples with a label of 1; <user, item> not in the log records are randomly sampled from the user unique identifier and item unique identifier as negative samples with a label of 0.
[0090] The training samples are divided into a 90% training set and a 10% validation set. The training set is used to optimize the parameters of the hypergraph neural network model, and the validation set is used to evaluate the generalization ability of the hypergraph neural network model and prevent overfitting, as detailed below:
[0091] The training set is input into the HyperGraph Neural Network model for training. First, the HyperGraph Neural Network model receives the <user, item> data from the training set samples through the input layer, and then processes it through the message passing layer and the output layer. The values of the 32-dimensional user embedding vector and the 32-dimensional item embedding vector are multiplied bit by bit and summed to generate a user-item interaction score. Next, the user-item interaction score is mapped to an interaction probability using the sigmoid function. Finally, the interaction probability is compared with the true interaction labels of the training set samples (1 for positive samples and 0 for negative samples) using the cross-entropy loss function to generate a loss value and optimize the parameters of the HyperGraph Neural Network model.
[0092] The parameters of the hypergraph neural network model are optimized by mini-batch gradient descent, with 128 training samples processed per batch and a maximum of 20 training cycles. When the cross-entropy loss on the validation set no longer decreases for several consecutive cycles, the training is stopped early to select the optimal hypergraph neural network model parameters. This allows the 32-dimensional user embedding vector to encode user behavior patterns (based on clicks, purchases, and favorites in log records, reflecting user interaction preferences, such as choosing electronic products), and the 32-dimensional item embedding vector to encode item attributes and interaction relationships (based on item categories, prices, description texts in the item attribute database, and co-occurrence relationships between items in log records, such as mobile phones often being selected together with headphones).
[0093] For new users without log records, the frequency of operation types is generated based on external data (such as registration information). Cosine similarity is calculated based on the frequency of operation types of existing users in the log records to determine the similarity between new users and existing users. The 32-dimensional user embedding vectors of existing users are weighted and averaged to generate the 32-dimensional user embedding vector of new users. Cosine similarity is a commonly used standard calculation method. It measures similarity by calculating the cosine value of the angle between two vectors. The closer the value is to 1, the more similar they are. It is a well-known technique in this field.
[0094] Based on the trained hypergraph neural network model, the central control center generates a comprehensive embedding vector set, which includes 32-dimensional user embedding vectors for all user nodes, 32-dimensional embedding vectors for item nodes, and 32-dimensional embedding vectors for scene nodes.
[0095] It should be noted that this step, by transforming the hypergraph structure dataset into embedding vectors for users, items, and scenes, significantly improves the understanding and representation of user behavior patterns, item attributes, and scene-related interactions. This transformation allows each entity (user, item, and scene) to be accurately represented in the form of a low-dimensional vector, capturing not only individual features but also revealing the complex interactions between each entity. Furthermore, the importance of key interactions is reinforced by combining operation type frequency with scene importance, and nonlinear transformations ensure the richness of feature representation. For new users, cosine similarity is used to calculate similarity with existing users, thereby generating reliable embedding vectors and effectively solving the cold start problem. Overall, this step enhances the depth of understanding of user preferences, optimizes the effect of personalized recommendations, makes the recommendation results more aligned with users' real needs and interests, improves user experience, and also enhances the quality and accuracy of recommendations.
[0096] S4. Concatenate the embedding vectors of users, items, and scenes to generate enhanced feature vectors, and combine them with positive and negative samples from log records to train a support vector machine model to predict the probability of user-item interactions and generate a personalized recommendation list for user profiles.
[0097] Furthermore, the 32-dimensional user embedding vector and the 32-dimensional item embedding vector are directly combined into a 64-dimensional user-item feature vector;
[0098] The 32-dimensional scene embedding vector is appended to the 64-dimensional user-item feature vector as the context feature of the 64-dimensional user-item feature vector, forming a 96-dimensional enhanced feature vector to capture the influence of the interaction scene;
[0099] Positive and negative samples are extracted from log records and directly combined with 96-dimensional enhanced feature vectors to generate the training set for the support vector machine model.
[0100] The support vector machine model classifier is trained using the training set, as follows:
[0101] A kernel function using radial basis functions maps the 96-dimensional enhanced feature vector to a high-dimensional space, making it easier to separate positive and negative samples.
[0102] The similarity between users and items is calculated using the inner product of radial basis functions (e.g., the similarity between the feature vector of user 001 and item 101 and positive samples). This provides a distance metric for the support vector machine (SVM) classifier, distinguishing between interacting (positive samples, labeled 1) and non-interacting (negative samples, labeled 0). The similarity expression is:
[0103] K(x,x′)=exp(-γ||xx′|| 2 );
[0104] Where K(x,x′) represents the user-item similarity, i.e., the kernel function value between two 96-dimensional augmented feature vectors; x is the current user-item 96-dimensional augmented feature vector, for example, the feature vectors of user 001 and item 101; x′ is another user-item 96-dimensional augmented feature vector, usually a positive or negative sample from the training set; exp is an exponential function (with the natural logarithm base e) that converts the input value to a value between 0 and 1; γ is the parameter of the radial basis function, i.e., the kernel parameter, which is a positive number (γ>0) that controls the decay rate of the similarity. 2 The squared Euclidean distance between two 96-dimensional augmented feature vectors x and x′ represents the degree of difference between the two 96-dimensional augmented feature vectors.
[0105] It should be noted that this formula is based on the radial basis function and relies on Mercer's theorem, and is widely used in interaction prediction in the recommendation field.
[0106] The sequence minimum optimization algorithm is used to iteratively solve for the support vectors and weights of the support vector machine (SVM) model classifier, and to optimize the hyperplane (the boundary line separating positive and negative samples in high-dimensional space) of the SVM model classifier, as follows:
[0107] Randomly select a portion of training samples from the training set as initial support vectors;
[0108] The initial weights are set to zero, the penalty parameter (which determines the tolerance of the support vector machine model classifier to classification errors, and the initial value is usually set to 1) and the kernel parameter of the radial basis function (the initial value is set to 1 / 96, which determines the strictness of similarity judgment based on the 96-dimensional enhanced feature vector) are used as the initial parameters of the support vector machine model classifier.
[0109] Check whether each training sample in the training set meets the classification conditions, that is, determine whether the training sample meets the optimization requirements of hyperplane classification, such as being misclassified, being too close to the hyperplane, or not reaching the maximum margin;
[0110] Prioritize training samples that severely violate classification conditions (such as misclassifying positive or negative samples, or training samples close to the hyperplane). Determine candidate support vectors by calculating the similarity between training samples that severely violate classification conditions and the current support vector samples (training samples close to the hyperplane) (high similarity indicates closeness to the hyperplane).
[0111] Select training sample pairs (two training samples, which can be two positive samples, two negative samples, or one positive sample and one negative sample) from the candidate support vectors. Adjust the weights of the support vector machine model classifier to make the hyperplane classification boundary of the support vector machine model classifier more accurate. Optimize the hyperplane position to ensure that positive samples and negative samples are separated as far apart as possible in the high-dimensional space. Learn the user-item interaction pattern (identify the interaction pattern between user preferences and item attributes through the 96-dimensional enhanced feature vectors and positive and negative labels of positive and negative samples, such as users who like electronic products are more likely to click on mobile phones).
[0112] A subset of positive and negative samples are randomly selected from the log records. Independent of the training set of the support vector machine (SVM) model, these samples are directly combined with 96-dimensional augmentation vectors to generate the validation set of the SVM model. The classification accuracy of the SVM model classifier is evaluated. The penalty parameters and the kernel parameters of the radial basis function are adjusted through grid search to select the optimal parameters and ensure generalization ability. Grid search is a standard parameter optimization technique in machine learning and recommendation, and is widely used in parameter tuning of support vector machine models.
[0113] The output is an optimized support vector machine model classifier, ensuring that positive and negative samples are separated as much as possible in the high-dimensional space, and learning user-item interaction patterns.
[0114] For new users with no log records or user-item combinations of existing users who have not interacted with any logs, generate a 96-dimensional enhanced feature vector.
[0115] The support vector machine model classifier uses the hyperplane and the kernel function of the radial basis function generated during training to calculate the distance from the 96-dimensional augmented feature vector to the hyperplane (positive values indicate a tendency to interact, and negative values indicate a tendency to have no interaction), and outputs a classification score;
[0116] The classification score is converted into an interaction probability (from 0 to 1, such as the probability of user 001 interacting with item 101 being 0.9) by Platt scaling; the interaction probability is then adjusted by weighting the 32-dimensional scene embedding vector (for example, the probability of promotional items is increased by 10% when shopping on weekends), to generate the final interaction probability; Platt scaling is an existing technique in the fields of machine learning and recommendation, and is widely used in the probability transformation of support vector machine models.
[0117] Based on the final interaction probability, all items for each user are sorted in descending order to generate a personalized recommendation list for the user profile (e.g., recommend mobile phones and headphones to user 001 who loves electronic products, and select the top 10 high-probability items).
[0118] It should be noted that this step generates a 96-dimensional enhanced feature vector by concatenating 32-dimensional user embedding vectors, 32-dimensional item embedding vectors, and 32-dimensional scene embedding vectors. This comprehensively captures the influence of user behavior patterns, item attributes, and scene associations. The 96-dimensional enhanced feature vector is then used in conjunction with positive and negative samples to train a support vector machine model. Radial basis functions and kernel functions are employed to enhance the discriminative power of the features in high-dimensional space, ensuring accurate modeling of user-item interaction patterns. The optimal hyperplane is solved using a sequence minimum optimization algorithm, and Platt scaling is used to convert classification scores into interaction probabilities. These probabilities are then adjusted based on scene importance, and finally, a personalized recommendation list is generated based on the interaction probabilities. This step significantly improves the relevance of the recommendation results and the user experience, making the recommendations more aligned with the user's actual interests and current contextual needs.
[0119] This embodiment also provides a user profile recommendation system based on support vector machines, including:
[0120] The acquisition module is used to acquire and preprocess user profile recommendation data. The user profile recommendation data includes user unique identifier, item unique identifier, operation type, timestamp, item category, item price, item description text, and scene tags.
[0121] The association module is used to generate a hypergraph structure dataset by using the hypergraph to associate preprocessed user profile recommendation data.
[0122] The transformation module is used to transform hypergraph structure datasets into embedding vectors for users, items, and scenes;
[0123] The prediction module is used to concatenate the embedding vectors of users, items, and scenes to generate enhanced feature vectors, and combine them with positive and negative samples from log records to train a support vector machine model to predict the probability of user-item interactions and generate a personalized recommendation list for user profiles.
[0124] This embodiment also provides a computer device applicable to the user profile recommendation method based on support vector machines, including: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the user profile recommendation method based on support vector machines as proposed in the above embodiment.
[0125] The computer device can be a terminal, comprising a processor, memory, communication interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, carrier networks, NFC (Near Field Communication), or other technologies. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad on the computer device's casing, or an external keyboard, touchpad, or mouse.
[0126] This embodiment also provides a storage medium storing a computer program that, when executed by a processor, implements the user profile recommendation method based on support vector machines as proposed in the above embodiments. The storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Red-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0127] In summary, this invention generates enhanced feature vectors by concatenating user, item, and scene embedding vectors, and then trains a support vector machine (SVM) model, achieving high-precision prediction of user-item interaction probabilities. By utilizing radial basis function kernels to map features to a high-dimensional space, the separability of positive and negative samples is enhanced, improving the generalization ability of the SVM model. Combining Platt scaling of the output interaction probabilities and introducing scene weights for dynamic adjustment makes the recommendation results more aligned with real-world scenario needs. Compared to traditional models, it exhibits greater robustness in handling high-dimensional sparse data, improving recommendation accuracy and personalization, and enhancing the user experience.
[0128] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A user profile recommendation method based on support vector machines, characterized in that: include, Acquire user profile recommendation data and preprocess it. The user profile recommendation data includes user unique identifier, item unique identifier, operation type, timestamp, item category, item price, item description text and scene tags. Using hypergraph associations to preprocess user profile recommendation data, a hypergraph structure dataset is generated; Transforming a hypergraph dataset into embedding vectors for users, items, and scenes refers to processing the hypergraph dataset through an input layer, two message passing layers, and an output layer to generate embedding vectors for users, items, and scenes, capturing user behavior patterns, item attributes, and interactive relationships associated with scenes. The process of processing the hypergraph structure dataset through an input layer, two message-passing layers, and an output layer is as follows: The input layer takes into account the feature vectors of user nodes, item nodes, scene node categories, and hyperedge weights from the hypergraph structure dataset. The first message passing layer aggregates the feature vectors of user nodes, item nodes, and scene node categories within the same hyperedge, and generates the first layer intermediate feature vector through nonlinear transformation. The second message passing layer receives the intermediate feature vector from the first layer, aggregates the neighbor hyperedge features of the same user node in the hypergraph, and generates the second layer intermediate feature vector through nonlinear transformation. The output layer transforms and compresses the intermediate feature vectors from the second layer to generate user embedding vectors, item embedding vectors, and scene embedding vectors. The hyperedge feature is a weighted combination of the feature vectors of user nodes, item nodes, and scene node categories within the hyperedge; The embedding vectors of users, items, and scenes are concatenated to generate enhanced feature vectors. These vectors are then combined with positive and negative samples from log records to train a support vector machine model, predict the probability of user-item interactions, and generate a personalized recommendation list for user profiles. The user embedding vector and the item embedding vector are directly combined into a user-item feature vector; The scene embedding vector is attached to the user-item feature vector as a contextual feature of the user-item feature vector, forming an enhanced feature vector; Positive and negative samples are extracted from log records and directly combined with enhanced feature vectors to generate the training set of the support vector machine model, and the support vector machine model classifier is trained. The kernel function using radial basis functions maps the enhanced feature vectors to a high-dimensional space, thus separating positive and negative samples. User-item similarity is calculated using the inner product of radial basis functions to distinguish between interactions and non-interactions; The sequence minimum optimization algorithm is used to iteratively solve for the support vectors and weights of the support vector machine model classifier, and then optimizes the hyperplane of the support vector machine model classifier. Randomly select a portion of training samples from the training set as initial support vectors; The initial weights are set to zero, and the penalty parameter and the kernel parameter of the radial basis function are set as the initial parameters of the support vector machine model classifier. Check whether each training sample in the training set meets the classification criteria; Prioritize selecting training samples that severely violate classification conditions, and determine candidate support vectors by calculating the similarity between the training samples that severely violate classification conditions and the current support vector samples; Select training sample point pairs from candidate support vectors, adjust the weights of the support vector machine model classifier, and learn user-item interaction patterns; Randomly select positive and negative samples from the log records, independent of the training set of the support vector machine model, and directly combine them with the boosting vectors to generate the validation set of the support vector machine model. Evaluate the classification accuracy of the support vector machine model classifier, adjust the penalty parameter and the kernel parameter of the radial basis function through grid search, select the optimal parameters, and output the optimized support vector machine model classifier. The support vector machine model classifier uses the hyperplane and the kernel function of the radial basis function generated during training to calculate the distance from the augmented feature vector to the hyperplane and output the classification score; Converting classification scores into interaction probabilities using Platt scaling; The interaction probabilities are adjusted by weighting the scene embedding vectors to generate the final interaction probabilities. Based on the final interaction probability, all items for each user are sorted in descending order to generate a personalized recommendation list for the user profile; Define user nodes, item nodes, and scene nodes; A hyperedge is formed by connecting a user with multiple items under the same scene label. The superedge weight is calculated by multiplying the frequency of the operation type by the importance of the scene label; The weight of hyperedges is determined based on the frequency of operation type and the importance of scene label, and low-frequency hyperedges are filtered out. Statistically count the frequency of operation types after preprocessing to generate user node feature vectors; The item category field is processed using one-hot encoding to generate a category feature vector; The item description text is processed by a pre-trained word embedding model to generate word vectors, which are then concatenated with the category feature vectors to form the item node feature vectors. The scene label field is converted into a scene node category feature vector through one-hot encoding; The dataset is formed by integrating user nodes, item nodes, scene nodes, hyperedges, hyperedge weights, user node feature vectors, item node feature vectors, and scene node category feature vectors.
2. The user profile recommendation method based on support vector machine as described in claim 1, characterized in that: The training of the support vector machine model is as follows. Positive and negative samples are extracted from log records and combined with the concatenated enhanced feature vectors to form a training set; A kernel function is used to map the enhanced feature vectors in the training set to a high-dimensional space, and user-item interaction patterns are learned based on positive and negative samples; The classification hyperplane is optimized using the sequence minimum optimization algorithm.
3. The user profile recommendation method based on support vector machines as described in claim 2, characterized in that: The log records are user unique identifiers, item unique identifiers, operation types, and timestamps from the user profile recommendation data; The positive and negative samples are determined based on the operation type; The classification hyperplane is the boundary line that separates positive and negative samples in a high-dimensional space.
4. A user profile recommendation system based on support vector machines, based on the user profile recommendation method based on support vector machines according to any one of claims 1 to 3, characterized in that: include, The acquisition module is used to acquire and preprocess user profile recommendation data, which includes user unique identifier, item unique identifier, operation type, timestamp, item category, item price, item description text, and scene tags. The association module is used to generate a hypergraph structure dataset by using the hypergraph to associate preprocessed user profile recommendation data. The transformation module is used to transform hypergraph structure datasets into embedding vectors for users, items, and scenes; The prediction module is used to concatenate the embedding vectors of users, items, and scenes to generate enhanced feature vectors, and combine them with positive and negative samples from log records to train a support vector machine model to predict the probability of user-item interactions and generate a personalized recommendation list for user profiles.
5. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, it implements the steps of the user profile recommendation method based on support vector machine as described in any one of claims 1 to 3.
6. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processor, it implements the steps of the user profile recommendation method based on support vector machine as described in any one of claims 1 to 3.