Abstract

The agricultural economy covers a wide range and has many influencing factors. There are often serious problems of complexity and diversity. The traditional agricultural economic forecasting methods often ignore the complexity and diversity, and it is difficult to accurately describe the development law of the agricultural economy. To improve the accuracy of agricultural economic time series forecasting under the condition of complexity and diversity, this paper proposes an agricultural economic forecasting method based on Elman neural network structure. Firstly, the data are screened and processed according to the time series of agricultural economic changes, and those factors that are more important to the agricultural economy are screened out from the collected public data. Secondly, this paper designs an efficient Elman neural network topology and sends the selected important data into the neural network for data learning and neural network parameter optimization, to achieve a more accurate agricultural economic forecasting model. Finally, a large number of experimental results show that the method based on the Elman neural network structure can overcome the shortcomings of traditional methods. It can avoid the interference of human subjective will, realize the comprehensive and accurate description of the changing laws of the agricultural economy with time, and promote the development of the agricultural economy.

1. Introduction

A large amount of historical data have been accumulated in the process of agricultural economic development. These data are recorded and stored according to time, which is a typical time-based sequence [15]. In addition to the influence of time series in the agricultural economic data [610], a large number of single-dependent variables and multidependent variables are also accumulated [1114]. They often contain a large number of dynamic characteristics and are also affected by independent variables. Impact. In general, the data of the agricultural economy have the characteristics of complexity, relevance, and diversity [1519]. The development of a region, country, or even the global economy is affected by many factors, which are characterized by a wide range of influences and many factors. Therefore, the prediction of the complex and diverse agricultural economy has always been the focus of the world's attention, and improving the prediction accuracy of the agricultural economy is of great significance to the world's economic life.

The current method based on time series processing has achieved certain results. The classic multidimensional time series analysis model has control items. The autoregressive moving average model (CARMA) [20, 21] combines the advantages of time series analysis and regression analysis, but it is more complicated and difficult to operate in actual use. The autoregressive model CAR [2225] can approach any model accuracy infinitely, and CAR can replace CARMA to implement unified modeling of dynamic systems. However, there is often a nonlinear relationship between agricultural economic data and CAR, which leads to the poor prediction accuracy of CAR in practice. Therefore, there is an urgent need to establish a nonlinear model of order determination and data screening method to efficiently and accurately realize the forecast of the agricultural economy.

In a long time, researchers at home and abroad have put forward many classical agricultural economic forecasting methods for the development of the agricultural economy. The commonly used agricultural economic forecasting methods mainly include linear regression and autoregressive models. However, these methods are often difficult to apply to nonlinear, complex, and diverse agricultural economic forecasting. Therefore, agricultural economic forecasting needs to be further improved.

With the speedy development of deep learning, the network model prediction provides a platform and support for the accurate prediction of the agricultural economy. Artificial neural networks have good nonlinear learning capabilities, and nonlinear sequences or nonlinear regression methods based on ANN [2629] are also constantly emerging. However, the structure of the ANN model is difficult to avoid, and it is prone to over-fitting and under-fitting, and there are many problems. Support vector machines [3033] based on statistical theory have been gradually extended to nonlinear time series analysis or nonlinear regression analysis. It can effectively solve the situation of small samples, over-fitting, the disappearance of dimensionality, etc., and has a certain generalization ability. However, its prediction accuracy in the agricultural economy still needs to be improved. The neural network has more competitive advantages. The integration of various forecasting methods promotes the accuracy of agricultural economic forecasts to a certain extent and provides a good idea for the agricultural economic forecast. It can process and adapt to incomplete information and noisy information. It has more obvious advantages for linear and nonlinear problems. Excellent prediction accuracy and results are often achieved with large amounts of data. It provides a new approach to forecasting complex agricultural systems.

To effectively promote the accuracy and efficiency of agricultural economic forecasting, this paper proposes an agricultural economic forecasting method based on the Elman neural network structure. Based on the Elman [3438] network model, a new topology is designed to advance the learning ability of the network. In addition, based on the collected agricultural economic data, we screened out important influencing factors like the model's training data, reducing the negative impact of the data on the network model. Experiments have demonstrated that the method proposed in this paper surpasses other agricultural economic forecasting models, promotes the forecasting accuracy of agricultural economics, and has achieved certain results.

2. Elman Neural Network Prediction Model

2.1. Elman Model Structure

