CN111489046A - Regional food safety evaluation model based on supply chain and BP neural network - Google Patents

Regional food safety evaluation model based on supply chain and BP neural network Download PDF

Info

Publication number
CN111489046A
CN111489046A CN201910088979.5A CN201910088979A CN111489046A CN 111489046 A CN111489046 A CN 111489046A CN 201910088979 A CN201910088979 A CN 201910088979A CN 111489046 A CN111489046 A CN 111489046A
Authority
CN
China
Prior art keywords
neural network
food safety
layer
index
input
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910088979.5A
Other languages
Chinese (zh)
Inventor
吴为
陈思秇
郑婵娇
彭接文
马文军
张永慧
陈子慧
纪桂元
闻剑
胡建雄
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
CENTRE FOR DISEASE CONTROL AND PREVENTION OF GUANGDONG PROVINCE
GUANGDONG PROVINCIAL INSTITUTE OF PUBLIC HEALTH
Original Assignee
CENTRE FOR DISEASE CONTROL AND PREVENTION OF GUANGDONG PROVINCE
GUANGDONG PROVINCIAL INSTITUTE OF PUBLIC HEALTH
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by CENTRE FOR DISEASE CONTROL AND PREVENTION OF GUANGDONG PROVINCE, GUANGDONG PROVINCIAL INSTITUTE OF PUBLIC HEALTH filed Critical CENTRE FOR DISEASE CONTROL AND PREVENTION OF GUANGDONG PROVINCE
Priority to CN201910088979.5A priority Critical patent/CN111489046A/en
Publication of CN111489046A publication Critical patent/CN111489046A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0635Risk analysis of enterprise or organisation activities
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/06Physical realisation, i.e. hardware implementation of neural networks, neurons or parts of neurons
    • G06N3/061Physical realisation, i.e. hardware implementation of neural networks, neurons or parts of neurons using biological neurons, e.g. biological neurons connected to an integrated circuit
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/067Enterprise or organisation modelling

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Physics & Mathematics (AREA)
  • Human Resources & Organizations (AREA)
  • Theoretical Computer Science (AREA)
  • Strategic Management (AREA)
  • General Physics & Mathematics (AREA)
  • Biophysics (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Economics (AREA)
  • Biomedical Technology (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Neurology (AREA)
  • Computational Linguistics (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Evolutionary Computation (AREA)
  • Data Mining & Analysis (AREA)
  • Development Economics (AREA)
  • General Engineering & Computer Science (AREA)
  • Educational Administration (AREA)
  • Artificial Intelligence (AREA)
  • Game Theory and Decision Science (AREA)
  • General Business, Economics & Management (AREA)
  • Marketing (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Tourism & Hospitality (AREA)
  • Microelectronics & Electronic Packaging (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention provides a regional food safety evaluation model based on a supply chain and a BP neural network, which is characterized in that the modeling process mainly comprises the following steps: the first step is as follows: establishing a food safety evaluation index system based on a supply chain, firstly establishing 9 first-level and 26 second-level index evaluation index systems by using a twice Delphi method, namely a Delphi method, and secondly determining the index weight by using an analytic hierarchy process, namely an AHP method; the second step is that: and (2) constructing a food safety evaluation model based on the BP neural network, firstly collecting sample data of each index, inputting the sample data of each index and the regional score into the initialized BP neural network, secondly adjusting parameters according to the accuracy of the calculated training data, and training the BP neural network again to finally obtain the regional food safety evaluation model. The method overcomes the defects of strong subjectivity, lack of self-learning capability and the like of the traditional evaluation model, fully utilizes the advantages of strong adaptability of the neural network, high fault tolerance rate and the like, and effectively improves the accuracy of food safety evaluation.

Description

Regional food safety evaluation model based on supply chain and BP neural network
Technical Field
The invention relates to the field of food safety evaluation, in particular to a regional food safety evaluation model based on a supply chain and a BP neural network.
Background
The food has wide sources, some raw materials can be directly used as food, some raw materials need to be processed, and the links from the raw materials to dining tables of consumers, such as production, processing, operation and consumption, can be influenced by a plurality of factors, such as environmental destruction, ecological imbalance, resource shortage and the like.
The food safety problem is closely related to environmental problems, social factors, food consumption, government supervision and the like, the quality and safety of food are guaranteed, and substances or factors which may damage human health are effectively supervised from source production to dining tables.
The food safety evaluation system is used as an important content of food safety research, researchers at home and abroad have related researches from the aspects of food safety management technology, consumer behaviors, overall food safety evaluation and the like, the evaluation method mainly depends on technologies such as food safety classification, fuzzy clustering and the like, but no index system for objectively, comprehensively and uniformly evaluating regional food safety conditions exists, and screening and constructing of the index system are the first step of food safety supervision and management.
The invention integrates methods such as a Delphi method, an analytic hierarchy process (AHP method), a BP neural network and the like, takes a food supply chain as a main line, deeply analyzes deep factors influencing food safety through food quality safety, and establishes regional food safety evaluation system indexes and models by taking food safety supervision experience at home and abroad as reference on the basis to accurately predict and evaluate regional food safety conditions and provide powerful support for food safety evaluation, prediction early warning and scientific supervision of food supervision departments at various regions.
The regional food safety condition evaluation index system is established based on the supply chain, the weight of the regional food safety condition evaluation index system is calculated, the weight of the regional food safety condition evaluation index system is optimized by adopting a BP neural network method, and the BP neural network is a forward artificial neural network based on the iteration of the forward propagation and error backward propagation processes of input signals and is one of the most widely applied neural networks in the artificial neural network.
Disclosure of Invention
The BP neural network is also called as an error back propagation neural network, and is a hierarchical learning algorithm formed by an input layer, a hidden layer and an output layer, wherein the hidden layer can be expanded into a plurality of layers, neurons in each layer are connected with one another, and neurons in each layer are not connected with one another. The neural network learns in an external supervision and guidance mode, after corresponding information is input into the network, the network can form a certain learning mode, and neurons in all layers can respond to each other to generate a connection weight. The network can follow the direction of reducing the error between the actual output and the expected output, modify the connection weight from the output layer to each hidden layer by layer, and finally feed back the connection weight to the input layer; through such repeated circulation, the sum of squares of errors between the actual output and the expected output of the neural network is minimized, and finally the evaluation model is established.
The Sigmoid function, i.e. Sigmoid function, is a common Sigmoid function in biology, also called S-type growth curve, and in the information science, due to the properties of single increment and single increment of anti-function, the Sigmoid function is often used as a threshold function of a neural network, and a variable is mapped between 0 and 1.
Based on the defects of the prior art, the invention provides a regional food safety evaluation model based on a supply chain and a BP neural network, which is characterized by comprising the following steps:
the first step is as follows: establishing a regional food safety evaluation index system based on a supply chain, and specifically comprising the steps of firstly establishing 9 first-level indexes and 26 second-level index evaluation index systems by using a two-time Delphi method, and secondly determining the weight of the indexes by using an Analytic Hierarchy Process (AHP);
the second step is that: the method comprises the specific steps of firstly obtaining sample data of each index of a food safety evaluation system, inputting the sample data of each index and regional scores into an initialized BP neural network, secondly adjusting parameters according to the accuracy of calculated training data, and then training the BP neural network again to finally obtain the regional food safety evaluation model.
As an improvement of the food safety condition prediction model based on the supply chain and the BP neural network, the BP neural network based on the supply chain and the BP neural network food safety condition prediction model, which can also be called as error and signal back propagation, comprises an input layer, one or more hidden layers and an output layer, wherein the input layer is sample data import, the input layer is used as an input variable of the BP neural network and is a sample data base to be analyzed, the number of nodes of the input layer is determined according to influence factors, the number of the input variables of the nodes of the input layer is 26, and the output layer is a total score of food safety condition evaluation.
As an improvement of the food safety condition prediction model based on the supply chain and the BP neural network, the first steps of determining the input layer and the output layer of the BP neural network based on the supply chain and the BP neural network food safety condition prediction model are determining input vectors and expected responses, wherein the input vectors are the 26 secondary indexes, the expected responses are evaluation prediction results, then training the BP neural network model according to the sample data, and finally adjusting the weight and the deviation of the network.
As an improvement of the food safety condition prediction model based on the supply chain and the BP neural network, the food safety condition prediction model based on the supply chain and the BP neural network takes the 26 indexes and the total evaluation score of the food safety condition as training data, an activation function of the BP neural network is set to be a logistic function, a loss function is a Sum of Squares of Errors (SSE), and a loss threshold is 1 × 10-4And the learning rate is 0.01, a back rprop algorithm is selected for parameter optimization, the number of hidden layers is initially set to be 1, and the number of initial neurons is 7.
As an improvement of the food safety condition prediction model based on the supply chain and the BP neural network, the food safety condition prediction model based on the supply chain and the BP neural network takes the index data and the total evaluation score as test data, calculates the accuracy of the test data, finds that the number of hidden layers is 2 and the number of neurons is 12 and 7 respectively through sensitivity analysis and comparison results, the accuracy rate under the parameter setting reaches 98.29 percent, trains the BP neural network after the parameter adjustment, and obtains the regional food safety evaluation model.
As an improvement of the food safety condition prediction model based on the supply chain and the BP neural network, the error of the food safety condition prediction model based on the supply chain and the BP neural network is propagated backwards, the weight and the deviation are modified layer by layer in the back propagation process, the back propagation process and the error adjustment process are sequentially that the weight adjustment between the hidden layer and the output layer, between the hidden layer and between the input layer and the hidden layer, generally, a multilayer BP neural network consists of L layers of neurons, wherein, the 1 st layer is called the input layer, the last layer, namely, the L th layer is called the output layer, and other layers are called the hidden layers, namely, the 2 nd layer to the L-1 st layer.
Let the input vector be:
Figure BDA0001961549990000031
the output vector is:
Figure BDA0001961549990000032
the output of each of the neurons of the hidden layer is:
Figure BDA0001961549990000033
is provided with
Figure BDA0001961549990000034
Is a connection weight between the jth of said neurons from level l-1 and the ith of said neurons from level l;
Figure BDA0001961549990000035
for the bias of the ith said neuron, then:
Figure BDA0001961549990000036
Figure BDA0001961549990000037
wherein the content of the first and second substances,
Figure BDA0001961549990000038
is the input to the ith neuron at level 1, and f (-) is the activation function of the neuron. Non-linear activation functions are typically employed in multiple layers of the BP neural network. The BP neural network typically uses a sigmod function as the activation function:
Figure BDA0001961549990000039
it varies over a range of (0,1) with a derivative of f ═ f (1-f)
Let us assume that we have m of the training samples { (x (1), y (1), (x (2), y (2),. ·., (x (m), y (m)) }, where d (i) is the desired output for the corresponding input x (i). the BP neural network algorithm achieves training (or learning) by optimizing the input weights and the biases for the neurons in each layer so that the output of the neural network is as close as possible to the desired output.
And defining an error function as follows for the given m training samples by adopting a batch updating method:
Figure BDA0001961549990000041
where e (i) is the training error for a single sample:
Figure BDA0001961549990000042
therefore, the temperature of the molten metal is controlled,
Figure BDA0001961549990000043
the weight and the bias are updated according to the following mode in each iteration of the BP neural network algorithm:
Figure BDA0001961549990000044
Figure BDA0001961549990000045
α is the learning rate, its value range is (0,1) the key of BP algorithm is how to solve
Figure BDA0001961549990000046
And
Figure BDA0001961549990000047
partial derivatives of (a).
The partial derivatives of the weights and offsets of the l-th layer (2. ltoreq.1. ltoreq. L-1) are
Figure BDA0001961549990000048
Figure BDA0001961549990000049
Wherein the content of the first and second substances,
Figure BDA00019615499900000410
compared with the prior art, the regional food safety evaluation model based on the supply chain and the BP neural network has the following beneficial effects:
at present, a traditional food supply chain is a top-down supply and demand network formed by economic benefit main bodies in all links from primary suppliers of food to consumers, and a food safety evaluation index system is usually constructed on the basis of quantity safety and quality safety of the food on the supply chain.
The Delphi method and the AHP method adopted by the invention are subjective judgment methods based on expert knowledge and experience, and the complex problems are analyzed by combining quantification and qualification, so that the subjective judgment of experts on an index system is expressed in a mathematical form, the deviation of the subjective judgment is reduced, the experience and knowledge of each expert can be fully exerted, the thought is wide, and the influence of individual authoritative opinions can be avoided.
The invention determines the index weight by using an Analytic Hierarchy Process (AHP) and optimizes according to an R software toolkit, designs a BP neural network structure from the aspects of network layer number, neuron number of each layer, neuron transfer function and the like, then passes through R software, the designed BP network structure model is trained and tested, experimental results are analyzed, the defects that a traditional evaluation model is strong in subjectivity and lack of self-learning capability and the like are overcome, the advantages of high adaptability and high fault tolerance rate of a neural network are fully utilized, the accuracy of food safety evaluation is effectively improved, the regional food safety condition is evaluated by adopting a method combining a Delphi-AHP method and the BP neural network, a more accurate and reliable evaluation result is obtained, a new way is opened for reasonable evaluation of the food safety condition, and a reference basis is provided for regional food safety condition evaluation work.
The food safety monitoring system takes a food supply chain as a main line, runs through the food quality safety from a farmland to a dining table, deeply analyzes key factors influencing food safety by combining a hazard analysis and a food safety management system theory of a key control point (HACCP), establishes regional food safety evaluation system indexes and models based on the BP neural network, aims to accurately test regional food safety conditions, dynamically predicts the food safety states for food safety supervision departments, establishes a food safety supervision and early warning system based on the regional food safety evaluation system indexes and models, and provides scientific support for effectively implementing regional food safety evaluation, early warning and supervision.
Drawings
FIG. 1 is a preliminary frame table of the regional food safety condition evaluation index system of the preferred embodiment of the regional food safety evaluation model based on the supply chain and BP neural network of the present invention;
FIG. 2 is the regional food safety evaluation index system and the weight coefficient table of the preferred embodiment of the regional food safety evaluation model based on the supply chain and BP neural network according to the present invention;
FIG. 3 is a diagram of the initial BP neural network of a preferred embodiment of the regional food safety assessment model based on a supply chain and BP neural network of the present invention;
FIG. 4 is a comparison table of sensitivity analysis of BP neural network based on a preferred embodiment of regional food safety evaluation model of supply chain and BP neural network of the present invention;
FIG. 5 is a diagram of a BP neural network after tuning parameters of a preferred embodiment of a regional food safety evaluation model based on a supply chain and the BP neural network according to the present invention;
FIG. 6 is a graph comparing the real scores of the preferred embodiment of the regional food safety evaluation model based on the supply chain and BP neural network according to the present invention with the predictions of the BP neural network;
FIG. 7 is a diagram of a regional food safety assessment model based on a supply chain and a BP neural network according to a preferred embodiment of the present invention;
FIG. 8 is a Sigmoid function diagram of a preferred embodiment of the regional food safety assessment model based on a supply chain and a BP neural network according to the present invention;
Detailed Description
The regional food safety evaluation model based on the supply chain and the BP neural network is mainly suitable for evaluating the regional food safety condition.
Referring to fig. 1, fig. 2, fig. 3, fig. 4, fig. 5, fig. 6, fig. 7, and fig. 8, the regional food safety evaluation model based on the supply chain and the BP neural network according to the present invention will be described in detail.
In this embodiment, a regional food safety evaluation model based on a supply chain and a BP neural network is characterized by including the following steps:
the first step is as follows: establishing a regional food safety evaluation index system based on a supply chain, and specifically comprising the steps of firstly establishing 9 first-level indexes and 26 second-level index evaluation index systems by using a two-time Delphi method, and secondly determining the weight of the indexes by using an Analytic Hierarchy Process (AHP);
the second step is that: the method comprises the specific steps of firstly obtaining sample data of each index of a food safety evaluation system, inputting the sample data of each index and regional scores into an initialized BP neural network, secondly adjusting parameters according to the accuracy of calculated training data, and then training the BP neural network again to finally obtain the regional food safety evaluation model.
In this embodiment, the applicant of the present invention performs literature search, refers to a large amount of research data on food safety conditions at home and abroad, collects related file data on food safety evaluation and assessment by the national food and drug administration and the guangdong food and drug administration, and establishes a frame based on a regional food safety condition evaluation index system of the supply chain based on file data of the food safety law, the 2015-year food and drug safety assessment and evaluation rules of the national food and drug administration, the 2016-year food and drug administration, the 2015-year food safety assessment and evaluation scheme of the guangdong food and drug administration, and the like in the original health hall with reference to the subject Guangdong food safety condition evaluation index system of the Guangdong, and the Happy Guangdong food safety evaluation index of the Guangdong.
In this embodiment, 9 first-level indexes and 26 second-level index evaluation index systems are constructed by two Delphi methods, which are detailed in fig. 1, wherein the 9 first-level indexes include social basic conditions, including the number of permanent population, population growth rate and total production value in per capita, environmental pollution, including total wastewater discharge, total exhaust gas discharge and total production of industrial solid wastes, food consumption, emergency disposal and social attention, environmental pollution includes the urban sewage treatment rate and the urban domestic garbage harmless treatment rate, food supervision includes the number of food safety supervision personnel per ten thousand population, the per capita food safety supervision project expenditure growth rate, daily supervision sampling inspection qualification rate in each city (district), and annual food safety work assessment scores in each city (district), the breeding and breeding comprises the total grain yield of each city (region), the meat yield of each region, the egg yield of each region, the aquatic product yield of each region and the quality safety monitoring qualification score of main edible agricultural products, the food production and management comprises the key food safety condition monitoring qualification rate of each region and the food safety quantitative grading management score of catering service food, and the breeding and breeding comprise the total grain yield of each region, the meat yield of each region, the egg yield of each region, the aquatic product yield of each region and the quality safety monitoring qualification score of main edible agricultural productsThe food consumption comprises average consumption income of residents and average annual income of catering enterprises with the quota more than, the emergency treatment comprises the incidence rate of food poisoning accidents in collective canteens, the incidence rate of major food accidents, the incidence rate of infectious diarrhea diseases and the incidence rate of food-borne diseases, the social attention comprises food safety attention, 26 indexes subdivided from 9 primary indexes form 26 secondary indexes, the weights of the indexes are determined by an analytic hierarchy process and are detailed in an attached figure 2, and the social basic condition W of the primary indexes is1Value 0.165, the standing population number W of the secondary index11Value 0.454, combined weight 0.0747, the population growth rate W of the secondary indicator12The value is 0.322, the combined weight is 0.0530, and the production total value W of the per capita region of the secondary index13The value is 0.225, and the combined weight is 0.0370. The environmental pollution W of the primary index2The value of 0.223, the total wastewater discharge amount W of the secondary index21The value of 0.563, the combined weight of 0.126, and the total exhaust emission W of the secondary index22Value 0.223, combined weight 0.0498, the industrial solid waste production W of the secondary index23At a value of 0.214, the combining weight is 0.0478. The environmental governance W of the primary index3Value of 0.173, the town sewage treatment rate W of the second-level index31The value is 0.591, the combination weight is 0.102, and the harmless treatment rate W of the municipal domestic waste of the secondary index32The value is 0.409, and the combined weight is 0.0707. The food supervision W of the primary indicator4The value of the second-level index is 0.105, and the number of food safety supervision personnel per ten thousand of the population W41Value of 0.452, combined weight of 0.0475, said per capita food safety supervision project expense growth rate W of said secondary index42The value is 0.316, the combination weight is 0.0326, and the daily supervision spot inspection qualification rate W of each city (region) of the secondary index43The value is 0.141, the combination weight is 0.0148, and the evaluation score W of the annual food safety work assessment of each city (district) of the secondary index44Value 0.0905, combined weight 0.00951, the said breeding and breeding of the said first-class indexW5The value of the total grain yield W of each city (region) of the secondary index is 0.10351The value is 0.239, the combination weight is 0.0247, and the meat yield W of each city (district) of the secondary index52The value is 0.228, the combination weight is 0.0235, and the egg yield W of each city (district) of the secondary index53The value is 0.213, the combination weight is 0.0219, and the yield W of aquatic products of each city (district) of the secondary index54The value is 0.185, the combination weight is 0.0190, and the quality safety monitoring qualification score W of the main edible agricultural products of the secondary indexes55The value is 0.135, and the combined weight is 0.0139. Said food production operation W of said primary index60.0852, the safety condition monitoring qualification rate W of the key food in each city (district) of the secondary index61The value is 0.703, the combination weight is 0.0599, and the food safety quantitative hierarchical management score W of the secondary index62The value is 0.297, and the combination weight is 0.0254. Said food consumption W of said primary indicator70.0560, the average consumer income W of the residents of the secondary indexes71The value is 0.529, the combination weight is 0.0296, and the average annual income W of the catering enterprises above the quota72The value is 0.471, and the combined weight is 0.0264. The emergency disposition W of the primary indicator80.0555, the incidence rate W of food poisoning accidents of the collective canteen of the secondary index81Value 0.538, combination weight 0.0299, the major food accident occurrence count W of said secondary indicator82The value is 0.232, the combined weight is 0.0129, and the incidence rate W of the infectious diarrhea of the secondary index83Value 0.12, combined weight 0.00668, and incidence rate W of said food-borne disease of said secondary index84At a value of 0.11, the combining weight is 0.00611. The social concern W of the primary indicator90.0343, the food safety concern W of the secondary index91With a value of 1, the combining weight is 0.0343.
In this embodiment, the BP neural network based on a supply chain and a BP neural network food safety condition prediction model, which may also be referred to as error and signal back propagation, of the present invention includes an input layer, one or more hidden layers, and an output layer, where the input layer is sample data import, the input layer is a sample data base to be analyzed as an input variable of the BP neural network, the number of nodes of the input layer is determined according to an influence factor, the input variables of the nodes of the input layer are 26, the output layer is a food safety condition evaluation summary, see fig. 7 for details, layer 1 is referred to as the input layer X, the last layer is referred to as layer L, and the other layers are referred to as the hidden layers, i.e., layers 2 to L-1 h.
In this embodiment, the first steps of determining the input layer and the output layer of the BP neural network based on the supply chain and the BP neural network food safety condition prediction model of the present invention are determining an input vector and an expected response, where the input vector is the 26 secondary indicators, the expected response is an evaluation prediction result, then training the BP neural network model according to the sample data, and finally adjusting the weight and the deviation of the network.
In this embodiment, the food safety condition prediction model based on the supply chain and the BP neural network uses the 26 indexes and the total score of the food safety condition evaluation as training data, the activation function of the BP neural network is set to be a logistic function, the loss function is the sum of squares of errors, namely SSE, and the loss threshold is 1 × 10-4And the learning rate is 0.01, a back rprop algorithm is selected for parameter optimization, the number of hidden layers is initially set to be 1, and the number of initial neurons is 7.
In this embodiment, the BP network is used as a supervised learning algorithm, the first step of the training process is to determine an input vector and an expected response, the regional food safety evaluation model inputs the vector, i.e., 26 secondary indexes of regional food safety evaluation, and the expected response, i.e., a regional food safety condition evaluation prediction result; the sample data of the report comes from the daily detection data of various supervision and inspection departments such as Guangdong statistical yearbook (2013-2016), various regional market announcements (2013-2016), food, medicine and the like in the past year, and the weight and deviation of the network are adjusted through the provided input vector and expected response in the training process, so that the expected effect is finally realized.
In this embodiment, the BP neural network structure generally has a data input layer, one or more hidden layers, and an output layer, where the input layer, i.e., sample data, is imported as an input variable of the neural network, and is equivalent to a sample database to be analyzed, and the number of nodes of the input layer is determined according to an influence factor.
In this embodiment, 26 indexes having significant influence on the food safety condition of the report are shown in fig. 1 in detail, 26 input variables of input nodes are determined, an output layer, namely, the total evaluation score of the food safety condition of each grade city, can be ranked according to scores, the 26 indexes and the total evaluation score of the food safety condition of each grade city in 2013 and 2015 are used as training data, an activation function of a BP neural network is set as a logistic function, a loss function is the sum of squared errors, namely SSE, a loss threshold value is 1 × 10-4, a learning rate is 0.01, a backprprop algorithm is selected for parameter optimization, the number of hidden layers is initially set to be 1 layer, the number of neurons is 7, and the BP neural network obtained by training is shown in fig. 3 in detail.
In this embodiment, 2016 index data and total evaluation score are used as test data, and the accuracy of the test data is calculated, as shown in fig. 4, by adjusting the number of hidden layers and the number of neurons, the accuracy of the test data is judged, the number of hidden layers is 1, the number of neurons is 7, and the accuracy rate is 93.01%; the number of hidden layers is 1, the number of neurons is 8 respectively, and the accuracy rate reaches 97.47%; the number of hidden layers is 1, the number of neurons is 9 respectively, and the accuracy rate reaches 86.82%; the number of hidden layers is 1, the number of neurons is 10 respectively, and the accuracy rate reaches 86.81%; the number of hidden layers is 1, the number of neurons is 11 respectively, and the accuracy rate reaches 86.47%; the number of hidden layers is 1, the number of neurons is 12 respectively, and the accuracy rate reaches 97.68 percent; the number of hidden layers is 1, the number of neurons is 13 respectively, and the accuracy rate reaches 88.78%; the number of hidden layers is 2, the number of neurons is respectively (8,5), and the accuracy rate reaches 92.11%; the number of hidden layers is 2, the number of neurons is respectively (8,6), and the accuracy rate reaches 95.82%; the number of hidden layers is 2, the number of neurons is (8) and (7), and the accuracy rate reaches 98.19%; the number of hidden layers is 2, the number of neurons is (8,8), and the accuracy rate reaches 95.58%; the number of hidden layers is 2, the number of neurons is (8,9) respectively, and the accuracy rate reaches 94.03%; the number of hidden layers is 2, the number of neurons is (12,6) respectively, and the accuracy rate reaches 96.09%; the number of hidden layers is 2, the number of neurons is (12) and (7), and the accuracy rate reaches 98.49%; the number of hidden layers is 2, the number of neurons is (12,8) respectively, and the accuracy rate reaches 97.24%; the number of hidden layers is 2, the number of neurons is (12,9) respectively, the accuracy rate reaches 97.14%, sensitivity analysis and comparison results show that the number of hidden layers is 2, the number of neurons is 12 and 7 respectively, and the accuracy rate reaches 98.29% under the parameter setting. The neural network obtained by training after parameter adjustment is shown in figure 5.
In this embodiment, under the above mentioned test of the referred BP neural network model, the normalized scores (so the scores are normalized and fall between 0 and 1) of each grade in 2016 are shown in fig. 6, wherein the abscissa represents the true score and the ordinate represents the predicted score through the BP neural network, and it can be seen that the true score and the predicted score have quite high consistency.
In this embodiment, the food safety condition prediction model based on the supply chain and the BP neural network calculates the accuracy of the test data by using the index data and the total evaluation score as the test data, finds that the number of hidden layers is 2 and the number of neurons is 12 and 7 respectively through sensitivity analysis and comparison results, sets the accuracy to 98.29% under the parameter setting, and trains the BP neural network after the parameter adjustment to obtain the regional food safety evaluation model.
In this embodiment, the errors of the food safety condition prediction model based on the supply chain and the BP neural network are propagated backwards, the weights and the deviations are modified layer by layer in the back propagation process, and the back propagation process and the error adjustment process sequentially include weight adjustment between the hidden layer and the output layer, between the hidden layer and the hidden layer, and between the input layer and the hidden layer, generally, a multi-layer BP neural network is composed of L layers of the neurons, wherein the 1 st layer is referred to as the input layer, the last layer, i.e., L layer, is referred to as the output layer, and other layers are referred to as the hidden layers, i.e., 2 nd to L-1 st layer.
Let the input vector be:
Figure BDA0001961549990000101
the output vector is:
Figure BDA0001961549990000102
the output of each of the neurons of the hidden layer is:
Figure BDA0001961549990000103
is provided with
Figure BDA0001961549990000104
Is a connection weight between the jth of said neurons from level l-1 and the ith of said neurons from level l;
Figure BDA0001961549990000105
for the bias of the ith said neuron, then:
Figure BDA0001961549990000106
Figure BDA0001961549990000107
wherein the content of the first and second substances,
Figure BDA0001961549990000108
is the input to the ith neuron at level 1, and f (-) is the activation function of the neuron. Non-linear activation functions are typically employed in multiple layers of the BP neural network. The BP neural network typically uses a sigmod function as the activation function:
Figure BDA0001961549990000109
it varies over a range of (0,1) with a derivative of f ═ f (1-f)
Assuming that we have m of the training samples { (x (1), y (1), (x (2), y (2),. · (x) (m), y (m)) }, where d (i) is the desired output corresponding to input x (i), see fig. 8, it can be derived from fig. 8 that the BP neural network algorithm makes the output of the neural network as close as possible to the desired output by optimizing the input weights and the biases of the neurons in each layer, for the purpose of training (or learning).
And defining an error function as follows for the given m training samples by adopting a batch updating method:
Figure BDA00019615499900001010
where e (i) is the training error for a single sample:
Figure BDA00019615499900001011
therefore, the temperature of the molten metal is controlled,
Figure BDA00019615499900001012
the weight and the bias are updated according to the following mode in each iteration of the BP neural network algorithm:
Figure BDA0001961549990000111
Figure BDA0001961549990000112
α is the learning rate, its value range is (0,1) the key of BP algorithm is how to solve
Figure BDA0001961549990000113
And
Figure BDA0001961549990000114
partial derivatives of (a).
The partial derivatives of the weights and offsets of the l-th layer (2. ltoreq.1. ltoreq. L-1) are
Figure BDA0001961549990000115
Figure BDA0001961549990000116
Wherein the content of the first and second substances,
Figure BDA0001961549990000117
compared with the prior art, the regional food safety evaluation model based on the supply chain and the BP neural network has the following beneficial effects:
at present, a traditional food supply chain is a top-down supply and demand network formed by economic benefit main bodies in all links from primary suppliers of food to consumers, and a food safety evaluation index system is usually constructed on the basis of quantity safety and quality safety of the food on the supply chain.
The Delphi method and the AHP method adopted by the invention are subjective judgment methods based on expert knowledge and experience, and the complex problems are analyzed by combining quantification and qualification, so that the subjective judgment of experts on an index system is expressed in a mathematical form, the deviation of the subjective judgment is reduced, the experience and knowledge of each expert can be fully exerted, the thought is wide, and the influence of individual authoritative opinions can be avoided.
The invention determines the index weight by applying an analytic hierarchy process and optimizes according to an R software toolkit, designs a BP neural network structure from the aspects of network layer number, neuron number of each layer, neuron transfer function and the like, and then passes through R software, the designed BP network structure model is trained and tested, experimental results are analyzed, the defects that a traditional evaluation model excessively depends on subjectivity, the self-learning capability is poor and the like are overcome, the advantages of strong neural network popularization and fault tolerance are fully utilized, the accuracy of food safety evaluation is effectively improved, the regional food safety condition is evaluated by adopting a method combining a Delphi-AHP method and a BP neural network, a more accurate and reliable evaluation result is obtained, a new way is opened for reasonable evaluation of the food safety condition, and a reference basis is provided for regional food safety condition evaluation work.
The food safety monitoring system takes a food supply chain as a main line, runs through the food quality safety from a farmland to a dining table, deeply analyzes key factors influencing food safety by combining a hazard analysis and a food safety management system theory of a key control point (HACCP), establishes regional food safety evaluation system indexes and models based on the BP neural network, aims to accurately test regional food safety conditions, dynamically predicts the food safety states for food safety supervision departments, establishes a food safety supervision and early warning system based on the regional food safety evaluation system indexes and models, and provides scientific support for effectively implementing regional food safety evaluation, early warning and supervision.
The above disclosure is only for the purpose of illustrating the preferred embodiments of the present invention, and it is therefore to be understood that the invention is not limited by the scope of the appended claims.

Claims (6)

1. A regional food safety evaluation model based on a supply chain and a BP neural network is characterized in that a modeling process mainly comprises the following steps:
the first step is as follows: establishing a regional food safety evaluation index system based on a supply chain, and specifically comprising the steps of firstly establishing 9 first-level indexes and 26 second-level index evaluation index systems by using a two-time Delphi method, and secondly determining the weight of the indexes by using an Analytic Hierarchy Process (AHP);
the second step is that: the method comprises the specific steps of firstly obtaining sample data of each index of a food safety evaluation system, inputting the sample data of each index and regional scores into an initialized BP neural network, secondly adjusting parameters according to the accuracy of calculated training data, and then training the BP neural network again to finally obtain the regional food safety evaluation model.
2. The supply chain and BP neural network-based regional food safety assessment model of claim 1, wherein: the BP neural network can also be called as error and signal back propagation, and comprises an input layer, one or more hidden layers and an output layer, wherein the input layer is sample data import, the input layer is used as an input variable of the BP neural network and is a sample database to be analyzed, the number of nodes of the input layer is determined according to influence factors, the number of the input variables of the nodes of the input layer is 26, and the output layer is a total score for evaluating the food safety condition.
3. The supply chain and BP neural network-based regional food safety assessment model of claim 2, wherein: the first step of determining the input layer and the output layer of the BP neural network is to determine an input vector and an expected response, the input vector is the 26 secondary indicators, the expected response is an evaluation prediction result, then train the BP neural network model according to the sample data, and finally adjust the weight and the deviation of the network.
4. The supply chain and BP neural network-based regional food safety assessment model of claim 3, wherein: setting the activation function of the BP neural network aslogistic function, loss function is sum of squared error, SSE, and loss threshold is 1 × 10-4And the learning rate is 0.01, a back rprop algorithm is selected for parameter optimization, the number of hidden layers is initially set to be 1, and the number of initial neurons is 7.
5. The supply chain and BP neural network based regional food safety assessment model of claim 4, wherein: and calculating the accuracy of the test data by taking the index data and the total evaluation score as test data, finding out that the number of hidden layers is 2 and the number of neurons is 12 and 7 respectively through sensitivity analysis and comparison results, setting the accuracy rate to 98.29% under the parameter setting, and training the BP neural network after the parameter adjustment to obtain the regional food safety evaluation model.
6. The regional food safety evaluation model based on supply chain and BP neural network of claim 5, wherein the error is propagated from back to back, and the weight and the deviation are modified layer by layer in the back propagation process, the back propagation and the error adjustment process are sequentially that the weight adjustment between the hidden layer and the output layer, between the hidden layer and the hidden layer, and between the input layer and the hidden layer, generally a multilayer BP neural network is composed of L layers of the neurons, wherein, the 1 st layer is called the input layer, the last layer, L, is called the output layer, and the other layers are called the hidden layers, i.e. the 2 nd layer to the L-1 st layer.
Let the input vector be:
Figure FDA0001961549980000021
the output vector is:
Figure FDA0001961549980000022
the output of each of the neurons of the hidden layer is:
Figure FDA0001961549980000023
is provided with
Figure FDA0001961549980000024
Is a connection weight between the jth of said neurons from level l-1 and the ith of said neurons from level l;
Figure FDA0001961549980000025
for the bias of the ith said neuron, then:
Figure FDA0001961549980000026
Figure FDA0001961549980000027
wherein the content of the first and second substances,
Figure FDA0001961549980000028
is the input to the ith neuron at level 1, and f (-) is the activation function of the neuron. Non-linear activation functions are typically employed in multiple layers of the BP neural network. The BP neural network typically uses a sigmod function as the activation function:
Figure FDA0001961549980000029
it varies over a range of (0,1) with a derivative of f ═ f (1-f)
Let us assume that we have m of the training samples { (x (1), y (1), (x (2), y (2),. ·., (x (m), y (m)) }, where d (i) is the desired output for the corresponding input x (i). the BP neural network algorithm achieves training (or learning) by optimizing the input weights and the biases for the neurons in each layer so that the output of the neural network is as close as possible to the desired output.
And defining an error function as follows for the given m training samples by adopting a batch updating method:
Figure FDA00019615499800000210
where e (i) is the training error for a single sample:
Figure FDA00019615499800000211
therefore, the temperature of the molten metal is controlled,
Figure FDA0001961549980000031
the weight and the bias are updated according to the following mode in each iteration of the BP neural network algorithm:
Figure FDA0001961549980000032
Figure FDA0001961549980000033
α is the learning rate, its value range is (0,1) the key of BP algorithm is how to solve
Figure FDA0001961549980000034
And
Figure FDA0001961549980000035
the partial derivatives of the weights and biases of the l-th layer (2. ltoreq. l.ltoreq. L-1) are
Figure FDA0001961549980000036
Figure FDA0001961549980000037
Wherein the content of the first and second substances,
Figure FDA0001961549980000038
CN201910088979.5A 2019-01-29 2019-01-29 Regional food safety evaluation model based on supply chain and BP neural network Pending CN111489046A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910088979.5A CN111489046A (en) 2019-01-29 2019-01-29 Regional food safety evaluation model based on supply chain and BP neural network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910088979.5A CN111489046A (en) 2019-01-29 2019-01-29 Regional food safety evaluation model based on supply chain and BP neural network

Publications (1)

Publication Number Publication Date
CN111489046A true CN111489046A (en) 2020-08-04

Family

ID=71811570

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910088979.5A Pending CN111489046A (en) 2019-01-29 2019-01-29 Regional food safety evaluation model based on supply chain and BP neural network

Country Status (1)

Country Link
CN (1) CN111489046A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112216399A (en) * 2020-10-10 2021-01-12 黑龙江省疾病预防控制中心 Food-borne disease pathogenic factor prediction method and system based on BP neural network
CN112308426A (en) * 2020-11-02 2021-02-02 北京工商大学 Training method, evaluation method and device for food heavy metal pollution risk evaluation model
CN112598116A (en) * 2020-12-22 2021-04-02 王槐林 Pet appetite evaluation method, device, equipment and storage medium
CN112733439A (en) * 2020-12-29 2021-04-30 哈尔滨工程大学 Method for calculating shielding material accumulation factor based on BP neural network
CN113256143A (en) * 2021-06-07 2021-08-13 中国传媒大学 Assessment method for media-melting organization, electronic equipment and readable storage medium
CN114004719A (en) * 2021-10-12 2022-02-01 杭州畅鸿信息技术有限公司 Food and drug supervision system and method based on big data and cloud computing
CN114021776A (en) * 2021-09-30 2022-02-08 联想(北京)有限公司 Material combination selection method and device and electronic equipment
CN115375113A (en) * 2022-08-05 2022-11-22 航天神舟智慧系统技术有限公司 Overall safety index evaluation method and device for places in primary treatment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106157162A (en) * 2016-07-22 2016-11-23 上海海洋大学 A kind of North Pacific squid cental fishing ground Forecasting Methodology
CN107194625A (en) * 2017-07-25 2017-09-22 国家电网公司 Wind power plant based on neutral net abandons wind-powered electricity generation amount appraisal procedure
CN107256426A (en) * 2017-06-19 2017-10-17 湖北省食品药品监督检验研究院 A kind of drug safety confidence index system and construction method based on intelligent algorithm
CN108647866A (en) * 2018-04-26 2018-10-12 民政部国家减灾中心 A kind of Typical Areas is because of non-irrigated dysdipsia population rapid evaluation model and construction method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106157162A (en) * 2016-07-22 2016-11-23 上海海洋大学 A kind of North Pacific squid cental fishing ground Forecasting Methodology
CN107256426A (en) * 2017-06-19 2017-10-17 湖北省食品药品监督检验研究院 A kind of drug safety confidence index system and construction method based on intelligent algorithm
CN107194625A (en) * 2017-07-25 2017-09-22 国家电网公司 Wind power plant based on neutral net abandons wind-powered electricity generation amount appraisal procedure
CN108647866A (en) * 2018-04-26 2018-10-12 民政部国家减灾中心 A kind of Typical Areas is because of non-irrigated dysdipsia population rapid evaluation model and construction method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
侯阳阳: "基于大数据的食品安全风险评估方法研究", 《中国优秀博硕士学位论文全文数据库(硕士) 工程科技Ⅰ辑》 *

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112216399A (en) * 2020-10-10 2021-01-12 黑龙江省疾病预防控制中心 Food-borne disease pathogenic factor prediction method and system based on BP neural network
CN112308426A (en) * 2020-11-02 2021-02-02 北京工商大学 Training method, evaluation method and device for food heavy metal pollution risk evaluation model
CN112598116A (en) * 2020-12-22 2021-04-02 王槐林 Pet appetite evaluation method, device, equipment and storage medium
CN112733439A (en) * 2020-12-29 2021-04-30 哈尔滨工程大学 Method for calculating shielding material accumulation factor based on BP neural network
CN113256143A (en) * 2021-06-07 2021-08-13 中国传媒大学 Assessment method for media-melting organization, electronic equipment and readable storage medium
CN114021776A (en) * 2021-09-30 2022-02-08 联想(北京)有限公司 Material combination selection method and device and electronic equipment
CN114004719A (en) * 2021-10-12 2022-02-01 杭州畅鸿信息技术有限公司 Food and drug supervision system and method based on big data and cloud computing
CN115375113A (en) * 2022-08-05 2022-11-22 航天神舟智慧系统技术有限公司 Overall safety index evaluation method and device for places in primary treatment

Similar Documents

Publication Publication Date Title
CN111489046A (en) Regional food safety evaluation model based on supply chain and BP neural network
Liu et al. Short‐term traffic speed forecasting based on attention convolutional neural network for arterials
Geng et al. Early warning modeling and analysis based on a deep radial basis function neural network integrating an analytic hierarchy process: A case study for food safety
CN105117602B (en) A kind of metering device running status method for early warning
CN109636055A (en) A kind of non-coal mine Safety Risk in Production prediction and warning platform
CN110738349A (en) Power grid fault first-aid repair duration prediction method based on multi-model fusion
CN109948000A (en) Anomaly target detection method, apparatus, equipment and the storage medium of heterogeneous network
CN108764473A (en) A kind of BP neural network water demands forecasting method based on correlation analysis
CN110390429A (en) A kind of quality of water environment forecasting system neural network based and method
CN113494939A (en) Distributed monitoring method for rural domestic sewage
Geng et al. Risk early warning of food safety using novel long short-term memory neural network integrating sum product based analytic hierarchy process
Ning et al. GA-BP air quality evaluation method based on fuzzy theory.
CN111242380A (en) Lake (reservoir) eutrophication prediction method based on artificial intelligence algorithm
Aramesh et al. A general neural and fuzzy-neural algorithm for natural gas flow prediction in city gate stations
CN114764682B (en) Rice safety risk assessment method based on multi-machine learning algorithm fusion
CN117350146A (en) GA-BP neural network-based drainage pipe network health evaluation method
CN112149870A (en) Pig house ammonia concentration combined prediction method based on ISODATA clustering and Elman neural network
CN109829115B (en) Search engine keyword optimization method
Zhao The water potability prediction based on active support vector machine and artificial neural network
CN115392618A (en) AHP-EW and AE-RNN fusion-based food safety risk early warning model and establishment method thereof
CN113269384B (en) Method for early warning health state of river system
Zain Al-Thalabi et al. Modeling and prediction using an artificial neural network to study the impact of foreign direct investment on the growth rate/a case study of the State of Qatar
CN110928924A (en) Power system customer satisfaction analyzing and predicting method based on neural network
Jusoh et al. Evaluating fuzzy time series and artificial neural network for air pollution index forecasting
An Research on early warning of operation and maintenance cost of engineering construction projects

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination