Abstract
The irrationality between the procurement and distribution of the logistics system increases unnecessary circulation links and greatly reduces logistics efficiency, which not only causes a waste of transportation resources, but also increases logistics costs. In order to improve the operation efficiency of the logistics system, based on the improved neural network algorithm, this paper combines the logistic regression algorithm to construct a logistics demand forecasting model based on the improved neural network algorithm. Moreover, according to the characteristics of the complexity of the data in the data mining task itself, this article optimizes the ladder network structure, and combines its supervisory decision-making part with the shallow network to make the model more suitable for logistics demand forecasting. In addition, this paper analyzes the performance of the model based on examples and uses the grey relational analysis method to give the degree of correlation between each influencing factor and logistics demand. The research results show that the model constructed in this paper is reasonable and can be analyzed from a practical perspective.
Introduction
Logistics demand is the product of economic activity behavior, which refers to the demand generated when economic activity behavior configures resources in a certain period of time, and involves every link of logistics activity. This demand is not only reflected in time and space, but also in higher requirements for quantity and quality. Moreover, this demand runs through the entire logistics process. The diversified and rapidly developing social economy has broadened the development space of the logistics industry and promoted the diversified and complex development of the logistics industry. In this context, the decision-making and planning of the logistics industry is particularly important to the development of the logistics industry. Moreover, accurate forecasting of logistics demand can provide a scientific basis for decision-makers’ decisions and play an important role in the development of the logistics industry. However, accurate logistics demand forecasting requires a more solid theoretical and scientific basis [1].
Whether the choice of the forecasting model is reasonable or not will affect the forecasting accuracy to a large extent. To obtain high-precision prediction simulation results, it is necessary to select a reasonable prediction model. It is necessary to analyze the characteristics of statistical data, and select a model method that is most suitable and easy to implement according to the data characteristics obtained by the analysis, so as to obtain higher precision and scientific and reasonable prediction results. Sometimes, the effective combination of multiple models can effectively make up for the shortcomings of a single model, obtain higher prediction accuracy than a single model, and obtain more reasonable and accurate prediction results. Therefore, building a combined forecasting model is also an important idea when building a forecasting model [2].
The logistics involves a series of processes in social economic activities from the initial demand, supply, production, product circulation to consumption. The logistics demand is the demand generated when resources are allocated in these processes. Therefore, logistics demand is a product of social economic activities, but also an important part of it. This article mainly analyzes the factors that can quantitatively measure the influence of logistics demand from five aspects: regional GDP, industrial structure, resident consumption level, domestic and foreign trade, and logistics infrastructure construction.
Cargo turnover includes two aspects: the quantity and distance of the transported goods, which can fully reflect the production results of the transport of goods. The logistics demand for transportation is only one part of the logistics demand and cannot fully reflect the logistics demand. However, cargo transportation volume and freight turnover volume account for a large proportion of the logistics volume, which can reflect the changing law of logistics demand and the total logistics demand in a specific area to a certain extent [3].
Related work
When studying the forecast of the demand for cold chain logistics of agricultural products, the literature [4] analyzed the current situation and existing problems of cold chain logistics of agricultural products, and then used the cold chain logistics to predict and put forward corresponding countermeasures. The literature [5] pointed out that the simple cargo transportation volume is enough to describe the logistics demand, and proposed that the logistics demand should be converted by the cargo transportation volume and the cargo volume in other links of logistics activities. The literature [6] used the total amount of agricultural product logistics as an index to measure agricultural product logistics demand, and analyzed and selected the influencing factors of agricultural product logistics demand from two aspects: agricultural product output and external economic environment. The literature [7] used the BP neural network prediction method to predict the logistics demand of agricultural products, and used the total logistics of agricultural products to measure the logistics demand of agricultural products, and also proposed an algorithm for the total logistics of agricultural products. The literature [8] analyzed the relationship between regional economic factors and regional logistics demand, and constructed an SVR prediction model for prediction research. The literature [9] used the correlation analysis method to analyze the factors that affect the level of logistics development in Fuzhou, and found out GDP, industrial output value, total import and export volume, and total retail sales of consumer goods and other economic indicators that have a greater correlation with the level of logistics development. The literature [10] believed that the very important prerequisite for urban logistics planning is to first make a scientific and accurate forecast of urban logistics demand, and built a multi-population genetic BP neural network model to forecast logistics demand. The literature [11] pointed out that when forecasting logistics demand, not only the influence of economic factors must be considered, but also industry factors such as logistics facilities and logistics services. Moreover, it also proposed a combined model that combines Grey Relational Analysis (GRA) and Least Squares Support Vector Machine (LSSVM). This combination model first uses grey relational analysis to screen the main influencing factors of logistics demand, and predicts the selected influencing factors as input variables of the LSSVM model. The literature [12] optimized the model, and used the kernel principal component analysis (KPCA) to eliminate the multiple correlations between the main influencing factors screened by GRA, and used the improved particle swarm optimization (IPSO) algorithm to optimize and adjust the parameters of the LSSVM model. At the same time, in the analysis of influencing factors, factors such as price level, population size and logistics information technology are analyzed.
The literature [13] pointed out that seasonal changes in certain regions would have a huge impact on local logistics demand, and based on this, created a combined forecasting model based on seasonal index and gray GM (1, 1). Moreover, it demonstrated the validity and feasibility of the model. The literature [14] combined linear regression with DGM (1, 1) model to propose a combined model based on the two, and conducted an empirical analysis of logistics demand. The results show that the DGM (1,1) model has the best prediction effect when the requirements for prediction accuracy are high and the data samples are small. The literature [15] constructed a gray GM (1,1) linear combination prediction model. After that, it applied the ant colony algorithm to the gray linear combination model, optimized the weights of the individual models in the combination model, and established a GM (1, 1) linear combination model based on the improvement of the ant colony algorithm. The results show that the improved grey linear combination forecasting model has a better fitting effect, and the forecasting accuracy is higher than the other two forecasting methods. The literature [16] proposed a method for forecasting logistics demand based on an input-output economic model, which to a certain extent provides a theoretical reference for logistics development planning. The literature [17] pointed out that logistics demand is closely related to the level of economic development, and constructed three models: gray prediction model, neural network model and gray neural network combination model. Moreover, it used genetic algorithm (GA) to optimize and improve the three models respectively, and constructs GA-GM (1,1). The literature [18] used the artificial fish school algorithm (AFSA) to optimize the parameters of the support vector machine (SVM) to propose an AFSA-SVM combination forecasting model of logistics demand. The literature [19] constructed an optimized combination prediction model based on dynamic adaptive particle swarm optimization algorithm (DAPSO) and unbiased grey prediction model (UGM (1,1)). The prediction results show the effective feasibility of the combination model. The literature [20] combined the GM (1, N) model with the BP neural network model to establish a gray neural network model, and based on this, developed a logistics demand forecasting system. The results show that the gray neural network combination model can effectively predict short-term logistics demand, and has higher prediction accuracy of a single model, which proves the effectiveness of the combination model.
Logistic regression algorithm
The principle of logistic regression is similar to that of linear regression. Logistic regression also requires a weighted sum of data features. However, unlike linear regression directly outputting the weighted sum, the logistic regression algorithm needs to calculate the weighted sum through the sigmoid function and output it. The mathematical expression of using logistic regression to predict probability is shown in formula (1) [21].
Function σ (·) is a sigmoid function, which can map data between 0 and 1. The specific mathematical form is shown in formula (2):
After the logistic regression model predicts the probability
The logistic regression model predicts and classifies the probability of a sample through the above steps. Next, we discuss the training steps of the model. According to the practical significance of the model, the training target of the model can be easily seen. For samples with label 1, the predicted probability needs to be as large as possible. For samples with a label of 0, the predicted probability needs to be as small as possible. This idea can be described by formula (4), and the loss function of a single sample is given [22].
It can be seen from the error function of a single sample that when
The loss function of the entire training set can be written as the average loss of all samples. The specific form is shown in formula (5):
By solving the minimum value of the loss function, the parameter set θ is determined. However, there is no way to find the closed solution of the loss function equation. However, because the loss function is a convex function, the global optimal solution of the function can be obtained through the gradient descent algorithm. The gradient descent algorithm only needs to calculate the partial differential of the loss function. The specific form of solving the j-th dimension gradient is shown in formula (6) [23]:
In order to prevent the logistic regression algorithm from overfitting when building the model, some regular terms are usually added to the cost function. The occurrence of over-fitting is usually caused by excessively high model parameters. The purpose of adding regular items is to limit the parameters. Common regularization methods are L1 and L2 regularization. For linear regression models, the model using L1 regularization is called Lasso regression, and the model using L2 regularization is called Ridge regression.
Lasso regression adds the L1 norm of the weight to the original loss function J0 as the penalty term of the loss function. The final form of the objective function is shown in formula (7):
When using L1 regularization, due to the nature of the L1 norm, the weights of features with lower importance will tend to zero. Therefore, L1 regularization also plays a role in feature selection. The process of solving the cost function is shown in Fig. 1. The contour of the graph is the contour of J0, and the black square is the graph of L1 norm. In the figure, the first intersection of the J0 contour and the L1 graph is the optimal solution. J0 and L1 intersect at a vertex, and this vertex is the optimal solution.

