# Research on Food Security Risk Assessment and Early Warning in China Based on BP Neural Network Model

Authors: Yuke Hou; Xin Liang
Journal: Journal of Food Quality
 (2022)

---

## Abstract

China has always attached great importance to food security issues; especially in today’s changeable world, it is particularly important to build a feasible and accurate food security early warning system. According to the influencing factors in food security, this paper uses the PCA method and the AHP method to construct a food security early warning index system that includes 4 secondary indicators and 13 tertiary indicators of total security, trade security, ecological security, and food security. There are four security levels of no warning, light warning, moderate warning, and heavy warning, and finally the comprehensive evaluation of food security from 2000 to 2019 and the specific early warning levels of various indicators are obtained. This paper constructs a food security evaluation system from the perspective of data, breaks through the limitations of existing research, and improves the completeness of food security early warning indicators. Because the BP neural network is a multilayer feedforward neural network with strong adaptability, it is one of the most widely used and successful neural network models at present. Finally, BP neural network is used to simulate China’s food security early warning system and design standardized risk prevention and control processes and classified response strategies—routine monitoring, risk control, and emergency response—to provide signal guidance and reference for China’s food security to respond to risks early.


---

## Body

## 1. Introduction

In 1983, FAO revised the definition proposed in 1974 that food security fundamentally refers to a basic human right to live and put forward the goal of food security to “make sure all people have access to and afford the basic food they need at all times.” China’s food security is mainly divided into three stages. The first stage is the low level of national economic development before the reform and opening up, and the focus of food security in this stage is total security [1]. The second stage is the period when the national economy develops to a medium level, and the focus of this stage is changed from total amount guarantee to circulation guarantee [2]. The third stage is the period when the national economy develops to the level of industrialization. At this time, the focus has become on the nutrition and sanitation of food and the food preference that arises with the improvement of living standards [3].At this stage, although China’s food security level has improved year by year, it also faces many challenges. According to scholars’ research, during the “14th Five-Year Plan” and “15th Five-Year Plan” period, China will move from a middle-income stage to a high-income stage, and the income of urban and rural residents will inevitably increase. It will bring about an upgrade in the structure of food consumption, which will inevitably lead to drastic changes in the structure of China’s food demand. China is a major country in grain production, consumption, import, and export, and the assessment of food security is often closely related to economy, ecology, trade, etc. [4]. How to build a reasonable food security early warning system to ensure the sustainability of China’s food, so as to further ensure China’s food security, has become the focus of academic and industry attention.Food security risk early warning is to issue a risk level signal based on the comprehensive evaluation results of food security, so as to provide early response and disposal methods for China’s food security situation. For the construction of China’s food security evaluation index system and a reasonable evaluation of China’s food security, Li and He selected 26 specific indicators around the four first-level dimensions of availability, accessibility, stability, and sustainability. Then, they used the entropy method to build a food security index evaluation system [5]. Cui and Nie refined 16 specific indicators based on 5 first-level dimensions such as quantity safety and quality safety and used the coefficient of variation method to construct an index evaluation system [6]. Lei divided 5 dimensions such as total safety and nutritional safety and their 16 specific indicators to construct an index evaluation system by using AHP. The above researches have carried out a dimensional analysis of China’s food security through the calculation of the food security index. Lei also classified China’s food security by security level [7]. Peijun analysis evaluated food security risks with five dimensions: policy, production, circulation, reserves, and consumption [8]. Lei used the entropy weight method and the second-order fuzzy comprehensive evaluation method to evaluate China’s food security according to the three dimensions of production safety, consumption safety, and circulation safety and their 11 specific indicators [9]. For the research on the construction of China’s food security early warning system, Xu divided the alarm situation into four subsystems: production, consumption, circulation, and reserve; used the PCA method to evaluate, construct, and select the early warning indicator system; and then used the SVR model to establish a food security early warning system. The researcher also predicted the food security situation in China from 2014 to 2016, and the prediction effect was good [10]. Lei et al. used the entropy weight method to determine the coefficient of security early warning indicators and established a regional food security early warning model based on the entropy weight extension decision-making model [11]. For the coupled coordinated development of water-energy-food system in the Yellow River Basin, Zhao et al. used the principal component analysis method to calculate the weight and used the gray forecast model to predict the development trend of its coordination degree [12]. The Famine Early Warning System Network (FEWS NET), established with the support of USAID, operates to mitigate the hazards associated with food insecurity and is used to warn of food security problems in some African countries. The predictions of this system for African food security were validated by David and Trey [13]. In 1975, FAO established GIEWS, which combines the information of land coverage and use of satellite positioning with the original data of agricultural statistics, livestock, agricultural products market, and climate. It is used to infer the production of agricultural products from the sample plots and to provide rapid early warning of special situations so that immediate countermeasures can be taken.From the existing research, it can be seen that the construction of China’s food security early warning system model basically adopts the method of two-level weighting. The methods of weight setting include expert consultation method, entropy index method, and AHP [14–16]. There are pros and cons. This paper constructs a food security evaluation system from the perspective of data, breaks through the limitations of existing research, and improves the completeness of food security early warning indicators. For the existing research on early warning systems, although there are evaluations on food security, few articles have established the warning situation and warning degree, and the early warning models also mostly adopt methods such as gray prediction [17] or regression [18]. In this paper, the multilayer feedforward neural network with strong adaptability in the current neural network model, BP neural network, is adopted. The BP neural network model has been used in the research of early warning system such as network public opinion prediction, financial risk early warning, and debt risk early warning, but the research on food early warning based on BP neural network is still in its infancy [19–21]. However, there is a lack of assessment and early warning of the national food security system from 2000 to 2019 in existing studies, and there is little assessment of the level of China’s food security system in the next few years. This paper innovatively and comprehensively uses PCA method, AHP method, and neural network model to construct an indicator system of China’s food security early warning system including total security, trade security, economic security, and ecological security. In addition, we fully consider the practical factors to classify the food security level, use the BP neural network to simulate and test the nonlinear early warning system, and put forward suggestions and policy references for China’s food security system.


## 2. Construction of Food Security Early Warning System

### 2.1. The Design of the Indicator System of the Food Security Early Warning System and the Source of Indicator Data

In this paper, food security means that on the premise of rational utilization of resources and sustainable ecological development, in accordance with the law of mutual promotion between domestic and foreign markets, stable food prices and quality assurance can meet domestic food demand [22]. It is decomposed into four aspects: total security, trade security, ecological security, and economic security. Secondly, according to the scientificity, systematicness, relevance, and data availability of the evaluation system, the relevant data and scholars’ researches are sorted out to form an index system that affects China’s food security early warning system. The above four influencing factors interact, and they are refined into 13 specific indicators that affect China’s food security early warning system, and the data from 2000 to 2019 are selected for research. The indicators are selected based on the following:(1)
Total security is refined into grain self-sufficiency rate, per capita grain output, grain output volatility, and total power of agricultural machinery. Among them, the grain self-sufficiency rate is an important indicator for evaluating the degree of national food security, and China’s grain self-sufficiency rate has exceeded 95%. The food self-sufficiency rate in this paper is obtained according to the following formula:food comsuption/yield+net import (food consumption is the sum of indirect and direct grain consumption). Due to the lack of the specific value of grain consumption, this paper uses the basic formula: direct grain  consumption + indirect consumption  +  inventory  =  total grain output + netgrain import. The FAO determines 17-18% of the annual consumption as the minimum reserve safety line. Considering that China has a large population base and a large grain inventory, this value is assumed to be 20% for calculation: namely, food consumption  =  (total  food  production  +  net  food imports)/1.2. In recent years, China’s population growth rate has slowed down, but the total population is still expanding, and the demand for food is increasing. The per capita grain output directly reflects the relationship between grain output and population data. The fluctuation of grain output not only affects the regional GDP but also affects the income and consumption level of farmers, and it is also one of the important issues in studying the level of grain supply. This article is based on the following formula: grain output volatility = (this year's grain output  −  last  year's  grain  output)/last  year's  grain output calculation index value. According to the research results of Chen et al., agricultural mechanization has a significant positive effect on farmers’ per capita disposable income, farmers’ wage income, and farmers’ family business income [23].(2)
Trade security includes the proportion of grain imports in the import of major agricultural products, the proportion of grain exports in the export of major agricultural products, and the degree of external dependence. Grain trade is an important indicator of China’s food security. According to relevant research, the main reason for the rapid expansion of China’s grain trade scale in the past 20 years is the rapid increase in the number of imports, while the scale of grain exports shows a slow upward trend. The quantity of grain import and export can effectively reflect the level of grain supply. At present, some of China’s agricultural products are highly dependent on foreign countries. This value is the ratio of the amount of domestic grain imported in that year to the total demand for grain in that year, which is an intuitive reflection of the degree of dependence of the development of the domestic grain industry on grain exports.(3)
Ecological security is refined into the ratio of infested area to disaster-stricken area, the amount of fertilizer application per unit sown area, the amount of pesticide application per unit sown area, and the proportion of cultivated land irrigated. Internationally, the infested area is usually defined as the sown area of crops that has been reduced by more than 30% due to disasters. Based on the research of a large number of scholars, the development of China’s agricultural economy is still accompanied by the use of a large number of pesticides, which threatens the sustainable development of China’s food security [24]. According to research, from 1980 to 2017, the irrigation rate of China’s cultivated land increased from 30% to 50.3%, an increase of 20.3%. The continuous increase in this value has promoted the growth of grain crop yields and is conducive to the construction of China’s food security system.(4)
Economic security includes the per capita disposable income of residents and the CPI of food. The above two indicators indirectly reflect food price security and price stability is an important symbol of food security [25]. The higher the disposable income of residents and the consumer price index of food, the higher the level of food security.The data for the above indicators are all from the National Bureau of Statistics database, China Statistical Yearbook, and China Rural Statistical Yearbook. The construction of indicator system of China’s food security early warning system is shown in Table1.Table 1
Construction of indicator system of China’s food security early warning system.
First-level indicatorSecond-level indicatorThird-level indicatorA: Composite food security indexB1: Total securityC1: Food self-sufficiencyC2: Per capita food productionC3: Food production volatilityC4: Total power of agricultural machineryB2: Trade securityC5: Grain imports as a percentage of imports of major agricultural productsC6: The proportion of grain exports in major agricultural exportsC7: External dependenceB3: Ecological securityC8: Ratio of infested area to disaster-stricken areaC9: Fertilizer application per unit sown areaC10: Pesticide application rate per unit sown areaC11: The proportion of irrigated area of cultivated landB4: Economic securityC12: Per capita disposable income of residentsC13: Food consumer price index


