Promotion effect prediction method and device based on multi-time granularity and heterogeneous model integration and storage medium
Patent Information
- Application Number
- CN202610990957.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-04
- Publication Date
- 2026-10-20
AI Technical Summary
[0004]然而,上述现有技术方案存在如下局限性或缺陷:1)推广效果受到多种复杂因素影响,包括广告内容、受众、出价策略等静态因素,以及日期、时刻、节假日等动态时间因素,单一时间粒度的数据分析往往无法全面捕捉这些影响:粗粒度分析可能掩盖日内关键时段的变化规律,而细粒度分析又可能因数据噪声大、长期趋势信息不足而导致预测不稳定;2)单一的预测模型在处理此类兼具时序性、非线性与高维特征的问题时,往往存在能力瓶颈,例如,传统统计模型可能难以捕捉复杂的非线性关系,而单纯的递归神经网络虽然擅长处理序列,但对静态特征和非时序模式的利用效率可能不高,这导致现有方法的预测精度和鲁棒性难以满足对投放效果进行精细化、实时性预测的需求
[0020]从上述本申请提供的技术方案可知,一方面,通过获取包含推广内部因素、时间因素以及投放效果指标的多源日志数据并进行预处理,构建了信息丰富的原始特征集合,这为后续建模提供了全面、高质量的数据基础,确保了预测模型能够学习到影响推广效果的多维度信息,而构建至少两个具有不同时间粒度与时间跨度的训练数据集,使得模型能够同时学习近期细粒度的微观变化模式和长期粗粒度的宏观趋势规律,这种多时间粒度数据融合策略,使模型能够更全面地理解推广效果随时间演化的多层次特性;另一方面,利用上述不同时间粒度的数据集,对包含决策树模型、支持向量机模型以及长短期记忆神经网络模型的异构模型集成进行协同训练,决策树模型和支持向量机模型善于从结构化数据中学习非线性规则和拟合复杂函数,而长短期记忆神经网络专门用于捕捉时序依赖关系,这种集成策略使预测模型集成能够综合发挥各类模型的优势,理论上可以更准确地拟合推广效果与多种因素之间的复杂映射关系,从而提高最终预测的精度和稳定性;第三方面,在接收实时预测请求后,不仅利用推广内部因素,还根据计划投放时间信息动态衍生出星期特征、节假日类型特征等强时序上下文特征,这使得生成的模型输入特征向量能够更精确地反映特定投放时刻所处的日历环境,从而有助于模型做出更符合该时刻典型规律的效果预测;第四方面,利用训练好的模型集成进行协同预测,能够同时输出分时ROI预测曲线和最终日ROI预测值,分时曲线揭示了推广效果在投放日内的动态变化趋势,有助于识别黄金投放时段,最终日预测值则给出了整体效果的评估,这种双重输出使得预测结果不仅能用于最终效果评估,还能直接指导实时的投放策略调整,增强了预测结果的实用性和决策支持价值。综上,本申请的技术方案通过融合多时间粒度数据与异构模型集成,能更全面捕捉推广效果的时序规律与复杂关系,从而提升预测的准确性和鲁棒性,为投放决策提供多维信息。
Smart Images

