Multimodal Data Guided Spatial Feature Fusion and Grouping Strategy for E-Commerce Commodity Demand Forecasting

E-commerce offers various merchandise for selling and purchasing with frequent transactions and commodity flows. An accurate prediction of customer needs and optimized allocation of goods is required for cost reduction. ,e existing solutions have significant errors and are unsuitable for addressing warehouse needs and allocation. ,at is why businesses cannot respond to customer demands promptly, as they need accurate and reliable demand forecasting.,erefore, this paper proposes spatial feature fusion and grouping strategies based onmultimodal data and builds a neural network predictionmodel for e-commodity demand. ,e designed model extracts order sequence features, consumer emotional features, and facial value features from multimodal data from e-commerce products. ,en, a bidirectional long short-term memory network(BiLSTM-) based grouping strategy is proposed. ,e proposed strategy fully learns the contextual semantics of time series data while reducing the influence of other features on the group’s local features. ,e output features of multimodal data are highly spatially correlated, and this paper employs the spatial dimension fusion strategy for feature fusion. ,is strategy effectively obtains the deep spatial relations among multimodal data by integrating the features of each column in each group across spatial dimensions. Finally, the proposedmodel’s prediction effect is tested using e-commerce dataset. ,e experimental results demonstrate the proposed algorithm’s effectiveness and superiority.


Introduction
e e-commerce platform offers a wide range of commodities, with frequent purchases, transactions, and commodity flows. e dynamic and complex business environment has posed significant challenges for business decision-making. As a result, inventory management has become more complex, and supply chain costs have risen steadily [1,2]. At the same time, the supply chain system, which includes businesses, upstream suppliers, and downstream customers, is becoming increasingly complicated. Logistics [3,4] and marketing are interconnected and gradually integrated into this increasingly complex system, with the ultimate goal of satisfying customer marketing activities, as a result, putting the customer first, utilizing information technology to its full potential, and accurately forecasting consumer demand [5][6][7][8]. e consumer demand for goods is a critical link in an enterprise's supply chain process. e accuracy of e-commerce commodity demand forecasting determines its value, exceptionally reliable commodity demand forecasting, which is critical for e-commerce. Wrong or inaccurate forecasts can significantly impact product allocation and distribution, damaging e-commerce companies' decision-making efficiency and resource allocation. With a better understanding of consumer demands, companies can create better inventory plans with competitive prices and timely promotion plans. It improves customer satisfaction and service quality, lowers supply chain costs, and increases corporate profits and brand value. However, many factors will influence commodity demand forecasting, particularly for customers in different regions, and many uncertain influencing factors will lead to changes in demand. In addition, time series analysis [9][10][11][12] is commonly used in traditional sales forecasting techniques [13,14]. Only historical sales data is used as a source of information. ese techniques can be used with products that have consistent or seasonal sales patterns. However, e-commerce platforms typically have many nonlinear, unstructured multimodal data, making traditional analysis and prediction difficult.
Fortunately, the rise of the mobile Internet, low-cost sensors, and low-cost storage has made obtaining large amounts of data more accessible. We can collect many other log data of e-commerce products over time, in addition to historical sales data. It includes consumer reviews, consumer portraits, page views (PV), search page views (SPV), user views (UV), search user view (SUV), selling price (PAY), user location (UL), and total merchandise sales (GMV). It provides a broad space for applying neural networks when combined with cheap computing power, especially the dramatic increase in GPU performance. Based on the above observations, this paper proposes spatial feature fusion and grouping strategies based on multimodal data and builds a neural network prediction model for e-commerce commodity demand. Initially, we consider the multimodal data of e-commerce products (such as historical orders, consumer reviews, and consumer portraits) while extracting different features. ese features are order sequence features, consumer emotional features, and facial value features. Finally, we proposed a grouping strategy based on a bidirectional long-term, short-term memory network (BiLSTM). e network fully learns the contextual semantics of time series data while reducing the influence of other features on the local features of the group. e main innovations of this article are as follows: (1) is paper considers numerical data such as historical orders and text and image data such as consumer comments and portraits. Because nonlinear data like text and image are becoming more important in e-commerce prediction tasks, the analysis value increases. We can intuitively understand the customer's desire to buy a particular product using semantic sentiment analysis of consumer comments. We can depict the consumer portrait and understand the consumer's preferences by calculating the appearance level of the consumer portrait, which is useful for improving the prediction model's performance. (2) is paper proposes a novel grouping strategy to consider both the long-distance dependence and the short-distance dependence in sequence data. It addresses the problem that the recurrent neural network only pays attention to the long-distance dependence in sequence data. Because of the shortdistance dependence, when a significant distance separates two sets of features, their connection is weak, and less information is retained.
(3) is paper proposes a novel spatial dimension fusion strategy. It effectively obtains the deep spatial relations among multimodal data by integrating each column's features across spatial dimensions. (4) e prediction effect of this model is verified using a dataset created by an e-commerce platform. e experimental results demonstrate the effectiveness and superiority of our algorithm. e rest of the paper is organized as follows. In Section 2, related work is studied. In Section 3, the methodology is given. In Section 4, results and discussion are explained, followed by a conclusion in Section 5.