### 2.2. The Basic Principle of BP Neural Network

As shown in Figure1, given the model a training set D=x1,y1,x2,y2,…,xm,ym, that is, the input training set is described by d attributes, and the output is n-dimensional real-valued vector; assuming the number of hidden layers is h, the connection weight between the input layer and the hidden layer is wki, the threshold value of the ith neuron in the output layer is ai, and the weight between the hidden layer and the output layer is wij and the threshold value is bj, then the ith neuron in the hidden layer is the threshold value bj. Then, the input formula of the ith neuron in the hidden layer is as follows:(1)Hi=f∑k=1nwkixk−ai,i=1,2,…,h.Figure 1
BP neural network structure diagram.Among them,f is the hidden layer function. It is assumed that both the hidden layer and the output layer neurons use the nonlinear differentiable and nondecreasing sigmoid function: fx=1/1−e−x, and its variation range is 0,1, the derivative form is f′x=fx1−fx, and the output layer formula can be obtained:(2)Oj=∑i=1hHiwij−bj,j=1,2,…,n.Then, the mean square error of the network onxk,yk is as follows:(3)Ek=12∑j=1ly^jk−yjk2.The BP neural network has the forward propagation of input information, and the error gradually decreases during repeated training and learning until it reaches the threshold to stop learning. During this process, the output valueOj gradually moves closer to the expected value Yk to achieve asymptotic fitting, and the error function Ew,b is as follows:(4)Ew,b=12∑j=1nOj−Yj2.In the error backpropagation, to update the connection weights, the update formulas ofwij and bj between the hidden layer and the output layer are as follows:(5)Δwij=−η∂Ew,b∂wij,(6)Δbj=−η∂Ew,b∂bj.The update formulas ofwki and bi between the input layer and the hidden layer are as follows:(7)Δwki=−η∂Ew,b∂wki,(8)Δbi=−η∂Ew,b∂bi.It can be seen from the above formula that with just one hidden layer containing enough neurons, using a sigmoid function in the hidden layer and a linear transfer function in the output layer, a multilayer feedforward neural network can approximate any complex continuous function with arbitrary precision. Moreover, BP neural network has strong simulation ability.


## 2.1. The Design of the Indicator System of the Food Security Early Warning System and the Source of Indicator Data

In this paper, food security means that on the premise of rational utilization of resources and sustainable ecological development, in accordance with the law of mutual promotion between domestic and foreign markets, stable food prices and quality assurance can meet domestic food demand [22]. It is decomposed into four aspects: total security, trade security, ecological security, and economic security. Secondly, according to the scientificity, systematicness, relevance, and data availability of the evaluation system, the relevant data and scholars’ researches are sorted out to form an index system that affects China’s food security early warning system. The above four influencing factors interact, and they are refined into 13 specific indicators that affect China’s food security early warning system, and the data from 2000 to 2019 are selected for research. The indicators are selected based on the following:(1)
Total security is refined into grain self-sufficiency rate, per capita grain output, grain output volatility, and total power of agricultural machinery. Among them, the grain self-sufficiency rate is an important indicator for evaluating the degree of national food security, and China’s grain self-sufficiency rate has exceeded 95%. The food self-sufficiency rate in this paper is obtained according to the following formula:food comsuption/yield+net import (food consumption is the sum of indirect and direct grain consumption). Due to the lack of the specific value of grain consumption, this paper uses the basic formula: direct grain  consumption + indirect consumption  +  inventory  =  total grain output + netgrain import. The FAO determines 17-18% of the annual consumption as the minimum reserve safety line. Considering that China has a large population base and a large grain inventory, this value is assumed to be 20% for calculation: namely, food consumption  =  (total  food  production  +  net  food imports)/1.2. In recent years, China’s population growth rate has slowed down, but the total population is still expanding, and the demand for food is increasing. The per capita grain output directly reflects the relationship between grain output and population data. The fluctuation of grain output not only affects the regional GDP but also affects the income and consumption level of farmers, and it is also one of the important issues in studying the level of grain supply. This article is based on the following formula: grain output volatility = (this year's grain output  −  last  year's  grain  output)/last  year's  grain output calculation index value. According to the research results of Chen et al., agricultural mechanization has a significant positive effect on farmers’ per capita disposable income, farmers’ wage income, and farmers’ family business income [23].(2)
Trade security includes the proportion of grain imports in the import of major agricultural products, the proportion of grain exports in the export of major agricultural products, and the degree of external dependence. Grain trade is an important indicator of China’s food security. According to relevant research, the main reason for the rapid expansion of China’s grain trade scale in the past 20 years is the rapid increase in the number of imports, while the scale of grain exports shows a slow upward trend. The quantity of grain import and export can effectively reflect the level of grain supply. At present, some of China’s agricultural products are highly dependent on foreign countries. This value is the ratio of the amount of domestic grain imported in that year to the total demand for grain in that year, which is an intuitive reflection of the degree of dependence of the development of the domestic grain industry on grain exports.(3)
Ecological security is refined into the ratio of infested area to disaster-stricken area, the amount of fertilizer application per unit sown area, the amount of pesticide application per unit sown area, and the proportion of cultivated land irrigated. Internationally, the infested area is usually defined as the sown area of crops that has been reduced by more than 30% due to disasters. Based on the research of a large number of scholars, the development of China’s agricultural economy is still accompanied by the use of a large number of pesticides, which threatens the sustainable development of China’s food security [24]. According to research, from 1980 to 2017, the irrigation rate of China’s cultivated land increased from 30% to 50.3%, an increase of 20.3%. The continuous increase in this value has promoted the growth of grain crop yields and is conducive to the construction of China’s food security system.(4)
Economic security includes the per capita disposable income of residents and the CPI of food. The above two indicators indirectly reflect food price security and price stability is an important symbol of food security [25]. The higher the disposable income of residents and the consumer price index of food, the higher the level of food security.The data for the above indicators are all from the National Bureau of Statistics database, China Statistical Yearbook, and China Rural Statistical Yearbook. The construction of indicator system of China’s food security early warning system is shown in Table1.Table 1
Construction of indicator system of China’s food security early warning system.
First-level indicatorSecond-level indicatorThird-level indicatorA: Composite food security indexB1: Total securityC1: Food self-sufficiencyC2: Per capita food productionC3: Food production volatilityC4: Total power of agricultural machineryB2: Trade securityC5: Grain imports as a percentage of imports of major agricultural productsC6: The proportion of grain exports in major agricultural exportsC7: External dependenceB3: Ecological securityC8: Ratio of infested area to disaster-stricken areaC9: Fertilizer application per unit sown areaC10: Pesticide application rate per unit sown areaC11: The proportion of irrigated area of cultivated landB4: Economic securityC12: Per capita disposable income of residentsC13: Food consumer price index