The solution of the cost function with L1 regular term.
The probability of J0 contacting these vertices is much greater than the probability of contacting other parts of the L1 norm. However, in these corners, there will be many weights equal to zero. Then, there will be more features of 0 in the multi-dimensional features. This is why L1 regularization can produce sparse models, which can then be used for feature selection [24].
The regular term of Ridge regression is the L2 norm of the weights, and the specific form of the objective function is shown in formula (8):
L2 regularization usually makes the final feature weight of the model smaller, so as to prevent the model from overfitting. The magnitude of model regularization is adjusted by adjusting parameter α. The increase of α will increase the generalization ability of the model, but at the same time reduce the expressive ability of the model. In practical applications, the appropriate parameter α can be selected through model performance. The process of solving the cost function is shown in Fig. 2. The contour of the graph is the contour of J0, and the black circle is the graph of L2 norm. In the figure, the first intersection of the J0 contour and the L2 figure is the optimal solution. This intersection is the optimal solution. The graph of L2 norm in the two-dimensional plane is a circle. Compared with the square, its edges and corners have been removed. Therefore, the intersection of J0 and L2 makes the probability of the weight equal to zero much smaller. This is why L2 regularization is not sparsity.

The solution of the cost function with L2 regular term.
Another form of regular term is a mixed form of L1 norm and L2 norm. The specific form of the objective function is shown in formula (9):
This regular term can control the mixing degree of L1 norm and L2 norm by adjusting the ratio r. When r = 1, its cost function form is the same as Lasso regression. When r = 0, the cost function form is the same as Ridge regression [25].
The algorithm model of the automatic encoder is also built around this purpose, and the specific structure is shown in Fig. 3. The auto-encoder learns the characteristic representation of the data by encoding the network, which can also be understood as the pattern of the data. Then, it restores the original data through the decoding network.