Figure 1 represents the structure of the Elman neural network. This neural network includes three parts: an input layer, a hidden layer, and an output layer. The connection between its network layers is similar to the feedforward neural network topology. The node of the input layer is mainly suitable for data signal transmission, sending the numerical signal into the neural network. The main function of the output layer node is to linearly weight the output data. The activation function of hidden layer nodes in the network structure can be a linear function or a nonlinear function. The function of the undertaking layer in the network model is to store and hide the output value of the previous network layer according to the time series, and then transmit it to the network, which is equivalent to having a memory effect and the function of monitoring time changes.

Elman neural network structure and its topological structure are mainly for processing nonlinear time series data. The characteristic of this type of network structure is that the data feedback connection is used as the input of the hidden layer through the delay and storage of the receiving layer. This connection method between network layers can process time series data and is very sensitive to historical dynamic data. The participation of its internal feedback network enhances its dynamic information and modeling capabilities. The agricultural economy is closely related to time series and crop types. The Elman neural network is used to model historical samples of the agricultural economy, which effectively achieves the purpose of prediction. In addition, the Elman network structure has high prediction accuracy, and it can approximate the relationship of nonlinear mapping with arbitrary accuracy infinitely. There is no need to consider the influence of external noise on the prediction effect of the network model.

The structure of the Elman neural network is a representative local regression artificial neural network. The Elman neural network has the design result of a local memory unit and local feedback connection, which can efficiently learn time series data. The design of the Elman network structure is similar to the multilayer structure of similar forward neural networks. On the basis of the structure of the BP neural network, a feedback connection layer is added to store time-sequential information in the network layer, which makes the agricultural economic forecasting model have the ability to process time-varying sequences and enhances the stability of this model. Compared with the feedforward neural network topology and the BP neural network topology, the Elman neural network structure has the function of short-term memory, which can quickly solve optimization problems, the processing characteristics of time series data, and the performance and stability of the network structure. It goes beyond backpropagation neural networks and feedforward neural networks. But it still has shortcomings. Its network structure is similar to other types of network structures. The convergence speed during network training is slow, and it is easy to fall into a local minimum in the data set. With a limited number of training times, it is difficult to achieve the global optimal effect.

The mathematical equation of the Elman neural network is shown in the following equations:where k—moment; y—m-dimensional output node data; x—n-dimensional middle node element vector; u—r-dimensional input data; —n-dimensional feedback condition data; —the weight of the connection between the middle layer and the output layer; —input layer to middle layer connection weight; —the connection weight of the undertaking layer to the middle layer; and g()—the convert function of the neurons in the output layer, which is a linear combination of the output of the middle layer using the purelin function; f()—the convert function of the middle layer neuron, often using the tansig function; —input layer threshold; and —Hidden layer threshold.

The Elman artificial neural network has different input data and output data generated at different times because the hidden layer in the network structure not only accepts data from the input layer but also accepts data from the connection layer. Among these data, the data of the input layer responds to the spatial domain information of the signal, and the data of the connection layer represents the time domain information of the input data. Through the fusion of these time and space domain information, the Elman artificial neural network can be more sensitive to the input data and corresponding time information, and the learning effect is better.

2.2. Elman’s Principle and Method

Elman artificial neural networks have the same structure as other types of neural networks. It uses a gradient optimization algorithm. This algorithm can adaptively adjust the learning rate when the learning momentum gradient drops, and adjust the weights backward, effectively avoiding the problem of artificial neural networks falling into local maximums. We use the mean square error loss function to ensure that the model can converge normally. The neural network modifies its threshold value and corresponding weight of each layer through the variance of the actual predicted value of the network and the label value so that the network output value is constantly close to the label value.

Hypothesis the actual output data of the kth step is , and the mean square error loss equation is defined in the time period (0, T) as:

Take and as examples, and obtain partial derivatives of E with respect to and , respectively, and the weight correction formula can be obtained as follows:where j = 1, 2, …, m;  = 1, 2, …, n. μ represents the learning rate and mc represents the momentum factor with a default value of 0.9.

The index function can be expressed by the error sum of the following mean square error loss equation:

In the equation, represents the actual output data and represents the target data.

2.3. Elman Network Improvements

Considering that there are many influencing factors in agricultural economic forecasts, such as labor, material input, etc., the input used for different sources of data has different influencing factors. For the sake of convenience, we only choose 3 to 4 influencing factors in the experiment of this articleto be input into the network as training data. The corresponding output node is a value, and the learning ability is constantly improved by comparing the export value with the label value. The hidden layer in the middle mainly has three layers. The first layer has 7 nodes, the second layer has 5 nodes, and the third layer has 3 nodes. Figure 2 shows the topology of the Elman artificial neural network. While ensuring the accuracy of the model, this paper also pays more attention to the amount of parameters and calculation of the model. On the premise of maintaining similar accuracy, the network structure is simplified to ensure that the model has good inference efficiency.