## 2.2. The Basic Principle of BP Neural Network

As shown in Figure1, given the model a training set D=x1,y1,x2,y2,…,xm,ym, that is, the input training set is described by d attributes, and the output is n-dimensional real-valued vector; assuming the number of hidden layers is h, the connection weight between the input layer and the hidden layer is wki, the threshold value of the ith neuron in the output layer is ai, and the weight between the hidden layer and the output layer is wij and the threshold value is bj, then the ith neuron in the hidden layer is the threshold value bj. Then, the input formula of the ith neuron in the hidden layer is as follows:(1)Hi=f∑k=1nwkixk−ai,i=1,2,…,h.Figure 1
BP neural network structure diagram.Among them,f is the hidden layer function. It is assumed that both the hidden layer and the output layer neurons use the nonlinear differentiable and nondecreasing sigmoid function: fx=1/1−e−x, and its variation range is 0,1, the derivative form is f′x=fx1−fx, and the output layer formula can be obtained:(2)Oj=∑i=1hHiwij−bj,j=1,2,…,n.Then, the mean square error of the network onxk,yk is as follows:(3)Ek=12∑j=1ly^jk−yjk2.The BP neural network has the forward propagation of input information, and the error gradually decreases during repeated training and learning until it reaches the threshold to stop learning. During this process, the output valueOj gradually moves closer to the expected value Yk to achieve asymptotic fitting, and the error function Ew,b is as follows:(4)Ew,b=12∑j=1nOj−Yj2.In the error backpropagation, to update the connection weights, the update formulas ofwij and bj between the hidden layer and the output layer are as follows:(5)Δwij=−η∂Ew,b∂wij,(6)Δbj=−η∂Ew,b∂bj.The update formulas ofwki and bi between the input layer and the hidden layer are as follows:(7)Δwki=−η∂Ew,b∂wki,(8)Δbi=−η∂Ew,b∂bi.It can be seen from the above formula that with just one hidden layer containing enough neurons, using a sigmoid function in the hidden layer and a linear transfer function in the output layer, a multilayer feedforward neural network can approximate any complex continuous function with arbitrary precision. Moreover, BP neural network has strong simulation ability.


## 3. Application of China’s Grain Security Nonlinear Simulation Early Warning System

### 3.1. Comprehensive Evaluation of China’s Food Security

In this paper, principal component analysis (PCA) and analytic hierarchy process (AHP) are used to give objective and subjective comprehensive weights to the 13 indicators of the food security early warning index system and then comprehensively evaluate China’s food security.


#### 3.1.1. Objective Empowerment Based on PCA

In order to build China’s food security early warning system, this paper selects 13 indicators from 2000 to 2019 as the indicator system of this early warning system. Due to the large amount of data and the strong correlation between the indicators, in order to reduce the loss of information contained in the original indicators and achieve the purpose of comprehensive analysis of the collected data, this paper uses the principal component analysis method to objectively weight the data.(1)
The first step is to standardize the data, and the second step is to use SPSS to reduce the dimensionality of the data, and perform the “KMO and Bartlett sphericity test.” If the KMO value is greater than 0.7, it indicates that the selected index data can be analyzed by principal component analysis.. Through calculation, the KMO value of the index system composed of the indicators selected in this paper is 0.75, indicating that it is generally applicable to the principal component analysis method; the approximate chi-square value is 412.016, indicating that it has passed the Bartlett sphericity test; and the PCA method can be used. Through total variance analysis, it is easy to conclude that the 13 indicators can be reduced to 3 dimensions for discussion.(2)
Calculate the comprehensive coefficient of the model: first calculate the coefficients in the linear combination of the three principal components; the coefficients are equal to the standardized number in the component matrix divided by the square of the characteristic root of the corresponding principal component. The eigenvalue of the first principal component is 7.978, the eigenvalue of the second principal component is 2.64, and the eigenvalue of the third principal component is 1.009. The linear combination formulas are as follows:(9)F1=0.316512x1+0.316886x2+0.042485x3+0.272611x4+0.303767x5−0.32005x6−0.21384x7−0.11577x8+0.204281x9+0.037528x10+0.303413x11+0.344481x12−0.08214x13,(10)F2=0.090472x1+0.067085x2+0.529293x3+0.148325x4−0.2031x5+0.043697x6−0.24495x7−0.46282x8+0.185868x9+0.150172x10+0.230797x11+0.08801x12+0.547142x13,(11)F3=0.39423x1+0.404185x2+0.182182x3+0.549533x4+0.150325x5−0.16824x6−0.54057x7−0.20209x8+0.733706x9+0.947745x10−0.03186x11+0.12245x12+0.179195x13.(3)
Finally, using the variance contribution rate of the three effective principal components as a weight, a weighted average of the coefficients is used to obtain the coefficients in the comprehensive scoring model. The final comprehensive scoring model formula is as follows:(12)Ynormalized=0.09138x1+0.090334x2+0.061778x3+0.09921x4+0.048813x5−0.065394x6−0.095669x7−0.071024x8+0.103191x9+0.086153x10+0.069498x11+0.076704x12+0.040853x13.According to the coefficients of the above formula, it is easy to obtain the objective weightsWOi of each index, and the results are shown in Table 2.Table 2
Objective weights of early warning indicators based on PCA method.
IndicatorWOjC10.09138C20.090334C30.061778C40.09921C50.048831C60.065394C70.095669C80.071024C90.103191C100.086153C110.069498C120.076704C130.040853Note. The coefficients of the three indicators C6, C7, and C8 in the comprehensive scoring model are negative values, so this paper obtains the absolute value of the coefficients of the sub-model when taking their weights.


#### 3.1.2. Subjective Weighting Based on AHP

The early warning indicators of China’s food security are converted into target layer, criterion layer, and program layer and then constructed into a comparison matrix. By arranging the research of a large number of scholars and internationally recognized standards, the scoring and decision making of the layered indicators are compared in pairs and processed by the AHP method. The weights of each indicator can be obtained as shown in Table3.Table 3
Subjective weights of early warning indicators based on AHP method.
A: Target layerB:Criterion layerB’s weightC:Program layerC’s weightEarly warning indicator weightComposite food security indexB10.565C10.56500.31923C20.26220.148144C30.11750.06639C40.05530.031236B20.1175C50.63700.074848C60.25830.03035C70.10470.012302B30.2622C80.52810.138468C90.21000.055062C100.21000.055062C110.05190.013608B40.0553C120.83330.046081C130.16670.009219


#### 3.1.3. The Comprehensive Weight of Indicators of China’s Food Security Early Warning System Combining Subjective and Objective Methods

Based on the weights in Tables2 and 3, the comprehensive weight calculation of subjective and objective method combination is as follows:(13)Wj=θWAHPj+1−θWPCAj.Among them,θ is the weight coefficient of the weight assigned by the AHP method. Since subjective weighting and objective weighting have their own advantages and disadvantages, they are equally important, so the value of θ is set to 0.5, so Wj=0.5WAHPj+0.5WPCAj. The calculation results are shown in Table 4.Table 4
Comprehensive weights of early warning indicators based on subjective and objective weighting.
SubsystemIndicatorSubjective and objective comprehensive weightB1C10.2005305C20.119239C30.064084C40.065223B2C50.06183C60.047872C70.053986B3C80.104746C90.079127C100.070607C110.041553B4C120.061393C130.025036


#### 3.1.4. Comprehensive Evaluation Results of China’s Food Security under the Full Sample

According to the comprehensive weight of the indicators calculated above, calculate the comprehensive evaluation value of food security in each year from 2001 to 2019:(14)Vi=∑j=1mWj∗Xij′=0.2005305∗Xi1′+0.119239∗Xi2′+0.064084∗Xi3′+0.06522∗Xi4′+0.06183∗Xi5′+0.047872∗Xi6′+0.053986∗Xi7′+0.104746∗Xi8′+0.079127∗Xi9′+0.070607∗Xi10′+0.041553∗Xi11′+0.061393∗Xi12′+0.0250365∗Xi13′.Among them,Vi is the food security evaluation value in the ith year, and the calculation results are shown in Table 5.Table 5
Comprehensive evaluation results of food security in China.
YearComprehensive evaluation of food securityAlertness2000−0.10012Heavy warning2001−0.02354Heavy warning2002−0.0403Heavy warning2003−0.0876Heavy warning20040.162666Moderate warning20050.133916Moderate warning20060.160253Moderate warning20070.186373Moderate warning20080.302155Moderate warning20090.364197Light warning20100.424979Light warning20110.497854Light warning20120.500631Light warning20130.53005Light warning20140.559451Light warning20150.612983No warning20160.59172No warning20170.619918No warning20180.574006Light warning20190.552851Light warningThe alarm degree refers to the standard used to judge the intensity of the alarm situation after the occurrence of the alarm situation. The setting of this value should be divided into different standards according to the constantly changing state of the alarm situation indicators and the thresholds in different periods, so as to analyze the current market situation and give an early warning degree of the situation. In this paper, the food security situation in China is divided into four levels: no warning, light warning, moderate warning, and heavy warning, and the division is based on the mean plus or minus the standard deviation. The specific results are shown in Table6.Table 6
Classification of food security grades.
AlertnessLower limitUpper limitHeavy warning0.077138Moderate warning0.0771380.326121Light warning0.3261210.575104No warning0.575104


