Online user reputation measurement method based on factorization machine
Through a deep learning model based on factor decomposition machine and online learning algorithm, combined with graph anomaly detection, the problems of data sparsity, insufficient feature interaction and insufficient dynamics of user reputation metrics in the prior art are solved, and accurate and real-time evaluation of user reputation is achieved.
Patent Information
- Application Number
- CN202510327038.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-19
- Publication Date
- 2025-06-13
AI Technical Summary
The existing online user reputation measurement methods have problems such as data sparsity, insufficient feature interaction, insufficient dynamics and susceptibility to malicious behavior, making it difficult to achieve accurate and real-time reputation assessment.
The online user reputation measurement method based on factor decomposition machine is adopted, and a deep factor decomposition machine model (DeepFM) is constructed by collecting and preprocessing multi-dimensional behavior data, combining online learning algorithms to achieve real-time updates, and malicious behavior is identified and blocked through graph anomaly detection.
It improves the accuracy and robustness of user reputation assessment, realizes real-time updates and dynamic assessments of user reputation, and adapts to the complex needs of online scenarios.
Smart Images

Figure CN120144964A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of online social networks, and particularly to an online user reputation measurement method based on factorization machines. Background Art
[0002] With the rapid development of the Internet, online platforms (such as e-commerce platforms, social media platforms, and content sharing platforms) play an increasingly important role in the interaction among users. On these platforms, the behavior and reputation of users directly affect the ecological health of the platform and the user experience. To maintain the fairness and credibility of the platform, it becomes particularly important to accurately measure the reputation of users.
[0003] Traditional user reputation measurement methods usually rely on rule-based models or simple statistical methods, such as user ratings, the number of comments, transaction records, etc. Although these methods are easy to implement, they have the following problems:
[0004] 1. Data sparsity problem: In many scenarios, user behavior data and interaction information are often very sparse, making it difficult for traditional methods to accurately evaluate the true reputation of users.
[0005] 2. Insufficient feature interaction: User reputation is affected by multiple factors, such as the user's historical behavior, comment content, interaction frequency, etc. Traditional methods are difficult to effectively capture the interaction relationships between these complex features.
[0006] 3. Lack of dynamics: The reputation of users is dynamically changing, and traditional methods often cannot update the reputation scores of users in real time, making it difficult to meet the requirements of online scenarios.
[0007] 4. Vulnerable to malicious behavior interference: Traditional methods are easily affected by behaviors such as malicious ratings and false comments, resulting in distorted reputation evaluation results.
[0008] Factorization Machines (FM) is an efficient machine learning algorithm that can demonstrate powerful capabilities in dealing with sparse data and high-dimensional feature interactions. Its core idea is to model the second-order interaction relationships between features through low-dimensional vector representations, so as to still achieve excellent prediction performance in the case of data sparsity. The user reputation measurement method based on factorization machines can not only effectively alleviate the data sparsity problem, but also capture the complex interaction relationships between multiple features, providing a new solution for the accurate evaluation of user reputation.
[0009] In recent years, with the continuous improvement of the requirements for real-time performance and accuracy in online platforms, the online user reputation measurement method based on factorization machines has gradually become a research hotspot. By combining factorization machines with online learning algorithms, the real-time update and dynamic evaluation of user reputation can be achieved, thus better adapting to the complex requirements of online scenarios.
[0010] Therefore, proposing an online user reputation measurement method based on factorization machines can not only improve the accuracy and robustness of reputation evaluation, but also provide important technical support for fields such as user behavior management, recommendation system optimization, and risk control on the platform.
[0011] Currently, certain progress has been made in the research on online user reputation measurement, and relevant technologies and patents have also provided important references for the development of this field. For example,
[0012] CN116862575A discloses a real-time evaluation method for brand reputation based on social media, which proposes to mine user-generated content on social media, combine brand management theories, identify relevant reputation influencing factors and their sentiment tendencies involved in each comment under each brand, and achieve real-time dynamic evaluation and tracking of brand reputation. However, this method mainly relies on scoring and review data, performs poorly in scenarios with high data sparsity, and fails to fully capture the complex interaction relationships between user behavior characteristics. Similarly, CN118132864A discloses a user reputation prediction method based on machine learning, which models user behavior data through machine learning models (such as decision trees and random forests), improving the accuracy of reputation evaluation. However, this method has a high computational complexity, is difficult to adapt to the real-time requirements of online scenarios, and still has deficiencies in data sparsity and online learning ability. Summary of the Invention
[0013] Aiming at the deficiencies of the existing technology, the present invention aims to provide an online user reputation measurement method based on factorization machines.
[0014] To achieve the above object, the present invention adopts the following technical solutions:
[0015] An online user reputation measurement method based on factorization machines, comprising the following steps:
[0016] S1. First, collect multi-dimensional behavior data of users from the online platform, where the multi-dimensional behavior data includes users' rating records, review texts, transaction records, and the interaction frequency between users and other users, and preprocess the collected multi-dimensional behavior data of users;
[0017] In the processing of review texts, a pre-trained language model is used to analyze the review texts. First, the review texts are tokenized and standardized. Then, the review texts obtained after tokenization and standardization are input into the pre-trained model for feature extraction. The extracted features include sentiment tendency, sentiment intensity, and the topic information of the reviews.
[0018] S2. Based on the multi-dimensional behavioral data of the user processed in step S1 and the interaction data of the user on the online platform, multiple user behavior features are constructed. The user behavior features specifically include user historical behavior features, time features, platform interaction features, and social embedding features generated based on a graph neural network. The generated user historical behavior features, time features, platform interaction features, and social embedding features are concatenated to form a high-dimensional feature vector, and the obtained high-dimensional feature vector is standardized to ensure the dimensional consistency between different features.
[0019] S3. Construction of the Deep Factorization Machine model DeepFM:
[0020] The structure of the DeepFM model includes a factorization machine model and a DNN model. The factorization machine model is used to capture the second-order interaction relationships between user behavior features, and the DNN model is used to layer by layer extract the high-order interaction relationships of user behavior features through a deep learning network. The final output user reputation evaluation result of DeepFM is the fusion result of the factorization machine model and the DNN model. The specific formula is:
[0021]
[0022] where σ is the activation function, FM(x) is the output of the factorization machine model, and DNN(x) is the output of the DNN model.
[0023] S4. Training of the DEEPFM model:
[0024] First, the factorization machine model and the DNN model are pre-trained separately to ensure that the factorization machine model and the DNN model can independently learn useful feature representations.
[0025] After the pre-training of the factorization machine model and the DNN model is completed, the outputs of the factorization machine model and the DNN model are fused, and the parameters of the factorization machine model and the DNN model are simultaneously optimized in the joint training stage to minimize the loss function of the DeepFM model.
[0026] S5. Arrange the preprocessed multi-dimensional behavior data of the user in step S1 in chronological order to construct the input of the time series model based on the Transformer structure. To ensure the consistency of the time series length, a fixed window length is used to intercept the multi-dimensional behavior data of the user. If the behavior records are insufficient, they are padded with zeros. The input data is finally constructed as a tensor with a shape of [B, T, F], where B is the batch size, T is the time window length, and F is the feature dimension of each behavior record.
[0027] S6. Update of the user reputation score: To cope with the dynamic changes of user behavior, the method of this embodiment uses an online learning algorithm to achieve real-time update of the user reputation score. The online learning algorithm updates the parameters of the DeepFM model by incremental learning while receiving new data, ensuring that the DeepFM model can efficiently adapt to the changes of user behavior in a dynamic environment, thereby improving the timeliness and accuracy of the reputation score.
[0028] S7. Use graph anomaly detection to detect and block abnormal patterns in user behavior, thereby effectively identifying malicious behavior and reducing the interference of noise data on the user reputation evaluation result:
[0029] S7.1. Graph construction: Users, behaviors, and objects are respectively defined as nodes in the graph. Edges between nodes are constructed according to user behavior data, and the attributes of the edges include rating values, comment sentiment scores, and behavior timestamps. Then, a heterogeneous graph is constructed, where nodes and edges have different types and attributes to capture diverse relationships.
[0030] S7.2. Use graph auto-encoding to perform embedded representation learning on the heterogeneous graph constructed in step S7.1, and detect abnormal nodes through reconstruction error: Based on the graph neural network GNN, extract the low-dimensional embedded representation of the nodes, and then reconstruct the edge relationship between the nodes through an inner product decoder or MLP. Calculate the reconstruction error as the anomaly score, and determine whether it is an abnormal node according to the set threshold.
[0031] Or,
[0032] Use a graph anomaly detection model to directly detect abnormal nodes through supervised or semi-supervised methods.
[0033] S8. To achieve accurate calculation and real-time output of the user reputation score, combine the prediction results of the DeepFM model, the prediction results of the time series model, and the output of the graph auto-encoder or graph anomaly detection model in step S7, and perform joint training through a multi-task learning framework to comprehensively evaluate the reputation performance of the user.
[0034] Further, in step S1, for the missing values in the collected original data, a multiple imputation-based method is used for filling; for numerical data, a filling strategy combining mean imputation and regression imputation is used; for categorical data, a frequency-based mode imputation method is adopted; in addition, to ensure the dimensional consistency between different features, all numerical data is normalized.
[0035] Further, in step S1, the pre-trained language model uses a BERT model fine-tuned on the target domain, and its parameter settings include: the hidden layer size is 768, the number of Transformer layers is 12, the number of attention heads is 12, the maximum sequence length is 128, the learning rate is set to 2e-5, and the training batch size is 32.
[0036] Further, in step S2, for the user's historical behavior features, the user's rating mean, rating variance, comment sentiment score mean, and comment word count mean are extracted. Among them, the comment sentiment score mean is calculated by combining the sentiment tendency feature and sentiment intensity feature extracted from the comment text in step S1. For each comment of the user, its corresponding sentiment tendency and sentiment intensity are combined to generate a sentiment score, and finally, the average value of the sentiment scores of all the user's comments is taken to obtain the user's comment sentiment score mean;
[0037] For the time feature, the time difference feature between the user's most recent active time and the current time, the time difference feature between the first active time and the current time, and the behavior distribution feature of the user in different time periods are constructed;
[0038] Then, for the platform interaction feature, the interaction feature between the user and their trading counterpart is constructed, including the rating mean, comment sentiment score mean, and transaction amount mean of the trading counterpart; among them, the rating mean of the trading counterpart refers to the average value of the ratings given by the trading counterpart in all transactions, and the comment sentiment score mean of the trading counterpart refers to the average value of the sentiment scores of all the trading counterpart's comments, which is used to quantify the overall sentiment tendency of the trading counterpart's comments;
[0039] In addition, the specific generation process of the user's social embedding feature in the social relationship graph is as follows:
[0040] First, a social relationship graph is constructed, where the nodes represent users, the edges represent the interaction relationships between users, and the weights of the edges are defined based on the interaction frequency or transaction amount; then, a Graph Sampling and Aggregation (GraphSAGE) model is used to perform embedding learning on the social relationship graph. In the GraphSAGE model, the node embeddings are generated by aggregating the features of neighboring nodes layer by layer; the user's social embedding feature not only contains its own behavior features but also the behavior features of its neighboring nodes, so as to capture the structured relationships of the user in the social network.
[0041] Further, in step S2, the generation of time features uses a sliding window to calculate the behavior statistics of the user within the time period of the sliding window respectively, so as to reflect the short-term and long-term behavior trends of the user. The behavior statistics include the behavior distribution characteristics of the user in different time periods, the time difference characteristics between the user's most recent active time and the current time, and the time difference characteristics between the user's first active time and the current time.
[0042] Further, in step S3, the DNN model is composed of multiple layers of fully connected neural networks, specifically:
[0043] Input layer: used to splice the dense representations of all features into an input vector of a fixed length; Hidden layer: adopts a 3-layer fully connected network, and the number of neurons in each layer is 256, 128, and 64 respectively; Activation function: each hidden layer uses the ReLU activation function; Regularization: add a Dropout layer after each hidden layer, and the Dropout ratio is 0.5; Optimizer: use the Adam optimizer with a learning rate of 0.001; Batch size: 256; Maximum number of iterations: 100.
[0044] Further, during the training process of the factorization machine model, the parameters of the factorization machine model are optimized using stochastic gradient descent. The specific parameter settings are as follows:
[0045] Dimension of latent vector: 10; Learning rate: 0.01; Regularization parameter: λ w = 0.001, λ v = 0.01, λ w and λ v perform L2 regularization on the weight parameter w i and the latent vector v i respectively to prevent overfitting; Training batch size: 256; Maximum number of iterations: 100;
[0046] The training data is divided into a training set and a validation set, and the cross-validation method is used to evaluate the model performance; During the training process, monitor the evaluation metrics on the validation set, and adjust the parameters of the factorization machine model according to the validation set performance to prevent overfitting; In addition, to further improve the effect of the factorization machine model, the input features are screened in combination with the importance of feature interactions, and the features that contribute more to the factorization machine model are retained, so as to reduce the interference of irrelevant features on the performance of the factorization machine model.
[0047] Further, in step S5, the structure and parameter settings of the time series model are as follows:
[0048] Embedding layer: used to map the input data to a fixed dimension through a fully connected layer and add time position encoding to retain the time order information;
[0049] Encoder layer: Three layers of Transformer encoders are adopted. Each layer contains the following components: a multi-head self-attention mechanism with 8 heads and a hidden dimension of 64; a feed-forward fully-connected network consisting of two fully-connected networks with a hidden layer dimension of 128 and a ReLU activation function; a normalization layer for stabilizing the training process; and a residual connection for alleviating the vanishing gradient problem.
[0050] Output layer: Using the final output of the encoder, a tensor of shape [B, T, H] is obtained, where H is the hidden layer dimension; through global pooling or a dynamic weighting mechanism, the time dimension is aggregated into a single user reputation score.
[0051] Furthermore, in step S5, to improve the real-time performance and sensitivity of user reputation, a dynamic weighting mechanism is adopted to assign different weights to user behaviors at different time points.
[0052] On the one hand, according to the behavior timestamp, the exponential decay function is used to calculate the time decay weight w of the behavior at time point t t = e -·Δt , where Δt is the difference between the current time and the behavior time, and α is the decay coefficient; the weight of recent behaviors is higher, and the weight of historical behaviors gradually decreases.
[0053] On the other hand, the attention score of each behavior is calculated through the self-attention mechanism and used as the attention weight for dynamically aggregating the time series output.
[0054] The time decay weight is mainly used to weight behaviors according to the time when the behaviors occur to highlight the importance of recent behaviors; while the attention weight is calculated through the self-attention mechanism based on the content and context information of the behaviors and is used to further adjust the weights of the behaviors; the time decay weight and the attention weight are used in combination. When calculating the output of the time series, the time decay weight and the attention weight of each behavior are multiplied to obtain the final weighted score of each behavior, and then these weighted scores are aggregated to obtain the dynamic change trend of user reputation.
[0055] Furthermore, in step S8, the multi-task learning framework adopts a structure with a shared underlying network and task-specific branches; the network structure of the shared underlying network includes a 3-layer fully connected neural network with hidden layer dimensions of 128, 64, and 32 respectively, the activation function is ReLU, and the regularization adopts Dropout and L2 regularization; the concatenated and processed feature vectors include the user behavior feature embeddings generated by the DeepFM model, the dynamic prediction results of the time series model, and the outputs of the graph autoencoder or graph anomaly detection model; the shared underlying network performs unified feature extraction and transformation on the input features to generate a shared feature representation; then, based on the shared features, exclusive branches are set for the DeepFM model, the time series model, and the graph autoencoder or graph anomaly detection model for independent prediction tasks. The DeepFM model is used to predict the user's behavior preference score, the time series model is used to predict the user's recent behavior activity or trend score, and the graph autoencoder or graph anomaly detection model outputs the confidence score of abnormal behavior; based on the outputs of the task branches, the final reputation score is calculated through weighted linear combination: S = w 1 ·S FM +w 2 ·S TS +w 3 ·(1 - S Anomaly ) where S FM 、S TS and S Anomaly respectively represent the output scores of the DeepFM model, the time series model, and the graph autoencoder or graph anomaly detection model, and w 1 、w 2 、w 3 are weight parameters.
[0056] The beneficial effects of the present invention are as follows: The present invention utilizes the advantages of the factorization machine in sparse data modeling and feature interaction capture, and combines with the online learning algorithm to achieve accurate evaluation and real-time update of user reputation. Compared with traditional methods, the method of the present invention can not only effectively solve the problems of data sparsity and insufficient feature interaction, but also has the ability of dynamic adjustment and efficient calculation, providing an innovative solution for online user reputation measurement. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] Figure 1 is the overall flowchart of the method of the embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0058] The following will further describe the present invention with reference to the drawings. It should be noted that this embodiment is based on the present technical solution and gives detailed implementation manners and specific operation processes, but the protection scope of the present invention is not limited to this embodiment.
[0059] This embodiment provides an online user reputation measurement method based on a factorization machine, as Figure 1 shown, which includes the following steps:
[0060] S1. First, collect multi-dimensional behavioral data of users from an online platform. The multi-dimensional behavioral data includes users' rating records, review texts, transaction records, and the interaction frequency between users and other users, etc., and preprocess the collected multi-dimensional behavioral data of users.
[0061] In this embodiment, in order to ensure the comprehensiveness and representativeness of the data, a distributed crawling technology can be used to batch collect data from the online platform.
[0062] In this embodiment, the preprocessing includes de-duplicating and cleaning operations on the collected data to remove duplicate records and outliers.
[0063] In this embodiment, in the processing of review texts, this embodiment uses a pre-trained language model with excellent performance in the field of natural language processing (such as BERT or RoBERTa) to analyze review texts. Specifically, first perform word segmentation and normalization processing on the review texts, such as removing stop words, punctuation marks, and special characters. Then, input the review texts obtained after word segmentation and normalization processing into the pre-trained model for feature extraction. The extracted features include sentiment tendency (positive or negative), sentiment intensity (such as the distribution of sentiment scores between 0 and 1), and the topic information of the reviews. To improve the accuracy of feature extraction, this embodiment uses a BERT model fine-tuned on the target domain (such as e-commerce or social media), and its parameter settings include: the hidden layer size is 768, the number of Transformer layers is 12, the number of attention heads is 12, the maximum sequence length is 128, the learning rate is set to 2e-5, and the training batch size is 32.
[0064] In this embodiment, in data preprocessing, in order to handle missing values in the collected raw data, a method based on multiple imputation is used for filling. Specifically, for numerical data (such as ratings and transaction amounts), a filling strategy combining mean imputation and regression imputation can be used; for categorical data (such as users' transaction categories), a frequency-based mode imputation method is adopted. In addition, to ensure the dimensional consistency between different features, all numerical data is normalized, and the normalization method can use Min-Max normalization.
[0065] S2. Based on the multi-dimensional behavioral data of users processed in step S1 and the interaction data of users on the online platform, construct various user behavior features to enrich the input dimension of the factorization machine model. The user behavior features specifically include user historical behavior features, time features, platform interaction features, and social embedding features generated based on Graph Neural Networks (GNNs). Concatenate the generated user historical behavior features, time features, platform interaction features, and social embedding features to form a high-dimensional feature vector, and perform standardization processing on the obtained high-dimensional feature vector to ensure the dimensional consistency between different features.
[0066] First, for the user historical behavior features, extract statistical features such as the user's average rating, rating variance, average comment sentiment score, and average comment word count. Among them, the average rating and rating variance can reflect the user's evaluation preference and rating stability, while the average comment sentiment score is calculated by combining the sentiment tendency features and sentiment intensity features extracted from the comment text in step S1. Specifically, for each comment of the user, combine its corresponding sentiment tendency and sentiment intensity to generate a sentiment score. For example, the score for positive sentiment can be set to 1, the score for negative sentiment can be set to 0, and the sentiment intensity is directly represented by a value between 0 and 1 to indicate the intensity of the sentiment (such as a value between 0 and 1). Then, weight the values corresponding to the sentiment tendency and sentiment intensity to obtain the sentiment score for the corresponding comment. Finally, take the average of the sentiment scores of all the user's comments to obtain the average comment sentiment score. In addition, the user's behavior frequency features (such as the number of ratings and comments per day) can be further extracted to capture the user's activity level.
[0067] Second, for the time features, construct the time difference feature between the user's most recent active time and the current time, the time difference feature between the first active time and the current time, and the behavior distribution features of the user in different time periods (such as weekdays and weekends, day and night). In this embodiment, the generation of time features uses the sliding window method. For example, set the window lengths of 7 days, 30 days, and 90 days, and calculate the behavior statistics of the user within these time periods respectively to reflect the short-term and long-term behavior trends of the user. The behavior statistics include the behavior distribution features of the user in different time periods, the time difference feature between the user's most recent active time and the current time, and the time difference feature between the user's first active time and the current time.
[0068] Then, for the platform interaction features, the interaction features between the user and their trading counterpart are constructed, including the average rating of the trading counterpart, the average sentiment score of the comments, and the average transaction amount, etc. Among them, the average rating of the trading counterpart refers to the average of the ratings given by the trading counterpart in all transactions, and the average sentiment score of the comments of the trading counterpart refers to the average of the sentiment scores of all the comments of the trading counterpart, which is used to quantify the overall sentiment tendency of the trading counterpart's comments.
[0069] In addition, for the social embedding features, the social embedding features of the user are constructed using the relationship data in the social network, such as the number of the user's friends, the average rating of the friends, and the average interaction frequency between friends. To further enrich the high-dimensional feature space, in this embodiment, a graph neural network (GNN) is used to generate the social embedding features of the user in the social relationship graph. The specific process is as follows:
[0070] First, a social relationship graph is constructed, where the nodes represent users, and the edges represent the interaction relationships between users (such as trading relationships or friend relationships). The weights of the edges can be defined based on the interaction frequency or the transaction amount. Then, the Graph Sample and Aggregate (GraphSAGE) model is used to perform embedding learning on the social relationship graph. The specific parameter settings are as follows: hidden layer dimension: 128; aggregation function: Mean Aggregator; number of sampled neighbors: 10 neighbors are sampled per layer; activation function: ReLU; optimizer: Adam; learning rate: 0.001; maximum number of training epochs: 200. In the GraphSAGE model, the node embeddings are generated by aggregating the features of neighboring nodes layer by layer. The social embedding features of the user not only include their own behavioral features but also the behavioral features of their neighboring nodes (friends or trading counterparts), thus capturing the structured relationships of the user in the social network.
[0071] Through the above feature engineering and high-dimensional feature generation methods, the model's ability to characterize user behavior can be significantly improved, providing rich information input for the subsequent factorization machine modeling.
[0072] S3. Construction of the Deep Factorization Machine (DeepFM) model.
[0073] In this embodiment, the Deep Factorization Machine model (DeepFM) is used to model user behavior and features. DeepFM combines the advantages of the Factorization Machine (FM) and the Deep Neural Network (DNN). It can not only capture the second-order interaction relationships between features through the factorization machine, but also learn high-order non-linear feature interactions through the DNN part, thereby enhancing the expression ability of the model. The structure of the DeepFM model includes a factorization machine model and a DNN model. The DNN model extracts high-order interaction relationships of user behavior features layer by layer through a deep learning network. The final output of DeepFM is the fusion result of the factorization machine model and the DNN model, and the specific formula is:
[0074]
[0075] where σ is the activation function (usually Sigmoid), FM(x) is the output of the factorization machine model, and DNN(x) is the output of the DNN model.
[0076] Among them, the Factorization Machines (FM) model models the user behavior features constructed in step S2, makes full use of its advantages in processing high-dimensional sparse data, and captures the second-order interaction relationships between user behavior features. By introducing the latent vector decomposition technology, the factorization machine model can efficiently learn the potential relationships of feature interactions, thereby effectively alleviating the data sparsity problem.
[0077] Taking the high-dimensional feature vector obtained in step S2 as the input of the factorization machine model, the input feature matrix is usually high-dimensional and sparse. For example, user behavior data may contain a large number of categorical features, and these features need to be represented by one-hot encoding, resulting in a significant increase in the dimension of the input matrix. The core idea of the factorization machine model is to model the second-order interaction relationships between features through low-dimensional vector decomposition. Specifically, the prediction formula of the factorization machine model is:
[0078]
[0079] where, w 0 is the global bias, w i is the weight of feature x i , v i and v j are the latent vector representations of features x i and x j respectively, <v i , v j > represents the inner product between latent vectors, which is used to model the interaction between features x i and x jThe interaction relationship between them; n represents the total number of features. Through latent vector factorization, the factorization machine model can calculate all second-order feature interactions with linear complexity, thus being applicable to high-dimensional sparse data.
[0080] In this embodiment, the DNN model consists of multiple layers of fully connected neural networks and is used to capture high-order feature interaction relationships. The specific network structure and parameters of the DNN model are as follows:
[0081] Input layer: Used to concatenate the dense representations of all features into an input vector of a fixed length. Hidden layer: Adopts a 3-layer fully connected network, and the number of neurons in each layer is 256, 128, and 64 respectively. Activation function: Each hidden layer uses the ReLU activation function. Regularization: Add a Dropout layer after each hidden layer, and the Dropout ratio is 0.5 to prevent overfitting. Optimizer: Use the Adam optimizer, with a learning rate of 0.001. Batch size: 256. Maximum number of iterations: 100.
[0082] In this embodiment, the outputs of the factorization machine model and the DNN model are fused by addition, and the fused result passes through the Sigmoid activation function to output the final prediction value (such as click-through rate or scoring probability).
[0083] S4. DEEPFM model training:
[0084] The goal of model training is to minimize the cross-entropy loss function (Binary Cross-Entropy Loss) in the binary classification task. The training data is divided into a training set and a validation set, and the early stopping mechanism is used to monitor the performance of the validation set (such as AUC or LogLoss) to prevent overfitting.
[0085] First, pre-train the factorization machine model and the DNN model respectively to ensure that the factorization machine model and the DNN model can independently learn useful feature representations.
[0086] During the training process of the factorization machine model, use stochastic gradient descent (SGD) to optimize the parameters of the factorization machine model. The specific parameter settings are: latent vector dimension: 10 (that is, the latent vector representation of each feature is 10-dimensional); learning rate: 0.01; regularization parameter: λ w = 0.001, λ = 0.01 (respectively for the weight parameter w i and the latent vector v iPerform L2 regularization to prevent overfitting); Training batch size: 256; Maximum number of iterations: 100. The training data is divided into a training set and a validation set, and the cross-validation method is used to evaluate the model performance. During the training process, monitor the mean squared error (MSE) or other evaluation metrics (such as AUC, LogLoss) on the validation set, and adjust the parameters of the factorization machine model according to the validation set performance to prevent overfitting. In addition, to further improve the performance of the factorization machine model, the input features can be screened based on the importance of feature interactions, and the features that contribute more to the factorization machine model are retained, thereby reducing the interference of irrelevant features on the performance of the factorization machine model. Finally, the trained factorization machine model can efficiently capture the second-order interaction relationship between user behavior features and provide accurate modeling results for the user behavior prediction task.
[0087] After the factorization machine model and the DNN model are pre-trained, the outputs of the factorization machine model and the DNN model are fused, and the parameters of the factorization machine model and the DNN model are optimized simultaneously in the joint training stage to minimize the loss function of the DeepFM model. This joint training method can make full use of the advantages of the factorization machine model in capturing low-order feature interactions and the ability of the DNN model in learning high-order non-linear feature interactions, thereby improving the overall performance of the DeepFM model.
[0088] Through the DeepFM model, on the basis of the second-order feature interaction modeling of the factorization machine, the DNN can be further used to capture high-order non-linear relationships, thereby significantly improving the effect of user behavior prediction. The final DeepFM model not only has strong expressive ability, but also can effectively process high-dimensional sparse data and is applicable to a variety of recommendation system scenarios.
[0089] S5. Regarding the dynamic change characteristics of user reputation, a time series model based on the Transformer structure is used to model the user behavior data, capture the trend of user reputation changing over time, and through a dynamic weighting mechanism, assign higher weights to recent user behaviors to improve the real-time performance and sensitivity of reputation measurement, while taking into account the overall impact of historical behaviors. The specific process is as follows:
[0090] Specifically, the preprocessed multi-dimensional behavior data of the user in step S1 is arranged in chronological order to construct the input of the time series model. To ensure the consistency of the time series length, a fixed window length (such as 30 days) is used to intercept the multi-dimensional behavior data of the user. If the behavior records are insufficient, they are filled with zeros. The input data is finally constructed as a tensor with a shape of [B, T, F], where B is the batch size, T is the time window length, and F is the feature dimension of each record.
[0091] The Transformer model captures the global dependencies in the time series through the self-attention mechanism, and can effectively model the dynamic change trend of user behavior. The structure and parameter settings of the time series model are as follows:
[0092] Embedding layer: It is used to map the input data to a fixed dimension (such as 64 dimensions) through a fully connected layer, and add positional encoding to retain the time order information.
[0093] Encoder layer: Adopt 3 layers of Transformer encoders, and each layer contains the following components: multi-head self-attention mechanism, with 8 heads and a hidden dimension of 64; feed-forward network (FFN), including two layers of fully connected networks, with a hidden layer dimension of 128 and an activation function of ReLU; normalization layer, used to stabilize the training process; residual connection, used to alleviate the problem of gradient disappearance.
[0094] Output layer: Use the encoder to finally output a tensor with a shape of [B, T, H], where H is the hidden layer dimension (64). Through global pooling or dynamic weighting mechanism, the time dimension is aggregated into a single user reputation score.
[0095] In this embodiment, in step S5, to improve the real-time performance and sensitivity of user reputation, a dynamic weighting mechanism is adopted to assign different weights to user behaviors at different time points. Specifically:
[0096] On the one hand, according to the behavior timestamp, use the exponential decay function to calculate the time decay weight w of the behavior at time point t t =e -·Δt , where Δt is the difference between the current time and the behavior time, and α is the decay coefficient (such as 0.1). The weight of recent behaviors is higher, and the weight of historical behaviors gradually decreases.
[0097] On the other hand, calculate the attention score of each behavior through the self-attention mechanism, and use it as the attention weight for dynamically aggregating the time series output.
[0098] The time decay weight is mainly used to weight behaviors according to the time when the behaviors occur, so as to highlight the importance of recent behaviors; while the attention weight is calculated based on the content and context information of the behaviors through the self-attention mechanism, and is used to further adjust the weights of the behaviors. In this embodiment, the time decay weight and the attention weight are used in combination to more comprehensively reflect the importance of the behaviors and their impact on the user's reputation. When calculating the output of the time series, the time decay weight and the attention weight of each behavior are multiplied to obtain the final weighted score of each behavior, and then these weighted scores are aggregated to obtain the dynamic change trend of the user's reputation.
[0099] Furthermore, the goal of the time series model is to predict the change trend of the user's reputation or the behavior score. In this embodiment, the Mean Squared Error (MSE) is used as the loss function. The training parameters of the time series model are set as follows:
[0100] Optimizer: AdamW optimizer, the learning rate is 0.001, and the weight decay coefficient is 0.01; Batch size: 128; Maximum number of training epochs: 50; Learning rate scheduling: Adopt the learning rate warm-up (Warmup) strategy, linearly increase the learning rate in the first 10 epochs, and then use the cosine annealing (Cosine Annealing) strategy to gradually decrease the learning rate.
[0101] In the training of the time series model, cross-validation is performed using the training set and the validation set, and the time-based split method is used to ensure the consistency of the time order of the training data and the validation data. The evaluation metrics include the Mean Squared Error (MSE), the Time-Weighted MSE, and the time sensitivity score of the prediction result.
[0102] S6. Update of the user reputation score. In order to cope with the dynamic changes of user behaviors, the method of this embodiment uses an online learning algorithm (such as the Follow-the-Regularized-Leader (FTRL) algorithm or the online learning method based on gradient update) to achieve real-time update of the user reputation score. The online learning algorithm uses an incremental learning method to quickly update the parameters of the DeepFM model (including the parameters of the factorization machine model and the DNN model) while receiving new data, ensuring that the DeepFM model can efficiently adapt to the changes of user behaviors in a dynamic environment, thereby improving the real-time performance and accuracy of the reputation score.
[0103] Specifically, the online learning algorithm receives user behavior data in the form of streaming data. The online learning algorithm will perform incremental updates according to the newly added user behavior data without reloading all historical behavior data.
[0104] More specifically, in this embodiment, the Follow-The-Regularized-Leader (FTRL) algorithm is adopted as the core method for online learning. By introducing a regularization term into the gradient update, the FTRL algorithm can efficiently handle high-dimensional sparse features in a dynamic environment, with strong adaptability and high computational efficiency. Its update formula is as follows:
[0105] Weight update: z i is the cumulative squared gradient, α is the learning rate, and g i is the current gradient.
[0106] Regularization update: Controls the model complexity through L1 and L2 regularization to avoid overfitting.
[0107] Furthermore, in this embodiment, the input data of the online learning algorithm is processed as follows:
[0108] For categorical features (such as user ID, product ID, etc.), one-hot encoding or hash encoding is used to adapt to the input of high-dimensional sparse features.
[0109] The numerical features (such as transaction amount, rating, etc.) are normalized to ensure that the gradient update amplitudes of different features are within a reasonable range, and the convergence speed of the DeepFM model is improved.
[0110] In this embodiment, after receiving new data each time, the parameters of the DeepFM model are immediately updated through the FTRL algorithm without retraining the entire DeepFM model. To balance real-time performance and the impact of historical behavior, a fixed-length sliding window (such as the data of the most recent 30 days) is used to limit the update range of the DeepFM model, and only the features within the sliding window are incrementally learned. Additionally, the learning rate is dynamically adjusted according to the characteristics of the data stream. The initial learning rate is set to 0.01 and gradually decreases as the amount of data increases to prevent parameter oscillation.
[0111] In this embodiment, the parameter settings of the FTRL algorithm are as follows: learning rate (α): 0.01; L1 regularization coefficient: 0.1; L2 regularization coefficient: 1.0; sliding window length: 30 days; batch update size: 1 (update one by one) or mini-batch (such as 10 data).
[0112] In this embodiment, the method further includes evaluating and validating the performance of the online learning algorithm, the DeepFM model, and the time series model. Specifically, it is necessary to not only evaluate the efficiency and stability of the online learning algorithm when updating the DeepFM model parameters in real time, but also verify the accuracy and robustness of the DeepFM model and the time series model in practical applications. By comprehensively evaluating the performance of the online learning algorithm, the DeepFM model, and the time series model, the real-time nature and accuracy of the user reputation score can be effectively guaranteed.
[0113] More specifically, the performance evaluation includes real-time performance evaluation, latency evaluation, and stability evaluation.
[0114] Real-time performance evaluation: Evaluate the performance of the DeepFM model and the time series model in real time through a Streaming Validation Set. The evaluation metrics include LogLoss, AUC (for classification tasks), or mean squared error (MSE, for regression tasks).
[0115] Latency evaluation: Evaluate the update latency of the online learning algorithm after receiving new data to ensure that the update time is within the millisecond level (e.g., less than 50 ms).
[0116] Stability evaluation: Ensure the stability of the DeepFM model in a dynamic environment by monitoring the magnitude of the DeepFM model parameter updates and the changes in the prediction results.
[0117] In this embodiment, the online learning algorithm is implemented based on Python, using LibFFM or a custom FTRL optimizer. The online learning algorithm is deployed into a real-time computing framework (such as Apache Flink or Kafka Streams) and seamlessly integrated with the data stream processing system. Additionally, by periodically saving DeepFM model checkpoints, it is ensured that the system can continue to learn from the latest state after a failure recovery.
[0118] S7. To improve the robustness of user reputation measurement, this embodiment uses graph anomaly detection (such as GraphAutoencoder or GNN-based Outlier Detection) to detect and mask abnormal patterns in user behavior, thereby effectively identifying malicious behaviors (such as false ratings, brush orders, etc.) and reducing the interference of noisy data on the user reputation evaluation results. By constructing a user-behavior-object graph structure, capturing the complex relationships between entities, and using the characteristics of graph neural networks (GNNs) to detect potential abnormal behaviors. The specific process is as follows:
[0119] S7.1. Graph Construction: Users, behaviors (such as ratings, comments), and objects (such as products, services) are respectively defined as nodes in the graph. Edges between nodes are constructed based on user behavior data. For example, the rating relationship between a user and a product, and the interaction relationship between users (such as friends or products with common ratings). The attributes of the edges include rating values, comment sentiment scores, timestamps, etc. Then, a heterogeneous graph is constructed. Nodes and edges have different types and attributes to capture diverse relationships.
[0120] Specifically, preprocess the user behavior (such as rating mean, rating variance), object (such as product category, price range), and time characteristics (such as behavior time interval) for each node. Among them, numerical features are normalized to ensure consistent scales of different features, and PCA or an embedding layer is used to map high-dimensional sparse features to a low-dimensional space to reduce computational complexity.
[0121] S7.2. As an implementation, use a Graph Autoencoder (GAE) to perform embedding representation learning on the heterogeneous graph constructed in step S7.1, and detect abnormal nodes through reconstruction error. Specifically, based on a Graph Neural Network (GNN) (such as GCN or GraphSAGE), extract the low-dimensional embedding representation of the nodes. Then, reconstruct the edge relationship between nodes through an inner product decoder or an MLP, calculate the reconstruction error as an abnormal score, and determine whether it is an abnormal node according to a set threshold (such as the 95th percentile).
[0122] Specifically, the structure and parameter settings of the Graph Neural Network (GNN) are as follows:
[0123] Number of network layers: 2 layers of GCN or GraphSAGE.
[0124] Hidden layer dimension: 64.
[0125] Activation function: ReLU.
[0126] Neighbor aggregation method: Mean Aggregation or Max Aggregation.
[0127] For the Inner Product Decoder, use the mean square error (MSE) of the edge reconstruction error as the optimization objective: A ij is the actual edge relationship, is the reconstructed edge relationship; ε represents the set of edges in the graph, that is, the set of all actually existing edges. i and j respectively represent the node indices in the graph. (i, j) represents an edge between node i and node j, and (i, j) ∈ ε means there is an edge between node i and node j.
[0128] As another implementation, the graph anomaly detection model GNN-based Outlier Detection (such as DOMINANT or ONE-GNN) is adopted to directly detect abnormal nodes through a supervised or semi-supervised manner.
[0129] Furthermore, in this embodiment, during the training processes of the graph autoencoder and the graph anomaly detection model, an optimizer is used to update the parameters, overfitting is avoided through regularization, and a subsampling strategy can be adopted to improve the training efficiency. In addition, an early stopping strategy is used to prevent the model from overfitting during training. Specifically:
[0130] Optimizer: Adam optimizer, with a learning rate of 0.001.
[0131] Regularization: Overfitting is avoided through L2 regularization, and the weight decay coefficient is set to 0.01.
[0132] Training data: The subsampling (Subgraph Sampling) strategy of the graph is adopted, and some nodes and edges are randomly sampled for training to improve the computational efficiency.
[0133] Number of training rounds: 100 rounds, and the early stopping strategy is adopted to avoid overfitting.
[0134] Furthermore, in this embodiment, the detected abnormal nodes or edges are masked, specifically including: deleting abnormal scoring or review data, reducing the reputation weight of abnormal users, marking abnormal products and restricting their influence in user reputation evaluation.
[0135] Furthermore, in this embodiment, the method further includes the evaluation and verification of the graph autoencoder and the graph anomaly detection model. When verifying the graph autoencoder, the focus is on evaluating the accuracy and efficiency of its reconstructed graph; when verifying the graph anomaly detection model, the focus is on evaluating its detection ability and robustness for abnormal nodes. Specifically including:
[0136] Evaluation metrics: AUC, Precision@K, and F1-Score are used to evaluate the performance of anomaly detection.
[0137] Verification method: Verification is carried out through a manually labeled anomaly dataset or synthetic anomaly data (such as inserting false scores).
[0138] Robustness analysis: Evaluate the performance of the graph autoencoder and the graph anomaly detection model under different anomaly ratios and data noise levels to ensure their detection ability and robustness for malicious behaviors.
[0139] S8. To achieve accurate calculation and real-time output of user reputation scores, the prediction results of the DeepFM model, the prediction results of the time series model, and the output of the graph autoencoder or graph anomaly detection model in step S7 are combined, and joint training is carried out through a multi-task learning framework (MTL, Multi-Task Learning) to comprehensively evaluate the reputation performance of users. It can not only integrate multi-source information but also improve the accuracy and real-time performance of reputation scores through collaborative optimization between models. Finally, the user's reputation score is output to the online platform in real time for scenarios such as user recommendation and credit assessment.
[0140] Specifically, the input data of the multi-task learning framework is first processed as follows:
[0141] First, numerical features (such as average score, anomaly score, etc.) are normalized to ensure that the scales of features from different sources are consistent. Then, the user behavior feature embeddings generated by the DeepFM model (such as scoring preferences, interaction patterns), the dynamic prediction results of the time series model (such as behavior trends, recent activity), and the output of the graph autoencoder or graph anomaly detection model (such as anomaly score markers, behavior credibility) are concatenated to form the final input feature vector.
[0142] Finally, the processed data is constructed into an input tensor with a shape of [B, F], where B is the batch size and F is the dimension of the fused features.
[0143] In this embodiment, the multi-task learning framework adopts a structure with a shared underlying network and task-specific branches; the network structure of the shared underlying network includes a 3-layer fully connected neural network (MLP), with hidden layer dimensions of 128, 64, and 32 respectively, the activation function is ReLU, and regularization uses Dropout (probability 0.5) and L2 regularization (weight decay coefficient 0.01). The input of the multi-task learning framework is the feature vector after concatenation and processing, including the user behavior feature embeddings generated by the DeepFM model, the dynamic prediction results of the time series model, and the output of the graph autoencoder or graph anomaly detection model. The shared underlying network performs unified feature extraction and transformation on these input features to generate a shared feature representation. Then, based on the shared features, dedicated branches are set for the DeepFM model, the time series model, and the graph autoencoder or graph anomaly detection model for independent prediction tasks. The DeepFM model is used to predict the user's behavior preference score, the time series model is used to predict the user's recent behavior activity or trend score, and the graph autoencoder or graph anomaly detection model outputs the confidence score of abnormal behaviors. Based on the output of the task branches, the final reputation score is calculated through weighted linear combination: S = w 1 ·S FM +w 2 ·STS +w 3 ·(1 - S Anomaly ) where S FM , S TS and S Anomaly respectively represent the output scores of the DeepFM model, the time - series model, and the graph auto - encoder or graph anomaly detection model, and w 1 , w 2 , w 3 are weight parameters (with initial values of 0.4, 0.4, 0.2, which can be dynamically adjusted through training).
[0144] In this embodiment, the multi - task learning framework adopts a weighted loss function to jointly optimize the objectives of different tasks: is the regression loss of the FM model (such as the mean squared error MSE), is the prediction loss of the time - series model (such as Huber Loss), is the classification loss of the graph auto - encoder or graph anomaly detection model (such as cross - entropy loss). The weights λ 1 , λ 2 , λ 3 have an initial value of 1 and can be dynamically adjusted through hyperparameter tuning.
[0145] In this embodiment, the training and optimization of the multi - task learning framework specifically include:
[0146] Optimizer: Adam optimizer, with a learning rate of 0.001.
[0147] Training strategy: Adopt a staged training strategy. First, train the deepFM model, the time - series model, and the graph auto - encoder or graph anomaly detection model separately, and then jointly train the multi - task learning model. Batch size: 32. Number of training epochs: 100 epochs, adopt an early - stopping strategy (stop when the performance on the validation set has not improved for 10 consecutive epochs).
[0148] In this embodiment, deploy the deepFM model, the time - series model, and the graph auto - encoder or graph anomaly detection model through an online inference service (such as TensorFlow Serving or PyTorch Serve), receive user behavior data in real - time and calculate the reputation score, and control the response time within 50 ms. The reputation score is mapped to the [0, 1] interval through the Sigmoid function for easy application in different scenarios. In addition, bind the reputation score to the user ID and output it in JSON format.
[0149] In this embodiment, there is also an evaluation and verification of the multi - task learning framework, which specifically includes:
[0150] Evaluation metrics: The performance of the multi-task learning framework is comprehensively evaluated using the mean squared error (MSE), AUC, and F1-Score.
[0151] Validation set construction: A validation set is constructed using historical user behavior data and manually labeled abnormal behavior data to ensure the robustness of the multi-task learning framework in different scenarios.
[0152] Importance analysis: The contribution of the outputs of each module to the reputation score is analyzed using methods such as SHAP values to verify the interpretability of the multi-task learning framework.
[0153] In the multi-task learning framework, by comprehensively evaluating the performance of each deepFM model, time series model, and graph autoencoder or graph anomaly detection model, the robustness and interpretability of the entire framework are ensured in different scenarios.
[0154] For those skilled in the art, various corresponding changes and deformations can be given based on the above technical solutions and concepts, and all such changes and deformations should be included within the protection scope of the claims of the present invention.
Claims
1. A method for measuring online user reputation based on factorization machine, characterized in that: The steps include: S1. First, collect multidimensional behavior data of users from the online platform, wherein the multidimensional behavior data includes user rating records, comment texts, transaction records, and the frequency of interaction between users and other users, and pre-process the collected multidimensional behavior data of users; In the processing of comment text, a pre-trained language model is used to analyze the comment text. First, the comment text is segmented and standardized. Then, the comment text obtained after segmentation and standardization is input into the pre-trained model for feature extraction. The extracted features include sentiment tendency, sentiment intensity and the subject information of the comment. S2. Based on the multi-dimensional behavior data of the user processed in step S1 and the interaction data of the user on the online platform, construct a variety of user behavior features, wherein the user behavior features specifically include user historical behavior features, time features, platform interaction features, and social embedding features generated based on graph neural networks; The generated user historical behavior features, time features, platform interaction features, and social embedding features are concatenated to form a high-dimensional feature vector, and the obtained high-dimensional feature vector is standardized to ensure the dimensional consistency between different features; S3. Construction of DeepFM, a deep factorization machine model: The structure of the DeepFM model includes a factorization machine model and a DNN model. The factorization machine model is used to capture the second-order interaction relationship between user behavior features, and the DNN model is used to extract the high-order interaction relationship of user behavior features layer by layer through a deep learning network. The user reputation evaluation result output by DeepFM is the fusion result of the factorization machine model and the DNN model. The specific formula is: Where σ is the activation function, FM(x) is the output of the factorization machine model, and DNN(x) is the output of the DNN model; S4. DEEPFM model training: First, the factorization machine model and the DNN model are pre-trained separately to ensure that the factorization machine model and the DNN model can independently learn useful feature representations; After the pre-training of the factorization machine model and the DNN model is completed, the outputs of the factorization machine model and the DNN model are fused, and the parameters of the factorization machine model and the DNN model are optimized simultaneously in the joint training stage to minimize the loss function of the DeepFM model; S5. Arrange the multi-dimensional behavior data of the user preprocessed in step S1 in chronological order to construct the input of the time series model based on the Transformer structure; to ensure the length consistency of the time series, use a fixed window length to intercept the multi-dimensional behavior data of the user, and fill it with zeros if the behavior record is insufficient; the input data is finally constructed into a tensor with a shape of [B, T, F], where B is the batch size, T is the time window length, and F is the feature dimension of each behavior record; S6. Update of user reputation score: In order to cope with the dynamic changes of user behavior, the method of this embodiment adopts an online learning algorithm to achieve real-time update of user reputation score; the online learning algorithm updates the parameters of the DeepFM model while receiving new data through incremental learning, ensuring that the DeepFM model can efficiently adapt to changes in user behavior in a dynamic environment, thereby improving the real-time and accuracy of the reputation score; S7. Use graph anomaly detection to detect and shield abnormal patterns in user behavior, thereby effectively identifying malicious behavior and reducing the interference of noise data on user reputation evaluation results: S7.
1. Graph construction: Users, behaviors, and objects are defined as nodes in the graph respectively; edges between nodes are constructed based on user behavior data, and the attributes of the edges include rating values, comment sentiment scores, and behavior timestamps; then a heterogeneous graph is constructed, where nodes and edges have different types and attributes to capture diverse relationships; S7.2, using graph autoencoding to learn the embedding representation of the heterogeneous graph constructed in step S7.1, and detecting abnormal nodes through reconstruction error: extracting low-dimensional embedding representation of nodes based on graph neural network GNN, and then reconstructing the edge relationship between nodes through inner product decoder or MLP, calculating the reconstruction error as the abnormality score, and judging whether it is an abnormal node according to the set threshold; or, Adopt graph anomaly detection model to directly detect abnormal nodes in a supervised or semi-supervised manner; S8. In order to achieve accurate calculation and real-time output of user reputation scores, the prediction results of the DeepFM model, the prediction results of the time series model, and the output of the graph autoencoder or graph anomaly detection model in step S7 are combined and jointly trained through a multi-task learning framework to comprehensively evaluate the user's reputation performance.
2. The method according to claim 1, characterized in that: In step S1, the missing values in the collected original data are filled by multiple interpolation; for numerical data, a filling strategy based on a combination of mean interpolation and regression interpolation is used; for categorical data, a frequency-based mode interpolation method is used; in addition, in order to ensure the dimensional consistency between different features, all numerical data are normalized.
3. The method according to claim 1, characterized in that In step S1, the pre-trained language model uses a BERT model fine-tuned on the target domain, and its parameter settings include: hidden layer size is 768, the number of Transformer layers is 12, the number of attention heads is 12, the maximum sequence length is 128, the learning rate is set to 2e-5, and the training batch size is 32.
4. The method according to claim 1, characterized in that In step S2, the user's rating mean, rating variance, comment sentiment score mean and comment word count mean are extracted based on the user's historical behavior characteristics, wherein the comment sentiment score mean is calculated by combining the sentiment tendency feature and sentiment intensity feature extracted from the comment text in step S1. For each comment of the user, its corresponding sentiment tendency and sentiment intensity are combined to generate a sentiment score. Finally, the sentiment scores of all the user's comments are averaged to obtain the user's comment sentiment score mean; For time features, construct the time difference features between the user's most recent active time and the current time, the time difference features between the first active time and the current time, and the user's behavior distribution features in different time periods; Then, based on the platform interaction characteristics, the interaction characteristics between users and their trading counterparts are constructed, including the mean rating of the trading counterparts, the mean sentiment score of the comments, and the mean transaction amount; among them, the mean rating of the trading counterparts refers to the average of the ratings given by the trading counterparts in all transactions, and the mean sentiment score of the trading counterparts’ comments refers to the average of the sentiment scores of all the comments of the trading counterparts, which is used to quantify the overall sentiment tendency of the comments of the trading counterparts; In addition, the specific generation process of the social embedding features of users in the social relationship graph is: Firstly, a social relationship graph is constructed, in which nodes represent users, edges represent the interaction relationships between users, and the weights of edges are defined based on the interaction frequency or transaction amount. Then, the graph sampling and aggregation GraphSAGE model is used to embed the social relationship graph. In the GraphSAGE model, node embedding is generated by aggregating the features of neighbor nodes layer by layer. The social embedding features of users include not only their own behavioral features, but also the behavioral features of their neighbor nodes, thereby capturing the structured relationships of users in social networks.
5. The method according to claim 4, characterized in that In step S2, the time features are generated using a sliding window to calculate the user's behavior statistics within the time period of the sliding window to reflect the user's short-term and long-term behavior trends. The behavior statistics include the user's behavior distribution characteristics in different time periods, the time difference characteristics between the user's most recent active time and the current time, and the time difference characteristics between the user's first active time and the current time.
6. The method according to claim 1, characterized in that In step S3, the DNN model consists of a multi-layer fully connected neural network, specifically: Input layer: used to concatenate the dense representations of all features into an input vector of fixed length; Hidden layer: uses a 3-layer fully connected network, with 256, 128, and 64 neurons in each layer; Activation function: each hidden layer uses the ReLU activation function; Regularization: a Dropout layer is added after each hidden layer, with a Dropout ratio of 0.5; Optimizer: Use Adam optimizer with a learning rate of 0.001; batch size: 256; maximum number of iterations:
100.
7. The method according to claim 1, characterized in that During the factorization machine model training process, stochastic gradient descent is used to optimize the parameters of the factorization machine model. The specific parameters are set as: Hidden vector dimension: 10; learning rate: 0.01; regularization parameter: λ w =0.001,λ v =0.01,λ w and λ v The weight parameters w i and the latent vector v i L2 regularization is performed to prevent overfitting; training batch size: 256; maximum number of iterations: 100; The training data is divided into a training set and a validation set, and cross-validation is used to evaluate the model performance. During the training process, the evaluation indicators on the validation set are monitored, and the parameters of the factorization machine model are adjusted according to the performance of the validation set to prevent overfitting. In addition, in order to further improve the effect of the factorization machine model, the input features are screened based on the importance of feature interactions, and the features that contribute more to the factorization machine model are retained, thereby reducing the interference of irrelevant features on the performance of the factorization machine model.
8. The method according to claim 1, characterized in that In step S5, the structure and parameter settings of the time series model are as follows: Embedding layer: used to map the input data to a fixed dimension through a fully connected layer and add time position encoding to preserve the time order information; Encoder layer: A 3-layer Transformer encoder is used, each layer contains the following components: a multi-head self-attention mechanism with 8 heads and a hidden dimension of 64; a forward fully connected network with two layers of fully connected networks, a hidden layer dimension of 128, and an activation function of ReLU; a normalization layer to stabilize the training process; and a residual connection to alleviate the gradient vanishing problem. Output layer: The encoder finally outputs a tensor of shape [B, T, H], where H is the hidden layer dimension; through global pooling or dynamic weighting mechanism, the time dimension is aggregated into a single user reputation score.
9. The method according to claim 1, characterized in that: In step S5, in order to improve the real-time and sensitivity of user reputation, a dynamic weighting mechanism is used to assign different weights to user behaviors at different time points; On the one hand, according to the behavior timestamp, the time decay weight w of the behavior at time point t is calculated using the exponential decay function t =e -α·Δt , where Δt is the difference between the current time and the behavior time, and α is the attenuation coefficient; the weight of recent behavior is higher, and the weight of historical behavior gradually decreases; On the other hand, the attention score of each behavior is calculated through the self-attention mechanism and used as the attention weight for dynamic aggregation of time series output; The time decay weight is mainly used to weight the behavior according to the time when the behavior occurred, so as to highlight the importance of recent behavior; while the attention weight is calculated based on the content and context information of the behavior through the self-attention mechanism, and is used to further adjust the weight of the behavior; The time decay weight and attention weight are used in combination. When calculating the output of the time series, the time decay weight and attention weight of each behavior are multiplied together to obtain the final weighted score of each behavior. These weighted scores are then aggregated to obtain the dynamic change trend of user reputation.
10. The method according to claim 1, characterized in that In step S8, the multi-task learning framework adopts a structure of a shared underlying network and task-specific branches; the network structure of the shared underlying network includes a 3-layer fully connected neural network, the hidden layer dimensions are 128, 64 and 32 respectively, the activation function is ReLU, and the regularization adopts Dropout and L2 regularization; the concatenated and processed feature vector includes the user behavior feature embedding generated by the DeepFM model, the dynamic prediction results of the time series model, and the output of the graph autoencoder or the graph anomaly detection model; the shared underlying network performs unified feature extraction and transformation on the input features to generate a shared feature representation; Then, based on the shared features, dedicated branches are set for the DeepFM model, time series model, and graph autoencoder or graph anomaly detection model for independent prediction tasks. The DeepFM model is used to predict the user's behavior preference score, the time series model is used to predict the user's recent behavior activity or trend score, and the graph autoencoder or graph anomaly detection model outputs the confidence score of the abnormal behavior. Based on the output of the task branch, the final reputation score is calculated through weighted linear combination: S = w1·S FM +w2·S TS +w3·(1-S Anomaly ) Among them, S FM , S TS and S Anomaly They represent the output scores of the DeepFM model, time series model, and graph autoencoder or graph anomaly detection model respectively, and w1, w2, and w3 are weight parameters.
Citation Information
Patent Citations
Real-time brand reputation evaluation method based on social media
CN116862575A