2.4. Training and Prediction Process

The adoption of the Elman neural network is mainly to establish the correspondence between input data, predicted value, and label value.

This article uses a supervised method for offline training to learn about typical agricultural economy and crop yields. This article mainly selects the Guangzhou Economic Yearbook’s agricultural economic statistics, agricultural production value, labor force, material input, and other related data in the Guangzhou area. The training current of the network is the learning course of the network system on the relationship between the data. The larger the amount of training data and the more comprehensive the data, the better the predicted effect of the trained network model on the economy.

The activation function of the Elman artificial neural network structure maps the data to the interval of (0,1). Therefore, the collected data requires regularization. At the same time, considering the different influencing factors; that is, the magnitude of the input data is very different. To avoid the error of the network prediction due to the magnitude, we adopt the normalization method to preprocess the final data. The maximum and minimum method is usually used for data normalization, and the expressions are as follows:

Among them, x is the original data and and are the max values of the influencing factors under different time series, and its value is between [0, 1] after the data normalization course.

In the network learning algorithm, the learning rate needs to be artificially set after observing the loss and accuracy changes of the experiment. Learning determines the step size of the drop along the gradient, which can be said to affect the prediction accuracy and training duration of network training to some extent. To balance the speed and precision of training, this paper adopts a means of degrading the learning rate, and the expression is as follows:k represents the decay rate, n is the current data of training times, and N is the total data of training times.

The training process of the network is shown in Figure 3. The maximum data of training epoch are 30000, and the training accuracy is . The activation equation of the hidden network uses LeakReLU, and the activation equation of the output network uses the Sigmoid function. After about 20,000 iterations, the accuracy requirements are basically met. The prediction accuracy and loss function of the Elman structure model are as follows:where the N is the data of the test dataset and Y is the data of samples that the Elman neural network, which correctly predicts the agricultural economy.

In Figure 4, the Elman artificial neural network structure first initializes each weight of the input data, then normalizes the entry data, and then inputs the processed data to the neural network for calculation. Matched with other forms of neural networks, the Elman artificial neural network structure has an additional layer after the hidden layer, and the feedback value returns to the hidden layer after the calculation of the inherited layer, which has the function of memory.

3. Experimental Analysis

3.1. Data Sources

In order to prevent the contingency of the prediction effect of a single data set, this paper uses multiple agricultural economic data as the training data of the Elman network model. Table 1 represents the time series forecast of the total output of food crops in the Guangzhou. Table 2 shows the forecast of agricultural production value and labor and material input. Table 3 shows the forecast of the relationship between China’s agricultural output value index (Y) and agricultural tax (X1), the agricultural labor force (X2), and grain output (X3) from 1952 to 1961.

According to the collected data 1, data 2, and data 3, as the test specimens of the neural network structure, use the established optimal neural network training model to train and test them, and the test results obtained are shown in the following figure and table. In order to compare the agricultural economic forecasting model based on the Elman artificial neural network structure and other classes of agricultural economic forecasting models, we put forward more fairly that all the experiments we have done are obtained under the same experimental conditions.

There are a large number of single-dependent variables and multiindependent time series data in the agricultural economy, such as grain output, total agricultural output value, and agricultural product prices and the area of arable land, fertilization, water consumption, and rural electricity consumption that are closely related to agricultural production. It is also a time series system. Agricultural economic time series data often show highly nonlinear characteristics; that is, affected by multiple external environmental factors, at the same time, it also contains significant dynamic time series characteristics; that is, the current year’s grain output is also affected by the previous year's grain output. The influence of my country's agricultural economy is not only affected by the labor force, agricultural input, and agricultural material input, but also by previous years’ grain output and environmental factors. The time series of the agricultural economy is highly volatile and difficult to find, and its prediction is still facing huge challenges. The accuracy of time series forecasting depends on the forecasting tools and time series analysis techniques used. A reasonable selection of forecasting tools is the basis and prerequisite of the entire forecasting process because all-time series analysis must be carried out around specific forecasting tools. The influencing factors of agricultural economic phenomena are complex and changeable, difficult to determine, and have strong regional characteristics. At present, the model design, variable selection, and training sample selection methods of time series analysis all have their own limitations, and most of the researches separate the three without integrating the advantages of the three to synthesize the overall system. The process of model order determination may lead to a substantial increase in the dimensionality of the independent variables, which will inevitably introduce a certain amount of information redundancy, which will have a inactivate influence on the prediction results. How to effectively eliminate redundant independent variables and cover all the information that affects the dependent variable with as few independent variable dimensions as possible can greatly increase the precision of the prediction results. The selection of training samples is of great significance to time series analysis. How to use old historical samples to select a suitable training set to build a predictive model is the key to the training sample selection stage. Accurate prediction is the basis of cognition and decision-making. The development of high-precision time series forecasting methods and accurate deduction of agricultural economic market development trends are of great significance for preventing agricultural economic crises, optimizing agricultural economic structure, and maximizing agricultural economic benefits. Therefore, the selection of independent variables for most of the current agricultural economic data is subjective and empirical, lacking theoretical basis, and the degree of overlap of information is biased. Therefore, this paper selects various factors and models for comparison and analysis.