Single-layer automatic encoder structure diagram.
Now, we assume that there is a series of unlabeled samples {x(1), x(2), x(3), ⋯ , x(N) }, and the sample x is a d-dimensional vector
The encoder part maps the data x into an abstract feature representation y, and f
θ
(x) is the mapping function, as shown in formula (10). The parameter set is θ = { W, b }, W is the d′ × d-dimensional weight matrix, and b is the d′-dimensional offset vector.
s is usually a nonlinear activation function, and sigmod activation function is often used.
The decoder part reconstructs the original input data x from the abstract feature representation y, generates a reconstruction vector z, and makes the reconstructed data as close to the original input data as possible. Among them, z = g
θ
(y), g
θ
are the mapping functions of the decoding part, as shown in formula (11).
The parameter set is θ′ = { W′, b′ }. If the input sample is not only in the interval [0, 1], it is more in line with our perception not to use the nonlinear function s. L (x, z) is the reconstruction error of the autoencoder, which is used to represent the difference between the reconstructed signal and the input signal. The measurement of the difference is also often related to the distribution of the input data x.
For the real vector x, that is
If the input data is x ∈ [0, 1]
d
, the reconstructed vector output by the decoder must be in the same interval as the input data. The decoder also usually uses the non-linear function sigmod activation function to achieve this goal. In this case, the cross entropy function is usually used. The form of loss function L (x, z) is shown in formula (13).
The autoencoder trains the model by minimizing the reconstruction error L (x, z), so that the reconstructed signal still retains most of the information of the input signal. Moreover, it determines the parameter set {θ, θ′} by solving the minimum value of the loss function, thereby obtaining the encoder function and the decoder function. The optimization function is shown in formula (14).
If the non-linear activation function is not used in the encoder and decoder functions, its form is almost the same as that of PCA (Principal Component Analysis). The functional form that minimizes the reconstruction error is the same as the functional form that maximizes the lower bound of the mutual information between the input signal x and the hidden layer feature representation y. It can be seen that the autoencoder extracts abstract features by maximizing the information of the input data.
The ladder network structure is shown in Fig. 4, including a forward neural network for output and a decoding network for reconstructing each layer. x represents the input data,

