Using Elman Neural Network Model to Forecast and Analyze the Agricultural Economy

. 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.


Introduction
A large amount of historical data have been accumulated in the process of agricultural economic development. ese data are recorded and stored according to time, which is a typical time-based sequence [1][2][3][4][5]. In addition to the inuence of time series in the agricultural economic data [6][7][8][9][10], a large number of single-dependent variables and multidependent variables are also accumulated [11][12][13][14].
ey often contain a large number of dynamic characteristics and are also a ected by independent variables. Impact. In general, the data of the agricultural economy have the characteristics of complexity, relevance, and diversity [15][16][17][18][19]. e development of a region, country, or even the global economy is a ected by many factors, which are characterized by a wide range of in uences and many factors. erefore, 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 signi cance to the world's economic life. e current method based on time series processing has achieved certain results. e classic multidimensional time series analysis model has control items. e autoregressive moving average model (CARMA) [20,21] combines the advantages of time series analysis and regression analysis, but it is more complicated and di cult to operate in actual use. e autoregressive model CAR [22][23][24][25] can approach any model accuracy in nitely, and CAR can replace CARMA to implement uni ed 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. erefore, there is an urgent need to establish a nonlinear model of order determination and data screening method to e ciently 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. e 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. erefore, 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 [26][27][28][29] 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 [30][31][32][33] 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. e neural network has more competitive advantages. e 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 [34][35][36][37][38] 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. Figure 1 represents the structure of the Elman neural network. is neural network includes three parts: an input layer, a hidden layer, and an output layer. e connection between its network layers is similar to the feedforward neural network topology. e node of the input layer is mainly suitable for data signal transmission, sending the numerical signal into the neural network. e main function of the output layer node is to linearly weight the output data. e activation function of hidden layer nodes in the network structure can be a linear function or a nonlinear function. e 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. e 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. is connection method between network layers can process time series data and is very sensitive to historical dynamic data. e participation of its internal feedback network enhances its dynamic information and modeling capabilities. e agricultural economy is closely related to time series and crop types. e 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. ere is no need to consider the influence of external noise on the prediction effect of the network model. e structure of the Elman neural network is a representative local regression artificial neural network. e Elman neural network has the design result of a local memory unit and local feedback connection, which can efficiently learn time series data. e 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 timesequential 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. e 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. e mathematical equation of the Elman neural network is shown in the following equations:

Elman Model Structure.
where k-moment; y-m-dimensional output node data; x-n-dimensional middle node element vector; u-r-dimensional input data; x c -n-dimensional feedback condition data; w 3 -the weight of the connection between the middle layer and the output layer; w 2 -input layer to middle layer connection weight; w 1 -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; b 1 -input layer threshold; and b 2 -Hidden layer threshold. e 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. rough 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.

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. is 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. e 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 y d (k), and the mean square error loss equation is defined in the time period (0, T) as: Take w 3 and w 2 as examples, and obtain partial derivatives of E with respect to w 3 and w 2 , respectively, and the weight correction formula can be obtained as follows: where j � 1, 2, . . ., m; v � 1, 2, . . ., n. μ represents the learning rate and mc represents the momentum factor with a default value of 0.9. e index function can be expressed by the error sum of the following mean square error loss equation: In the equation, y k (ω) represents the actual output data and y k (ω) represents the target data.

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. e corresponding output node is a value, and the learning ability is constantly improved by comparing the export value with the label value. e hidden layer in the middle mainly has three layers. e 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.

Training and Prediction Process.
e adoption of the Elman neural network is mainly to establish the correspondence between input data, predicted value, and label value.
is article uses a supervised method for offline training to learn about typical agricultural economy and crop yields.
is 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. e training current of the network is the learning course of the network system on the relationship between the data. e 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. e activation function of the Elman artificial neural network structure maps the data to the interval of (0,1). erefore, 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. e maximum and minimum method is usually used for data normalization, and the expressions are as follows: Among them, x is the original data and x max and x min 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. e training process of the network is shown in Figure 3. e maximum data of training epoch are 30000, and the training accuracy is 2 × 10 − 4 . e 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. e 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.

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. ere 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

Journal of Mathematics
year's grain output.
e 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. e time series of the agricultural economy is highly volatile and difficult to find, and its prediction is still facing huge challenges. e 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 alltime series analysis must be carried out around specific forecasting tools. e 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. e 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. e 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. e 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. erefore, 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. erefore, this paper selects various factors and models for comparison and analysis.
Agricultural economic time series are complex nonlinear time series. erefore, 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.
ere 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.
erefore, appropriate influencing factors should be selected according to the specific research on the agricultural economy. e influencing factors in this article refer to the journals that have been published so far. e 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.

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 Table 2: Agricultural production value and labor and material input (10,000 people, 100 million yuan).
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, y i is the true value of the agricultural economy, namely the label value. y i is the predicted data of the Elman network model, and n is the number of test samples. rough 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. e 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.

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. e 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. e 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.  Journal of Mathematics e 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    Journal of Mathematics 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. e 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. e 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 followup work, attention should be paid to collecting data, avoiding significant changes, or adopting reasonable methods to analyze and process data change. e 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. e 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 Elmanbased 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  Journal of Mathematics 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. rough these timevarying 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.
is 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.

Conclusion
is 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
e data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest
e authors declare that they have no conflicts of interest.