Agricultural economic time series are complex nonlinear time series. Therefore, this article selects the current time series analysis model, neural network Elman model, with excellent nonlinear approximation ability of time series as the forecasting tool, and selects from model design, time series, and data start with processing and other aspects to consecutively improve the learning capacity of the model. In the follow-up experiments and analysis, we will prove that the method submitted in this article can effectively realize the forecasting effect of the agricultural economy.

There are many influencing factors of the agricultural economy. At present, the amount of data on the agricultural economy is relatively small, and it is difficult to specify a unified multielement standard. Therefore, appropriate influencing factors should be selected according to the specific research on the agricultural economy. The influencing factors in this article refer to the journals that have been published so far.

The data in this paper come from the databases of various provinces and regions. During data preprocessing, the data are incomplete. Usually, we filter out these data or select the data with more complete data for consecutive years. In special cases, we use mean values instead of missing data. Of the data we collect, the amount of data that can be used is relatively small. In order to get a better prediction effect, we divide the dataset ratio as verification: test = 8 : 1 : 1.

3.2. Evaluation Criteria

To accurately analyze the learning capacity of the model, it is essential to compare the prediction results of the model with the label value and to enhance the prediction precision of the model by continuously iterating the weights and thresholds of the network structure. In our paper, the mean square error is adopted as a measure of model prediction performance:

Among them, is the true value of the agricultural economy, namely the label value. is the predicted data of the Elman network model, and n is the number of test samples. Through the mean square loss function, the difference between the predicted value and the label value of the network model is compared, and the model weight of the neural network is improved by the continuous back propagation, and the prediction effect of the neural network is improved.

To prove the effect of the Elman network model used in this article, we also used the linear agricultural economic forecasting model, multiple linear regression model (MLR), CAR model, BP neural network model etc., to compare, and the experimental results are presented in Figure 5. The network model adopts the Adam optimizer, and the initial learning rate is set to 0.001, and then decreases to 0.0001 and 0.000001, respectively, as the experiment progresses to a certain extent.

4. Results and Analysis

First, we discuss the experimental effects of the neural network prediction model in the prediction of time series and factor relationships in the two cases of sudden changes in the data and drastic changes in the original data. Table 1 represents that although there was a sudden change in grain output from 1987 to 1988, the total output fluctuated during the period before and after, but the overall change was relatively stable. The correspondence graph between area, yield and label value is shown in Figure 6.

In the network model, we take the year and area as the entry of the model, and the mapping total grain output as the output. The fitting graph of the total output in historical years is shown in Figure 7. We can see that compared to the actual output, the total output predicted by the Elman method is approached to the actual value than the BP method. From the perspective of the accuracy of the fitting, the BP method is very close to the real data value of GT, but the learning of certain data is not in place, so the fitting effect is not satisfactory for future predictions. Although the Elman-based method we proposed is closer to the true value of GT, from the perspective of the learned data, the original data learned by the network model has abrupt changes, but it does not mean that the future predicted data will also have abrupt changes, so follow-up the network structure should be improved in response to sudden changes in data.

When we compare other network models, we use the most classic version of the network model to compare with our network model, in which the input and output are determined, and the performance of the model is shown by the training and test results of the model. It should be noted that other types of network models can also achieve good results after continuous improvement.