Ladder network structure.
In the case of unlabeled data, the ladder network can also effectively improve the performance of the model by purely supervised learning training. The general implementation steps are as follows:
First a suitable encoder network is selected. The type of network is not limited to the traditional multilayer perceptron model. For different tasks, convolutional network (CNN) or recurrent neural network (RNN) can be selected as the coding network.
For each layer of hidden variables, we analyze its conditional distribution p (z(l)|z(l+1)) to the upper layer of hidden variables. For different distributions, the form is also different.
Then, the decoding function
Finally, the entire network is trained through supervised learning or semi-supervised learning. The optimization algorithm can choose stochastic gradient descent or Adam algorithm.
The specific algorithm for batch standardization operation for the first layer is as follows:
The batch function BN will perform the operation as in formula (6) on each x vector. μ x is the mean value of the small batch data, and σ x is the corresponding standard deviation. The mean and standard deviation will be estimated from the mini-batch used for training. For the initial value h(0), the initial value is such that h(0) = x, r(l) and β(l) will be set as the expansion factor and bias factor of the activation function of each layer. They are all trainable parameters. φ (·) is the activation function of each layer of the network. For some activation functions, the expansion factor will be redundant and can be omitted when building the model, such as the relu function φ (·) = max(0, ·). For linear activation functions, both the stretch parameter and the bias parameter can be omitted. However, for the softmax function, both are often indispensable.
The ladder network requires two forward processes to find the output of noise-adding and output of un-noise-adding of each layer respectively. For the noise-adding process, Gaussian noise is used for noise addition analysis. The algorithm will add noise after batch standardization. The specific process is as follows:
The un- noise-adding path algorithm is roughly the same as the noise-adding path algorithm, and it only needs to remove the noise-adding step in the above algorithm process. The final model prediction result uses the output of the un- noise-adding path, and outputs
The loss functions of supervised learning are all generated by the encoder process. We set t (n) as the label corresponding to the input feature data x (n). The general form of the loss function of the supervised learning part of the ladder network is shown in formula (22). Depending on the data set and the problem to be solved, different specific forms of loss function are selected, such as cross entropy or square error. The specific form of the loss function is as follows:
In order to design a suitable decoder, it is necessary to make the decoding function can effectively reduce the noise of the data, which is also a key step of the ladder network.
How to choose an appropriate noise reduction function is the key to designing a decoder. First, from a simple situation analysis, we assume that the hidden variable
Among them, v and μ are both trainable parameters. However, these are all under the assumption that they are true, and these can only be applied to these simple situations. Since the noise reduction function itself is also linear, its expressive power is often insufficient. Therefore, in order to increase the expressive ability of the model and make it have a wider application range, in specific applications, v and μ are usually set as the nonlinear transformation of the reconstructed latent variable
In the formula,
The nonlinear transformation is
Although the form of the de-noising function of the ladder network is more complicated, the computational complexity has not increased too much. Because of the high computational complexity of the matrix calculation part, only matrix multiplication is used in the process of obtaining information from the reconstructed hidden variables of the upper layer. However, the non-linear part of the noise reduction function is all numerical operations. The parameter
The form of the unsupervised loss function is shown in formula (28).
In the above formula, m l is the number of neurons in each layer, N is the total number of training samples, and parameter λ l is the importance weight of each layer loss.
The overall loss function C of the ladder network is the sum of the supervised learning loss and the unsupervised learning loss, that is C = C su + Cunsup.
In order to accurately reflect the current situation of logistics demand in area A, this article takes 2004–2019 as the research interval. Moreover, this article obtains data on four types of factor indicators: industrial structure, transportation infrastructure, population and consumption levels, and investment and trade from the 2004–2019 A regional statistical yearbook and data from the National Bureau of Statistics. First, this article numbers these indicators, and then performs statistics, as shown in Table 1 and Table 2. The statistical graph drawn is shown in Fig. 5.
Parameter number
Parameter number
Industrial structure, transportation base, population and consumption level, and investment and trade data