Related Work
is section discusses related work from various aspects to understand the problem addressed in this paper.

Forecast of Demand for Commodities.
Demand forecasting [15,16] is a critical component of the e-commerce supply chain and commodity inventory management. Improving the accuracy of forecasting results by studying the factors that influence demand is critical. e company's replenishment strategy and inventory cost reduction rely heavily on accurate forecasting results. Scholars divide forecasting methods into qualitative and quantitative forecasting based on forecasting. However, this article's research only looks at quantitative forecasting. e quantitative forecasting methods can be mainly divided into traditional time series forecasting, combined forecasting [17][18][19], and the current popular deep neural network methods.
(1) Traditional time series forecasting: the time series forecasting method is based on the continuous law of objective thing development. It is used to further speculate on the future development trend using historical data and statistical analysis. Models for time series forecasting t have been widely used in the economic field including the growth rate, moving average, exponential smoothing, random time series model, gray model, chaos, and fractal. Tsai et al. [20] proposed a hybrid time series model based on feature selection methods to predict stock prices in leading industries. e results show that the proposed model has better accuracy than the other listed models and provides convincing investment guidance. Mustafa and Yumusak [21] [23,24]. However, the error is relatively large for data with a complex structure.
(2) Combination forecasting: a single forecasting method is difficult to manage for some relatively complex and challenging forecasting tasks. Its forecasting accuracy can be improved by combining a reasonable number of different methods in a scientific manner. Some scholars have studied combination forecasting methods extensively since J. N. Bates and C. W. J. Granger published "Combined Forecasting" in the 1870s. Huard et al. [25] constructed an e-commerce sales volume prediction model based on exponential smoothing and Holt linear trend methods. ey proved the effectiveness of the model on the sales dataset provided by the e-commerce company Cdiscount. In order to obtain a more accurate sales forecast during the price war, Hsieh et al. [15] adjusted the seasonal index by using a simple moving average, removed the seasonal index from the sales volume, and then used the previous month's data subjected to regression analysis. Finally, a more accurate sales forecast is obtained in the price war. Bowen et al. [26] used two independent ARIMA-BP nonlinear combination models to predict sales in the next 5 days. ey established a mean square error model to weigh the fitting and prediction results of the two predictions, which can better deal with the e-commerce merchandise sales forecast problem. e combined forecasting model, in general, has clear advantages. For example, it can handle some relatively complex and difficult forecasting tasks. e combined forecasting method is better than a single method based on the traditional time series model. It is still inferior to a single method based on the traditional time series model. With complex unstructured multimodal data, however, the combined forecasting method is still difficult to use.
(3) Deep learning-based prediction model: with the booming development of the mobile Internet and the arrival of big data, the business of the e-commerce platform has become more complex with huge data. Nonlinear and unstructured data has become the most valuable data. Both traditional time series forecasting methods and combined forecasting methods have been unable to cope with the increasingly complex and challenging task of e-commerce demand forecasting. e mining and processing of nonlinear and unstructured data also have natural disadvantages. Fortunately, advances in computing power and the rise of deep learning [27][28][29] have given us new ways to solve this dilemma. Suchacka and Stemplewski [30] proposed a backpropagation neural network model to predict the purchases of active users in a Web store. Training and evaluation of the neural network are performed using user data reconstructed from server log data. e proposed deep neural network can achieve 99.6% and 87.8% recall rates, and the prediction results are effective and accurate. Giri et al. [31] converted clothing images into feature vectors, combined with historical sales data. ey applied a backpropagation neural network to predict the sales of new products. e results show that the model performs well despite the small dataset. Sen and Lin [32] combined the LSTM method with sentiment analysis of consumer reviews. In the training stage, the sales data and comments captured from "Taobao" are preprocessed. e emotional level of the comments is analyzed in terms of "positive," "negative," and "confidence" to build a model to predict the short-term commodity demand in the e-commerce environment. e results show that the sentiment analysis of consumer comments has a great influence on the forecast results.
According to the review, the above deep learning prediction models differ from traditional linear numerical data such as order sales, images, text semantic understanding, and other unstructured multimodal data. It is becoming increasingly important in the e-commerce industry. As a result, using deep learning technology to create relevant predictive models in the e-commerce industry has become commonplace. Figure 1 is a flowchart of the overall architecture of our algorithm. e feature extraction methods for multimodal data are as follows: first, perform feature engineering on historical order data to obtain the data combination required for prediction. Second, the purchase desire's weight is calculated using natural language processing technology for text sentiment analysis on consumer review data. e face value of the consumer's portrait is calculated to match the product type. We use n sets of BiLSTM for deep feature extraction in the above three feature sequences and traditional and spatial feature fusion strategies to obtain feature spatial relationships. Finally, we obtain the forecast output of e-commerce commodity demand via the FC layer.