The relationship between agricultural production value and labor and material input is shown in Table 2, and their changes are shown in Figure 8 above. From our Figure 8, we found that these three types of variable factors have a greater impact on the future economy, and we can achieve better agricultural economic development by improving these three factors, which have certain guiding significance. From the changes in the data, we can see that labor and material inputs have not changed much over time, but the corresponding agricultural production value has gradually increased, and the degree of change has been increasing. In the training of the model, we use labor and material input as the entry of the network model, and the total value of agricultural production as the output of the model. The results are shown in Figure 9. Contrasted to the real value, our method is closer to the real value than the method based on the BP network model, which shows that our method has better learning ability and the fitting ability for time-varying data. The original data have relatively large range of changes, and the output data are significantly affected by labor and material input, but the original data have a large range ratio change, and the overall influence on the prediction precision of the network model is also particularly large. In the follow-up work, attention should be paid to collecting data, avoiding significant changes, or adopting reasonable methods to analyze and process data change.

The data in Table 3 shows the relationship between the national agricultural economic output (Y) and agricultural taxes (X1), the agricultural labor force (X2), and food production (X3) from 1952 to 1980 at the end of 1980. We use the data from 1952 to 1961 as the training sample of the model, and the data from 1976 to 1980 as the test sample to compare the learning ability of the model.

In Figure 10, in order to accurately depict the changes of these factors over time, we reduced the data of agricultural labor and food production by 100 times and then compared them in the same graph. From the perspective of data changes, the overall increase of these data are small, the growth is stable, and there is no major sudden change. From the data graph, we can clearly see the relationship and trend of changes between different data factors. Better data preprocessing is more suitable for model learning. Figure 5 shows the collected sample data and its distribution. Due to the large difference in the magnitude of the data, we divide the larger data by a multiple of 10 in order to make it more convenient for the data to change with the year.

Under the same experimental conditions, the comparative experimental results of multiple neural networks are shown in Figure 11. GT represents the ground-truth of the model, and other different colors represent MLR, CAR, BPNN, and Elman methods. The horizontal axis represents different years, and the vertical axis represents the total amount of agricultural economy corresponding to that year. It can be clearly seen from the data in the table that the agricultural economic forecast results based on the Elman-based neural network model proposed in this paper are closer to the real data of the year, indicating that the method proposed in this paper has better forecasting effect. It should be noted that the neural networks compared in this article are all classical neural networks, which are standard network structure modules, rather than those network models modified on the standard network structure. In the comparative experiment, to compare the prediction effects of different neural networks on the agricultural economy more fairly, we have the same settings in terms of data input, output, and loss function.

In this paper, we have done a lot of experiments and work, mainly to choose appropriate influencing factors and get better experimental results. We select appropriate representative influencing factors as the input of our network model according to the published literature to train the prediction performance of the model. Through these time-varying influencing factors, we can obtain indicators that compare key influencing factors. By paying attention to and improving the data of these indicators, we can predict and analyze the agricultural economic form in the next few years. In addition, a lot of work to improve these influencing factors can better guide the development of the agricultural economy.

This paper spends a lot of time explaining the structure of the network model through, which the relationship between multiple factors and the total value of the agricultural economy can be improved. In the future development of the agricultural economy, controlling certain factors can improve the GDP of an agricultural economy.

5. Conclusion

This paper submits an agricultural economic forecasting method based on the Elman neural network. Based on the Elman network structure, a more efficient new topology structure was designed to promote the prediction precision of the network model. In addition, based on the collected agricultural economic data, we screened out important influencing factors the model's training data, reducing the negative impact of the data on the network model. Experiments show that the method based on the Elman neural network is more friendly to the learning effect of time series data. At the same time, it also proves that the neural network prediction method has better learning ability and strong adaptability, and it has a good development prospect in the forecast of the agricultural economic system. In future work, the Elman neural network can be extended to a wider range of fields.

Data Availability

The data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest

The authors declare that they have no conflicts of interest.

Acknowledgments

This research was supported by the 2020 Disciplinary Co-construction Project of the Guangdong Province’s Philosophy and Social Sciences “13th Five-Year Plan,” “Research on the Digital and High-Quality Development Path of Guangdong Foreign Trade Enterprises from the Perspective of Postepidemic” (Project no. GD20XYJ23); the 2020 characteristic innovation project of colleges and universities in the Guangdong Province “Research on the Path of Guangdong Foreign Trade Enterprises’ Response to the Epidemic from the Perspective of Digital Economy” (Project no. 2020WTSCX114); and 2020, the Guangdong Provincial Department of Science and Technology Project “Coconstruction of Guangdong Cold Chain Standardization Engineering Technology Research Center” (Project no. 2020440121000082) funding.