Artificial Intelligence 10 min read

Combining CNN and LSTM for Purchase User Prediction: Architecture, Implementation, and Results

This article presents a detailed case study of building a purchase‑user prediction model by integrating Convolutional Neural Networks for feature extraction with Long Short‑Term Memory networks for time‑series forecasting, covering background, model structure, data augmentation, experimental results, and business impact.

JD Tech Talk
JD Tech Talk
JD Tech Talk
Combining CNN and LSTM for Purchase User Prediction: Architecture, Implementation, and Results

Research Background Deep learning models, due to their strong expressive power and flexible architectures, have achieved breakthroughs in many fields. The article explores how to apply such models to business scenarios for precise marketing, aiming to predict purchases of a specific product category.

The proposed solution combines a CNN to extract visual‑style features from user behavior data and an LSTM to capture long‑term dependencies in purchase sequences, forming a unified predictive pipeline.

CNN (Convolutional Neural Networks) Feature Extraction CNNs reduce parameter count through local connections, weight sharing, and pooling, enabling efficient learning of hierarchical features. The article explains convolutional layers, ReLU, pooling, and fully‑connected layers, illustrating the concepts with diagrams.

LSTM (Long Short‑Term Memory) Introduction LSTM networks address gradient vanishing/exploding problems in traditional RNNs by using forget, input, and output gates. The article describes the gate mechanisms and shows schematic diagrams of data flow through the cells.

Model Implementation The purchase‑user prediction model treats each user's first purchase of related items as a feature day. Positive samples are users who bought the target product within a one‑year observation window; negative samples are users with no purchase signals. The dataset is split 1:1 for training, validation, and testing.

Feature Extraction CNN automatically learns discriminative features, while LSTM models temporal patterns. Combining both reduces model complexity and accelerates training, outperforming standalone LSTM.

Data Augmentation A shifting strategy removes recent purchase actions to simulate data scarcity, improving robustness. Results on a 20K‑user validation set show enhanced performance, with XGBoost achieving an F1 score of 0.87.

Model Effect On the test set, precision and recall exceed 0.80, and the model predicts that about 24% of targeted users will make multiple purchases within two weeks, leading to noticeable improvements in PV, UV, and conversion rates after deployment.

Conclusion The CNN‑LSTM hybrid model has been successfully applied to various business scenarios such as user tagging, precise product marketing, and recommendation systems. The team plans to continue exploring deep‑learning applications to further enhance personalized marketing.

CNNdeep learningFeature Extractionmodel evaluationtime seriesLSTMpurchase prediction
JD Tech Talk
Written by

JD Tech Talk

Official JD Tech public account delivering best practices and technology innovation.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.