### 3.2. Food Security Alertness Classification

The interval division of each indicator is shown in Table7, where the basis for setting the warning interval of each indicator is as follows:(1)
C1: Grain self-sufficiency rate is an indicator to assess the country’s grain self-sufficiency level, which is the proportion of grain production in the year to the grain consumption of the year. According to the data, if the grain self-sufficiency rate of a country or region is more than 100%, it indicates complete self-sufficiency; if it is 95%–100%, it means basic self-sufficiency; if it is 90%–95%, it represents an acceptable level of food security; and if it is less than 90%, it proves that the risk of food supply and demand increases.(2)
C2: The National Food Security Medium and Long-Term Plan (2008–2020) proposes that the per capita grain consumption should not be less than 395 kg by 2020, but in 2010, China’s per capita grain consumption exceeded the 400 kg mark, and in 2014, the per capita food possession reached 445 kilograms.(3)
C3: According to the research of scholars, the normal range of the fluctuation coefficient of total grain output should be within ±5%. According to the National Food Security Medium and Long-Term Plan outline (2008–2020), the comprehensive grain production capacity in 2020 is guaranteed to be 540 million tons. However, data show that grain production in 2014 reached 607 million tons. As a result, there is little pressure on China’s total grain supply, so this paper sets it at 3% ideally.(4)
C6, C7, and C8 are all negative indicators. The larger the value of the indicator, the lower the food security. In this paper, the minimum value in the sample is selected as the ideal value.Table 7
Construction of food security early warning indicator system.
Second-level indicatorNo warningLight warningModerate warningHeavy warningC1100,+∞95,10090,950,90C2400,+∞375,400350,3750,350C30.03,+∞0.01,0.030,0.01−∞,0C4100000,+∞70000,1000060000,70000,60000C50.9,10.8,0.90.7,0.80,0.7C60,0.90.9,0.950.95,0.970.97,1C70,0.010.01,0.020.02,0.050.05,1C80,5050,5555,6065,100C9340,+∞325,340300,3250,300C1010,+∞9.1,108,2,9.10,8.2C110.54,10.53,0.540.5,0.530,0.5C1210000,+∞7000,100005000,70000,5000C13100,+∞90,10090,1000,90


### 3.3. Sample Data Discretization

By taking China’s food security indicators from 2000 to 2019 as a sample, the sample data is discretized, and the sample data of each indicator is compared with the security level classification in Table5. Accordingly, each indicator is assigned one of the following values: 1 if it falls in the “no warning” interval, 2 if it falls in the “light warning” interval, 3 if it falls in the “moderate warning” interval, and 4 if it falls in the “heavy warning” interval. The specific results are shown in Table 8.Table 8
Decision values of discrete early warning index attributes of China’s 2000–2019 food security indicators.
C1C2C3C4C5C6C7C8C9C10C11C12C132000434422344444420014344233444342200243443333433422003444334434313120044313432133231200543133332333312006422232233122120074232333221221200841123213211212009313222111121120103122221111111201131122211111112012311122111111120133121221111111201421312212111112015212111131111120162142111211111201711321111121112018211111121211120192131111123111


### 3.4. Simulation and Verification of Nonlinear Early Warning System

According to the characteristics of the collected data and previous researches by scholars, in order to build a more accurate food security early warning system, this paper compares the simulation results based on the machine learning regression model and the BP neural network to determine the optimal model. The specific analysis is as follows:(1)
The machine learning regression model is written in Python 3.7, and the Bayesian Ridge, Linear Regression in the sklearn package, SVR in svm, and Gradient Boosting Regressor in ensemble gradient boosting are called for fitting. The proportion of training set and test set is 80% and 20%, respectively. This model has a total of 20 samples and 13 features, so the training set samples are determined to be 16, and the test set samples are determined to be 4. The regression results are shown in Table9.(2)
BP neural network: 13 early warning indicators are used as the input layer nodes of the BP neural network, and the number of nodes is 13; the comprehensive evaluation value of food securityYi is used as the output layer node, and the number of nodes is 1. After repeated trial calculation and iteration, the initial hidden layer node number in the case of the highest matching degree is 10, and a 3-layer BP neural network structure is established. Select 4 samples from the 20 samples as test samples, and the remaining 16 samples as training samples. The neural network toolbox in MATLAB software is used for training and testing. The results are shown in Figure 2.Table 9
Fitting effect.
Regression metricsEVMAEMSEr2Bayesian Ridge9.893355e − 010.0212280.0006310.989335Linear Regression9.970487e − 010.0092730.0001750.997049SVR9.034646e − 010.0663650.0057150.903421GBR9.999035e − 010.0015550.0000060.996903Figure 2
Curve diagram of simulated value and real value of BP neural network test sample.The GBR model showed the best regression effect, so it is used to simulate the data from 2016 to 2019. The results are shown in Table10.Table 10
GBR simulation values.
YearActual valueSimulation valueSimulation effect20160.591720.59104499.89%20170.6199180.57343896.91%20180.5740060.58732697.73%20190.5528510.56087198.57%The ideal line indicates that the BP training result is the most ideal when the BP network is trained to the 66th time. At this time, the fitting degree between the simulated value obtained by training and the real value is relatively high, and the MSE index of the two is 0.0009258.Put 4 test samples into the trained BP neural network; the fitting degree of the two is 99.81%, and the training effect is good. The simulation effect is shown in Table11.Table 11
Simulation values of BP neural network.
BP neural network predictionYearActual valueSimulation valueSimulation effect20160.591720.569696.26%20170.6199180.628598.63%20180.5740060.594496.57%20190.5528510.550899.63%Compare the simulation results of the above five nonlinear systems with the real values.Figure3 and the simulation results show that, except for the Linear Regression model, the simulation accuracy of all methods is above 90%. Compared with the GBR regression model, the simulation effect of the BP neural network model is better, and the simulation effect of the five samples is above 96%. The simulated value is almost indistinguishable from the real value. This shows that the BP neural network model is very effective in the early warning of food security. Compared with the existing research results, this model has made some progress. Therefore, in this system, as long as the data of the above 13 indicators of Chinese grain are collected and input into the system, the current food risk situation in China can be obtained, so that solutions can be formulated as soon as possible to effectively avoid risks.Figure 3
BP neural network training error curve.


## 3.1. Comprehensive Evaluation of China’s Food Security

In this paper, principal component analysis (PCA) and analytic hierarchy process (AHP) are used to give objective and subjective comprehensive weights to the 13 indicators of the food security early warning index system and then comprehensively evaluate China’s food security.


### 3.1.1. Objective Empowerment Based on PCA

