Method and system for constructing multi-source time series data fusion prediction model in bi analysis
By preprocessing and feature extraction of multi-source time-series data, combined with attention mechanisms and combined prediction models, the problem of insufficient fusion of multi-source time-series data is solved, achieving high-precision enterprise-level BI analysis and improving the accuracy and timeliness of decision-making.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING HI TECH TECH
- Filing Date
- 2025-11-12
- Publication Date
- 2026-05-08
AI Technical Summary
Existing technologies in enterprise-level BI analytics do not fully integrate multi-source time-series data, making it difficult to capture complex spatiotemporal features and lacking dynamic adaptive capabilities, resulting in low prediction accuracy and poor decision-making timeliness.
By acquiring and preprocessing multi-source raw time-series data, extracting multi-dimensional features, and using an attention mechanism to fuse time-series features and business features, a combined LSTM and XGBoost prediction model is constructed. The model parameters are then validated and optimized to generate the final prediction model.
It significantly improves the accuracy and timeliness of sales forecasting and inventory optimization decisions, with minute-level real-time response capabilities, supporting enterprise strategic planning and operational management.
Smart Images

Figure CN121480859B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of enterprise-level business intelligence analysis technology, and in particular to a method and system for constructing a multi-source time-series data fusion prediction model in BI analysis. Background Technology
[0002] With the deepening of enterprise digital transformation and upgrading, business intelligence analysis systems have become core tools for enterprises to improve operational efficiency, optimize resource allocation, and support strategic decision-making. In enterprise-level BI analysis, the fusion analysis of multi-source time-series data is crucial for key business scenarios such as sales trend forecasting, inventory optimization, and risk warning. This data covers internal business system data (such as sales data and inventory data) and external related data (such as industry trend data and macroeconomic data), and is characterized by diverse sources, heterogeneous frequencies, and complex dimensions.
[0003] However, traditional single-source forecasting methods face significant challenges when processing multi-source time-series data. First, multi-source data differ in collection frequency, data format, and semantic dimensions; for example, sales data may be daily or weekly, while macroeconomic data may be monthly or quarterly, leading to difficulties in data alignment and insufficient integration. Second, models struggle to capture the complex spatiotemporal characteristics and business coupling between multi-source data, such as the lagged correlation between sales and logistics data, and the cross-influence between user behavior data and promotional activities. These synergistic patterns are often overlooked, limiting forecast accuracy. Furthermore, existing models lack dynamic adaptive capabilities, cannot respond promptly to rapid changes in the business environment, are susceptible to noise interference, and exhibit significant forecast bias, impacting the accuracy and timeliness of enterprise decision-making.
[0004] Currently, multi-source time-series data fusion and prediction technologies in enterprise-level BI analytics are still immature. Existing methods mostly rely on simple aggregation or single models, which cannot effectively solve problems such as heterogeneous data integration, feature mining, and model generalization. Therefore, how to achieve efficient fusion of multi-source time-series data and build predictive models that can capture complex business patterns has become a technical problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0005] The purpose of this invention is to provide a method and system for constructing a multi-source time-series data fusion prediction model in BI analysis, so as to solve the problems of insufficient multi-source time-series data fusion, difficulty in capturing complex spatiotemporal features, and lack of dynamic adaptive capability in the existing technology. The specific technical solution is as follows:
[0006] This invention provides a method for constructing a multi-source time-series data fusion prediction model in BI analysis, comprising:
[0007] Step 1: Based on the business requirements of enterprise-level business intelligent analysis, acquire multi-source raw time-series data, and preprocess the multi-source raw time-series data to obtain standardized multi-source time-series data; the multi-source raw time-series data includes data from internal business systems and external related data.
[0008] Step 2: Extract features from the standardized multi-source time-series data to obtain a multi-dimensional feature set. The feature extraction includes time-series feature extraction and business feature extraction. Time-series feature extraction calculates trend, periodic and stationary features using time series analysis algorithms. Business feature extraction combines product category, region and customer group business dimensions to mine the correlation and dimensional attribute features of business indicators.
[0009] Step 3: Construct a multi-source feature fusion module and prediction model framework; use an attention mechanism to calculate the weights of the temporal feature subset and the business feature subset to obtain a fused feature vector; input the fused feature vector into a combined prediction model composed of an LSTM network and an XGBoost model for training to obtain an initial fused prediction model;
[0010] Step 4: Validate and optimize the initial fusion prediction model; select an independent validation dataset to calculate the prediction error index, including mean absolute error and root mean square error. If the error exceeds the preset threshold, adjust the attention mechanism weight parameters and model hyperparameters, and repeat training until the error meets the accuracy requirements to obtain the final prediction model.
[0011] Furthermore, the preprocessing described in step 1 includes data cleaning, format unification, and missing value imputation. Specifically, data cleaning involves using a Z-score-based statistical method to calculate the deviation of each data point from the mean; when the absolute Z-score is greater than 3, it is identified as an outlier and removed. Simultaneously, duplicate values are identified and removed using a combination of timestamps and primary keys. For sales data, business rules are used for verification; if the sales amount is negative, it is considered an outlier. Format unification includes converting the timestamps of multi-source data to the standard ISO 8601 format and unifying the time zone to UTC. For data of different frequencies, a sliding window aggregation method is used to align low-frequency data to the high-frequency time axis through linear interpolation, ensuring consistency in the time dimension. Missing value imputation includes using time series linear interpolation to complete data from internal business systems; for externally related data, if the missing rate is less than 10%, the mean of adjacent time points is used for imputation; if the missing rate is greater than 10%, imputation is derived based on business rules, such as using the industry's year-on-year growth rate to infer missing values.
[0012] Furthermore, step 1 also includes a data quality assessment process, which involves assessing data integrity, calculating the variance of the sampling time interval for each data source, and using the variance formula to calculate the variance value based on the time series of the sampling points. When the variance exceeds the threshold of 0.5, a data interpolation and completion process is triggered. A time series correlation check is performed, and the Pearson correlation coefficient of adjacent data points is calculated. If the correlation coefficient is lower than 0.8, it indicates that the data time series continuity is insufficient. The data is then smoothed using a sliding window with a window length of 7 days.
[0013] Further, the time series feature extraction in step 2 specifically includes: trend feature calculation using a sliding window method with a window length of 30 days; calculating the linear regression slope of the data within each window for daily frequency data as a trend strength indicator; if the absolute value of the slope is greater than the threshold of 0.1, the data is determined to have a significant trend, and the trend direction is recorded; separating trend components using Hodrick-Prescott filtering and calculating the trend contribution rate; when the contribution rate exceeds 60%, it is considered strong trend data; periodic feature analysis based on the autocorrelation function to detect the periodicity of the data, calculating the autocorrelation coefficient of the time series data at different lag orders, and selecting the lag order corresponding to the peak of the correlation coefficient as the main period; stationarity feature evaluation using the Augmented Dickey-Fuller test, calculating the ADF statistic; if its value is less than the 1% significance level critical value of -3.5 and the p-value is less than 0.01, the data is determined to be stationary; for non-stationary data, first-order differencing is performed, and volatility is calculated as a supplementary feature for stationarity.
[0014] Furthermore, the business feature extraction in step 2 includes business indicator correlation mining. For the three business dimensions of product category, region, and customer group, the Pearson correlation coefficient and mutual information entropy between business indicators are calculated. If the absolute value of the correlation coefficient is greater than 0.7, a strong correlation is determined. At the same time, the non-linear correlation is measured by mutual information entropy. If the entropy value exceeds 0.5, it is recorded as a significant dependency. The correlation features include horizontal correlation and vertical correlation. A business indicator correlation graph is constructed by graph neural network, and node centrality features are extracted as correlation strength indicators. Dimension attribute feature extraction is based on data aggregation according to business dimensions to generate inventory turnover rate, sales share, and gross profit margin variation coefficient for product category dimension; Gini coefficient and concentration index for region dimension; and customer activity, repurchase rate, and high-value customer share for customer group dimension.
[0015] Furthermore, step 2 also includes feature fusion and optimization. A multi-dimensional feature matrix is constructed using a subset of time-series features and a subset of business features. To eliminate the influence of dimensions, continuous features are normalized using Min-Max, and discrete features are encoded using one-hot encoding. A recursive feature elimination method is used to select key features. Using a random forest as the base model, feature importance scores are calculated, and the bottom 10% of low-contribution features are removed, retaining no more than 50 dimensions of features. Principal component analysis is used to reduce the dimensionality of the feature matrix, retaining 95% of the variance contribution rate, and generating the final multi-dimensional feature set.
[0016] Furthermore, the specific process of weight calculation for the temporal feature subset and the business feature subset by the attention mechanism in step 3 includes: calculating the importance weight of the temporal feature through the temporal attention layer, the weight value is jointly determined by the feature variance and the mutual information entropy of the prediction target, and the feature with larger variance and higher mutual information entropy receives higher weight; calculating the importance weight of the business feature through the business attention layer, and dynamically allocating weights based on the Pearson correlation coefficient between the feature and the business target value, if the absolute value of the correlation coefficient is greater than 0.6, the weight of the feature is increased by 20%; the attention mechanism uses a normalized exponential function to normalize the weights to ensure that the sum of the weights of each feature is 1; after the weight calculation is completed, the temporal feature and the business feature are weighted and fused according to the weights to form a fused feature vector.
[0017] Further, in step 4, an independent validation dataset for enterprise-level business intelligence is selected. This validation dataset is independent of the training dataset in terms of time range and business dimension, covering data from consecutive time periods following the training set. The validation data sources include internal business system data and external related data, and the data preprocessing method is consistent with the training set. The mean absolute error and root mean square error (RMSE) between the prediction results and the actual business target values are calculated. Preset accuracy thresholds are dynamically set according to the business scenario: for sales forecasting tasks, the mean absolute error threshold is set to 0.05, and the RMS error threshold is set to 0.08; for inventory turnover forecasting tasks, the mean absolute error threshold is set to 0.1. Error calculation is differentiated. From a business perspective, error metrics are calculated for each product category. If the error metrics exceed the threshold, the attention mechanism weight parameters and the hyperparameters of the combined prediction model are adjusted, including the number of hidden layer nodes in LSTM and the tree depth in XGBoost. The adjustment strategies include: for the temporal feature subset, dynamically adjusting the weight coefficients using gradient descent with a weight update step size of 0.01; for the business feature subset, redistributing weights based on the Pearson correlation coefficient; hyperparameter adjustment is optimized using grid search or random search; an iterative optimization strategy is used to repeat the training and validation process, with an early stopping mechanism, where the model is considered converged when the error reduction rate is less than 1% for three consecutive iterations.
[0018] This invention also relates to a system for constructing a multi-source time-series data fusion prediction model in BI analysis, used to implement the method described above, characterized in that it includes: a data acquisition and preprocessing unit, a multi-dimensional feature extraction unit, a fusion prediction model construction unit, and a model verification and optimization unit;
[0019] The data acquisition and preprocessing unit is used to acquire multi-source raw time-series data and preprocess it to obtain standardized data.
[0020] The multi-dimensional feature extraction unit is used to extract features from standardized data to obtain a multi-dimensional feature set;
[0021] The fusion prediction model building unit is used to fuse features using an attention mechanism and train an initial prediction model using LSTM and XGBoost models.
[0022] The model validation and optimization unit is used to optimize the model using a validation dataset to obtain the final prediction model.
[0023] Furthermore, the data acquisition and preprocessing unit also includes a data integrity assessment module and a temporal correlation verification module to ensure data quality; the multi-dimensional feature extraction unit also includes a feature fusion and optimization module to normalize and reduce the dimensionality of the feature matrix; the attention mechanism in the fusion prediction model construction unit is configured to calculate weights based on variance and correlation coefficient, the LSTM network is set as a three-layer gated structure, and the XGBoost model is set as a gradient boosting decision tree; the model validation and optimization unit also includes a parameter adjustment module and an iterative optimization module to dynamically adjust parameters and control the training process.
[0024] An electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, performs the steps of the method described herein.
[0025] A computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the steps of the method.
[0026] The beneficial effects of this invention are as follows: By deeply integrating and intelligently predicting multi-source time-series data, this invention effectively solves key problems in enterprise-level BI analysis, such as high data heterogeneity, insufficient feature extraction, and weak model adaptability. It significantly improves the accuracy and timeliness of decision-making in business scenarios such as sales forecasting and inventory optimization. Compared with traditional single prediction models, it can effectively improve accuracy and inventory optimization decision-making accuracy, and has a minute-level real-time response capability, providing reliable data support for enterprise strategic planning and operation management.
[0027] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description
[0028] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:
[0029] Figure 1 This is a schematic diagram illustrating the steps of a method for constructing a multi-source time-series data fusion prediction model in BI analysis, provided by a preferred embodiment of the present invention.
[0030] Figure 2 This is a schematic diagram of the structure of a system for constructing a multi-source time-series data fusion prediction model in BI analysis, provided by a preferred embodiment of the present invention. Detailed Implementation
[0031] The preferred embodiments of the present invention will be described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.
[0032] In enterprise-level BI analytics, it is often necessary to integrate time-series data from multiple business systems to achieve comprehensive prediction and decision support for business indicators. However, due to differences in collection frequency, data format, and semantic dimensions among multi-source time-series data, traditional single-source prediction methods struggle to effectively integrate time-series features from different sources. This results in insufficient model capability to capture complex business situations, leading to biased prediction results and consequently affecting the accuracy and timeliness of enterprise operational decisions.
[0033] Multi-source time-series data often exhibit potential spatiotemporal correlations and business couplings. For example, sales data and logistics data have a time-lag correlation, while user behavior data and promotional activity data have cross-dimensional influences. This multi-source collaborative change pattern contains the dynamic evolution characteristics of the business system. If it can be effectively extracted and integrated, it will significantly improve the generalization ability and interpretability of the predictive model.
[0034] In embodiments of the present invention, a method for constructing a multi-source time-series data fusion prediction model in BI analysis is provided. This method is applied to an enterprise business intelligent analysis system to solve the problem of accurate prediction of multi-source time-series data under conditions of heterogeneity, noise interference, and difficulties in spatiotemporal alignment. Please refer to... Figure 1 The method includes the following steps:
[0035] Step 1: Based on the business requirements of enterprise-level business intelligent analysis, acquire multi-source raw time series data, and preprocess the multi-source raw time series data to obtain standardized multi-source time series data.
[0036] Specifically, the business requirements for enterprise-level business intelligence analysis include sales trend forecasting, inventory optimization, and risk warning, which necessitate building predictive models based on historical and real-time data. The multi-source raw time-series data includes data from internal business systems and externally related data. Internal business system data includes at least sales data and inventory data: sales data originates from the enterprise's ERP or CRM system, containing indicators such as sales revenue, order volume, and customer activity, sampled daily or weekly; inventory data originates from the WMS system, containing indicators such as inventory turnover rate, inventory age, and stockout rate, sampled hourly or daily. Externally related data includes at least industry trend data and macroeconomic data: industry trend data is obtained through public API interfaces (such as the National Bureau of Statistics and industry association databases), containing indicators such as industry growth rate, competition index, and market saturation; macroeconomic data originates from financial information platforms (such as Wind and the National Bureau of Statistics), containing indicators such as GDP growth rate, consumer confidence index, and inflation rate, sampled monthly or quarterly.
[0037] Preprocessing of multi-source raw time series data includes data cleaning, format standardization, and missing value imputation.
[0038] Data cleaning includes first removing outliers. A Z-score-based statistical method is used to calculate the deviation of each data point from the mean. Data points with an absolute Z-score greater than 3 are considered outliers and removed. Duplicate values are also identified by combining timestamps and primary keys. For sales data, business rules are also incorporated for validation; for example, sales revenue should not be negative, and negative values are considered outliers.
[0039] Format standardization includes converting timestamps from multi-source data to the standard ISO 8601 format and unifying the time zone to UTC. For data of different frequencies (such as daily sales data and monthly macroeconomic data), a sliding window aggregation method is used to align low-frequency data to the high-frequency time axis through linear interpolation, ensuring consistency in the time dimension.
[0040] Missing value imputation involves selecting interpolation methods or business rules based on data type characteristics. For internal business system data (such as sales data), missing values are imputed using time series linear interpolation. For externally related data (such as macroeconomic data), if the missing rate is less than 10%, the average of adjacent time points is used for imputation; if the missing rate is greater than 10%, it is derived based on business rules, such as using the industry's year-on-year growth rate to infer missing values.
[0041] Furthermore, to ensure data quality, data integrity assessment and temporal correlation verification are introduced:
[0042] Data integrity assessment: Calculate the variance of the sampling time interval for each data source. A larger variance indicates greater fluctuation in the data collection interval and poorer data integrity. Let the sampling time be t1, t2, ..., t n The formula for the variance of the time interval is:
[0043] ;
[0044] Where μ is the average time interval. When the variance exceeds the threshold of 0.5, the data interpolation and completion process is triggered.
[0045] Temporal correlation verification: Calculate the Pearson correlation coefficient between adjacent data points. If the correlation coefficient is lower than 0.8, it indicates that the temporal continuity of the data is insufficient and it is necessary to use a sliding window smoothing process (window length is 7 days) to enhance stability.
[0046] Through the above preprocessing, standardized multi-source time-series data is obtained, characterized by: unified timestamps, outlier removal rate exceeding 95%, missing value imputation accuracy exceeding 90%, and significantly improved time-series correlation among various data sources. This step lays a high-quality data foundation for the subsequent construction of the fusion prediction model and solves the integration challenge caused by the heterogeneity of multi-source data.
[0047] Step 2: Extract features from the standardized multi-source time-series data to obtain a multi-dimensional feature set. Feature extraction includes time-series feature extraction and business feature extraction. Time-series feature extraction involves calculating trend, periodic, and stationary features using time-series analysis algorithms. Business feature extraction involves mining the correlation and dimensional attribute features of business indicators by combining business dimensions of enterprise-level business intelligence. Business dimensions include product category, region, and customer group, resulting in a subset of time-series features and a subset of business features.
[0048] Specifically, based on the standardized multi-source time-series data obtained in step 1, multi-dimensional feature extraction is performed to capture the temporal patterns and business correlations within the data. Feature extraction includes two core steps: time-series feature extraction and business feature extraction. Time-series feature extraction aims to uncover the trend, periodicity, and stationarity characteristics of the data from a time perspective; business feature extraction combines the business dimensions of enterprise-level BI analysis (including product categories, regions, and customer groups) to uncover the correlations and dimensional attribute characteristics between business indicators. Through the above extraction process, time-series feature subsets and business feature subsets are generated respectively and then merged into a multi-dimensional feature set.
[0049] Its temporal feature extraction is achieved through time series analysis algorithms, including the following steps:
[0050] Trend feature calculation includes using a sliding window method to calculate the long-term trend of standardized multi-source time series data. With a window length of 30 days (for daily frequency data), the slope of the linear regression within each window is calculated as an indicator of trend strength. If the absolute value of the slope is greater than a threshold of 0.1, the data is considered to have a significant trend, and the trend direction (positive / negative) is recorded. Simultaneously, the trend components are separated using Hodrick-Prescott filtering, and the trend contribution rate (the ratio of the trend component variance to the original series variance) is calculated. Data with a contribution rate exceeding 60% is considered to have a strong trend.
[0051] Periodicity analysis includes detecting periodic patterns in data based on the autocorrelation function (ACF). The autocorrelation coefficients of time-series data at different lag orders are calculated, and the lag order corresponding to the peak correlation coefficient is selected as the principal period. For example, a peak in sales data at lag=7 indicates weekly periodicity; a secondary peak at lag=30 indicates monthly periodicity. The intensity of periodicity is quantified by the autocorrelation coefficient of the principal peak; if the coefficient is greater than 0.6, the data is considered to have significant periodicity. Simultaneously, frequency domain features are extracted using Fourier transform to identify dominant frequency components; components whose amplitude exceeds 10% of the total amplitude are considered valid periodic features.
[0052] Stationarity assessment: The Augmented Dickey-Fuller (ADF) test was used to determine the stationarity of the data. The ADF statistic was calculated; if its value was less than the 1% significance level critical value (-3.5) and the p-value was less than 0.01, the non-stationarity hypothesis was rejected, and the data was considered stationary. For non-stationary data, first-order differencing was performed, and the stationarity index after differencing was recorded. Simultaneously, the volatility (rolling standard deviation) of the data was calculated as a supplementary feature of stationarity; data with volatility less than 20% of the historical mean were considered highly stationary.
[0053] Its business feature extraction, combined with enterprise-level BI analysis, includes the following steps:
[0054] Business metric correlation mining: For three business dimensions—product category, region, and customer group—Pearson correlation coefficients and mutual information entropy are calculated between business metrics. For example, for the product category dimension, a correlation coefficient matrix of sales revenue for different categories is calculated. If the absolute value of the coefficient is greater than 0.7, a strong correlation is determined. Simultaneously, non-linear correlations are measured using mutual information entropy; entropy values exceeding 0.5 are recorded as significant dependencies. Correlation features include horizontal correlations (between different metrics at the same time point) and vertical correlations (between different time points for the same metric). A business metric correlation graph is constructed using a graph neural network, and node centrality features are extracted as correlation strength indicators.
[0055] Dimensional attribute feature extraction includes data aggregation based on business dimensions to generate dimension-specific features, including:
[0056] Product category dimension: Calculate the inventory turnover rate, sales share, and gross profit margin variation coefficient for each category;
[0057] Regional dimension: Extract the Gini coefficient (measures the balance of distribution between regions) and concentration index (the proportion of top regions) of regional sales.
[0058] Customer group dimension: Calculate customer activity (login frequency in the last 30 days), repurchase rate, and the proportion of high-value customers.
[0059] The aforementioned attribute features are standardized using Z-score and then aligned with the temporal features.
[0060] Furthermore, the time-series feature subset and the business feature subset are fused and optimized:
[0061] A multi-dimensional feature matrix is constructed using subsets of temporal features and business features, with a matrix dimension of N×M (N being the number of samples and M being the total number of features). To eliminate the influence of dimensions, continuous features are normalized using Min-Max, and discrete features are encoded using one-hot encoding.
[0062] Key features are selected using the Recursive Feature Elimination (RFE) method: using random forest as the base model, feature importance scores are calculated, and the bottom 10% of low-contribution features are eliminated, retaining no more than 50 features to ensure that the model complexity is controllable.
[0063] Finally, principal component analysis (PCA) is used to reduce the dimensionality of the feature matrix, retaining 95% of the variance contribution rate, to generate the final multi-dimensional feature set, which combines temporal dynamics and business interpretability.
[0064] This step, through the aforementioned feature extraction process, addresses the problem of insufficient discovery of hidden patterns in multi-source time-series data, providing high-information-density input features for subsequent model construction.
[0065] Step 3: Construct a multi-source feature fusion module and prediction model framework; use an attention mechanism to calculate the weights of the temporal feature subset and the business feature subset, dynamically adjust the fusion weights of the two types of features according to the business scenario, and obtain a fused feature vector; input the fused feature vector into a preset combined prediction model, which consists of an LSTM network and an XGBoost model. The LSTM network is used to capture temporal dependencies, and the XGBoost model is used to enhance the nonlinear mapping of business features; train the combined prediction model using a historical dataset labeled with business target values, including sales forecasts and inventory turnover forecasts, to obtain an initial fused prediction model;
[0066] Specifically, based on the multi-dimensional feature set obtained in step 2, a multi-source feature fusion module and a prediction model framework are constructed. This module dynamically fuses temporal features and business features through an attention mechanism, and employs a prediction framework combining an LSTM network and an XGBoost model to simultaneously capture the nonlinear mapping patterns of temporal dependencies and business features. Finally, the combined prediction model is trained using a historical dataset labeled with business target values to obtain the initial fused prediction model.
[0067] First, an attention mechanism is employed to adaptively fuse temporal and business feature subsets. The temporal feature subset includes trend, periodic, and stationary features, while the business feature subset includes correlation and attribute features of business indicators across dimensions such as product category, region, and customer group. The importance weights of temporal features are calculated through a temporal attention layer, with the weights determined by the feature variance and the mutual information entropy of the prediction target; features with higher variance and mutual information entropy receive higher weights. The importance weights of business features are calculated through a business attention layer, dynamically assigning weights based on the Pearson correlation coefficient between the feature and the business target value. Features with an absolute correlation coefficient greater than 0.6 receive a 20% increase in weight. The attention mechanism uses a normalized exponential function to normalize the weights, ensuring that the sum of all feature weights is 1. After weight calculation, the temporal and business features are weighted and fused to form a fused feature vector that combines temporal dynamism and business semantics.
[0068] Secondly, the fused feature vectors are input into a combined prediction model consisting of LSTM and XGBoost. The LSTM network employs a three-layer gated recurrent unit structure, with 128 neurons per layer and a dropout rate of 0.2 to prevent overfitting. The input sequence length is set to 30 time steps, corresponding to the monthly cyclical data pattern. LSTM selectively retains historical information and filters noise interference through a triple gating mechanism of input gate, forget gate, and output gate, effectively capturing long-term temporal dependencies. The XGBoost model uses a gradient boosting decision tree framework, with a maximum tree depth of 10 and a learning rate of 0.1. The decision tree combination is iteratively optimized through a forward step-by-step algorithm. XGBoost selects the optimal split point through the Gini coefficient descent criterion during feature splitting, effectively enhancing the nonlinear mapping capability of business features. The outputs of the dual-path model are integrated using a weighted average method, with the weights dynamically adjusted based on the mean squared error performance on the validation set. Typically, the LSTM weight is set to 0.6, and the XGBoost weight is set to 0.4.
[0069] Furthermore, the combined forecasting model was trained using a historical dataset labeled with business target values. These business target values included continuous sales forecasts and categorized inventory turnover forecasts. The training data was divided into training and validation sets in a 7:3 ratio, and time-series cross-validation was used to ensure temporal continuity. The LSTM network parameters were initialized using a Xavier normal distribution, with a training cycle of 100 epochs and a batch size of 32. The Adam optimizer was used for parameter updates, and a learning rate decay strategy was employed to prevent oscillations. The XGBoost model optimized hyperparameters using a grid search method and employed early stopping to prevent overfitting; training was terminated when the validation set loss did not decrease for 10 consecutive epochs. After model training, the root mean square error (RMSE) and mean absolute percentage error (MSE) between the predicted and true sequences were calculated, and an RMSE threshold of 0.05 was set as the model performance acceptance criterion.
[0070] Finally, through the multi-source feature fusion and combined model training described above, an initial fusion prediction model is obtained. This model fully leverages the complementary advantages of LSTM in temporal pattern recognition and XGBoost in business feature mining. In actual enterprise BI analysis scenarios, it effectively improves prediction accuracy compared to a single model, significantly enhancing the accuracy and reliability of enterprise-level business intelligence analysis.
[0071] Step 4: Validate and optimize the initial fusion prediction model. Select an independent validation dataset for enterprise-level business intelligence, input the validation dataset into the initial fusion prediction model, and calculate the error index between the prediction result and the actual business target value. The error index includes mean absolute error and root mean square error. If the error index exceeds the preset accuracy threshold, adjust the weight parameters of the attention mechanism and the hyperparameters of the combined prediction model. The hyperparameters of the combined prediction model include the number of hidden layer nodes of LSTM and the tree depth of XGBoost. Repeat the training and validation process until the error index meets the preset accuracy requirements to obtain the final multi-source time series data fusion prediction model for BI analysis.
[0072] Specifically, based on the initial fusion prediction model obtained in step 3, systematic verification and optimization are performed to ensure the model's prediction accuracy, stability, and practicality in enterprise-level business intelligence analysis. This step evaluates the model's performance using an independent validation dataset, conducts multiple rounds of parameter adjustment and iterative training targeting error metrics, and ultimately obtains a multi-source time-series data fusion prediction model that meets the high-precision requirements of enterprise-level business intelligence analysis. The verification and optimization process includes five core steps: validation dataset preparation, error metric calculation, accuracy threshold determination, adaptive parameter adjustment, and iterative model optimization.
[0073] First, select an independent validation dataset for enterprise-level business intelligence and standardize it. The validation dataset must be completely independent of the training dataset in terms of time range and business dimension. It typically covers business data for consecutive time periods after the training set. For example, the training set uses data from the past 24 months, while the validation set uses data from the following 6 months. Validation data sources include internal enterprise business systems (such as sales data provided by ERP systems and inventory turnover records provided by WMS systems) and external related data (such as quarterly industry growth rates published by industry associations and monthly consumer confidence indices published by the National Bureau of Statistics). Data preprocessing methods are strictly consistent with those of the training set, including data cleaning (removing outliers with Z-scores greater than 3), format standardization (converting to UTC timestamps), and missing value imputation (using linear interpolation). The business target values of the validation dataset include continuous variables (such as sales forecasts, in ten thousand yuan) and categorical variables (such as inventory turnover levels, divided into high / medium / low levels), and are aligned with the prediction sequence through timestamps to ensure that the actual values and predicted values are of consistent length. For example, a manufacturing company's validation set contains data from 180 time points. The sales data is sampled daily, and the macroeconomic data is sampled monthly. After being aggregated and aligned using a sliding window, a standardized validation set is formed.
[0074] Secondly, the validation dataset is input into the initial fusion prediction model to calculate the error metrics between the prediction results and the actual business target values. The error metrics mainly include mean absolute error (MAE) and root mean square error (RMSE), used to quantify model prediction bias. MAE is obtained by averaging the absolute differences between predicted and actual values at all time points, reflecting the average level of prediction error; RMSE is obtained by calculating the square root of the average of the squared deviations between predicted and actual values, and is more sensitive to larger errors. Preset accuracy thresholds are dynamically set according to the business scenario: for sales forecasting tasks, the MAE threshold is set to 0.05 (i.e., 5% relative error), and the RMSE threshold is set to 0.08; for inventory turnover forecasting tasks, due to the characteristics of categorical variables, the threshold is appropriately relaxed to 0.1. Error calculation needs to differentiate between business dimensions; for example, for the product category dimension, error metrics for each category are calculated separately to avoid the global average masking local biases. When the error metric for any dimension exceeds the corresponding threshold, the model optimization process is triggered.
[0075] If the error index exceeds the preset accuracy threshold, the model parameters will be adjusted in multiple levels. Parameter adjustment covers two parts: the attention mechanism weight parameters and the combined prediction model hyperparameters.
[0076] Attention Mechanism Weight Parameter Adjustment: The weight allocation strategy of the attention layer is optimized based on the backpropagation of the validation set error. For the temporal feature subset, the weight coefficients of the temporal attention layer are dynamically adjusted using the gradient descent method, with the weight update step size set to 0.01. For the business feature subset, the weights are redistributed according to the Pearson correlation coefficient between the features and the business target value. Features with an absolute correlation coefficient value lower than 0.6 have their weights reduced by 20%, while those with a higher absolute correlation coefficient value have their weights increased by 15%.
[0077] Hyperparameter tuning for the combined prediction model includes the number of hidden layer nodes in the LSTM network and the tree depth of the XGBoost model. The initial number of hidden layer nodes in the LSTM network is 128, with an adjustment range of 64 to 256. The optimal value is selected using a grid search method based on the root mean square error performance on the validation set. For example, when the error consistently exceeds a threshold, the number of nodes is gradually increased to 192 or 256 to enhance model capacity. The initial XGBoost tree depth is 10, with an adjustment range of 5 to 20, optimized using a random search method to avoid overfitting. Error metrics need to be re-validated after each iteration of hyperparameter tuning.
[0078] Furthermore, an iterative optimization strategy is employed to repeat the training and validation process. After each parameter adjustment, the model is retrained using the training dataset from step 3, with a training cycle of 100 rounds, a batch size of 32, and the Adam optimizer used. The learning rate decay strategy is to reduce it by 50% every 20 rounds. The retrained model is then input into the validation dataset to calculate the error metric. If it still exceeds the threshold, multiple rounds of optimization loops are initiated until all error metrics meet the accuracy requirements. An early stopping mechanism is implemented in the optimization process; the model is considered converged when the error decrease rate is less than 1% for three consecutive iterations. For example, in a sales prediction model for an e-commerce platform, the initial mean absolute error was 0.09. After two rounds of parameter adjustments (increasing the number of LSTM nodes to 192 and reducing the XGBoost tree depth to 8), the error decreased to 0.04, meeting the threshold requirement.
[0079] Finally, through the above verification and optimization process, a multi-source time-series data fusion prediction model for BI analysis was obtained. The optimized model has a mean absolute error of no more than 0.05 and a root mean square error of no more than 0.08 on the independent test set, and it performs stably across different business dimensions (such as product category and region). This model supports the real-time prediction needs of enterprise-level BI analysis, such as reducing the response time for sales trend prediction to the minute level and improving the accuracy of inventory optimization decisions by 25%.
[0080] Accordingly, such as Figure 2As shown, based on a method for constructing a multi-source time-series data fusion prediction model in BI analysis, this embodiment of the invention also provides a system for constructing a multi-source time-series data fusion prediction model in BI analysis, realizing the method for constructing a multi-source time-series data fusion prediction model in BI analysis disclosed in this embodiment of the invention. The system is applied to an enterprise business intelligent analysis platform and includes: a data acquisition and preprocessing unit 1, a multi-dimensional feature extraction unit 2, a fusion prediction model construction unit 3, and a model verification and optimization unit 4.
[0081] The data acquisition and preprocessing unit 1 is used to acquire multi-source raw time-series data based on the business needs of enterprise-level BI analysis, and preprocess the multi-source raw time-series data to obtain standardized multi-source time-series data. The preprocessing includes data cleaning, format unification, and missing value filling. Data cleaning removes outliers and duplicates using the Z-score statistical method. Format unification converts timestamps to the standard ISO 8601 format and unifies the time zone. Missing value filling is performed by interpolation or business rules according to the data type.
[0082] The multi-dimensional feature extraction unit 2 is used to extract features from the standardized multi-source time-series data to obtain a multi-dimensional feature set. The feature extraction includes time-series feature extraction and business feature extraction. Time-series feature extraction calculates trend, periodic and stationary features through time series analysis algorithms. Business feature extraction combines product category, region and customer group business dimensions to mine the correlation and dimensional attribute features of business indicators.
[0083] The fusion prediction model construction unit 3 is used to construct a multi-source feature fusion module and a prediction model framework; an attention mechanism is used to calculate the weights of the temporal feature subset and the business feature subset to obtain a fusion feature vector, and the fusion feature vector is input into the combined prediction model composed of LSTM network and XGBoost model for training to obtain the initial fusion prediction model.
[0084] The model verification and optimization unit 4 is used to verify and optimize the initial fusion prediction model; the prediction error index is calculated by using an independent verification dataset; if the error exceeds a preset threshold, the attention mechanism weight parameters and the hyperparameters of the LSTM and XGBoost models are adjusted, and the training is repeated until the model meets the accuracy requirements, thus obtaining the final multi-source time series data fusion prediction model.
[0085] Specific limitations regarding the construction system of a multi-source time-series data fusion prediction model in BI analysis can be found in the above-described limitations regarding the construction method of a multi-source time-series data fusion prediction model in BI analysis, and will not be repeated here. Those skilled in the art will recognize that the various modules and steps described in conjunction with the embodiments disclosed in this invention can be implemented in hardware, software, or a combination of both. 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 invention.
[0086] This embodiment provides a system for constructing a multi-source time-series data fusion and prediction model in BI analysis, addressing technical issues such as insufficient fusion of multi-source time-series data, difficulty in capturing complex spatiotemporal features, and lack of dynamic adaptive capabilities. The system achieves standardized processing of multi-source data through a data acquisition and preprocessing unit, mines temporal patterns and business correlations through a multi-dimensional feature extraction unit, employs an attention mechanism and an LSTM-XGBoost combined model to achieve feature fusion and prediction through a fusion and prediction model construction unit, and ensures the model's prediction accuracy and stability through a model validation and optimization unit. This system effectively improves the accuracy and real-time performance of sales trend prediction and inventory optimization in enterprise-level BI analysis. Compared to a single model, this solution improves prediction accuracy and the accuracy of inventory optimization decisions.
[0087] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.
Claims
1. A method for constructing a multi-source time-series data fusion prediction model in BI analysis, characterized in that, include: Step 1: Based on the business requirements of enterprise-level business intelligent analysis, acquire multi-source raw time-series data, preprocess the multi-source raw time-series data to obtain standardized multi-source time-series data; the multi-source raw time-series data includes data from internal business systems and external related data. Step 2: Extract features from the standardized multi-source time-series data to obtain a multi-dimensional feature set. The feature extraction includes time-series feature extraction and business feature extraction. Time-series feature extraction calculates trend, periodic and stationary features using time series analysis algorithms. Business feature extraction combines product category, region and customer group business dimensions to mine the correlation and dimensional attribute features of business indicators. Step 3: Construct a multi-source feature fusion module and prediction model framework; use an attention mechanism to calculate the weights of the temporal feature subset and the business feature subset to obtain a fused feature vector; input the fused feature vector into a combined prediction model composed of an LSTM network and an XGBoost model for training to obtain an initial fused prediction model; The LSTM network employs a three-layer gated recurrent unit (GRU) structure, with 128 neurons per layer, a dropout rate of 0.2, and an input sequence length of 30 time steps. The LSTM network parameters are initialized using a Xavier normal distribution, with 100 training epochs and a batch size of 32. The Adam optimizer is used for parameter updates, and a learning rate decay strategy is employed. The XGBoost model uses a gradient boosting decision tree framework, with a maximum tree depth of 10 and a learning rate of [missing information]. 0.1, an early stopping rule is set during training: training is terminated if the validation set loss does not decrease for 10 consecutive rounds; the outputs of the LSTM network and the XGBoost model are integrated using a weighted average method, with the LSTM weight set to 0.6 and the XGBoost weight set to... 0.4, the weights are dynamically adjusted based on the mean squared error performance on the validation set; Training data is divided into training and validation sets in a 7:3 ratio. Time-series cross-validation is used to ensure temporal continuity, and an RMSE threshold is set during model training. 0.05 is used as the performance acceptance standard; Step 4: Verify and optimize the initial fusion prediction model; The prediction error metrics, including mean absolute error and root mean square error, are calculated by selecting an independent validation dataset. If the error exceeds the preset threshold, the attention mechanism weight parameters and model hyperparameters are adjusted, and the training is repeated until the error meets the accuracy requirements to obtain the final prediction model.
2. The construction method as described in claim 1, characterized in that, The preprocessing described in step 1 includes data cleaning, format standardization, and missing value imputation. Data cleaning specifically involves using a Z-score-based statistical method to calculate the deviation of each data point from the mean; outliers are identified and removed when the absolute Z-score is greater than 3. Duplicate values are also identified and removed using a combination of timestamps and primary keys. For sales data, business rules are used for verification; negative sales figures are considered outliers. Format standardization involves converting timestamps from multi-source data to the standard ISO 8601 format and standardizing the time zone to UTC. For data of different frequencies, a sliding window aggregation method is used to align low-frequency data to the high-frequency time axis using linear interpolation, ensuring consistency in the time dimension. Missing value imputation includes using time series linear interpolation to complete data from internal business systems; for externally correlated data, if the missing rate is less than 10%, the mean of adjacent time points is used for imputation; if the missing rate is greater than 10%, imputation is derived based on business rules, such as using the industry's year-on-year growth rate to infer missing values.
3. The construction method as described in claim 2, characterized in that, Step 1 also includes a data quality assessment process, which assesses data integrity and calculates the variance of the sampling time interval for each data source. The variance formula is based on the time series of the sampling points. When the variance exceeds the threshold of 0.5, the data interpolation and completion process is triggered. A time-series correlation check was performed by calculating the Pearson correlation coefficient between adjacent data points. If the correlation coefficient was lower than 0.8, it indicated that the data time-series continuity was insufficient. A sliding window was used for smoothing, with a window length of 7 days.
4. The construction method as described in claim 1, characterized in that, The time series feature extraction described in step 2 specifically includes the trend feature calculation using the sliding window method with a window length of 30 days. For daily frequency data, the linear regression slope of the data within each window is calculated as a trend strength indicator. If the absolute value of the slope is greater than the threshold of 0.1, it is determined that the data has a significant trend, and the trend direction is recorded. Trend components are separated by Hodrick-Prescott filtering, and the trend contribution rate is calculated. Data with a contribution rate exceeding 60% is considered to have a strong trend. Periodicity feature analysis is based on the autocorrelation function to detect the periodicity of the data. The autocorrelation coefficient of the time series data under different lag orders is calculated, and the lag order corresponding to the peak of the correlation coefficient is selected as the principal period. The stationarity feature is evaluated using the Augmented Dickey-Fuller test. The ADF statistic is calculated. If its value is less than the 1% significance level critical value of -3.5 and the p value is less than 0.01, the data is judged to be stationary. For non-stationary data, first-order differencing is performed, and volatility is calculated as a supplementary feature of stationarity.
5. The construction method as described in claim 1, characterized in that, Step 2's business feature extraction includes business indicator correlation mining. For the three business dimensions of product category, region, and customer group, the Pearson correlation coefficient and mutual information entropy between business indicators are calculated. If the absolute value of the correlation coefficient is greater than 0.7, it is determined that there is a strong correlation. At the same time, the non-linear correlation is measured by mutual information entropy. If the entropy value exceeds 0.5, it is recorded as a significant dependency. The correlation features include horizontal and vertical correlations, and a correlation graph of business indicators is constructed through a graph neural network to extract node centrality features as correlation strength indicators. The dimensional attribute feature extraction is based on data aggregation according to business dimensions to generate inventory turnover rate, sales share and gross profit margin variation coefficient of product category dimension, Gini coefficient and concentration index of region dimension, and customer activity, repurchase rate and high-value customer share of customer group dimension.
6. The construction method as described in claim 1, characterized in that, Step 2 also includes feature fusion and optimization. A multi-dimensional feature matrix is constructed using a subset of time-series features and a subset of business features. To eliminate the influence of dimensions, continuous features are normalized using Min-Max, and discrete features are encoded using one-hot encoding. A recursive feature elimination method is used to select key features. Using a random forest as the base model, feature importance scores are calculated, and the bottom 10% of low-contribution features are removed, retaining no more than 50 dimensions of features. Principal component analysis is used to reduce the dimensionality of the feature matrix, retaining 95% of the variance contribution rate, and generating the final multi-dimensional feature set.
7. The construction method as described in claim 1, characterized in that, The specific process of weight calculation for the temporal feature subset and the business feature subset by the attention mechanism in step 3 includes: calculating the importance weight of the temporal feature through the temporal attention layer, the weight value is jointly determined by the feature variance and the mutual information entropy of the prediction target, and the feature with larger variance and higher mutual information entropy receives higher weight; calculating the importance weight of the business feature through the business attention layer, and dynamically allocating weights based on the Pearson correlation coefficient between the feature and the business target value, if the absolute value of the correlation coefficient is greater than 0.6, the weight of the feature is increased by 20%; the attention mechanism uses a normalized exponential function to normalize the weights to ensure that the sum of the weights of each feature is 1; after the weight calculation is completed, the temporal feature and the business feature are weighted and fused according to their weights to form a fused feature vector.
8. The construction method as described in claim 1, characterized in that, In step 4, an independent validation dataset for enterprise-level business intelligence is selected. The validation dataset is independent of the training dataset in terms of time range and business dimension, and covers data for continuous time periods after the training set. The sources of validation data include data from internal business systems and external related data. The data preprocessing method is consistent with that of the training set. The mean absolute error and root mean square error between the prediction results and the actual business target values are calculated. The preset accuracy thresholds are dynamically set according to the business scenario: for sales forecasting tasks, the mean absolute error threshold is set to 0.05, and the root mean square error threshold is set to 0.08; for inventory turnover forecasting tasks, the mean absolute error threshold is set to 0.
1. Error calculation is differentiated by business dimension, and the error index for each product category is calculated separately. If the error index exceeds the threshold, the attention mechanism weight parameters and the hyperparameters of the combined prediction model are adjusted, including the number of hidden layer nodes of LSTM and the tree depth of XGBoost. The adjustment strategies include: for time series feature subsets, the weight coefficients are dynamically adjusted using gradient descent, with the weight update step size set to 0.01; for business feature subsets, the weights are redistributed according to the Pearson correlation coefficient. Hyperparameter tuning employs grid search or random search optimization; iterative optimization strategy is used to repeat the training and validation process, and an early stopping mechanism is set up, determining that the model has converged when the error decrease rate is less than 1% for three consecutive iterations.
9. A system for constructing a multi-source time-series data fusion prediction model in BI analysis, used to implement the method described in any one of claims 1-8, characterized in that, include: Data acquisition and preprocessing unit, multi-dimensional feature extraction unit, fusion prediction model construction unit, and model validation and optimization unit; The data acquisition and preprocessing unit is used to acquire multi-source raw time-series data and preprocess it to obtain standardized data. The multi-dimensional feature extraction unit is used to extract features from standardized data to obtain a multi-dimensional feature set; The fusion prediction model building unit is used to fuse features using an attention mechanism and train an initial prediction model using LSTM and XGBoost models. The model validation and optimization unit is used to optimize the model using a validation dataset to obtain the final prediction model.
10. The system as described in claim 9, characterized in that, The data acquisition and preprocessing unit also includes a data integrity assessment module and a temporal correlation verification module to ensure data quality; the multi-dimensional feature extraction unit also includes a feature fusion and optimization module to normalize and reduce the dimensionality of the feature matrix; the attention mechanism in the fusion prediction model construction unit is configured to calculate weights based on variance and correlation coefficient, the LSTM network is set as a three-layer gated structure, and the XGBoost model is set as a gradient boosting decision tree; the model validation and optimization unit also includes a parameter adjustment module and an iterative optimization module to dynamically adjust parameters and control the training process.
Citation Information
Patent Citations
Food and beverage network sales trend prediction model construction system and method based on multi-source data fusion and deep learning
CN120655340A