E-commerce platform click conversion rate prediction method and system based on time perception
By constructing a user-time-product tripartite graph and a multi-layer neural network model, the problems of dynamic evolution of user interests and product cycle differences were solved, enabling accurate prediction of click-through rates and improving the user experience and marketing efficiency of e-commerce platforms.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHONGQING UNIV OF POSTS & TELECOMM
- Filing Date
- 2025-12-19
- Publication Date
- 2026-04-24
AI Technical Summary
Existing click-through rate (CTR) prediction methods struggle to effectively handle the complex relationships between users and products, the dynamic evolution of user interests, and the cyclical differences in product sales, resulting in insufficient prediction accuracy.
A user-time-product tripartite graph is constructed, and an embedding representation is performed using a representation learning method. User interest behavior is extracted by combining a multilayer long short-term memory network, product sales cycle patterns are extracted using a time-weighted gating recurrent unit, and prediction is performed using a multilayer perceptron.
It enables accurate prediction of user behavior and product sales trends, improves the accuracy of click-through rate prediction, and supports personalized recommendations and marketing strategy optimization for e-commerce platforms.
Smart Images

Figure CN121921046A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the technical field of e-commerce recommendation systems, and relates to a method and system for predicting click conversion rates on e-commerce platforms based on time awareness. Background Technology
[0002] With the rapid development and widespread adoption of internet technology, e-commerce platforms have gradually become the preferred channel for people's daily shopping and consumption. Against this backdrop, effectively improving user click-through rates (CTR) has become a crucial component of e-commerce platforms' core competitiveness. CTR prediction technology not only plays a vital role in recommendation systems but is also widely used in search engine optimization, online advertising, and personalized marketing. Its accuracy directly impacts the platform's user experience and commercial value.
[0003] Some large internet companies have already deployed deep interest network models in their actual systems. These models can adaptively learn the potential interest patterns implied by users' historical behavior, thereby significantly improving the prediction accuracy of click-through rates (CTR). However, existing CTR prediction methods still face a series of serious challenges.
[0004] First, the relationship between users and products is extremely complex. E-commerce platforms generate an exceptionally large amount of interactive data, which not only reflects users' shopping habits and interests but is also crucial for predicting product sales. Constructing a feature space that clearly represents the complex relationship between users, products, and time is the primary challenge currently faced.
[0005] Secondly, accurately quantifying the long-term and short-term dependencies between user interests and behavior over time is a crucial issue. User interests are not static but evolve dynamically with time, seasons, and holidays. Long-term interests reflect the stability of user preferences, while short-term interests exhibit immediacy and volatility. These two dependencies are intertwined, and effectively learning and distinguishing them within a single model is highly complex.
[0006] Finally, the sales cycles of different types of goods vary significantly. For example, the sales of seasonal goods such as down jackets and swimwear exhibit clear cyclical fluctuations. If the unique cyclical patterns of different goods cannot be accurately captured, the predictive model will produce large errors. Therefore, enabling the model to learn and adapt to these cyclical differences is another important challenge.
[0007] In summary, existing technologies struggle to simultaneously address the three core challenges of complex relationship modeling, dynamic evolution of user interests, and learning product lifecycle differences. Therefore, a novel click-through rate prediction model is urgently needed, capable of deeply integrating time-awareness capabilities to more accurately predict user behavior and product sales trends. Summary of the Invention
[0008] In view of this, the purpose of the present invention is to provide a time-aware method and system for predicting click conversion rates on e-commerce platforms.
[0009] To achieve the above objectives, the present invention provides the following technical solution:
[0010] A time-aware method for predicting click-through rate (CTR) on e-commerce platforms, comprising the following steps: constructing a user-time-product ternary graph, denoted as G. utc ={U i ∪T j ∪C k M ut ∪M tc}, where U i T j C k M represents the user node, time node, and product node, respectively. ut M is a matrix representing the relationship between users and time. tc The relationship matrix between time and goods is generated; a representation learning method is used to embed the user-time-goods tripartite graph to obtain low-dimensional vector representations of users, time, and goods; a user interest matrix is generated by extracting user long-short-term interest behaviors based on a multilayer long short-term memory network (LSTM); a product cycle pattern is generated by extracting the periodic patterns of product sales based on a time-weighted gated recurrent unit (TW-GRU); and the click-through rate is predicted by fusing the user interest matrix and the product cycle pattern through a multilayer perceptron (MLP).
[0011] Furthermore, the embedding representation of the user-time-item tripartite graph using the representation learning method specifically includes: performing a random walk on the user-item graph to generate a node sequence, wherein the user-item graph is represented as G. u = (U, C, E), where U is the set of user nodes, C is the set of product nodes, and E is the set of edges; the node sequence is trained using a Skip-Gram model to maximize the objective function. Where V is the set of all nodes, θ(t) is the set of context nodes of node v, and P(u|v) uses the softmax function to represent the co-occurrence probability; and by introducing time features, the user-time-product tripartite graph is updated to G. utc Maximize the co-occurrence probability containing time information: commonP2 = maxΠ v∈V Π t∈TΠ u∈θ(v,t) logP(u|v,t), where θ(v,t) is the set of context nodes of node v at time t.
[0012] Furthermore, the extraction of user long-term and short-term interest behaviors based on multi-layer LSTM specifically includes: processing the user behavior sequence Ub={(u1,c1,t... 1, b1)...(u n ,c n ,t n, b n )} as input, where u i Indicates the user identifier, c i Indicates product identification, t i Indicating time characteristics, b i It represents the behavior type; processes short-term fluctuations in user data through a low-level LSTM network to output intermediate features; extracts long-term user trends through a high-level LSTM network to output user interest features; and introduces an attention mechanism to calculate the user's attention weights to items at different time steps. The final user interest matrix Ui·mat(t) = U is obtained through normalization. i *(T t +C j ).
[0013] Furthermore, the attention weights are calculated using the formula... in It represents the hidden state of the i-th LSTM layer at time t, and the score function is calculated using the tanh activation function.
[0014] Furthermore, the extraction of the periodic pattern of product sales based on TW-GRU specifically includes: dividing the product sales data set Ccycle={(c,s t )|s t ∈S} as input, where c represents the product identifier, s t This represents the sales performance of a product at time t; a time weighting factor is introduced. Where T is the current time, t i It is the timestamp of the i-th time step, and τ is the time constant; adjust the update gate z of TW-GRU. t Reset door r t and hidden state h t The calculation is made to be affected by the time weighting factor; and periodic features are introduced, including sine and cosine representations of daily, weekly and annual cycles, to generate a commodity cycle pattern CT(i)={t|t∈T}.
[0015] Furthermore, the periodicity feature is expressed by the formula and It is represented as follows, where t is the timestamp, T is the period length, the daily period T = 24 hours, the monthly period T = 30 days, and the annual period T = 365 days.
[0016] Furthermore, the step of fusing the user interest matrix and the product cycle pattern to predict the click-through rate using an MLP specifically includes: concatenating the user interest matrix U and the product cycle pattern P into a feature vector C = [U, P]; inputting the feature vector C into an MLP, wherein the MLP includes at least two hidden layers, each using the ReLU activation function, and the output layer using a linear activation function; and employing the Huber loss function as the loss function, wherein the Huber loss function combines mean squared error (MSE) and mean absolute error (MAE), and optimizes the model parameters through backpropagation and gradient descent algorithms.
[0017] A time-aware e-commerce platform click-through rate prediction system, the system comprising: a ternary graph construction module, used to construct a user-time-product ternary graph, wherein the user-time-product ternary graph is represented as G. utc ={U i ∪T j ∪C k M ut ∪M tc}, where U i T j C k The system comprises three modules: a user node, a time node, and a product node; a representation learning module connected to the ternary graph construction module, used to embed the user-time-product ternary graph using a representation learning method to obtain low-dimensional vector representations of users, time, and products; a user interest learning module connected to the representation learning module, used to extract user long-term and short-term interest behaviors based on a multi-layer LSTM to generate a user interest matrix; a product cycle extraction module connected to the representation learning module, used to extract the periodic patterns of product sales based on TW-GRU to generate a product cycle pattern; and a prediction module connected to the user interest learning module and the product cycle extraction module, used to fuse the user interest matrix and the product cycle pattern to predict the click-through rate using an MLP.
[0018] Furthermore, the representation learning module specifically includes: a random walk unit, used to generate a node sequence by performing a random walk on the user-item graph; a Skip-Gram training unit, connected to the random walk unit, used to train the node sequence using the Skip-Gram model; and a time extension unit, connected to the Skip-Gram training unit, used to introduce time features and update the embedding representation of the user-time-item tripartite graph.
[0019] Furthermore, the prediction module specifically includes: a splicing unit for splicing the user interest matrix and the product cycle pattern into a feature vector; an MLP processing unit connected to the splicing unit for inputting the feature vector into an MLP for nonlinear transformation; and a loss optimization unit connected to the MLP processing unit for optimizing model parameters using the Huber loss function.
[0020] The beneficial effects of this invention are as follows:
[0021] (1) This invention constructs a user-time-product tripartite graph, deeply integrating the time dimension as the core element with users and products, thereby constructing a feature space with complete information. Furthermore, by employing representation learning methods, it can automatically learn effective low-dimensional vector representations from complex interaction data, overcoming the shortcomings of traditional methods in depicting complex relationships between multiple entities, and laying a solid foundation for subsequent accurate prediction.
[0022] (2) The multi-layer long short-term memory network structure designed in this invention innovatively separates and models the short-term fluctuations and long-term trends of user interests. The lower-layer network focuses on capturing recent real-time changes in user interests, while the higher-layer network is dedicated to extracting stable user preference patterns. This hierarchical processing mechanism enables the model to more nuancedly understand and quantify the evolution of user interests over time, thereby more accurately grasping the user's immediate intentions and long-term preferences.
[0023] (3) To address the unique sales cycles of different products, this invention designs a time-weighted gated cyclic unit structure. This structure introduces a time-weighting factor to give higher importance to recent data and explicitly incorporates periodic features, enabling the model to keenly perceive and learn the fluctuation patterns of different cycles such as daily, weekly, monthly, and even yearly sales of products, effectively identifying the cyclical differences of different product categories.
[0024] (4) This invention ultimately integrates a matrix representing users' dynamic interests with signals reflecting product cycle patterns, and performs nonlinear combination and prediction through a multilayer perceptron. This fusion strategy fully utilizes the inherent connection between user behavior and product attributes in the time dimension, so that the prediction results not only reflect users' purchasing intentions, but also take into account the sales patterns of the products themselves, thereby achieving a significant improvement in the accuracy of click-through rate prediction.
[0025] (5) Because this invention can more accurately predict product click-through rates in the future, it can provide more reliable data support for personalized recommendations, precise advertising, inventory management, and promotional strategy formulation for e-commerce platforms. This helps platforms optimize user experience, improve marketing efficiency, and ultimately enhance the platform's core competitiveness.
[0026] Other advantages, objectives, and features of the invention will be set forth in part in the description which follows, and in part will be apparent to those skilled in the art from the following examination, or may be learned from practice of the invention. The objectives and other advantages of the invention can be realized and obtained through the following description. Attached Figure Description
[0027] To make the objectives, technical solutions, and advantages of the present invention clearer, the preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings, wherein:
[0028] Figure 1 This is a diagram of the architecture of the present invention;
[0029] Figure 2 This is a diagram of the prediction model of the present invention. Detailed Implementation
[0030] The following specific examples illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of the present invention. Unless otherwise specified, the following embodiments and features can be combined with each other.
[0031] The accompanying drawings are for illustrative purposes only and are schematic diagrams, not actual pictures. They should not be construed as limiting the invention. To better illustrate the embodiments of the invention, some parts in the drawings may be omitted, enlarged, or reduced, and do not represent the actual product dimensions. It is understandable to those skilled in the art that some well-known structures and their descriptions may be omitted in the drawings.
[0032] In the accompanying drawings of the embodiments of the present invention, the same or similar reference numerals correspond to the same or similar components. In the description of the present invention, it should be understood that if terms such as "upper," "lower," "left," "right," "front," and "rear" indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, they are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, the terms used to describe positional relationships in the drawings are only for illustrative purposes and should not be construed as limiting the present invention. For those skilled in the art, the specific meaning of the above terms can be understood according to the specific circumstances.
[0033] The figure shows the architecture of this invention.
[0034] 1. Problem Definition
[0035] 1.1 Relevant Definitions
[0036] Our goal is to first model user behavior characteristics based on the "user-time" relationship, analyzing and determining users' short-term and long-term interests; then, to model product sales performance based on the "product-time" relationship, learning its cyclical patterns and differences; finally, to combine the above analysis results to predict purchase rates. User behavior characteristics include browsing history, favorites, and purchase records at each moment; product details include order settlement time, product price, category, etc. Below, we will define the basic concepts used in this paper based on the above information.
[0037] Definition 1: Click-through rate (CtPr) = (Purchase | Click).
[0038] Click-to-buy rate (CtPr) is an important metric for measuring website performance and user purchase intent. This article defines CtPr as the probability that a user clicks on a product and then makes a purchase.
[0039] Definition 2 User-Time-Product Association Matrix UTC-matrix = [user i ,time j ,commodity k (1)
[0040] Define this correlation matrix as a three-dimensional matrix, user i This is represented as a user dimension, including the user's personal ID. (time) j This is represented by the time dimension, which refers to the characteristics of different points in time or time periods, including specific dates, days of the week, and time periods. In addition, the time dimension also considers special time factors such as seasonality, holidays, or promotional activities. k This dimension represents the product ID of different products.
[0041] For each element of the matrix q =UTC-matrix[i,time,k], representing a user's behavior or characteristics towards a specific product at a certain point in time or over a period of time. Matrix q =0 indicates that user i has favorited item k at time time. q =X (X∈Z*) represents that user i clicked and viewed k products |X| times within time time. Matrix q =X (X∈-Z*) means that user i purchased item k |X| times at time time.
[0042] Definition 3: User Product Attention uc
[0043] Users' product attention directly reflects their interest in and demand for specific products. High product attention often indicates a stronger purchase intention, which is crucial for users making purchase decisions and improving conversion rates. We define it as:
[0044] Attention uc =Num(timeT) / Num(timeC)*fac (2)
[0045] Where Num(timeT) represents the number of times the product was clicked during the specified time period, and Num(timeC) represents the total number of clicks during the specified time period. The value of fac is determined by three conditions: direct purchase fac = 1.0, adding to cart fac = 0.6, and clicking fac = 0.1.
[0046] Definition 4: Product Cycle Time Weighting Factor Tf ti .
[0047] Based on the division of time periods, a corresponding time weighting factor is defined for each stage, and it is defined as follows:
[0048]
[0049] Where day(j) represents the sales volume of the product on day j, period ti The sales volume during this period. The ratio of days to totalDays represents the ratio of the number of days with sales to the total number of days in the statistics. Fac(x) is the percentage factor. When x=0, it means that the product has been on the market for less than four months, Fac(0)=2; when x=1, it means that the product has been on the market for four to ten months, Fac(1)=1.5; when x=2, it means that the product has been on the market for more than ten months, Fac(2)=1.2.
[0050] Define 5-moment influence Td t .
[0051] Let be the influence function of a user's behavior at time t on a future time t. This paper assumes that the influence of the behavior decays exponentially over time. Here, λ is the decay coefficient, representing the rate at which the influence of the behavior decays over time. Behavior a t The influence decreases as t increases.
[0052] Td t =f(a t ,t,t')=e -λ(t'-t) a t (4)
[0053] 1.2 Problem Formalization
[0054] To address the research question in this paper, we first use a UTC-matrix to represent the information structure of "user-time-product" in an e-commerce system. Secondly, we use Ub = {(u,h} i )|h i ∈H} represents the set of user's historical behaviors, combined with Attention uc To learn about UI-matrix; use Ccycle = {(c, s k )|s k ∈S} represents the set of historical sales data for a product, weighted by the factor Tf. ti After processing the data, the cyclical pattern of the product is analyzed. Finally, based on the UI-matrix, the product's cycle and user interaction data with the product are combined to predict CtPr at the next moment. The problem is defined as follows:
[0055]
[0056] 1.2.1 Problem Input
[0057] Based on the definitions and descriptions in Section 3.1, the input for the research content of this paper is:
[0058] The user behavior data set Ub = {(u,ht)|ht∈H}, where H represents all user behaviors and ht represents the user's specific operation at time t, including operations such as clicking to browse, adding to favorites, and placing orders.
[0059] The sales data set of the product is Ccycle={(c,st)|st∈S}, where S represents all situations in the product sales process, and st represents the product's situation at time t, including order placement, return, etc.
[0060] 2. The UTC-matrix of "user-time-product" has user dimension, time dimension and product dimension. The time dimension includes special time factors such as the characteristics of different time points or time periods.
[0061] 2.2.2 Problem Output
[0062] Based on the above description, we use the model proposed in this paper to solve the following problems:
[0063] 1. The vector representation of "user-time-product" information in the embedding space, denoted as {U i ,T j C lThe UTC2vec method is used to more effectively represent the user-product information space of an e-commerce system by embedding the user-time-product tripartite graph into a low-dimensional vector space.
[0064] 2. User interest matrix Ui·mat(t)=U i *(T t +C j The product cycle pattern CT(i) = {t|t∈T} is determined. A multi-layer LSTM approach is used, with lower-layer networks handling short-term data fluctuations and higher-layer networks extracting long-term trends. A structure incorporating a Time-Weighted Gated Recurrent Unit (TW-GRU) is designed to learn the cycle pattern.
[0065] 3. Based on the above characteristics, predict the click-through rate (CTR). i This paper inputs the user interest matrix and product sales set obtained from the above steps into a multilayer perceptron to predict the click-through rate of products.
[0066] 4 Model Methods
[0067] To address the aforementioned issues, this paper constructs a click-through rate prediction architecture as follows: Figure 1 As shown, we first integrate user basic information data, historical behavior data, and product attribute and sales data from e-commerce platforms to create a three-part feature graph of "user-time-product". We then propose using the UTC2vec method to represent this graph. Next, we design a method based on multi-layer LSTM to extract users' short- and long-term interest behaviors. This method addresses the "user-time" relationship by using a low-level network to handle short-term data fluctuations and a high-level network to extract long-term trends. Then, we design a structure incorporating a Time-Weighted Gated Recurrent Unit (TW-GRU). This structure learns periodic patterns for the "product-time" relationship. Finally, combining user interests, product sales data, and user-product interaction data, we propose a time-aware e-commerce platform click-through rate prediction model.
[0068] 2.1 Representation of "User-Time-Product" Features
[0069] A ternary graph is a graph structure in which nodes are divided into three categories, and related nodes belong to different subsets. We constructed a user-time-item ternary graph network, UTC. The UTC ternary graph is represented as G. utc ={U i ∪T j ∪C k M ut ∪M tc}, where U i T j Ck These represent the user, time, and product, respectively. M ut Let a be the matrix representing the relationship between users and time. ij The elements in the matrix represent the user's action at that moment, such as clicking "browse" (a ij =0), Favorites (a) ij =1), Add to cart (a ij =2), place an order (a) ij =3) etc. M tc This represents the time information of the product being operated on by the user at time t, as well as the product's time on the platform, such as the listing time.
[0070] In real-world e-commerce data, most users are not active in every time period, and many products are not viewed or purchased for most of the time, resulting in highly sparse user-time and product-time matrices. Since the matrix does not contain negative values, this paper uses the Non-Material Value Decomposition (NMF) method to decompose the sparse matrix.
[0071] M ut ≈W1H1 M tc ≈W2H2 (5)
[0072] loss function f m for:
[0073]
[0074] We will f m Minimizing the value of the loss function can effectively address the sparsity in the user-time and product-time matrices.
[0075] Since this paper focuses on predicting the click-through rate of a single product in an e-commerce system, we propose a UTC2vec method that extracts structural features from the "user-product" relationship and represents them as vectors. To represent the complex relationship between users and products, we employ graph embedding techniques to map users and products to a low-dimensional vector space, using random walks and Skip-Gram models for graph embedding.
[0076] First, a random walk is performed on the user-product graph to generate a node sequence. For each node v, a neighboring node is randomly selected with a certain probability for the walk, and this step is repeated until a node sequence of length L is generated. u = (U,C,E) represents the user-product graph, and the node sequence S is generated by a random walk.
[0077] Secondly, the generated node sequence is trained using the Skip-Gram model to obtain a low-dimensional vector representation of the nodes. Our goal is to maximize the co-occurrence probability of the target node and its context nodes:
[0078]
[0079] Here, V is the set of all nodes, θ(v) is the set of context nodes of node v, and we use the softmax function to represent the co-occurrence probability. By optimizing the objective function, we can obtain the embedding vectors u and v of users and items.
[0080]
[0081] Finally, based on the graph embedding described above, we introduce temporal features for expansion. We use temporal information as a third dimension to update the tripartite graph network G. utc Taking time points into account, we maximize the co-occurrence probability containing time information: (θ(v,t) represents the set of context nodes of node v at time t)
[0082] commonP2=max∑ v∈V ∑ t∈T ∑ u∈θ(v,t) logP(u|v,t) (7)
[0083] By optimizing the above objective function, we can obtain a joint embedding representation of users, products, and time.
[0084] 2.2 User Interest Learning
[0085] In e-commerce systems, user interest behaviors can be broadly categorized into short-term and long-term interests. Short-term interests are highly real-time, meaning users may develop an interest in a product and make a purchase decision within a short period. Long-term interests, on the other hand, are relatively stable, with users maintaining sustained interest in a particular type of product or service over a longer period.
[0086] Users' short-term interest behaviors can be captured and analyzed through browsing history, search history, and click behavior, while their long-term interest behaviors can be captured and analyzed through purchase history, comment behavior, and following lists. Therefore, this paper designs a multi-layer LSTM method, where the output of each layer is passed to the next layer.
[0087] User behavior sequence Ub={(u1,c1,t 1, b1)...(u n ,c n ,t n, b n )},u i Represents the user ID, c i Represents the product ID, t i Indicating time characteristics, b iTo represent behavior, we use the embedding vectors u, c, t of users, items, and time, along with timestamp features, as input to construct a multi-layer LSTM model to capture users' short- and long-term interests. The lower-layer LSTM network captures short-term fluctuations in user behavior; its output serves as intermediate features fed into higher-layer LSTMs. The higher-layer LSTM network captures long-term trends in user behavior; the outputs of these layers are used to generate the final interest matrix.
[0088] Each layer of the unit structure includes an input gate, a forget gate, and an output gate, which control the flow of information. This paper designs a three-layer structure. The first layer focuses on processing recent behavioral changes in the user, providing fine-grained feature representations. Its parameters primarily affect the most recent time step, using short-term dependencies and controlling the gate structure to achieve short-term feature extraction. The number of hidden units can be set to 128, balancing model complexity and computational cost.
[0089]
[0090] The second layer extracts intermediate features, enabling it to capture changes in user behavior patterns over a longer timeframe. Its parameters affect multiple time steps. By accumulating short-term features, the mid-layer LSTM can extract intermediate features. The number of hidden units can be set to the same as the first layer to accommodate more feature extraction.
[0091]
[0092] The third-layer LSTM network is used to capture long-term trends in user behavior, process features from the middle-layer LSTM, and further refine long-term patterns of user behavior.
[0093]
[0094] Finally, the fully connected layer flattens the output of the higher-level LSTM and maps it to the final interest matrix.
[0095]
[0096] To ensure that the predicted values of the user interest matrix are as close as possible to the actual values, mean squared error (MSE) loss is used.
[0097]
[0098] In addition, attention is introduced for each LSTM layer. uc To handle the attention weights of users towards products at different time steps. Then normalize the weights:
[0099]
[0100] 2.3 Product lifecycle extraction and click-through rate prediction
[0101] In e-commerce click-through rate (CTR) prediction, the periodicity of product CTR and conversion rates is an important characteristic. Periodicity reflects the regular changes in CTR and conversion rates over time. These changes can occur on a daily, weekly, monthly, or yearly basis. For example, some products may have higher CTR and conversion rates on weekends, while others may perform better during holidays or seasonal promotions.
[0102] Standard RNNs struggle to capture long-term dependencies in time-series data, but TW-GRU enhances this ability by introducing time weights. Simultaneously, the time weighting mechanism ensures the model assigns higher weights to more recent data points, thus focusing more on recent trends and changes. This paper introduces the Time-Weighted Gated Recurrent Unit (TW-GRU).
[0103] TW-GRU, based on the standard GRU, enhances its focus on recent data through a time-weighted mechanism, thereby improving the model's ability to capture periodicity and trends. The formula for calculating the time weight is as follows: (where T is the current time, t...) i (where τ is the timestamp of the i-th time step and τ is the time constant controlling the decay rate.)
[0104]
[0105] Furthermore, by introducing time weights, the input and hidden state updates at each time step are influenced by these time weights. Therefore, we adjust the TW-GRU update formula as follows: (where z...) t and r t These are the update door and the reset door, h t It is in a hidden state, x t (This is input)
[0106] z t =σ(W z ·[w t h t-1 ,w t x t ]+b z (13)
[0107] r t =σ(W r ·[w t h t-1 ,w t x t ]+b r (14)
[0108]
[0109] To capture the periodicity of product click-through rates (CTRs), we introduce sine and cosine features into the TW-GRU model to represent different periodic components. By introducing sine and cosine features, periodic patterns can be explicitly embedded into the model input, making it easier for the model to learn periodic patterns in the data, especially when dealing with click-through rate and conversion rate data that exhibit significant periodicity. We can introduce sine and cosine features for daily, weekly, and yearly periods, respectively. For a time series with a period T, we introduce the following features: (different periods are defined as different features: daily period T = 24 hours, monthly period T = 30 days, yearly period T = 365 days)
[0110]
[0111] User click and conversion behaviors are influenced not only by their interests but also by product cycle patterns. By combining the outputs of a multi-layer LSTM model (user interest features U) and a TW-GRU model (product cycle pattern P), a more comprehensive understanding of user behavior can be achieved, thereby improving prediction accuracy. Furthermore, considering that MLP models excel at handling fixed-size input data, by combining the outputs of the multi-layer LSTM and TW-GRU models to form a fixed-size feature vector, non-linear combinations using the MLP model can be employed to further enhance predictive capabilities, such as... Figure 2 As shown.
[0112] First, the output U of the multi-layer LSTM model and the output P of the TW-GRU model are concatenated to form a new feature vector C:
[0113] C = [U, P] (19)
[0114] The goal of an MLP is to learn more complex features from the combined feature vector C to predict click-through rates. Assume an MLP has two hidden layers, each using the ReLU activation function, and an output layer using a linear activation function. The output of the hidden layers is as follows:
[0115]
[0116] The loss function uses Huber loss, which combines the advantages of MSE and MAE. MSE is used for small errors, while MAE is used for large errors. This reduces the impact of outliers on the model and provides smooth optimization for small errors. The loss function is minimized using backpropagation and gradient descent algorithms to update the weights and biases of the MLP.
[0117]
[0118] 2.4 Model Algorithm
[0119] We input the user's behavior data set Ub = {(u,h t )|h t ∈H}, the sales data set of the product Ccycle={(c,s t )|s t ∈S}, the UTC-matrix association matrix of "user-time-product". Our goal is to obtain the vector representation of "user-time-product" information in the embedding space, the user interest matrix, the product cycle pattern, and the product click-through rate. The UTC2vec algorithm, user interest, and product cycle learning algorithms in this paper are shown in the table below:
[0120] Table 1 UTC2vec Algorithm
[0121]
[0122] Table 2 User Interest and Product Cycle Learning Algorithm
[0123]
[0124]
[0125] Furthermore, we analyzed the time complexity of the algorithm. Let n represent the number of users, t represent the number of time steps, k represent the number of items, and d represent the embedding dimension. The time complexity of the embedding layer is O(n*d+t*d+k*d), constructing the ternary graph is O(E), the matrix factorization method is O(E*d*iter), the graph embedding method is O(E*r*l), and the total time complexity is O(E*d*iter+n*t*k*d).
[0126] Assuming n is the number of users in the batch, s is the sequence length, h is the hidden layer dimension, d is the input dimension, and there are l layers of LSTM, then the time complexity of a multi-layer LSTM is O. The time complexity of the Attention-uc mechanism includes calculating the attention score, weights, and context vector, with a time complexity of O(s*(h*a+a+h)), where the time complexity of a multi-layer LSTM is O(l*s*h*(h+d)).
[0127] The time complexity of initializing the parameters (weights and biases) of a GRU unit is O(h*(i+h)), where h is the size of the hidden layer and i is the dimension of the input features. Assuming the time series length is T, the forward propagation time complexity for each sequence is O(T*h*(i+h)). Assuming there are m sequences, the forward propagation time complexity for all sequences is O(m*T*h*(i+h)).
[0128] The overall time complexity of the algorithm in this paper is: O(E*d*iter+n*t*k*d)+O(l*s*h*(h+d))+O(m*T*h*(i+h))≈O(n+h) 2 ).
[0129] Finally, 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 present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A time-aware method for predicting click-through rate (CTR) on e-commerce platforms, characterized in that: The method includes the following steps: constructing a user-time-product ternary graph, wherein the user-time-product ternary graph is represented as G. utc ={U i ∏T j ∏C k M ut ∏M tc }, where U i T j C k M represents the user node, time node, and product node, respectively. ut M is a matrix representing the relationship between users and time. tc The relationship matrix between time and goods is generated; the user-time-goods tripartite graph is embedded using a representation learning method to obtain low-dimensional vector representations of users, time, and goods; user long-short-term interest behaviors are extracted based on a multilayer long short-term memory network (LSTM) to generate a user interest matrix; the periodic patterns of goods sales are extracted based on a time-weighted gated recurrent unit (TW-GRU) to generate a goods periodic pattern; and the click-through rate is predicted by fusing the user interest matrix and the goods periodic pattern using a multilayer perceptron (MLP).
2. The time-aware e-commerce platform click-through rate prediction method according to claim 1, characterized in that: The method of embedding the user-time-item tripartite graph using representation learning specifically includes: performing a random walk on the user-item graph to generate a node sequence, wherein the user-item graph is represented as G. u = (U, C, E), where U is the set of user nodes, C is the set of product nodes, and E is the set of edges; the node sequence is trained using a Skip-Gram model to maximize the objective function. Where V is the set of all nodes, θ(t) is the set of context nodes of node v, and P(u|v) uses the softmax function to represent the co-occurrence probability; and by introducing time features, the user-time-product tripartite graph is updated to G. utc Maximize the co-occurrence probability commonP2 = maxΣ that includes time information. v∈V Σ t∈T Σ u∈θ(v,t) logP(u|v,t), where θ(v,t) is the set of context nodes of node v at time t.
3. The time-aware e-commerce platform click-through rate prediction method according to claim 1, characterized in that: The extraction of user long-term and short-term interest behaviors based on multi-layer LSTM specifically includes: processing the user behavior sequence Ub={(u1,c1,t) 1, b1)...(u n ,c n ,t n, b n )} as input, where u i Indicates the user identifier, c i Indicates product identification, t i Indicating time characteristics, b i It represents the behavior type; processes short-term fluctuations in user data through a low-level LSTM network to output intermediate features; extracts long-term user trends through a high-level LSTM network to output user interest features; and introduces an attention mechanism to calculate the user's attention weights to items at different time steps. The final user interest matrix Ui·mat(t) = U is obtained through normalization. i *(T t +C j ).
4. The time-aware e-commerce platform click-through rate prediction method according to claim 3, characterized in that: The attention weights are calculated using the formula... in It represents the hidden state of the i-th LSTM layer at time t, and the score function is calculated using the tanh activation function.
5. The time-aware e-commerce platform click-through rate prediction method according to claim 1, characterized in that: The aforementioned TW-GRU-based extraction of the periodic pattern of product sales specifically includes: dividing the product sales data set Ccycle={(c,s t )|s t ∈S} as input, where c represents the product identifier, s t This represents the sales performance of a product at time t; a time weighting factor is introduced. Where T is the current time, t i It is the timestamp of the i-th time step, and τ is the time constant; adjust the update gate z of TW-GRU. t Reset door r t and hidden state h t The calculation is made to be affected by the time weighting factor; and periodic features are introduced, including sine and cosine representations of daily, weekly and annual cycles, to generate a commodity cycle pattern CT(i)={t|t∈T}.
6. The time-aware e-commerce platform click-through rate prediction method according to claim 5, characterized in that: The periodicity feature is expressed by the formula and It is represented as follows, where t is the timestamp, T is the period length, T = 24 hours for daily period, T = 30 days for monthly period, and T = 365 days for annual period.
7. The time-aware e-commerce platform click-through rate prediction method according to claim 1, characterized in that: The method of fusing the user interest matrix and the product cycle pattern to predict the click-through rate using an MLP specifically includes: concatenating the user interest matrix U and the product cycle pattern P into a feature vector C = [U, P]; inputting the feature vector C into an MLP, wherein the MLP includes at least two hidden layers, each using the ReLU activation function, and the output layer using a linear activation function; and using the Huber loss function as the loss function, wherein the Huber loss function combines the mean squared error (MSE) and the mean absolute error (MAE), and optimizes the model parameters through backpropagation and gradient descent algorithms.
8. A time-aware e-commerce platform click-through rate prediction system, characterized in that: The system includes: a ternary graph construction module, used to construct a user-time-product ternary graph, wherein the user-time-product ternary graph is represented as G. utc ={U i ∏T j ∏C k M ut ∪M tc }, where U i T j C k The system comprises three modules: a user node, a time node, and a product node; a representation learning module connected to the ternary graph construction module, used to embed the user-time-product ternary graph using a representation learning method to obtain low-dimensional vector representations of users, time, and products; a user interest learning module connected to the representation learning module, used to extract user long-term and short-term interest behaviors based on a multi-layer LSTM to generate a user interest matrix; a product cycle extraction module connected to the representation learning module, used to extract the periodic patterns of product sales based on TW-GRU to generate a product cycle pattern; and a prediction module connected to the user interest learning module and the product cycle extraction module, used to fuse the user interest matrix and the product cycle pattern to predict the click-through rate using an MLP.
9. The time-aware e-commerce platform click-through rate prediction system according to claim 8, characterized in that: The representation learning module specifically includes: a random walk unit, used to generate a node sequence by performing a random walk on the user-product graph; a Skip-Gram training unit, connected to the random walk unit, used to train the node sequence using the Skip-Gram model; and a time extension unit, connected to the Skip-Gram training unit, used to introduce time features and update the embedding representation of the user-time-product tripartite graph.
10. The time-aware e-commerce platform click-through rate prediction system according to claim 8, characterized in that: The prediction module specifically includes: a splicing unit for splicing the user interest matrix and the product cycle pattern into a feature vector; an MLP processing unit connected to the splicing unit for inputting the feature vector into an MLP for nonlinear transformation; and a loss optimization unit connected to the MLP processing unit for optimizing model parameters using the Huber loss function.