In order to build China’s food security early warning system, this paper selects 13 indicators from 2000 to 2019 as the indicator system of this early warning system. Due to the large amount of data and the strong correlation between the indicators, in order to reduce the loss of information contained in the original indicators and achieve the purpose of comprehensive analysis of the collected data, this paper uses the principal component analysis method to objectively weight the data.(1)
The first step is to standardize the data, and the second step is to use SPSS to reduce the dimensionality of the data, and perform the “KMO and Bartlett sphericity test.” If the KMO value is greater than 0.7, it indicates that the selected index data can be analyzed by principal component analysis.. Through calculation, the KMO value of the index system composed of the indicators selected in this paper is 0.75, indicating that it is generally applicable to the principal component analysis method; the approximate chi-square value is 412.016, indicating that it has passed the Bartlett sphericity test; and the PCA method can be used. Through total variance analysis, it is easy to conclude that the 13 indicators can be reduced to 3 dimensions for discussion.(2)
Calculate the comprehensive coefficient of the model: first calculate the coefficients in the linear combination of the three principal components; the coefficients are equal to the standardized number in the component matrix divided by the square of the characteristic root of the corresponding principal component. The eigenvalue of the first principal component is 7.978, the eigenvalue of the second principal component is 2.64, and the eigenvalue of the third principal component is 1.009. The linear combination formulas are as follows:(9)F1=0.316512x1+0.316886x2+0.042485x3+0.272611x4+0.303767x5−0.32005x6−0.21384x7−0.11577x8+0.204281x9+0.037528x10+0.303413x11+0.344481x12−0.08214x13,(10)F2=0.090472x1+0.067085x2+0.529293x3+0.148325x4−0.2031x5+0.043697x6−0.24495x7−0.46282x8+0.185868x9+0.150172x10+0.230797x11+0.08801x12+0.547142x13,(11)F3=0.39423x1+0.404185x2+0.182182x3+0.549533x4+0.150325x5−0.16824x6−0.54057x7−0.20209x8+0.733706x9+0.947745x10−0.03186x11+0.12245x12+0.179195x13.(3)
Finally, using the variance contribution rate of the three effective principal components as a weight, a weighted average of the coefficients is used to obtain the coefficients in the comprehensive scoring model. The final comprehensive scoring model formula is as follows:(12)Ynormalized=0.09138x1+0.090334x2+0.061778x3+0.09921x4+0.048813x5−0.065394x6−0.095669x7−0.071024x8+0.103191x9+0.086153x10+0.069498x11+0.076704x12+0.040853x13.According to the coefficients of the above formula, it is easy to obtain the objective weightsWOi of each index, and the results are shown in Table 2.Table 2
Objective weights of early warning indicators based on PCA method.
IndicatorWOjC10.09138C20.090334C30.061778C40.09921C50.048831C60.065394C70.095669C80.071024C90.103191C100.086153C110.069498C120.076704C130.040853Note. The coefficients of the three indicators C6, C7, and C8 in the comprehensive scoring model are negative values, so this paper obtains the absolute value of the coefficients of the sub-model when taking their weights.


### 3.1.2. Subjective Weighting Based on AHP

The early warning indicators of China’s food security are converted into target layer, criterion layer, and program layer and then constructed into a comparison matrix. By arranging the research of a large number of scholars and internationally recognized standards, the scoring and decision making of the layered indicators are compared in pairs and processed by the AHP method. The weights of each indicator can be obtained as shown in Table3.Table 3
Subjective weights of early warning indicators based on AHP method.
A: Target layerB:Criterion layerB’s weightC:Program layerC’s weightEarly warning indicator weightComposite food security indexB10.565C10.56500.31923C20.26220.148144C30.11750.06639C40.05530.031236B20.1175C50.63700.074848C60.25830.03035C70.10470.012302B30.2622C80.52810.138468C90.21000.055062C100.21000.055062C110.05190.013608B40.0553C120.83330.046081C130.16670.009219


### 3.1.3. The Comprehensive Weight of Indicators of China’s Food Security Early Warning System Combining Subjective and Objective Methods

Based on the weights in Tables2 and 3, the comprehensive weight calculation of subjective and objective method combination is as follows:(13)Wj=θWAHPj+1−θWPCAj.Among them,θ is the weight coefficient of the weight assigned by the AHP method. Since subjective weighting and objective weighting have their own advantages and disadvantages, they are equally important, so the value of θ is set to 0.5, so Wj=0.5WAHPj+0.5WPCAj. The calculation results are shown in Table 4.Table 4
Comprehensive weights of early warning indicators based on subjective and objective weighting.
SubsystemIndicatorSubjective and objective comprehensive weightB1C10.2005305C20.119239C30.064084C40.065223B2C50.06183C60.047872C70.053986B3C80.104746C90.079127C100.070607C110.041553B4C120.061393C130.025036


### 3.1.4. Comprehensive Evaluation Results of China’s Food Security under the Full Sample

According to the comprehensive weight of the indicators calculated above, calculate the comprehensive evaluation value of food security in each year from 2001 to 2019:(14)Vi=∑j=1mWj∗Xij′=0.2005305∗Xi1′+0.119239∗Xi2′+0.064084∗Xi3′+0.06522∗Xi4′+0.06183∗Xi5′+0.047872∗Xi6′+0.053986∗Xi7′+0.104746∗Xi8′+0.079127∗Xi9′+0.070607∗Xi10′+0.041553∗Xi11′+0.061393∗Xi12′+0.0250365∗Xi13′.Among them,Vi is the food security evaluation value in the ith year, and the calculation results are shown in Table 5.Table 5
Comprehensive evaluation results of food security in China.
YearComprehensive evaluation of food securityAlertness2000−0.10012Heavy warning2001−0.02354Heavy warning2002−0.0403Heavy warning2003−0.0876Heavy warning20040.162666Moderate warning20050.133916Moderate warning20060.160253Moderate warning20070.186373Moderate warning20080.302155Moderate warning20090.364197Light warning20100.424979Light warning20110.497854Light warning20120.500631Light warning20130.53005Light warning20140.559451Light warning20150.612983No warning20160.59172No warning20170.619918No warning20180.574006Light warning20190.552851Light warningThe alarm degree refers to the standard used to judge the intensity of the alarm situation after the occurrence of the alarm situation. The setting of this value should be divided into different standards according to the constantly changing state of the alarm situation indicators and the thresholds in different periods, so as to analyze the current market situation and give an early warning degree of the situation. In this paper, the food security situation in China is divided into four levels: no warning, light warning, moderate warning, and heavy warning, and the division is based on the mean plus or minus the standard deviation. The specific results are shown in Table6.Table 6
Classification of food security grades.
AlertnessLower limitUpper limitHeavy warning0.077138Moderate warning0.0771380.326121Light warning0.3261210.575104No warning0.575104


## 3.1.1. Objective Empowerment Based on PCA

In order to build China’s food security early warning system, this paper selects 13 indicators from 2000 to 2019 as the indicator system of this early warning system. Due to the large amount of data and the strong correlation between the indicators, in order to reduce the loss of information contained in the original indicators and achieve the purpose of comprehensive analysis of the collected data, this paper uses the principal component analysis method to objectively weight the data.(1)
The first step is to standardize the data, and the second step is to use SPSS to reduce the dimensionality of the data, and perform the “KMO and Bartlett sphericity test.” If the KMO value is greater than 0.7, it indicates that the selected index data can be analyzed by principal component analysis.. Through calculation, the KMO value of the index system composed of the indicators selected in this paper is 0.75, indicating that it is generally applicable to the principal component analysis method; the approximate chi-square value is 412.016, indicating that it has passed the Bartlett sphericity test; and the PCA method can be used. Through total variance analysis, it is easy to conclude that the 13 indicators can be reduced to 3 dimensions for discussion.(2)
Calculate the comprehensive coefficient of the model: first calculate the coefficients in the linear combination of the three principal components; the coefficients are equal to the standardized number in the component matrix divided by the square of the characteristic root of the corresponding principal component. The eigenvalue of the first principal component is 7.978, the eigenvalue of the second principal component is 2.64, and the eigenvalue of the third principal component is 1.009. The linear combination formulas are as follows:(9)F1=0.316512x1+0.316886x2+0.042485x3+0.272611x4+0.303767x5−0.32005x6−0.21384x7−0.11577x8+0.204281x9+0.037528x10+0.303413x11+0.344481x12−0.08214x13,(10)F2=0.090472x1+0.067085x2+0.529293x3+0.148325x4−0.2031x5+0.043697x6−0.24495x7−0.46282x8+0.185868x9+0.150172x10+0.230797x11+0.08801x12+0.547142x13,(11)F3=0.39423x1+0.404185x2+0.182182x3+0.549533x4+0.150325x5−0.16824x6−0.54057x7−0.20209x8+0.733706x9+0.947745x10−0.03186x11+0.12245x12+0.179195x13.(3)
Finally, using the variance contribution rate of the three effective principal components as a weight, a weighted average of the coefficients is used to obtain the coefficients in the comprehensive scoring model. The final comprehensive scoring model formula is as follows:(12)Ynormalized=0.09138x1+0.090334x2+0.061778x3+0.09921x4+0.048813x5−0.065394x6−0.095669x7−0.071024x8+0.103191x9+0.086153x10+0.069498x11+0.076704x12+0.040853x13.According to the coefficients of the above formula, it is easy to obtain the objective weightsWOi of each index, and the results are shown in Table 2.Table 2
Objective weights of early warning indicators based on PCA method.
IndicatorWOjC10.09138C20.090334C30.061778C40.09921C50.048831C60.065394C70.095669C80.071024C90.103191C100.086153C110.069498C120.076704C130.040853Note. The coefficients of the three indicators C6, C7, and C8 in the comprehensive scoring model are negative values, so this paper obtains the absolute value of the coefficients of the sub-model when taking their weights.


## 3.1.2. Subjective Weighting Based on AHP