Figure FT_1 
Figure FT_2 
Figure FT_3
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, and in particular to a method, apparatus and storage medium for predicting promotion effects based on multi-time granularity and heterogeneous model integration. Background Technology
[0002] Online advertising and promotional campaigns have become a core tool in digital marketing, and their effectiveness directly impacts advertisers' return on investment (ROI). Accurate prediction of advertising performance, especially ROI, is crucial for advertisers to allocate budgets, optimize bidding strategies, and select optimal campaign periods. Therefore, developing high-precision promotional performance prediction technologies has significant commercial value.
[0003] Existing promotion effect prediction solutions are typically built upon machine learning or statistical models. One common approach is to collect historical campaign data, extract features, and train a single predictive model to forecast future overall ROI. Another approach is to focus on analyzing and modeling data at a specific time granularity to simplify the problem.
[0004] However, the existing technical solutions mentioned above have the following limitations or defects: 1) The promotion effect is affected by a variety of complex factors, including static factors such as advertising content, audience, and bidding strategy, as well as dynamic time factors such as date, time, and holidays. Data analysis at a single time granularity often cannot fully capture these effects: coarse-grained analysis may mask the changing patterns of key intraday periods, while fine-grained analysis may lead to unstable predictions due to high data noise and insufficient long-term trend information; 2) When dealing with problems that combine time-series, nonlinear, and high-dimensional characteristics, single prediction models often have capacity bottlenecks. For example, traditional statistical models may have difficulty capturing complex nonlinear relationships, while simple recurrent neural networks, although good at processing sequences, may not be efficient in utilizing static features and non-time-series patterns. This makes it difficult for the prediction accuracy and robustness of existing methods to meet the needs of refined and real-time prediction of campaign performance. Summary of the Invention
[0005] This application provides a method, device, and storage medium for predicting promotion effects based on multi-time granularity and heterogeneous model integration. By integrating multi-time granularity data with heterogeneous models, it can more comprehensively capture the temporal patterns and complex relationships of promotion effects, thereby improving the accuracy and robustness of prediction and providing multi-dimensional information for deployment decisions.
[0006] On the one hand, this application provides a method for predicting promotion effects based on multi-time granularity and heterogeneous model integration, the method comprising:
[0007] Step S1: Obtain multi-source log data generated during the historical campaign period of the target promotion project, and preprocess the multi-source log data to construct an original feature set. The multi-source log data includes internal promotion factors, time factors, and campaign performance indicators.
[0008] Step S2: Based on the original feature set, construct at least two training datasets with different time granularities and time spans;
[0009] Step S3: Using the training dataset, perform collaborative training on the model ensemble consisting of at least a decision tree model, a support vector machine model, and a long short-term memory neural network model to obtain a trained prediction model ensemble.
[0010] Step S4: Receive a real-time prediction request for the promotion plan to be predicted. Based on the plan delivery time information in the real-time prediction request, derive the weekday feature, holiday type feature, and day of the holiday feature. Combine the internal factors of the promotion in the real-time prediction request to generate the model input feature vector.
[0011] Step S5: Input the model input feature vector into the trained prediction model ensemble. Through the collaborative prediction of different models in the model ensemble, output the time-sharing ROI prediction curve of the promotion plan to be predicted on the launch day and the final daily ROI prediction value.
[0012] On the other hand, this application provides a device for predicting promotion effects based on multi-time granularity and heterogeneous model integration, the device comprising:
[0013] The preprocessing module is used to acquire multi-source log data generated by the target promotion project during the historical campaign period, and to preprocess the multi-source log data to construct an original feature set. The multi-source log data includes internal promotion factors, time factors, and campaign performance indicators.
[0014] A construction module is used to construct at least two training datasets with different time granularities and time spans based on the original feature set;
[0015] The training module is used to perform collaborative training on a model ensemble consisting of heterogeneous models, including at least a decision tree model, a support vector machine model, and a long short-term memory neural network model, using the training dataset, to obtain a trained prediction model ensemble.
[0016] The generation module receives real-time prediction requests for the promotion plan to be predicted, and derives weekday features, holiday type features, and holiday day features based on the plan delivery time information in the real-time prediction request. It also combines the internal factors of the promotion in the real-time prediction request to generate the model input feature vector.
[0017] The prediction module is used to input the model input feature vector into the trained prediction model integration, and through the collaborative prediction of different models in the model integration, output the time-sharing return on investment (ROI) prediction curve of the promotion plan to be predicted on the launch day and the final daily ROI prediction value.
[0018] Thirdly, this application provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps of the above-described method for predicting the promotion effect based on multi-time granularity and heterogeneous model integration.
[0019] Fourthly, this application provides a storage medium storing a computer program, which, when executed by a processor, implements the steps of the above-described method for predicting promotion effects based on multi-time granularity and heterogeneous model integration.
[0020] As can be seen from the technical solution provided in this application, on the one hand, by acquiring and preprocessing multi-source log data containing internal promotion factors, time factors, and campaign performance indicators, a rich set of original features is constructed. This provides a comprehensive and high-quality data foundation for subsequent modeling, ensuring that the prediction model can learn multi-dimensional information affecting the promotion effect. Furthermore, constructing at least two training datasets with different time granularities and time spans allows the model to simultaneously learn recent fine-grained micro-change patterns and long-term coarse-grained macro-trend patterns. This multi-time-granularity data fusion strategy enables the model to more comprehensively understand the multi-level characteristics of the promotion effect evolving over time. On the other hand, using the aforementioned datasets with different time granularities, heterogeneous models including decision tree models, support vector machine models, and long short-term memory neural network models are integrated for collaborative training. Decision tree models and support vector machine models are adept at learning nonlinear rules and fitting complex functions from structured data, while long short-term memory neural networks are specifically designed to capture temporal dependencies. This integration strategy... The ensemble of predictive models leverages the strengths of various models, theoretically enabling a more accurate fit to the complex mapping between promotional effects and multiple factors, thereby improving the accuracy and stability of the final prediction. Thirdly, upon receiving real-time prediction requests, it not only utilizes internal promotional factors but also dynamically derives strong temporal context features such as weekday characteristics and holiday type characteristics based on planned deployment time information. This allows the generated model input feature vectors to more accurately reflect the calendar environment at a specific deployment time, helping the model make effect predictions more consistent with the typical patterns of that time. Fourthly, collaborative prediction using the trained model ensemble can simultaneously output time-sharing ROI prediction curves and final-day ROI prediction values. The time-sharing curves reveal the dynamic trends of promotional effects within the deployment day, helping to identify peak deployment periods, while the final-day prediction values provide an overall effect assessment. This dual output allows the prediction results not only to be used for final effect evaluation but also to directly guide real-time deployment strategy adjustments, enhancing the practicality and decision support value of the prediction results. In summary, the technical solution of this application, by integrating multi-time granular data and heterogeneous models, can more comprehensively capture the temporal patterns and complex relationships of promotion effects, thereby improving the accuracy and robustness of prediction and providing multi-dimensional information for campaign decisions. Attached Figure Description
[0021] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0022] Figure 1This is a flowchart of the promotion effect prediction method based on multi-time granularity and heterogeneous model integration provided in the embodiments of this application;
[0023] Figure 2 This is a schematic diagram of the promotion effect prediction device based on multi-time granularity and heterogeneous model integration provided in the embodiments of this application;
[0024] Figure 3 This is a schematic diagram of the device provided in the embodiments of this application. Detailed Implementation
[0025] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0026] In this specification, adjectives such as "first" and "second" are used only to distinguish one element or action from another, without necessarily requiring or implying any actual such relationship or order. Where circumstances permit, reference to an element or component or step (etc.) should not be construed as being limited to only one of the elements, components, or steps, but may be one or more of the elements, components, or steps, etc.
[0027] For ease of description, the dimensions of the various parts shown in the accompanying drawings are not drawn to actual scale.
[0028] Existing promotion effect prediction schemes are typically built on machine learning or statistical models. One common approach is to collect historical campaign data, extract features, and train a single predictive model (e.g., a regression model or a time series model) to predict future overall ROI. Another approach is to focus on analyzing and modeling data at specific time granularities (e.g., daily or hourly data only) to simplify the problem. However, the existing technical solutions mentioned above have the following limitations or defects: 1) The promotion effect is affected by a variety of complex factors, including static factors such as advertising content, audience, and bidding strategy, as well as dynamic time factors such as date, time, and holidays. Data analysis at a single time granularity often cannot fully capture these effects: coarse-grained (e.g., daily level) analysis may mask the changing patterns of key time periods within the day, while fine-grained (e.g., hourly level) analysis may lead to unstable predictions due to high data noise and insufficient long-term trend information; 2) When dealing with problems that combine time-series, nonlinearity, and high-dimensionality characteristics, single prediction models often have capacity bottlenecks. For example, traditional statistical models may have difficulty capturing complex nonlinear relationships, while simple recurrent neural networks, although good at processing sequences, may not be efficient in utilizing static features and non-time-series patterns. This makes it difficult for the prediction accuracy and robustness of existing methods to meet the needs of refined and real-time prediction of campaign performance.
[0029] To address the aforementioned problems in existing technologies, this application proposes a method for predicting promotion effects based on multi-time granularity and heterogeneous model integration, the flowchart of which is attached. Figure 1 As shown, it mainly includes steps S1 to S5, which are detailed below:
[0030] Step S1: Obtain multi-source log data generated during the historical campaign period of the target promotion project, and preprocess the multi-source log data to construct the original feature set. The multi-source log data includes internal promotion factors, time factors, and campaign performance indicators.
[0031] Step S1 provides the data foundation for model training and prediction. Specifically, it involves extracting all campaign records for the target promotion project (e.g., a specific game app installation ad campaign) over a historical period (e.g., the past year) from the backend database or log server of the advertising / promotion platform. Each record represents a campaign event reflected in the log.
[0032] As one embodiment of this application, preprocessing multi-source log data to construct an original feature set can be achieved through steps S1.1 to S1.4, as detailed below:
[0033] Step S1.1: Clean the multi-source log data to remove abnormal log records that are missing key fields, have zero exposure times, or have zero cost.
[0034] Specifically, the system scans log data line by line, checking key fields (such as promotion identifier, timestamp, number of impressions, and cost) for NULL values or format errors. Such records are considered invalid and are discarded immediately. Furthermore, records with zero impressions mean the ad was not displayed, and records with zero cost may indicate that the campaign was not actually charged or that the system recorded an error. These records do not contain valid performance information and are also filtered out, thus ensuring the quality of the data used for training.
[0035] Step S1.2: Normalize the numerical features in the cleaned log data and encode the categorical features.
[0036] The purpose of step S1.2 is to transform features of different dimensions and types into numerical forms that the model can efficiently process. For numerical features, such as bid amount and budget, a min-max normalization method is used to linearly scale the feature value of all samples to the [0, 1] interval. The calculation formula is: (current value - minimum value of the feature) / (maximum value of the feature - minimum value of the feature). This eliminates feature scale differences and accelerates model convergence. For categorical features, such as promotional placement information and bidding method, one-hot encoding is used. For example, if there are three types of "bidding method": "CPC" (cost per click), "CPM" (cost per mille), and "oCPM" (optimized cost per mille), three binary feature columns will be generated. If a record belongs to "CPC", the corresponding column will be 1, and the rest will be 0. This allows the model to understand categorical information unambiguously.
[0037] Step S1.3: Based on the user's first-day recharge amount and cost expenditure in the campaign performance metrics, calculate the first-day ROI for each log record and use it as the target variable for model training.
[0038] Performance metrics are the core of measuring campaign effectiveness. In this example, we focus not only on intermediate metrics such as impressions and clicks, but also on the final return on investment (ROI). The formula for calculating Day 1 ROI is: Day 1 ROI = User's first-day recharge amount / Cost spent. For example, if a record costs 100 yuan and generates 150 yuan in user first-day recharge, then its Day 1 ROI is 1.5. This calculated ROI value will serve as the "label" or "target variable" that the model needs to fit and predict during training.
[0039] Step S1.4: Based on the delivery date and delivery time in the time factors, construct time-series related features, including calculating the time offset between the current time and the start time of the day, as well as the number of days between the current date and the nearest holiday.
[0040] Simply using the date and time of ad placement as features makes it difficult for the model to directly understand its inherent periodicity and event-driven patterns. Therefore, this application transforms them into features with greater business significance. The time offset between the current time and the start time of the day refers to the number of seconds or minutes that have elapsed from 00:00 on the current day to the current time. This feature helps the model learn the regular fluctuations in user behavior at different times of the day (e.g., morning, noon, and night). The number of days between the current date and the most recent holiday reflects the position of the ad placement date within the holiday cycle (e.g., 3 days before the holiday, 1 day after the holiday), which is crucial for capturing changes in traffic and consumer behavior brought about by holidays. By constructing these time-related features, the model's ability to understand the temporal context of its input is significantly enhanced.
[0041] The technical solutions exemplified in steps S1.1 to S1.4 above enable the model to perceive the relative time within a day and its proximity to special dates more precisely, rather than just knowing the absolute date and time. This enhances the model's ability to capture intraday patterns (e.g., differences between morning and afternoon) and pre- and post-holiday effects (e.g., pre-holiday spending spree, post-holiday slump), thereby improving the accuracy of the spatiotemporal context perception in prediction. This is not a simple feature engineering, but a deep feature construction designed for the temporal characteristics of promotion effects.
[0042] Although the technical solutions exemplified in steps S1.1 to S1.4 above address the issue of "the need to introduce temporal context," how to discover and extract optimal temporal context representations that are difficult for humans to predefine in a data-driven manner remains a noteworthy problem. Furthermore, in the above solutions, manually constructed features may fail to capture non-linear, complex cross-period interactions (e.g., special patterns like "the evening of the last day of the National Day holiday"). Therefore, the preprocessing schemes for multi-source log data exemplified in steps S1.1 to S1.4 above can further include: inputting the absolute timestamp (i.e., the date and time of delivery) of each cleaned log record into a pre-trained temporal representation neural network; the output of this pre-trained temporal representation neural network is a fixed-dimensional temporal embedding vector that integrates the periodic, seasonal, and event-related semantic information contained in the absolute timestamp; and concatenating the temporal embedding vector with normalized and encoded generalized internal factor features to form the original feature set. Since the embedding vectors learned by neural networks can theoretically encode temporal semantics more richly and accurately, this scheme provides subsequent prediction models with temporal features that have higher information density and stronger discriminative power, directly improving the upper limit of the model from the feature level.
[0043] Step S2: Based on the original feature set, construct at least two training datasets with different time granularities and time spans.
[0044] Existing technologies employ data with a single time span and a single time granularity for training, leading to an inherent contradiction where the model cannot simultaneously capture both short-term fluctuations in promotional effects (e.g., intraday user activity changes) and long-term trends / cyclical patterns (e.g., weekend effects, holiday effects). Specifically, the approach of using only recent fine-grained data, such as hourly data from the past three months, suffers from a short data window that cannot encompass the complete annual cycle (e.g., all holidays), preventing the model from learning long-term seasonal patterns and making predictions inaccurate for special dates (e.g., Spring Festival, National Day holidays). The approach of using only long-term coarse-grained data, such as daily data from the past year, suffers from the drawback that while it can learn long-term trends, the daily average smooths out the detailed fluctuations of different time periods within the day (e.g., morning and evening rush hours), resulting in insufficient sensitivity to real-time market changes and instantaneous user behavior, and an inability to perform refined time-sharing predictions. Therefore, the technical solution adopted in this application is to construct at least two training datasets with different time granularities and time spans based on the original feature set. This approach constructs at least two training datasets that differ in time span and granularity, such as recent hourly datasets and long-term daily datasets. This data fusion strategy is the foundation for the subsequent model's divide-and-conquer capability. It provides the model with the necessary data materials from different perspectives to characterize macro trends and micro fluctuations, fundamentally expanding the spatiotemporal boundaries of the model's learning ability. This allows the subsequent model to simultaneously internalize long-term patterns and short-term patterns, laying an irreplaceable data foundation for prediction results that combine trend stability and time-period sensitivity.
[0045] In this application embodiment, at least two training datasets with different time granularities and time spans include a first training dataset constructed based on hourly granular data within a first predetermined time span, and a second training dataset constructed based on daily or hourly granular data within a second predetermined time span longer than the first predetermined time span. As one embodiment of this application, the first and second training datasets described above are constructed through the following steps S2.1 and S2.2:
[0046] Step S2.1: Extract all log data from the original feature set, with hours as the smallest unit, from the current time point backwards for a first predetermined time span, to form the first training dataset.
[0047] For example, the first predetermined time span is set to "90 days". The system will extract all preprocessed log records from the past 90 days, maintaining hourly granularity, to form the first training dataset. This dataset is fresh, rich in detail, and can reflect the latest user behavior patterns and market competition.
[0048] Step S2.2: Extract log data from the original feature set that traces back to the second predetermined time span from the current time point, and aggregate the data to the daily granularity to form the second training dataset, wherein the second predetermined time span is greater than the first predetermined time span.
[0049] For example, the second predetermined time span is set to "365 days". The system will extract data from the past year. Next, the data is aggregated to daily granularity as follows: For all hourly granular log data of the same promotional project within the same natural day, the impressions, clicks, first-day user spending, and cost in the campaign performance metrics are summed; the attribute values of the internal factors of the promotion that remain unchanged within that day are used as the corresponding feature values of the aggregated daily granular record; the ratio of the total first-day user spending to the total cost calculated by the aggregation is used as the daily granular ROI target variable for that day. Specifically, the system will group according to the promotion identifier and the launch date. Numerical performance metrics are summed to obtain the total impressions, total clicks, total spending, and total cost for that promotion day. Promotional attributes such as "placement" and "bidding method" usually remain unchanged within a day and are directly used. Finally, the daily ROI for that promotion day is calculated using "total spending / total cost". This second training dataset has a long time span, covering the entire annual cycle and multiple holidays. After the data is aggregated at the daily level, the noise is relatively reduced, and it better reflects long-term trends and stable patterns.
[0050] Step S2 provides the model with two sets of data: a recent micro view and a long-term macro view, laying a solid foundation for the subsequent heterogeneous model to learn patterns from different perspectives.
[0051] Step S3: Using the training dataset, perform collaborative training on the model ensemble consisting of at least a decision tree model, a support vector machine model, and a long short-term memory neural network model to obtain a trained prediction model ensemble.
[0052] In machine learning prediction tasks, using a single type of model (e.g., using only gradient boosting decision trees or only recurrent neural networks) is a common practice. However, prediction problems involving generalization effects have both complex feature interactions and significant temporal dependencies, and single models often have limitations: decision tree models excel at handling structured features and complex nonlinear relationships, but are weak in directly modeling raw temporal patterns; while recurrent neural networks, although designed for sequences, are sometimes inefficient at learning sparse rules in high-dimensional static features. Even when homogeneous models are integrated, for example, using multiple models of the same type (e.g., multiple LSTMs with different parameters), there are still shortcomings. That is, although robustness may be improved to some extent, the shortcomings of all sub-models are the same, and they cannot complement each other in a fundamental way. For example, a set of LSTMs may all be weak in encoding non-temporal features.
[0053] To address the limitations of single-type predictive models in handling multi-granularity time-series data and complex nonlinear relationships, this application employs a heterogeneous model ensemble strategy. It innovatively matches and trains data of different time granularities with models possessing complementary characteristics. Specifically, the technical solution involves using the training dataset to collaboratively train an ensemble of heterogeneous models, including at least a decision tree model, a support vector machine model, and a long short-term memory neural network model, resulting in a trained predictive model ensemble. This approach does not simply juxtapose different models; rather, it selectively trains different types of data with complementary models. Specifically, it uses a second training dataset (long-term, coarse-grained) to train decision tree and support vector machine models, which are adept at extracting complex nonlinear relationships and stable rules between features from structured tabular data. Simultaneously, it uses a first training dataset (recent, fine-grained sequences) to train an LSTM model specifically designed for sequence modeling. This data-model matching design allows each model to perform at its best on the data modalities it is best at, ultimately integrating them into a single predictive model ensemble. This creates an "expert consultation" system that works together to solve the same prediction problem from different modeling principles (e.g., splitting rules of tree models, margin maximization of SVM, and temporal memory of LSTM). This significantly enhances the generalization ability and robustness of the entire prediction system because the integrated decision-making mechanism can effectively mitigate specific biases or errors that may arise from a single model, making the final prediction results more reliable and stable.
[0054] As an embodiment of this application, the training dataset is used to perform collaborative training on a model ensemble consisting of heterogeneous models, including at least a decision tree model, a support vector machine model, and a long short-term memory neural network model, to obtain a trained prediction model ensemble. This can be achieved through steps S3.1 to S3.3, as detailed below:
[0055] Step S3.1: Using the second training dataset, train the decision tree model and the support vector machine model independently, respectively.
[0056] The second training dataset consists of daily-granular data with a long time span, containing stable long-term trends and cyclical patterns, and relatively low data noise. Decision tree models (e.g., XGBoost or LightGBM) can automatically select features and learn complex if-then rules between features, making them well-suited for mining deep combinations of factors influencing ROI from this type of well-structured tabular data. Support vector machine models (SVM) aim to find a hyperplane that maximizes the margin between samples at different ROI levels. They have good generalization ability when dealing with high-dimensional features and help learn robust prediction boundaries from long-term data. These two models are trained independently using the second training dataset to obtain two "experts" with a deep understanding of long-term macroscopic patterns.
[0057] Step S3.2: Train a long short-term memory neural network model using the first training dataset, wherein the hourly granular data in the first training dataset is organized into a sequence input in chronological order.
[0058] The first training dataset consists of fine-grained hourly data, containing rich short-term fluctuations and intraday patterns. Due to its internal gating mechanisms (including forget gate, input gate, output gate, etc.), the LSTM neural network can effectively capture long-term dependencies in time series, such as how the effectiveness of morning campaigns affects the afternoon's traffic competition. Specifically, the hourly data is organized into a chronological sequence as input, including: extracting multiple consecutive hourly data segments from the first training dataset with a preset continuous time window length; arranging the features within each data segment by time step to form an input sequence; and using the actual ROI value corresponding to the last time step of the sequence as the prediction target for that sequence.
[0059] For example, a time window of 24 hours is set. The system slides through 24 consecutive hourly sample segments from the first training dataset. Each sample segment contains 24 time steps, and the feature vector for each time step includes all generalized internal factors and derived time features for that hour. During training, the feature sequences from the first 23 hours are input into the LSTM model, which is then asked to predict the ROI value (label) for the 24th hour. In this way, the LSTM is trained to understand and predict temporal evolution patterns in recent, fine-grained data.
[0060] Step S3.3: Combine the models trained in steps S3.1 and S3.2 into a trained prediction model ensemble.
[0061] After independent training, the decision tree model, support vector machine model, and LSTM model are saved and combined into a unified prediction model ensemble. This ensemble is not a simple parallel arrangement of models, but a collaborative system with internal specialization.
[0062] The technical solutions exemplified in steps S3.1 to S3.3 above effectively address the technical problem of inputting different types of data into the most suitable model to maximize their respective performance. This achieves the alignment of data and model capabilities, enabling decision trees / SVMs to focus on learning stable rules from macro trends, and LSTMs to focus on learning dynamic patterns from recent sequences. This training strategy ensures specialized division of labor and complementary advantages within the model integration.
[0063] It is understandable that the collaborative training in steps S3.1 to S3.3 is parallel and independent training, where each model learns independently, ensuring that the models fit their respective data. Therefore, to achieve collaborative training and knowledge transfer between models, the above embodiment utilizes a training dataset to collaboratively train a model ensemble consisting of heterogeneous models, including at least a decision tree model, a support vector machine model, and a long short-term memory neural network model, to obtain a trained predictive model ensemble. This can also be achieved by: training a deep predictive model as a teacher model using a second training dataset; minimizing the loss of the long short-term memory neural network model based on the prediction results of the first training dataset while minimizing the distillation loss between its prediction results and the soft target output by the teacher model at the corresponding time segment; the soft target output by the teacher model contains trend and stability knowledge learned from long-term, coarse-grained data. Compared to the collaborative training schemes exemplified in steps S3.1 to S3.3, this collaborative training scheme is a sequential, guided training that introduces a teacher-student framework. This allows the long short-term memory neural network model (which acts as the student model) that processes fine-grained, recent data to actively imitate the knowledge extracted by the teacher model that processes coarse-grained, long-term data—the soft objective—while learning the patterns in its own data. This is a positive knowledge transfer that allows the student model's predictions to remain sensitive to short-term fluctuations while avoiding overfitting noise. Its output has a more macroscopic perspective and stability. Essentially, it distills the "wisdom" of long-term data into the short-term prediction model, improving the generalization performance and robustness of the student model.
[0064] Furthermore, to address the issue that static, average model ensembles cannot adapt to performance fluctuations of different models under varying data distributions, after step S3.3, Figure 1 The example method also includes the following steps S3.4 and S3.5, which illustrate the process of weighting the prediction model ensemble:
[0065] Step S3.4: Using a validation dataset, obtain the prediction results of the decision tree model, support vector machine model, and long short-term memory neural network model on the validation dataset.
[0066] The validation dataset is a portion of historical data that is reserved and not used in training. The three models in the ensemble each make predictions on the validation set, resulting in three sets of predictions.
[0067] Step S3.5: Assign a dynamic weight to each model based on the error between the prediction results of each model and the true values of the validation dataset, where the model with the smaller prediction error is assigned a higher weight.
[0068] The calculation method for the dynamic weights assigned to each model includes: calculating the reciprocal of the prediction error of each model on the validation dataset; summing the reciprocals of the prediction errors of all models to obtain the normalized denominator; and dividing the reciprocal of the prediction error of each model by the normalized denominator to obtain the dynamic weight of that model. Assume the root mean square errors (RMSE) of the three models on the validation set are as follows: , and First, calculate the reciprocal of the error for each model: , , Then normalization is performed: , , . , and This refers to the dynamic weights assigned to each model, with models having smaller errors receiving larger weights. This allocation method automatically tilts the ensemble prediction results towards models with more reliable historical performance.
[0069] The process of weighting the prediction model ensemble as illustrated in steps S3.4 and S3.5 uses a validation set to evaluate and assign dynamic weights to each model that are inversely proportional to the prediction error. This enables the entire prediction system to have online adaptive capabilities. This means that the ensemble decision is no longer fixed, but can automatically tilt the confidence level to the model that is currently performing more reliably based on the current data pattern, thereby significantly improving the robustness of the ensemble and its ability to generalize to different scenarios.
[0070] As another embodiment of this application, weight allocation for predictive model ensemble can also be achieved by simultaneously inputting the model input feature vector into each sub-model in the predictive model ensemble and a weight generation network; the weight generation network takes the intermediate layer representation or original output generated by each of the aforementioned sub-models for the current input feature vector as input, and infers in real time and outputs a set of dynamic fusion weights related to the current input instance. Compared with the weight allocation process for predictive model ensemble exemplified in steps S3.4 and S3.5, this scheme is based on the content of the current input instance, real-time inference-generated, instance-related weights, and the weight generator itself is a learnable neural network, i.e., a meta-learner. This transforms model ensemble from a "fixed committee" into an intelligent scheduler. For different types of input (e.g., high-budget brand advertising vs. performance-based short-term promotion), the system can automatically allocate different weight strategies, thereby achieving true instance-level optimal fusion and improving the flexibility of ensemble and the upper limit of prediction accuracy.
[0071] Furthermore, to better balance the model's learning of patterns in data across different time spans during the training phase, the collaborative training of model ensembles consisting of heterogeneous models, including at least decision tree models, support vector machine models, and long short-term memory neural network models, also includes the following weight adjustment process: During model training, based on the sample size ratio of the first and second training datasets and the historical prediction error trend, the weights given to the loss of data across different time spans by the decision tree model and the support vector machine model during training are dynamically adjusted. Specifically, when training the decision tree and SVM models, their loss functions can be designed as a weighted sum: ,in, The main loss is based on the second training dataset. It is based on the loss of an auxiliary task (e.g., predicting short-term volatility) sampled from or constructed from the first training dataset. Weights and It's not fixed, but rather dynamically decays or enhances during training based on the relative sample sizes of the two datasets (e.g., number of samples in the second dataset / number of samples in the first dataset) and the trend of the model's error on recent validation sets. For example, if the model's error continues to increase on recent data, the enhancement level is appropriately increased. This encourages the model to pay more attention to recent patterns, preventing its knowledge from becoming "outdated." This mechanism enables adaptive fine-tuning of the training objective.
[0072] Through step S3 and its sub-processes, a carefully trained and optimized prediction model ensemble is obtained, which combines the rule understanding of the decision tree model, the generalization robustness of the support vector machine model, and the temporal insight of the long short-term memory neural network model, and equips them with an adaptive weighting mechanism, thus preparing them for high-precision prediction.
[0073] In another embodiment of this application, the aforementioned collaborative training of the model ensemble can also employ a strategy combining course learning and adversarial training: In the early stages of training, a high learning rate is set for the Long Short-Term Memory (LSTM) neural network model, primarily using the first training dataset to enable it to quickly learn temporal patterns from recent data; in the later stages of training, the learning rate is gradually reduced, and a discriminator network is introduced. This discriminator network is trained to distinguish between predictions generated by the model ensemble based on the first training dataset and predictions generated based on the second training dataset; the training objective of the model ensemble is adjusted to minimize prediction error while maximizing its ability to confuse the discriminator, thereby encouraging the model to learn stable feature representations across time granularities. This collaborative training scheme effectively solves the problem of how to make the feature representations learned by the model applicable to both recent fluctuation patterns and long-term stable patterns—a deeper problem of representation learning. The goal of adversarial training is to eliminate "patterns" in the prediction results that can be identified by the discriminator and belong to a specific dataset, thereby learning more fundamental causal or correlational relationships across time granularities. It enables model ensembles to not only fit the data, but also to pursue the consistency of the learned knowledge across different time distributions, mitigating the risk of poor performance of model ensembles outside the training data distribution, resulting in a more powerful and robust model core.
[0074] Step S4: Receive a real-time prediction request for the promotion plan to be predicted. Based on the plan delivery time information in the real-time prediction request, derive the weekday features, holiday type features, and day of the holiday features. Combine these with the internal factors of the promotion in the real-time prediction request to generate the model input feature vector.
[0075] Upon receiving a real-time forecast request for a new advertising campaign from an ad optimizer or automated delivery system, the system enters the real-time forecast phase. The real-time forecast request includes at least the campaign's internal factors (e.g., ad placement, targeted user tags, bidding strategy, etc.) and the campaign's scheduled delivery time information (usually the date and time the campaign will begin).
[0076] In existing technologies, the processing of time information can be rather coarse. For example, if only the date and time are used as numerical inputs, the model may struggle to directly understand the underlying periodicity and social patterns. Therefore, this application employs refined time feature engineering in the prediction stage. As an embodiment of this application, based on the planned delivery time information, features such as weekday characteristics, holiday type characteristics, and the day of the holiday can be derived through steps S4.1 to S4.3, as detailed below:
[0077] Step S4.1: Parse the delivery date in the planned delivery time information and calculate its corresponding week value as the week feature.
[0078] The system analyzes the campaign date and calculates the day of the week using a calendar (e.g., Monday is the 1st, Sunday is the 7th). Weekday characteristics are key to capturing regular weekly patterns; for example, user activity and spending habits typically differ significantly between weekdays and weekends.
[0079] Step S4.2: Based on the national statutory holiday schedule, determine the type of holiday to which the delivery date belongs. Holiday types include non-holidays, short holidays, and long holidays.
[0080] The system maintains a holiday calendar. Based on the date of the campaign, it determines whether it falls under a statutory holiday. Holiday types are further differentiated: "short holidays" typically refer to holidays of about 3 days, such as New Year's Day, Qingming Festival, and Dragon Boat Festival; "long holidays" refer to holidays of 7 days or more, such as Spring Festival and National Day. Different types of holidays result in varying patterns, durations, and intensities of user online activity; distinguishing between them helps the model make more refined predictions.
[0081] Step S4.3: If the delivery date falls on a holiday, calculate which day of the holiday it is, and use it as the characteristic of the day of the holiday.
[0082] The effects may differ for each day of a holiday. For example, user behavior patterns may be drastically different on the first day (New Year's Eve) and the last day (the sixth day of the Lunar New Year). Calculating the feature of "which day of the holiday" (e.g., the first day of the Spring Festival, the second day, etc.) allows the model to capture the dynamic changes within the holiday period.
[0083] While completing the above-mentioned time feature derivation, the system processes the promotion internal factors in the request. The acquisition of promotion internal factors can be achieved through the following steps S1.a to S1.c:
[0084] Step S1.a: Parse the original fields of promotion identifier, promotion position information, targeted user group tags, bidding method, bidding amount and budget constraints from the multi-source log data.
[0085] Step S1.b: Perform multi-hot encoding on the targeted user group tags to generate user profile vectors.
[0086] Consistent with the preprocessing during training, the targeted user group labels (such as "age 25-30", "interest games", "region Wuhan") are not singular; a plan typically targets multiple groups. Therefore, "multi-hot encoding" is employed, assigning a feature bit to each possible group label. If the plan targets that group, the corresponding bit is set to 1; otherwise, it is set to 0, ultimately forming a sparse binary vector that comprehensively represents the target user profile.
[0087] Step S1.c: Combine and encode the bidding method and bidding amount to generate bidding strategy features.
[0088] Bidding method and bidding amount together determine the advertising strategy. They can be combined into a composite feature, for example, treating "CPM-10 yuan" and "oCPM-20 yuan" as independent categories, or they can be split into two features but jointly normalized to reflect the differences in the meaning of the amount under different bidding methods.
[0089] Finally, all these processed internal factors and derived time features (weekdays, holiday types, holiday days, etc.) are concatenated in the exact same order and format as the training data to generate a unified, structured model input feature vector for use by the prediction model.
[0090] Step S5: Input the model input feature vector into the trained prediction model ensemble. Through the collaborative prediction of different models in the trained prediction model ensemble, output the time-sharing ROI prediction curve of the promotion plan on the launch day and the final daily ROI prediction value.
[0091] This is the value realization stage of the entire method. Traditional forecasting methods often only output a single final result, such as the overall return on investment (ROI), and cannot provide process guidance. The model ensemble in this application is designed to output multi-dimensional forecasting information.
[0092] To integrate composite prediction results that combine temporal details and overall evaluation from the diverse outputs of heterogeneous models, as an embodiment of this application, the time-sharing ROI prediction curve for the promotion plan on the launch date and the final daily ROI prediction value can be output through the collaborative prediction of different models in model integration, via the following steps S5.1 to S5.3:
[0093] Step S5.1: Input the model input feature vector into the decision tree model, support vector machine model, and long short-term memory neural network model in the prediction model ensemble, respectively.
[0094] The same feature vector is fed into three sub-models in parallel. It's important to note that for the Long Short-Term Memory (LSTM) neural network model, since its input requires a sequence, a virtual sequence needs to be constructed here. A common approach is to duplicate the current feature vector multiple times to form a fixed-length sequence, or to construct a virtual timestamp sequence for the next few hours, combined with the planned delivery time, as part of the input.
[0095] Step S5.2: Obtain the sequence output by the long short-term memory neural network model, which represents the trend of ROI changes in multiple consecutive time units in the future, as the basis for the time-sharing ROI prediction curve.
[0096] The LSTM model is trained to predict the value of a sequence at the next time step. During inference, it can continuously predict the ROI value for multiple future hours (e.g., the next 24 hours) by using its predicted output as part of the input for the next time step through a "rolling prediction" approach. Connecting these predictions chronologically forms the prototype of a time-sharing ROI prediction curve. This curve visually illustrates how the expected ROI will fluctuate over time from the start of deployment, such as when peaks or troughs might occur.
[0097] Step S5.3: Obtain the final daily ROI prediction values output by the decision tree model and the support vector machine model respectively, and combine them with the final sequence value output by the long short-term memory neural network model to generate the final daily ROI prediction value through weighted averaging or voting.
[0098] The decision tree model and support vector machine model directly output a predicted value representing the overall ROI for the entire deployment day. The last value of the sequence output by the long short-term memory neural network model can also be considered its prediction of the day's final ROI. Generating the final daily ROI prediction using a weighted average involves: assigning a fixed weight coefficient to each model based on the historical prediction accuracy of the decision tree model, support vector machine model, and long short-term memory neural network model on the validation set; the output of the long short-term memory neural network model is its final sequence value; multiplying the final daily ROI prediction values output by each model by their corresponding weight coefficients and summing the results yields the final daily ROI prediction value. The weight coefficients used here can be the same as the dynamic weights calculated in step S3.5, or they can be fixed weights determined based on long-term performance evaluation. The weighted average method integrates the judgments of different models and typically yields a more stable and accurate final daily prediction value than any single model.
[0099] Thus, the system has obtained two forms of prediction results: a dynamic time-sharing ROI prediction curve and a generalized final daily ROI prediction value.
[0100] The technical solutions described in steps S5.1 to S5.3 above achieve multi-dimensional and structured output of the prediction results. They provide both fine-grained time-series trends that can be used for real-time monitoring and optimization, and general indicators for final evaluation, thus greatly increasing the practical value of the prediction results.
[0101] As another embodiment of this application, the output of the time-sharing ROI prediction curve and the final day ROI prediction value of the promotion plan on the launch date can also be achieved through the collaborative prediction of different models in model integration, as follows: obtain the initial time-sharing ROI prediction curve output by the long short-term memory neural network model; obtain the final day ROI prediction value output by the decision tree model and / or support vector machine model; based on the final day ROI prediction value, perform overall scaling correction on the initial time-sharing ROI prediction curve so that the integral or summation result of the corrected time-sharing ROI prediction curve in the time dimension is logically consistent with the final day ROI prediction value; output the overall scaled and corrected time-sharing ROI prediction curve as the final time-sharing ROI prediction result. Compared to the collaborative predictions in the examples of steps S5.1 to S5.3, this scheme is a cascading correction at the process level. It uses the judgment of the macro judge (i.e., the daily model) to calibrate the entire event line described by the micro interpreter (i.e., the time series model). This correction mechanism not only integrates information but also improves the logical credibility and business interpretability of the prediction results. Businesses can simultaneously trust the time-sharing trend and the daily total because they match each other. This cascading approach of "macro setting the tone and micro describing the shape" provides a new and more rigorous paradigm for generating multi-granularity prediction results.
[0102] In order to directly translate the forecast results into actionable decisions, Figure 1 The example method also includes the following decision support flow examples after step S5: steps S6 and S7:
[0103] Step S6: Based on the time-sharing ROI prediction curve, identify the preferred time period when the predicted ROI value on the day of deployment is higher than the preset threshold.
[0104] The system analyzes the time-sharing ROI prediction curves and sets an ROI threshold (e.g., ROI > 1.2). All time periods with predicted ROI higher than this threshold are marked as preferred time periods. These time periods are expected to offer the highest cost-effectiveness for ad placement.
[0105] Step S7: Generate a decision recommendation report containing the preferred time period information and the final daily ROI forecast, which will guide the concentrated allocation of the promotion budget within the preferred time period.
[0106] The system automatically generates a structured report. The report clearly states: "High ROI periods are expected in [Time Period A, e.g., 19:00-22:00] and [Time Period B, e.g., 12:00-13:00]. It is recommended to increase budget allocation or raise bids during these periods to compete for traffic. The estimated final ROI for the entire day is X." This allows optimizers to make precise budget adjustments and real-time interventions based on data insights.
[0107] As another embodiment of this application, Figure 1 The example method can also include the following real-time decision optimization scheme: Based on the time-sharing ROI prediction curve, rolling planning is performed with a preset time interval as the decision cycle; at the beginning of each decision cycle, the time-sharing ROI prediction after the current moment, the remaining budget, and real-time competitive environment information are used as the state and input into a pre-trained reinforcement learning agent; the reinforcement learning agent outputs the bid adjustment strategy or budget allocation ratio action within the current decision cycle; the bid adjustment strategy or budget allocation ratio action is executed, and the state is updated based on the actual campaign performance after the cycle ends, entering the next decision cycle, thus achieving online adaptive optimization of the campaign strategy. This scheme models the entire campaign process as a sequential decision problem, with the reinforcement learning agent making real-time decisions considering long-term returns (total ROI for the entire campaign cycle). Because it is a dynamic, sequential decision-based online control, it not only provides suggestions but also automatically executes a closed-loop, globally optimal real-time adjustment strategy. Therefore, this scheme can cope with dynamic factors such as changes in market competition and the rate of budget consumption, achieving online maximization of promotional effectiveness, i.e., ROI.
[0108] In addition, to maintain the timeliness of the predictive model and respond to market changes, the method also includes the following steps S8 and S9, which illustrate the model update process:
[0109] Step S8: Regularly obtain newly added promotion and placement log data.
[0110] For example, the system automatically collects new deployment logs from the past period, either daily or weekly.
[0111] Step S9: Using the new data, incrementally train the long short-term memory neural network model in the predictive model ensemble to update its model parameters.
[0112] Since LSTM models are most sensitive to recent time-series patterns, incremental training is chosen for them. Specifically, new data is mixed with a portion of older data from the first training dataset, and a few training iterations are performed based on the existing model parameters. This allows the model to quickly adapt to the latest data distribution and changes in user behavior. Decision tree and SVM models, on the other hand, can be retrained with the full dataset at a lower frequency (e.g., monthly). This update strategy balances model performance with computational efficiency.
[0113] Finally, regarding the consistency of feature normalization, in step S1.2, the numerical features in the cleaned log data are normalized, including: for the numerical features in the first training dataset, using their own data distribution for min-max normalization; for the numerical features in the second training dataset, using the same normalization parameters as the first training dataset. When constructing the second training dataset (long-term data), the normalization of its numerical features (e.g., bids) must use the maximum and minimum values calculated from the first training dataset (recent data), rather than using the second dataset itself. This ensures that long-term data and recent data are mapped to the same numerical space, avoiding bias introduced by the drift of data distribution over time, and ensuring that the model can consistently interpret input features from the recent distribution during prediction.
[0114] From the above appendix Figure 1The example of a promotion effect prediction method based on multi-temporal granularity and heterogeneous model integration demonstrates that, on the one hand, by acquiring and preprocessing multi-source log data containing internal promotion factors, time factors, and campaign performance indicators, a rich set of original features is constructed. This provides a comprehensive and high-quality data foundation for subsequent modeling, ensuring that the prediction model can learn multi-dimensional information affecting promotion effects. Furthermore, constructing at least two training datasets with different temporal granularities and time spans allows the model to simultaneously learn recent fine-grained micro-change patterns and long-term coarse-grained macro-trend patterns. This multi-temporal granularity data fusion strategy enables the model to more comprehensively understand the multi-level characteristics of promotion effects evolving over time. On the other hand, using the aforementioned datasets with different temporal granularities, a heterogeneous model integration including decision tree models, support vector machine models, and long short-term memory neural network models is collaboratively trained. Decision tree models and support vector machine models are adept at learning nonlinear rules and fitting complex functions from structured data, while long short-term memory neural networks are specifically designed to capture temporal dependencies. This integration strategy enables the ensemble of predictive models to leverage the strengths of various models, theoretically allowing for a more accurate fit of the complex mapping relationship between promotional effects and multiple factors, thereby improving the accuracy and stability of the final prediction. Thirdly, upon receiving real-time prediction requests, it not only utilizes internal promotional factors but also dynamically derives strong temporal context features such as weekday features and holiday type features based on planned deployment time information. This allows the generated model input feature vectors to more accurately reflect the calendar environment of a specific deployment time, helping the model make effect predictions that better align with the typical patterns of that time. Fourthly, by using the ensemble of trained models for collaborative prediction, it can simultaneously output time-sharing ROI prediction curves and final-day ROI prediction values. The time-sharing curves reveal the dynamic trends of promotional effects within the deployment day, helping to identify prime deployment periods, while the final-day prediction values provide an overall effect assessment. This dual output allows the prediction results not only to be used for final effect evaluation but also to directly guide real-time deployment strategy adjustments, enhancing the practicality and decision support value of the prediction results. In summary, the technical solution of this application, by integrating multi-time granular data and heterogeneous models, can more comprehensively capture the temporal patterns and complex relationships of promotion effects, thereby improving the accuracy and robustness of prediction and providing multi-dimensional information for campaign decisions.
[0115] Please see the appendix Figure 2 This application provides a device for predicting the generalization effect based on multi-time granularity and heterogeneous model integration. The device includes a preprocessing module 201, a construction module 202, a training module 203, a generation module 204, and a prediction module 205, which are described in detail below:
[0116] The preprocessing module 201 is used to obtain multi-source log data generated by the target promotion project during the historical campaign period, and to preprocess the multi-source log data to construct an original feature set. The multi-source log data includes internal promotion factors, time factors, and campaign performance indicators.
[0117] Module 202 is used to construct at least two training datasets with different time granularities and time spans based on the original feature set;
[0118] Training module 203 is used to perform collaborative training on a model ensemble consisting of heterogeneous models, including at least a decision tree model, a support vector machine model, and a long short-term memory neural network model, using a training dataset, to obtain a trained prediction model ensemble.
[0119] The generation module 204 is used to receive real-time prediction requests for the promotion plan to be predicted, and derive week features, holiday type features, and holiday day features based on the plan delivery time information in the real-time prediction request. It also combines the internal factors of the promotion in the real-time prediction request to generate the model input feature vector.
[0120] The prediction module 205 is used to input the model input feature vector into the training prediction model integration. Through the collaborative prediction of different models in the training model integration, it outputs the time-sharing return on investment (ROI) prediction curve of the promotion plan to be predicted on the launch day and the final daily ROI prediction value.
[0121] From the above appendix Figure 2The example of a promotion effect prediction device based on multi-temporal granularity and heterogeneous model integration demonstrates that, on the one hand, by acquiring and preprocessing multi-source log data containing internal promotion factors, time factors, and campaign performance indicators, a rich set of original features is constructed. This provides a comprehensive and high-quality data foundation for subsequent modeling, ensuring that the prediction model can learn multi-dimensional information affecting promotion effects. Furthermore, constructing at least two training datasets with different temporal granularities and time spans allows the model to simultaneously learn recent fine-grained micro-change patterns and long-term coarse-grained macro-trend patterns. This multi-temporal granularity data fusion strategy enables the model to more comprehensively understand the multi-level characteristics of promotion effects evolving over time. On the other hand, using the aforementioned datasets with different temporal granularities, a heterogeneous model integration including a decision tree model, a support vector machine model, and a long short-term memory neural network model is collaboratively trained. Decision tree models and support vector machine models are adept at learning nonlinear rules and fitting complex functions from structured data, while long short-term memory neural networks are specifically designed to capture temporal dependencies. This integration strategy enables the ensemble of predictive models to leverage the strengths of various models, theoretically allowing for a more accurate fit of the complex mapping relationship between promotional effects and multiple factors, thereby improving the accuracy and stability of the final prediction. Thirdly, upon receiving real-time prediction requests, it not only utilizes internal promotional factors but also dynamically derives strong temporal context features such as weekday features and holiday type features based on planned deployment time information. This allows the generated model input feature vectors to more accurately reflect the calendar environment of a specific deployment time, helping the model make effect predictions that better align with the typical patterns of that time. Fourthly, by using the ensemble of trained models for collaborative prediction, it can simultaneously output time-sharing ROI prediction curves and final-day ROI prediction values. The time-sharing curves reveal the dynamic trends of promotional effects within the deployment day, helping to identify prime deployment periods, while the final-day prediction values provide an overall effect assessment. This dual output allows the prediction results not only to be used for final effect evaluation but also to directly guide real-time deployment strategy adjustments, enhancing the practicality and decision support value of the prediction results. In summary, the technical solution of this application, by integrating multi-time granular data and heterogeneous models, can more comprehensively capture the temporal patterns and complex relationships of promotion effects, thereby improving the accuracy and robustness of prediction and providing multi-dimensional information for campaign decisions.
[0122] Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. For example... Figure 3As shown, the electronic device 3 in this embodiment mainly includes: a processor 30, a memory 31, and a computer program 32 stored in the memory 31 and executable on the processor 30, such as a program for a promotion effect prediction method based on multi-temporal granularity and heterogeneous model integration. When the processor 30 executes the computer program 32, it implements the steps in the above-described embodiment of the promotion effect prediction method based on multi-temporal granularity and heterogeneous model integration, for example... Figure 1 Steps S1 to S5 are shown. Alternatively, when processor 30 executes computer program 32, it implements the functions of each module / unit in the above-described device embodiments, for example... Figure 2 The functions of the preprocessing module 201, construction module 202, training module 203, generation module 204, and prediction module 205 are shown.
[0123] For example, the computer program 32 of the promotion effect prediction method based on multi-time granularity and heterogeneous model integration mainly includes: acquiring multi-source log data generated by the target promotion project during the historical deployment period, and preprocessing the multi-source log data to construct an original feature set, wherein the multi-source log data includes internal promotion factors, time factors, and deployment effect indicators; constructing at least two training datasets with different time granularities and time spans based on the original feature set; using the training datasets, co-training a model ensemble composed of heterogeneous models including at least a decision tree model, a support vector machine model, and a long short-term memory neural network model to obtain a trained prediction model ensemble; receiving a real-time prediction request for the promotion plan to be predicted, deriving weekday features, holiday type features, and holiday day features based on the plan deployment time information in the real-time prediction request, and generating a model input feature vector by combining the internal promotion factors in the real-time prediction request; inputting the model input feature vector into the trained prediction model ensemble, and outputting the time-sharing return on investment (ROI) prediction curve and the final daily ROI prediction value of the promotion plan to be predicted on the deployment day through the co-prediction of different models in the trained prediction model ensemble. The computer program 32 can be divided into one or more modules / units, which are stored in the memory 31 and executed by the processor 30 to complete this application. The one or more modules / units can be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program 32 in the electronic device 3.For example, computer program 32 can be divided into the functions of a preprocessing module 201, a construction module 202, a training module 203, a generation module 204, and a prediction module 205 (a module in the virtual device). The specific functions of each module are as follows: The preprocessing module 201 is used to acquire multi-source log data generated by the target promotion project during the historical deployment period, and preprocess the multi-source log data to construct an original feature set, wherein the multi-source log data includes internal promotion factors, time factors, and deployment effect indicators; the construction module 202 is used to construct at least two training datasets with different time granularities and time spans based on the original feature set; the training module 203 is used to use the training datasets to train a model consisting of at least a decision tree model and a support vector machine. The model ensemble, composed of heterogeneous models including the quantitative model and the long short-term memory neural network model, is collaboratively trained to obtain a trained prediction model ensemble. The generation module 204 is used to receive real-time prediction requests for the promotion plan to be predicted, and derives weekday features, holiday type features, and holiday day features based on the plan deployment time information in the real-time prediction request. It also combines the internal factors of the promotion in the real-time prediction request to generate the model input feature vector. The prediction module 205 is used to input the model input feature vector into the trained prediction model ensemble. Through the collaborative prediction of different models in the trained model ensemble, it outputs the time-sharing return on investment (ROI) prediction curve of the promotion plan to be predicted on the deployment day and the final daily ROI prediction value.
[0124] Electronic device 3 may include, but is not limited to, processor 30 and memory 31. Those skilled in the art will understand that... Figure 3 This is merely an example of electronic device 3 and does not constitute a limitation on electronic device 3. It may include more or fewer components than shown, or combine certain components, or different components. For example, electronic device may also include input / output devices, network access devices, buses, etc.
[0125] The processor 30 may be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.
[0126] The memory 31 can be an internal storage unit of the electronic device 3, such as a hard disk or RAM. The memory 31 can also be an external storage device of the electronic device 3, such as a plug-in hard disk, Smart Media Card (SMC), Secure Digital (SD) card, or Flash Card. Furthermore, the memory 31 can include both internal and external storage units of the electronic device 3. The memory 31 is used to store computer programs and other programs and data required by the electronic device. The memory 31 can also be used to temporarily store data that has been output or will be output.
[0127] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed. That is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above-described device can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0128] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0129] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0130] In the embodiments provided in this application, it should be understood that the disclosed devices / electronic devices and methods can be implemented in other ways. For example, the device / electronic device embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0131] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0132] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0133] If integrated modules / units are implemented as software functional units and sold or used as independent products, they can be stored in a storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program for the promotion effect prediction method based on multi-time granularity and heterogeneous model integration can be stored in a storage medium. When executed by a processor, this computer program can implement the steps of the various method embodiments described above, namely, acquiring multi-source log data generated by the target promotion project during its historical deployment period, and preprocessing the multi-source log data to construct an original feature set, wherein the multi-source log data includes internal promotion factors, time factors, and deployment effect indicators; based on the original feature set, constructing at least two training datasets with different time granularities and time spans; and utilizing the training datasets... The system performs collaborative training on a model ensemble consisting of heterogeneous models, including at least decision tree models, support vector machine models, and long short-term memory neural network models, to obtain a trained predictive model ensemble. It receives real-time prediction requests for a promotional plan to be predicted, and based on the plan's deployment time information in the real-time prediction request, derives features such as weekday features, holiday type features, and the day of the holiday, and combines these with internal promotional factors in the real-time prediction request to generate a model input feature vector. This model input feature vector is then input into the trained predictive model ensemble. Through collaborative prediction by different models within the trained predictive model ensemble, it outputs the time-sharing ROI prediction curve for the promotional plan on the deployment day and the final daily ROI prediction value. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or some intermediate form. The storage medium can include: any entity or device capable of carrying computer program code, recording media, USB flash drives, external hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the contents of the storage medium may be appropriately added to or subtracted from the contents according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the storage medium may not include electrical carrier signals and telecommunication signals.
[0134] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit it. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. These modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application. The specific embodiments described above further illustrate the purpose, technical solutions, and beneficial effects of this application. It should be understood that the above descriptions are merely specific embodiments of this application and are not intended to limit the protection scope of this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A method for predicting the promotion effect based on multi-time granularity and heterogeneous model integration, characterized in that, The method includes: Step S1: Obtain multi-source log data generated during the historical campaign period of the target promotion project, and preprocess the multi-source log data to construct an original feature set. The multi-source log data includes internal promotion factors, time factors, and campaign performance indicators. Step S2: Based on the original feature set, construct at least two training datasets with different time granularities and time spans; Step S3: Using the training dataset, perform collaborative training on the model ensemble consisting of at least a decision tree model, a support vector machine model, and a long short-term memory neural network model to obtain a trained prediction model ensemble. Step S4: Receive a real-time prediction request for the promotion plan to be predicted. Based on the plan delivery time information in the real-time prediction request, derive the weekday feature, holiday type feature, and day of the holiday feature. Combine the internal factors of the promotion in the real-time prediction request to generate the model input feature vector. Step S5: Input the model input feature vector into the trained prediction model ensemble. Through the collaborative prediction of different models in the model ensemble, output the time-sharing ROI prediction curve of the promotion plan to be predicted on the launch day and the final daily ROI prediction value.
2. The method for predicting promotion effects based on multi-time granularity and heterogeneous model integration as described in claim 1, characterized in that, The preprocessing of multi-source log data includes: Step S1.1: Clean the multi-source log data to remove abnormal log records that are missing key fields, have zero exposure times, or have zero cost. Step S1.2: Normalize the numerical features in the cleaned log data and encode the categorical features; Step S1.3: Based on the user's first-day recharge amount and cost expenditure in the aforementioned campaign performance metrics, calculate the first-day ROI corresponding to each log record and use it as the target variable for model training; Step S1.4: Based on the delivery date and delivery time in the time factors, construct time-series related features, including calculating the time offset between the current time and the start time of the day, as well as the number of days between the current date and the nearest holiday.
3. The method for predicting promotion effects based on multi-time granularity and heterogeneous model integration as described in claim 1, characterized in that, The training dataset includes a first training dataset constructed based on hourly granular data within a first predetermined time span, and a second training dataset constructed based on daily or hourly granular data within a second predetermined time span longer than the first predetermined time span. The step of using the training dataset to collaboratively train a model ensemble consisting of heterogeneous models, including at least a decision tree model, a support vector machine model, and a long short-term memory neural network model, to obtain a trained predictive model ensemble includes: Step S3.1: Using the second training dataset, train the decision tree model and the support vector machine model independently, respectively; Step S3.2: Using the first training dataset, train the long short-term memory neural network model, wherein the hourly granular data in the first training dataset is organized into a sequence input in chronological order; Step S3.3: Combine the models trained in steps S3.1 and S3.2 into the trained prediction model ensemble.
4. The method for predicting promotion effects based on multi-time granularity and heterogeneous model integration according to claim 3, characterized in that, Following step S3.3, the method further includes the following process of weighting the prediction model ensemble: Step S3.4: Using a validation dataset, obtain the prediction results of the decision tree model, the support vector machine model, and the long short-term memory neural network model for the validation dataset; Step S3.5: Assign a dynamic weight to each model based on the error between the prediction results of each model and the true values of the validation dataset, where the model with the smaller prediction error is assigned a higher weight.
5. The method for predicting promotion effects based on multi-time granularity and heterogeneous model integration as described in claim 1, characterized in that, The method of collaborative prediction through different models in the model integration outputs the time-sharing ROI prediction curve for the promotion plan to be predicted on the launch day and the final daily ROI prediction value, including: Step S5.1: Input the model input feature vector into the decision tree model, support vector machine model, and long short-term memory neural network model in the prediction model ensemble, respectively; Step S5.2: Obtain the sequence output by the long short-term memory neural network model, which represents the trend of ROI changes in multiple consecutive time units in the future, as the basis for the time-sharing ROI prediction curve; Step S5.3: Obtain the final daily ROI prediction values output by the decision tree model and the support vector machine model respectively, and combine them with the final sequence value output by the long short-term memory neural network model to generate the final daily ROI prediction value through weighted averaging or voting.
6. The method for predicting promotion effects based on multi-time granularity and heterogeneous model integration as described in claim 1, characterized in that, The method further includes the following decision support process after step S5: Step S6: Based on the time-sharing ROI prediction curve, identify the preferred time period during which the predicted ROI value is higher than a preset threshold on the day of deployment; Step S7: Generate a decision recommendation report containing the preferred time period information and the final daily ROI forecast value, to guide the concentrated deployment of the promotion budget within the preferred time period.
7. The method for predicting promotion effects based on multi-time granularity and heterogeneous model integration as described in claim 1, characterized in that, The collaborative training of the model ensemble, which consists of at least decision tree models, support vector machine models, and long short-term memory neural network models, also includes the following weight adjustment process: Step S3.6: During model training, based on the sample size ratio of different training datasets in the training dataset and the historical prediction error trend, dynamically adjust the attention weight of the decision tree model and support vector machine model to data loss at different time spans during training.
8. A device for predicting the promotion effect based on multi-time granularity and heterogeneous model integration, characterized in that, The device includes: The preprocessing module is used to acquire multi-source log data generated by the target promotion project during the historical campaign period, and to preprocess the multi-source log data to construct an original feature set. The multi-source log data includes internal promotion factors, time factors, and campaign performance indicators. A construction module is used to construct at least two training datasets with different time granularities and time spans based on the original feature set; The training module is used to perform collaborative training on a model ensemble consisting of heterogeneous models, including at least a decision tree model, a support vector machine model, and a long short-term memory neural network model, using the training dataset, to obtain a trained prediction model ensemble. The generation module receives real-time prediction requests for the promotion plan to be predicted, and derives weekday features, holiday type features, and holiday day features based on the plan delivery time information in the real-time prediction request. It also combines the internal factors of the promotion in the real-time prediction request to generate the model input feature vector. The prediction module is used to input the model input feature vector into the trained prediction model integration, and through the collaborative prediction of different models in the model integration, output the time-sharing return on investment (ROI) prediction curve of the promotion plan to be predicted on the launch day and the final daily ROI prediction value.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method as described in any one of claims 1 to 7.
10. A storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1 to 7.