Feature Engineering.
Feature engineering is a critical step in the data preprocessing stage that ensures the best possible feature data for the prediction task. is article first performs feature construction, feature selection, feature extraction, and feature processing on historical order data.
Feature construction: the selection of basic features and the derived features are the two main parts of the feature construction work in this paper. e following is the specific selection procedure: To extract the basic features, first, select the basic characteristics that influence goods demand, such as the attributes of the commodity itself, sales volume, commodity market performance, and time. In general, ready-made nonattribute feature data required in the research can be extracted statistically when selecting basic features. Each goods ID has 20 basic features, which are counted and extracted in this paper. e distinguishing factors obtained in this paper include all kinds of commodity attributes, price, market performance, commodity sales, and other characteristic data. We use the time sliding window method to deal with the demand and characteristics of commodities every week. One week (7 days) is taken as a window, in which the demands of each commodity in different areas are called labels. e working principle of the sliding window method is shown in Figure 2.
is paper uses the scaling method to deal with continuous numerical feature data because some historical e-commerce transaction data features have large values, such as the number of views and favorites. On the other hand, some have relatively small values with an extensive feature value range that is usually not conducive to the algorithm's convergence speed. As a result, this paper uses a scaling method to process this type of data that produces a mean value 0 and a variance 1, in addition, to increase the learning rate and then increase the speed of model training. erefore, we standardize all features. e standardized formula is as follows: It is a one-hot encoding and distributed representation of attribute or category data. Because such characteristic values are discrete rather than continuous, and there is no sequential distinction between categories, one-hot coding is used. e dimension of characteristic data can be reduced, and data sparsity can be reduced by one-hot coding of characteristic values.

Data Collection.
In this experiment, text sentiment analysis was used to analyze comments on skincare products that were crawled from an e-commerce platform as shown in Figure 3. In this figure, a business platform is used for goods as data has the advantage of each comment text having a corresponding star comment. Each text corresponding star represents the emotional tendency; we can put a week's comments as a negative tendency of data and five-star comments as a positive tendency of data, so that sentiment analysis can be aided further.
Each review has a review star, the content of the review, the product reviewed, and the review time, as shown in Figure 3. We can crawl review content and star ratings from related e-commerce platforms such as corpus and tags. However, each product's review data feature is that the data of positive reviews outnumber the data of negative reviews. If a product has a negative review, it should be avoided. When a product receives more than positive feedback, it will be removed from the shelves. To solve this problem, we crawl all of a product's negative review data and then crawl the corresponding positive reviews. is article crawled a total of 10,000 positive review texts, with the majority of them   focusing on everyday skincare products. e main characteristics of e-commerce review text, as shown in Table 1, are short text length. ese are people's product opinions, which are usually only a few short sentences long. It is a serious case of colloquialization. People do not pay much attention to grammar when they make comments. ey write more casually and do not adhere to strict grammatical and syntactic rules. Emotional semantics are difficult to grasp. e context in the text is sometimes relatively high, because the text is short and contains a lot of emotional information. It is possible that one or two words can determine the emotional tone of the entire text, making it difficult to assess the text's emotional tone.
Since the segmentation of wheat field plantation row images is a binary classification task, the numbers of vectors in primary caps and digit caps are both set to 2. e number of capsules in digit caps is also set to 2. In addition, this paper uses the ReLU function as the activation function of the network and uses the sigmoid function for classification.