The early warning indicators of China’s food security are converted into target layer, criterion layer, and program layer and then constructed into a comparison matrix. By arranging the research of a large number of scholars and internationally recognized standards, the scoring and decision making of the layered indicators are compared in pairs and processed by the AHP method. The weights of each indicator can be obtained as shown in Table3.Table 3
Subjective weights of early warning indicators based on AHP method.
A: Target layerB:Criterion layerB’s weightC:Program layerC’s weightEarly warning indicator weightComposite food security indexB10.565C10.56500.31923C20.26220.148144C30.11750.06639C40.05530.031236B20.1175C50.63700.074848C60.25830.03035C70.10470.012302B30.2622C80.52810.138468C90.21000.055062C100.21000.055062C110.05190.013608B40.0553C120.83330.046081C130.16670.009219


## 3.1.3. The Comprehensive Weight of Indicators of China’s Food Security Early Warning System Combining Subjective and Objective Methods

Based on the weights in Tables2 and 3, the comprehensive weight calculation of subjective and objective method combination is as follows:(13)Wj=θWAHPj+1−θWPCAj.Among them,θ is the weight coefficient of the weight assigned by the AHP method. Since subjective weighting and objective weighting have their own advantages and disadvantages, they are equally important, so the value of θ is set to 0.5, so Wj=0.5WAHPj+0.5WPCAj. The calculation results are shown in Table 4.Table 4
Comprehensive weights of early warning indicators based on subjective and objective weighting.
SubsystemIndicatorSubjective and objective comprehensive weightB1C10.2005305C20.119239C30.064084C40.065223B2C50.06183C60.047872C70.053986B3C80.104746C90.079127C100.070607C110.041553B4C120.061393C130.025036


## 3.1.4. Comprehensive Evaluation Results of China’s Food Security under the Full Sample

According to the comprehensive weight of the indicators calculated above, calculate the comprehensive evaluation value of food security in each year from 2001 to 2019:(14)Vi=∑j=1mWj∗Xij′=0.2005305∗Xi1′+0.119239∗Xi2′+0.064084∗Xi3′+0.06522∗Xi4′+0.06183∗Xi5′+0.047872∗Xi6′+0.053986∗Xi7′+0.104746∗Xi8′+0.079127∗Xi9′+0.070607∗Xi10′+0.041553∗Xi11′+0.061393∗Xi12′+0.0250365∗Xi13′.Among them,Vi is the food security evaluation value in the ith year, and the calculation results are shown in Table 5.Table 5
Comprehensive evaluation results of food security in China.
YearComprehensive evaluation of food securityAlertness2000−0.10012Heavy warning2001−0.02354Heavy warning2002−0.0403Heavy warning2003−0.0876Heavy warning20040.162666Moderate warning20050.133916Moderate warning20060.160253Moderate warning20070.186373Moderate warning20080.302155Moderate warning20090.364197Light warning20100.424979Light warning20110.497854Light warning20120.500631Light warning20130.53005Light warning20140.559451Light warning20150.612983No warning20160.59172No warning20170.619918No warning20180.574006Light warning20190.552851Light warningThe alarm degree refers to the standard used to judge the intensity of the alarm situation after the occurrence of the alarm situation. The setting of this value should be divided into different standards according to the constantly changing state of the alarm situation indicators and the thresholds in different periods, so as to analyze the current market situation and give an early warning degree of the situation. In this paper, the food security situation in China is divided into four levels: no warning, light warning, moderate warning, and heavy warning, and the division is based on the mean plus or minus the standard deviation. The specific results are shown in Table6.Table 6
Classification of food security grades.
AlertnessLower limitUpper limitHeavy warning0.077138Moderate warning0.0771380.326121Light warning0.3261210.575104No warning0.575104


## 3.2. Food Security Alertness Classification

The interval division of each indicator is shown in Table7, where the basis for setting the warning interval of each indicator is as follows:(1)
C1: Grain self-sufficiency rate is an indicator to assess the country’s grain self-sufficiency level, which is the proportion of grain production in the year to the grain consumption of the year. According to the data, if the grain self-sufficiency rate of a country or region is more than 100%, it indicates complete self-sufficiency; if it is 95%–100%, it means basic self-sufficiency; if it is 90%–95%, it represents an acceptable level of food security; and if it is less than 90%, it proves that the risk of food supply and demand increases.(2)
C2: The National Food Security Medium and Long-Term Plan (2008–2020) proposes that the per capita grain consumption should not be less than 395 kg by 2020, but in 2010, China’s per capita grain consumption exceeded the 400 kg mark, and in 2014, the per capita food possession reached 445 kilograms.(3)
C3: According to the research of scholars, the normal range of the fluctuation coefficient of total grain output should be within ±5%. According to the National Food Security Medium and Long-Term Plan outline (2008–2020), the comprehensive grain production capacity in 2020 is guaranteed to be 540 million tons. However, data show that grain production in 2014 reached 607 million tons. As a result, there is little pressure on China’s total grain supply, so this paper sets it at 3% ideally.(4)
C6, C7, and C8 are all negative indicators. The larger the value of the indicator, the lower the food security. In this paper, the minimum value in the sample is selected as the ideal value.Table 7
Construction of food security early warning indicator system.
Second-level indicatorNo warningLight warningModerate warningHeavy warningC1100,+∞95,10090,950,90C2400,+∞375,400350,3750,350C30.03,+∞0.01,0.030,0.01−∞,0C4100000,+∞70000,1000060000,70000,60000C50.9,10.8,0.90.7,0.80,0.7C60,0.90.9,0.950.95,0.970.97,1C70,0.010.01,0.020.02,0.050.05,1C80,5050,5555,6065,100C9340,+∞325,340300,3250,300C1010,+∞9.1,108,2,9.10,8.2C110.54,10.53,0.540.5,0.530,0.5C1210000,+∞7000,100005000,70000,5000C13100,+∞90,10090,1000,90


## 3.3. Sample Data Discretization

By taking China’s food security indicators from 2000 to 2019 as a sample, the sample data is discretized, and the sample data of each indicator is compared with the security level classification in Table5. Accordingly, each indicator is assigned one of the following values: 1 if it falls in the “no warning” interval, 2 if it falls in the “light warning” interval, 3 if it falls in the “moderate warning” interval, and 4 if it falls in the “heavy warning” interval. The specific results are shown in Table 8.Table 8
Decision values of discrete early warning index attributes of China’s 2000–2019 food security indicators.
C1C2C3C4C5C6C7C8C9C10C11C12C132000434422344444420014344233444342200243443333433422003444334434313120044313432133231200543133332333312006422232233122120074232333221221200841123213211212009313222111121120103122221111111201131122211111112012311122111111120133121221111111201421312212111112015212111131111120162142111211111201711321111121112018211111121211120192131111123111


## 3.4. Simulation and Verification of Nonlinear Early Warning System

According to the characteristics of the collected data and previous researches by scholars, in order to build a more accurate food security early warning system, this paper compares the simulation results based on the machine learning regression model and the BP neural network to determine the optimal model. The specific analysis is as follows:(1)
The machine learning regression model is written in Python 3.7, and the Bayesian Ridge, Linear Regression in the sklearn package, SVR in svm, and Gradient Boosting Regressor in ensemble gradient boosting are called for fitting. The proportion of training set and test set is 80% and 20%, respectively. This model has a total of 20 samples and 13 features, so the training set samples are determined to be 16, and the test set samples are determined to be 4. The regression results are shown in Table9.(2)
BP neural network: 13 early warning indicators are used as the input layer nodes of the BP neural network, and the number of nodes is 13; the comprehensive evaluation value of food securityYi is used as the output layer node, and the number of nodes is 1. After repeated trial calculation and iteration, the initial hidden layer node number in the case of the highest matching degree is 10, and a 3-layer BP neural network structure is established. Select 4 samples from the 20 samples as test samples, and the remaining 16 samples as training samples. The neural network toolbox in MATLAB software is used for training and testing. The results are shown in Figure 2.Table 9
Fitting effect.
Regression metricsEVMAEMSEr2Bayesian Ridge9.893355e − 010.0212280.0006310.989335Linear Regression9.970487e − 010.0092730.0001750.997049SVR9.034646e − 010.0663650.0057150.903421GBR9.999035e − 010.0015550.0000060.996903Figure 2
Curve diagram of simulated value and real value of BP neural network test sample.The GBR model showed the best regression effect, so it is used to simulate the data from 2016 to 2019. The results are shown in Table10.Table 10
GBR simulation values.
YearActual valueSimulation valueSimulation effect20160.591720.59104499.89%20170.6199180.57343896.91%20180.5740060.58732697.73%20190.5528510.56087198.57%The ideal line indicates that the BP training result is the most ideal when the BP network is trained to the 66th time. At this time, the fitting degree between the simulated value obtained by training and the real value is relatively high, and the MSE index of the two is 0.0009258.Put 4 test samples into the trained BP neural network; the fitting degree of the two is 99.81%, and the training effect is good. The simulation effect is shown in Table11.Table 11
Simulation values of BP neural network.
BP neural network predictionYearActual valueSimulation valueSimulation effect20160.591720.569696.26%20170.6199180.628598.63%20180.5740060.594496.57%20190.5528510.550899.63%Compare the simulation results of the above five nonlinear systems with the real values.Figure3 and the simulation results show that, except for the Linear Regression model, the simulation accuracy of all methods is above 90%. Compared with the GBR regression model, the simulation effect of the BP neural network model is better, and the simulation effect of the five samples is above 96%. The simulated value is almost indistinguishable from the real value. This shows that the BP neural network model is very effective in the early warning of food security. Compared with the existing research results, this model has made some progress. Therefore, in this system, as long as the data of the above 13 indicators of Chinese grain are collected and input into the system, the current food risk situation in China can be obtained, so that solutions can be formulated as soon as possible to effectively avoid risks.Figure 3
BP neural network training error curve.