Statistical diagram of industrial structure, transportation infrastructure, population and consumption levels, and investment and trade data.
This paper calculates the gray correlation degree of each index sequence to the freight volume index sequence under the four types of logistics demand influencing factors, and sorts within the group according to the factor classification. Moreover, this article uses the freight volume index sequence as the reference sequence, and other index sequences as the comparison sequence, and uses MatlabR2016a to calculate the gray correlation degree. Due to the different dimensions of each feature data in the statistical data, it is not convenient to establish the correct prediction model. Therefore, in accordance with the steps of gray correlation analysis mentioned, this article first performs dimensionless processing on time series data. In addition, this article adopts the averaging method, which compares the annual statistical value of each series with the mean of the entire series. After the original data is dimensionless, the new data sequence is obtained as shown in Table 3 and Fig. 6:
Data after dimensionless processing

Statistical diagram of data after dimensionless processing.
This paper finds the maximum difference and the minimum difference in each difference sequence from ten difference sequences. After that, this paper compares the maximum difference and minimum difference of ten difference sequences, and obtains the corresponding maximum difference and minimum difference. Then, the result obtained is substituted into the formula to calculate the correlation coefficient, where ρ is 0.5. The results are shown in Table 4 and Fig. 7.
Statistical diagram of correlation coefficient

Statistical diagram of correlation coefficient.
The average value of the correlation coefficient of each year is concentrated into one value, which is used as the degree of correlation between the comparison series and the reference series. The calculation results of the correlation degree are shown in Table 5 and Fig. 8:
Statistical table of correlation degree

Statistical diagram of correlation degree.
From the above analysis results, we obtain the predicted correlation degree and compare it with actual data. The results show that the model constructed in this paper has good performance and meets the actual needs of the predictive model.
From a regional perspective, we can actually see that regional logistics demand is generated in a comprehensive environment. The reason is that logistics activities run through all links of social activities. Therefore, investigating and forecasting the logistics demand of a region is not only a clear grasp of the overall logistics development and supply and demand of the region, but also an understanding of the development of various aspects of the region. This research mainly establishes an index system for logistics demand forecasting. First of all, this research summarizes the 10 main relevant factors that the predecessors found when studying logistics demand by consulting relevant literature. After that, this study uses the grey relational analysis method to give the degree of relevance between each influencing factor and logistics demand, and selects factors with a degree of relevance greater than 0.7 as the indicator of urban logistics demand forecast in this research, including railway operating mileage, permanent population, highway mileage, primary industry output value and total foreign trade import and export. From the prediction results, it can be seen that the model constructed in this paper has good performance and has certain practical effects.