Word Segmentation.
e existing Chinese word segmentation tool JIEBA is used in this paper to perform Chinese word segmentation tasks. It employs a standard probabilistic language model word segmentation method. It can perform various tasks, including word part-of-speech tagging and keyword extraction from text data. e removal of stop words and vectorization of the text will be easier with good word segmentation. Figure 4 shows a histogram of the number of corresponding texts based on the length of the text we receive. It can be seen that the majority of the e-commerce review texts are less than 300 words long, with only a few exceeding 200 words.

Text Vectorization.
e word2vec model maps words to high-dimensional spaces with high efficiency. is model primarily uses text data's context information at a higher level. It employs neural networks to map all text data into a

Positive emotion text
Negative emotion text I have been using this essence water and essence lotion for more than 2 years, and it is best to use it in autumn and winter Not suitable for me Buy again, good hydrating effect e QR code cannot scan the product information, and the face does not feel hydrated when used, and it dries quickly, not as easy to use as other brands more low-dimensional, practical, and dense real number matrix. e skip-gram model as shown in Figure 5 is used in this paper, and it consists of three layers: input, hidden, and output. e input of the input layer in the model is the onhot form of the word w(t). e hidden layer is not the same as the cbow model. It serves no purpose other than transferring data, and the output layer's purpose is to transfer probability. e highest n words' vector is output, and the model's result is calculated using softmax normalization. In Figure 5, the input vector x represents the one-hot encoding of a Chinese word and the corresponding output vector y 1 , y 2 , . . . , y C . e i th row of the weight matrix W between the input and the hidden layer represents the weight of the i th word in the vocabulary. e objective function of the skip-gram model is Finally, the soft max layer is used to make the final sentiment analysis classification decision. e output of soft max represents the relative probability between different emotion categories. Suppose that the sentiment label is e ∈ 1, 2, . . . , A { }, and there are a total of A values, which represent A sentiment categories. For sample x, the calculation equation of the conditional probability is as follows: where w a represents the weight vector of the a-th sentiment category.

Face Value Calculation.
e facial value calculation is used to determine the skin type of the consumer. As far as known, there are five skin types, namely, normal, dry, oily, mixed, and sensitive skin. is paper builds a CNN model to evaluate facial appearance and gives the skin quality classification results.
As shown in Figure 6, the network model here is VGG16, and the corresponding pretraining model is used. e K-fold cross-validation method is used in the training process. e specific idea is to divide the dataset into K parts, one of which is used as the verification set, and the remaining K−1 parts as the training set. e cross-validation is repeated K times. Each piece of data will become a validation set. Finally, the average value will be taken as the accuracy rate.

Grouping Strategy.
e most important feature of a recurrent neural network is making predictions by combining current and previous feature information. e goal is to better preserve the information between the features in the sequence when we only need to consider the most recent part of the information. When a greater distance separates two groups of features, the connection between them is weaker, and thus less information is retained. is situation not only lowers the final prediction accuracy, but also increases the model's computational complexity. As a result,