## 4. Conclusions and Recommendations on China’s Food Security Research Based on Risk Early Warning

Food security is the fundamental issue of human survival security. We must focus on national strategic needs and people’s lives. In recent years, the international environment is complex, the risks and challenges are severe, and the outbreak of COVID-19 has made it imperative to build a high-precision Chinese food security risk assessment and early warning system under the background of big data in order to cope with the ever-changing situation. In this paper, a combination of subjective and objective methods is used to construct a food security early warning index system including 13 specific indicators under the four secondary indicators of total security, trade security, ecological security, and economic security and complete the calculation of the comprehensive evaluation value of food security. This divides China’s food security status from 2000 to 2019. By comparing the simulation results based on the machine learning regression model and the BP neural network, it is finally determined that the BP neural network is used to simulate the nonlinear early warning system, and based on this, suggestions for improving the food security system are put forward.The main conclusions of this paper are as follows:


### 4.1. Comprehensive Evaluation of China’s Food Security

(a)
From 2000 to 2003, China’s food security situation was in a state of high warning, and 13 specific indicators were basically in a state of heavy or moderate warning. The per capita output decreased year by year from 2000 to 2003. The main reason is that after joining the WTO, the grain import volume increased, which also led to a sudden increase in grain import volume from 2000 to 2001 and a high degree of dependence on foreign grains, which had an impact on the domestic grain market. As a result, total food production continued to decline. In addition, the raging drought in southern China during this period was also one of the reasons for the decline in total grain output.(b)
From 2004 to 2008, China’s food security situation was in the middle of the warning degree. During this period, only the food self-sufficiency rate was in a state of heavy warning. Due to the low enthusiasm of Chinese farmers on the one hand and under the premise that the severe drought in the south has not fully recovered on the other hand, the population has grown rapidly, and to a certain extent, food production cannot meet the needs of consumers. The alertness of the remaining 12 indicators gradually declined during this period, mainly due to the fact that the state implemented minimum price purchases to maintain farmers’ enthusiasm during this period, and the level of irrigation was gradually improved.(c)
From 2009 to 2014, China’s food security was in a state of light warning. During this period, all indicators except the food self-sufficiency rate were in a state of light or no warning. The grain self-sufficiency rate in 2008 was higher than that in 2009, mainly because the degree of agricultural mechanization and the improvement of agricultural technology made grain production in a relatively safe state. Since China has restricted grain exports to less than 1.5 million tons since 2010, the proportion of grain exports has continued to decline, and its alertness has gradually declined.(d)
From 2015 to 2017, China’s food security was in a state of no warning. In 2015, grain output achieved a “twelfth consecutive increase” [26]. In 2016, the “Regulations on the Administration of Grain Circulation” were issued. In 2017, grain production functional areas and important agricultural product production protection areas were designated, which improved farmland infrastructure and reduced the waste of cultivated land. The foundations of food security were more solid.(e)
From 2018 to 2019, China’s food security status was in a state of light warning, and the alertness was higher than that of 2015 to 2017. The yield per unit of corn and soybeans in China is only about 60% of that of the United States. The reason is that the United States uses genetically modified technology to improve the yield and quality, which leads to an increase in China’s imports of corn and soybeans [27], so the degree of foreign dependence increases; that is, the alertness is higher.


### 4.2. Research on Early Warning of Food Security in China

#### 4.2.1. Basic Process Design of Food Security Risk Prevention and Control

The food security early warning system is mainly designed based on the theoretical connotation of risk management. The specific process is as follows:(1)
Data collection: collect the raw data of the 13 indicators in the food security early warning index system mentioned above(2)
Data preprocessing: convert the data in months to data in years(3)
Early warning decision: substitute data into the model for early warning(4)
Early warning report: get the current food security level and various indicators(5)
Select a risk prevention and control strategy: according to the obtained early warning report, routine monitoring shall be carried out at the light warning level; risk control shall be adopted at the moderate warning level; if it is at the high warning level, emergency treatment shall be carried out in timeThe above steps are completed in sequence and level by level, and early warning reports and prevention and control strategies are quickly formed, as shown in Figure4.Figure 4
Basic process of food security risk prevention and control.


#### 4.2.2. Food Security Early Warning Analysis

(1) Total Security. In 2020, China’s grain output reached a “17th consecutive increase,” with a total output of 1,339 billion catties, and the output remained above 1.3 trillion catties for six consecutive years. In general, the main grain-producing areas have a surplus in output, but the spatial distribution is unbalanced, as shown in Figure 5. In order to effectively control the phenomenon of imbalanced spatial distribution of grain, the planting area of crops should be allocated scientifically and rationally, with emphasis on low energy consumption and high output; farmers in nondominant planting areas should try to expand their sources, and strictly implement the national grain planting structure adjustment policy to cope with future agricultural problems.Figure 5
Heatmap of China’s food security production.(2) Trade Security. In recent years, corn and rice have been oversupplied, and the supply of soybeans and barley has been insufficient. Some grain varieties cannot meet the needs of consumption upgrades, resulting in an increase in external dependence. At present, the domestic and international grain markets are more closely linked, and the Chinese grain market has become an important part of the world grain market. In 2020, the total grain imports reached 142.621 million tons, with a rate of increase of 28.0%, of which soybean imports reached 100.327 million tons, with a rate of increase of 13.3%. The specific response strategies are as follows:(1)
Adhere to the diversification of food import sources and varieties. Expand the import channels of staple food varieties, diversify import sources, reduce the concentration of grain imports, and at the same time, optimize the structure of grain imports [28].(2)
According to the actual situation of food supply and demand, moderately control the structure of food import and export, reduce the external dependence of soybeans, and appropriately increase the external dependence of the other three main grains, which can reduce the consumption of internal food resources and keep the external dependence within a safe range. It is conducive to the sustainable development of food, while improving the advantages of soybean cultivation and reducing the external dependence of soybeans are more conducive to the guarantee of China’s food security level.(3) Ecological Security. To achieve food security, we must adhere to sustainable development, coordinate the relationship between food security and ecological security, develop green agricultural production [29], strengthen environmental governance in major grain-producing areas, control the amount of pesticides and fertilizers applied per unit of arable land [30], develop water-saving agriculture, optimize the structure of grain planting and the layout of production areas, and guide food security in a sustainable sense.(4) Economic Security. Under the current form of “dual circulation,” following the laws of the market, because China’s grain prices are easily affected by international factors [31], we should produce more and more high-quality agricultural products that can meet the increasingly high-quality, personalized, and diversified needs of the people, and accelerate the integrated development of the food industry. The multidimensional function of grain production promotes the realization of vertical and horizontal industrial integration; explores and designs a fair, scientific, and reasonable benefit distribution system; and forms a community of interests in the grain industry.


## 4.1. Comprehensive Evaluation of China’s Food Security