Input layer
Hidden layer Output layer  the GBL grouping sequence strategy was created. e following is the grouping strategy's calculation equation: where G represents the overall feature sequence, g represents the local feature sequence, and n represents the number of groups.
To extract feature sequences A, B, and C from multimodal data, the calculation equation is as follows: 1 , g a,2 , . . . , g a,n , where G A represents the extracted feature sequence of historical order data, G B represents the extracted feature sequence of consumer comment emotions, and G C represents the extracted feature sequence of facial value and skin type. e three groups of extracted feature sequences G A , G B , and G C are grouped to weaken the context information between the features with weaker relations and enhance the context information between the features with stronger relations. Based on the grouping strategy, we introduced the BiLSTM network, the purpose of which is to fully obtain the contextual information between the features in each group of sequences. At the same time, the BiLSTM network can better obtain context information within a certain sequence step. e calculation equation of the grouping strategy based on the BiLSTM network is as follows: where g a,n , g b,n , g c,n represents the input local, new feature sequence; O A,n , O B,n , O C,n represents the local, new feature output sequence; n represents the sequence number of each group; and ⊗ represents the forward and backward feature fusion strategy of LSTM.

Spatial Feature Fusion.
rough the grouping strategy in the previous section, we have fully obtained the local context information of each group. However, to ensure the integrity of the contextual information of the features of the entire multimodal data, we use multiscale traditional convolution and multiscale cavity convolution. Its purpose is to achieve the spatial dimension fusion of different sets of features. In order to more intuitively understand the difference between spatial dimension fusion and traditional fusion, we have made a detailed explanation through Figure 7. Figure 7(a) represents the traditional feature fusion strategy. G 1 represents the context information of the local features generated by the first set of features through the BiLSTM network. G 2 is directly spliced behind G 1 , while G 3 is spliced behind G 2 , and so on. e new feature sequence generated after m − 1 splicing includes completeness of the context information of the entire feature sequence. en, deep features are mined through convolution and hole convolution. e calculation equation is as follows:

Mobile Information Systems
where MSC represents the operation result of multiscale convolution. MSDC represents the operation result of multiscale dilated convolution. x represents the characteristics of the sample. i represents the i-th feature in the sample. w represents the weight coefficient; b stands for bias; k is the size of the convolution kernel; j is the number of convolution kernels; d represents the scale of dilated convolution expansion; and l represents the number of dilations of dilated convolution. Figure 7(b) shows the feature fusion strategy of the spatial dimension.
is strategy integrates the features of each column in each group across spatial dimensions. We fused the first feature of G 1 with the first feature G 2 until the first feature G m . At the same time, we used traditional convolution and dilated convolution to mine the features of the same spatial dimension to generate deep features of the spatial dimension. e calculation equation is as follows: where n represents the length of each group of local features; MSC * represents the operation result of multiscale convolution in the spatial dimension; and MSDC * represents the operation result of multiscale dilated convolution in the spatial dimension.

Dataset.
e dataset in this article uses historical sales data, consumer review data, and consumer portrait data collected by skincare product e-commerce platform. e dataset contains historical information of 200 products over more than a year, a total of more than 20,000 pieces of data information. rough data cleaning and feature engineering, this paper constructs a training set and a test set that can be used for neural networks.

Hyperparameter Settings.
e main parameters are shown in Table 2: lr means that the learning rate is 0.01; bata 1 means that the exponential decay rate of the firstorder moment estimation is 0.9; bata 2 means the secondorder moment. e estimated exponential decay rate is 0.999. Epsilon is set to 1e − 08. Decay indicates that the learning rate decay value is 3e − 8 after each parameter update. e experiments with all the algorithms were performed on a computer equipped with a single NVIDIA GTX1080 GPU (8 GB).

Evaluation Criteria.
For prediction problems, it is necessary to establish prediction performance evaluation indicators to verify the feasibility and accuracy of the prediction model, considering that e-commerce commodity demand forecasting is generally for the purchase and inventory replenishment of e-commerce companies. e forecast error of the demand for selling a larger number of commodities has a greater impact than selling after commodities under the equivalent error. erefore, the error    Mobile Information Systems selected in this paper should consider the error between the predicted value and the true value and consider the ratio between the error and the true value. Mean square error (MSE): this indicator is the square of the difference between the real quantity and the predicted quantity and then summed and averaged. e calculation equation is as follows: Root mean square error (RMSE): this indicator is the square root calculation of the ratio of the square sum of the difference between the real quantity and the predicted quantity to the number of observations. is is used to measure the deviation between the predicted quantity and the real quantity. e calculation equation is as follows: Mean absolute error (MAE): this metric is used to average absolute error. is value more accurately reflects the current state of the forecast error, i.e., the difference between the actual quantity and the forecast. e following is the calculation formula: Mean absolute percentage error (MAPE): this metric considers the difference between the predicted and actual value. It also computes the ratio between the predicted error and the true value at the same time. e following is the calculation equation: where TP is true positives (the number of wheat pixels that are correctly detected), FP is false positives (the number of wrongly detected pixels as wheat), and FN is false negatives (the number of wheat pixels that are wrongly detected).

Experimental Results.
Since the final output of the model is a probability distribution, in order to be able to obtain the predicted value of each tested product, this article uses a sampling method to output the predicted value. It selects u i,t,m corresponding to the largest p i,t,m as the predicted output value of the product, and part of the tested product demand. e prediction result of the quantity is shown in Figure 8. It can be seen from Figure 8 that the model in this paper has a good fit between the predicted value of the short-term demand for e-commerce commodities and the actual value. e predicted value is extremely close to the actual value on the whole. In order to demonstrate the effectiveness of our model, we randomly select 8 products in the test set for an 8-week prediction test and use RMSE and MAPE to evaluate the error results quantitatively. e results are shown in Table 3.
It can be seen from Table 3 that, for the 6 randomly selected goods Good_ID, the predicted RMSE fluctuates between 2.03 and 3.48, and the MAPE fluctuates between 1.27% and 1.62%. e average value of RMSE is 2.6891, and the average value of MAPE is 1.41%, indicating that the prediction errors of the 6 randomly selected commodities in the prediction results are relatively stable, so this also fully proves the effectiveness of the model in this paper.

Ablation Experiment of Multimodal Data.
In this section, we conducted an ablation experiment of multimodal data, segmented. We combined the data of the three modalities to observe the influence of each part on the experimental results. A represents historical order data, B represents consumer review data, and C represents consumer portrait data.
e experimental results are shown in Table 4. As shown in Table 4 and Figure 9, when considering three types of multimodal data simultaneously, the prediction model achieves the best prediction results. Secondly, it can also be found that data error considering any two modes is lower than that of single-mode data. erefore, this proves the effectiveness of using three modes of data simultaneously in this paper.

Ablation Experiment of Feature Fusion
Strategy. Since the model in this paper adopts traditional feature fusion and spatial feature fusion strategies, to deeply analyze the impact of the above two strategies on the experimental results, the feature fusion ablation experiment is conducted. We assume that T represents the traditional feature fusion measurement, and S represents the spatial feature fusion. e experimental results are shown in Table 5.
It can be seen from Table 5 that the combination of traditional feature fusion and spatial feature fusion strategy achieves the best prediction effect. Meanwhile, it is also found that the spatial feature fusion strategy is superior to the traditional one. erefore, it proves the effectiveness of the spatial feature fusion strategy.

Comparative Experiments.
To further verify the effectiveness and superiority of this model, this section applies other prediction methods for verification and comparison with the same dataset. e comparison model mainly selected ARIMA and MLP-LSTM.
From Tables 6 and 7, we can comprehensively compare the performance of the three models on the commodity demand forecasting task in 6. We find that the three models have different performances for different commodities in terms of RMSE and MAPE. However, from an overall point of view, the prediction error fluctuations of the 6 test commodities in this model are smaller than those of the ARIMA model and MLP-LSTM, indicating that it has better accuracy.
Mobile Information Systems 9

Conclusion
For e-commerce companies, accurate and reliable e-commerce commodity demand forecasting is essential. is paper proposes a spatial feature fusion and grouping strategy based on multimodal data. It establishes a neural network prediction model for e-commerce commodity demand. First of all, the ablation experiment proved the positive influence of multimodal data on the prediction task. It indicates that consumer reviews and consumer portraits are important factors influencing in demand forecasting. In addition, we also found that the feature relationships between the three modal data are not independent. However, there are closely related relationships, which we call spatial relationships. e superiority of spatial feature fusion is proved through ablation experiments. Finally, the e-commerce product dataset generated by the e-commerce platform is used to test the prediction effect of the proposed model. e experimental results prove the effectiveness and superiority of the algorithm.

Mobile Information Systems
Data Availability e data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest
All the authors do not have any possible conflicts of interest.