(a)
From 2000 to 2003, China’s food security situation was in a state of high warning, and 13 specific indicators were basically in a state of heavy or moderate warning. The per capita output decreased year by year from 2000 to 2003. The main reason is that after joining the WTO, the grain import volume increased, which also led to a sudden increase in grain import volume from 2000 to 2001 and a high degree of dependence on foreign grains, which had an impact on the domestic grain market. As a result, total food production continued to decline. In addition, the raging drought in southern China during this period was also one of the reasons for the decline in total grain output.(b)
From 2004 to 2008, China’s food security situation was in the middle of the warning degree. During this period, only the food self-sufficiency rate was in a state of heavy warning. Due to the low enthusiasm of Chinese farmers on the one hand and under the premise that the severe drought in the south has not fully recovered on the other hand, the population has grown rapidly, and to a certain extent, food production cannot meet the needs of consumers. The alertness of the remaining 12 indicators gradually declined during this period, mainly due to the fact that the state implemented minimum price purchases to maintain farmers’ enthusiasm during this period, and the level of irrigation was gradually improved.(c)
From 2009 to 2014, China’s food security was in a state of light warning. During this period, all indicators except the food self-sufficiency rate were in a state of light or no warning. The grain self-sufficiency rate in 2008 was higher than that in 2009, mainly because the degree of agricultural mechanization and the improvement of agricultural technology made grain production in a relatively safe state. Since China has restricted grain exports to less than 1.5 million tons since 2010, the proportion of grain exports has continued to decline, and its alertness has gradually declined.(d)
From 2015 to 2017, China’s food security was in a state of no warning. In 2015, grain output achieved a “twelfth consecutive increase” [26]. In 2016, the “Regulations on the Administration of Grain Circulation” were issued. In 2017, grain production functional areas and important agricultural product production protection areas were designated, which improved farmland infrastructure and reduced the waste of cultivated land. The foundations of food security were more solid.(e)
From 2018 to 2019, China’s food security status was in a state of light warning, and the alertness was higher than that of 2015 to 2017. The yield per unit of corn and soybeans in China is only about 60% of that of the United States. The reason is that the United States uses genetically modified technology to improve the yield and quality, which leads to an increase in China’s imports of corn and soybeans [27], so the degree of foreign dependence increases; that is, the alertness is higher.


## 4.2. Research on Early Warning of Food Security in China

### 4.2.1. Basic Process Design of Food Security Risk Prevention and Control

The food security early warning system is mainly designed based on the theoretical connotation of risk management. The specific process is as follows:(1)
Data collection: collect the raw data of the 13 indicators in the food security early warning index system mentioned above(2)
Data preprocessing: convert the data in months to data in years(3)
Early warning decision: substitute data into the model for early warning(4)
Early warning report: get the current food security level and various indicators(5)
Select a risk prevention and control strategy: according to the obtained early warning report, routine monitoring shall be carried out at the light warning level; risk control shall be adopted at the moderate warning level; if it is at the high warning level, emergency treatment shall be carried out in timeThe above steps are completed in sequence and level by level, and early warning reports and prevention and control strategies are quickly formed, as shown in Figure4.Figure 4
Basic process of food security risk prevention and control.


### 4.2.2. Food Security Early Warning Analysis

(1) Total Security. In 2020, China’s grain output reached a “17th consecutive increase,” with a total output of 1,339 billion catties, and the output remained above 1.3 trillion catties for six consecutive years. In general, the main grain-producing areas have a surplus in output, but the spatial distribution is unbalanced, as shown in Figure 5. In order to effectively control the phenomenon of imbalanced spatial distribution of grain, the planting area of crops should be allocated scientifically and rationally, with emphasis on low energy consumption and high output; farmers in nondominant planting areas should try to expand their sources, and strictly implement the national grain planting structure adjustment policy to cope with future agricultural problems.Figure 5
Heatmap of China’s food security production.(2) Trade Security. In recent years, corn and rice have been oversupplied, and the supply of soybeans and barley has been insufficient. Some grain varieties cannot meet the needs of consumption upgrades, resulting in an increase in external dependence. At present, the domestic and international grain markets are more closely linked, and the Chinese grain market has become an important part of the world grain market. In 2020, the total grain imports reached 142.621 million tons, with a rate of increase of 28.0%, of which soybean imports reached 100.327 million tons, with a rate of increase of 13.3%. The specific response strategies are as follows:(1)
Adhere to the diversification of food import sources and varieties. Expand the import channels of staple food varieties, diversify import sources, reduce the concentration of grain imports, and at the same time, optimize the structure of grain imports [28].(2)
According to the actual situation of food supply and demand, moderately control the structure of food import and export, reduce the external dependence of soybeans, and appropriately increase the external dependence of the other three main grains, which can reduce the consumption of internal food resources and keep the external dependence within a safe range. It is conducive to the sustainable development of food, while improving the advantages of soybean cultivation and reducing the external dependence of soybeans are more conducive to the guarantee of China’s food security level.(3) Ecological Security. To achieve food security, we must adhere to sustainable development, coordinate the relationship between food security and ecological security, develop green agricultural production [29], strengthen environmental governance in major grain-producing areas, control the amount of pesticides and fertilizers applied per unit of arable land [30], develop water-saving agriculture, optimize the structure of grain planting and the layout of production areas, and guide food security in a sustainable sense.(4) Economic Security. Under the current form of “dual circulation,” following the laws of the market, because China’s grain prices are easily affected by international factors [31], we should produce more and more high-quality agricultural products that can meet the increasingly high-quality, personalized, and diversified needs of the people, and accelerate the integrated development of the food industry. The multidimensional function of grain production promotes the realization of vertical and horizontal industrial integration; explores and designs a fair, scientific, and reasonable benefit distribution system; and forms a community of interests in the grain industry.


## 4.2.1. Basic Process Design of Food Security Risk Prevention and Control

The food security early warning system is mainly designed based on the theoretical connotation of risk management. The specific process is as follows:(1)
Data collection: collect the raw data of the 13 indicators in the food security early warning index system mentioned above(2)
Data preprocessing: convert the data in months to data in years(3)
Early warning decision: substitute data into the model for early warning(4)
Early warning report: get the current food security level and various indicators(5)
Select a risk prevention and control strategy: according to the obtained early warning report, routine monitoring shall be carried out at the light warning level; risk control shall be adopted at the moderate warning level; if it is at the high warning level, emergency treatment shall be carried out in timeThe above steps are completed in sequence and level by level, and early warning reports and prevention and control strategies are quickly formed, as shown in Figure4.Figure 4
Basic process of food security risk prevention and control.


## 4.2.2. Food Security Early Warning Analysis

(1) Total Security. In 2020, China’s grain output reached a “17th consecutive increase,” with a total output of 1,339 billion catties, and the output remained above 1.3 trillion catties for six consecutive years. In general, the main grain-producing areas have a surplus in output, but the spatial distribution is unbalanced, as shown in Figure 5. In order to effectively control the phenomenon of imbalanced spatial distribution of grain, the planting area of crops should be allocated scientifically and rationally, with emphasis on low energy consumption and high output; farmers in nondominant planting areas should try to expand their sources, and strictly implement the national grain planting structure adjustment policy to cope with future agricultural problems.Figure 5
Heatmap of China’s food security production.(2) Trade Security. In recent years, corn and rice have been oversupplied, and the supply of soybeans and barley has been insufficient. Some grain varieties cannot meet the needs of consumption upgrades, resulting in an increase in external dependence. At present, the domestic and international grain markets are more closely linked, and the Chinese grain market has become an important part of the world grain market. In 2020, the total grain imports reached 142.621 million tons, with a rate of increase of 28.0%, of which soybean imports reached 100.327 million tons, with a rate of increase of 13.3%. The specific response strategies are as follows:(1)
Adhere to the diversification of food import sources and varieties. Expand the import channels of staple food varieties, diversify import sources, reduce the concentration of grain imports, and at the same time, optimize the structure of grain imports [28].(2)
According to the actual situation of food supply and demand, moderately control the structure of food import and export, reduce the external dependence of soybeans, and appropriately increase the external dependence of the other three main grains, which can reduce the consumption of internal food resources and keep the external dependence within a safe range. It is conducive to the sustainable development of food, while improving the advantages of soybean cultivation and reducing the external dependence of soybeans are more conducive to the guarantee of China’s food security level.(3) Ecological Security. To achieve food security, we must adhere to sustainable development, coordinate the relationship between food security and ecological security, develop green agricultural production [29], strengthen environmental governance in major grain-producing areas, control the amount of pesticides and fertilizers applied per unit of arable land [30], develop water-saving agriculture, optimize the structure of grain planting and the layout of production areas, and guide food security in a sustainable sense.(4) Economic Security. Under the current form of “dual circulation,” following the laws of the market, because China’s grain prices are easily affected by international factors [31], we should produce more and more high-quality agricultural products that can meet the increasingly high-quality, personalized, and diversified needs of the people, and accelerate the integrated development of the food industry. The multidimensional function of grain production promotes the realization of vertical and horizontal industrial integration; explores and designs a fair, scientific, and reasonable benefit distribution system; and forms a community of interests in the grain industry.



---

*Source: 5245752-2022-05-20.xml*