[go: up one dir, main page]

CN111310317A - Prediction method and device of granary space-time temperature field based on big data and interpolation prediction - Google Patents

Prediction method and device of granary space-time temperature field based on big data and interpolation prediction Download PDF

Info

Publication number
CN111310317A
CN111310317A CN202010079018.0A CN202010079018A CN111310317A CN 111310317 A CN111310317 A CN 111310317A CN 202010079018 A CN202010079018 A CN 202010079018A CN 111310317 A CN111310317 A CN 111310317A
Authority
CN
China
Prior art keywords
temperature
data
layer
granary
training
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.)
Granted
Application number
CN202010079018.0A
Other languages
Chinese (zh)
Other versions
CN111310317B (en
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.)
Anhui University
Original Assignee
Anhui University
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 Anhui University filed Critical Anhui University
Priority to CN202010079018.0A priority Critical patent/CN111310317B/en
Publication of CN111310317A publication Critical patent/CN111310317A/en
Application granted granted Critical
Publication of CN111310317B publication Critical patent/CN111310317B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01KMEASURING TEMPERATURE; MEASURING QUANTITY OF HEAT; THERMALLY-SENSITIVE ELEMENTS NOT OTHERWISE PROVIDED FOR
    • G01K13/00Thermometers specially adapted for specific purposes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/084Backpropagation, e.g. using gradient descent

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Molecular Biology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

本发明公开了一种基于大数据与插值预测的粮仓空时温度场预测方法及装置。该方法包括:读取粮情数据及仓库信息;截取不同时间点数据作为数据依据;对仓内温度3D重建;选取要预测的截面,对于截面温度时序预测;对选取截面中要预测的温度点,判断该坐标位置是否为外层坐标点;将样本数据输入为输入序列;初始化,设定训练周期及精度;计算网络层的实际输出;计算误差并修正权值、阈值;神经网络训练并判断训练精度是否达到预设精度或训练周期是否达到预设周期,是则预测出温度值;利用预测出的截面离散温度点空间插值,获得截面的预测温度场图。本发明准确预测仓内温度场的变化趋势,直观且有效的反映粮仓粮堆内部温度信息,保障粮食储存质量。

Figure 202010079018

The invention discloses a granary space-time temperature field prediction method and device based on big data and interpolation prediction. The method includes: reading grain condition data and warehouse information; intercepting data at different time points as data basis; 3D reconstruction of the temperature in the warehouse; selecting a section to be predicted, and predicting the temperature time series of the section; , determine whether the coordinate position is an outer coordinate point; input the sample data as the input sequence; initialize, set the training period and accuracy; calculate the actual output of the network layer; calculate the error and correct the weights and thresholds; Whether the training accuracy reaches the preset accuracy or the training period reaches the preset period, the temperature value is predicted; the predicted temperature field map of the section is obtained by spatial interpolation of the predicted discrete temperature points of the section. The invention accurately predicts the change trend of the temperature field in the silo, directly and effectively reflects the internal temperature information of the granary grain pile, and ensures the quality of grain storage.

Figure 202010079018

Description

基于大数据与插值预测的粮仓空时温度场预测方法及装置Prediction method and device of granary space-time temperature field based on big data and interpolation prediction

技术领域technical field

本发明涉及粮食储存技术领域的一种温度场预测方法,尤其涉及一种基于大数据与插值预测的粮仓空时温度场预测方法,还涉及应用该方法的基于大数据与插值预测的粮仓空时温度场预测装置。The invention relates to a temperature field prediction method in the technical field of grain storage, in particular to a granary space-time temperature field prediction method based on big data and interpolation prediction, and also relates to a granary space-time temperature field prediction method based on big data and interpolation prediction using the method Temperature field prediction device.

背景技术Background technique

目前,国内兴建了许多大型粮库,单仓容量是以往所建单仓容量的数倍,在粮仓内发生霉变,虫害的问题也更加严重。粮食作为一种特殊及复杂的生命体,粮堆内部温度场的变化规律也变得异常复杂,因此准确掌握粮仓温度分布、合理分析预测粮仓温度变化趋势,是预判储粮安全状态的重要方法之一。At present, many large grain depots have been built in China, and the capacity of a single warehouse is several times that of a single warehouse built in the past. Mildew occurs in the grain warehouse, and the problem of insect pests is also more serious. Grain is a special and complex living body, and the change law of the internal temperature field of the grain pile has also become extremely complex. Therefore, accurately grasping the temperature distribution of the granary and reasonably analyzing and predicting the temperature change trend of the granary are important methods to predict the safety state of grain storage. one.

但是,目前的粮仓中粮温预测方案针对于单个点的温度预测,对于复杂的仓储环境,单点的温度预测不足以表现出整个粮仓温度的变化趋势,在大仓的环境中体现不出整体的温度分布,仓中出现局域温度异常的情况可能预测不到,导致理论的预测和实际的情况偏差大,粮仓热芯冷芯的变化无法展现,粮情管理者出现错误的判别。However, the current grain temperature prediction scheme in the granary is aimed at the temperature prediction of a single point. For a complex storage environment, the temperature prediction of a single point is not enough to show the temperature change trend of the whole granary, and it cannot reflect the overall temperature in the large warehouse environment. Temperature distribution, local temperature anomalies in the warehouse may not be predicted, resulting in a large deviation between the theoretical prediction and the actual situation, the changes in the hot and cold cores of the granary cannot be displayed, and the grain management manager makes a wrong judgment.

发明内容SUMMARY OF THE INVENTION

为解决现有粮仓的粮温预测方案不能预测整仓的具体温度分布,而对每个粮仓进行数学建模分析又不切合实际的技术问题,本发明提供一种基于大数据与插值预测的粮仓空时温度场预测方法及装置。In order to solve the technical problem that the grain temperature prediction scheme of the existing granary cannot predict the specific temperature distribution of the whole silo, and the mathematical modeling analysis of each granary is impractical, the present invention provides a granary based on big data and interpolation prediction. Space-time temperature field prediction method and device.

本发明采用以下技术方案实现:一种基于大数据与插值预测的粮仓空时温度场预测方法,其包括以下步骤:The present invention adopts the following technical solutions to realize: a method for predicting the granary space-time temperature field based on big data and interpolation prediction, which comprises the following steps:

步骤S1,从一个粮仓数据库中读取粮情数据及对应的仓库信息;Step S1, read grain condition data and corresponding warehouse information from a grain warehouse database;

步骤S2,根据所述仓库信息中的仓库状态,截取不同时间点数据;Step S2, intercepting data at different time points according to the warehouse state in the warehouse information;

步骤S3,对温度进行3D空间重建,获得温度点对应的位置信息;In step S3, 3D space reconstruction is performed on the temperature, and position information corresponding to the temperature point is obtained;

步骤S4,选取要预测的截面,先进行所述截面温度的时序预测;Step S4, select the section to be predicted, and first perform the time series prediction of the temperature of the section;

步骤S5,判断所述截面不同位置的温度点是否为外层温度点;Step S5, judging whether the temperature points at different positions of the cross section are outer layer temperature points;

在所述位置的温度点是所述外层温度点时,执行步骤S6;When the temperature point of the position is the temperature point of the outer layer, step S6 is performed;

步骤S6,选择包括气象数据、内温内湿以及相邻温度点的变量并作为样本数据;Step S6, select variables including meteorological data, internal temperature and internal humidity, and adjacent temperature points as sample data;

在所述位置的温度点不是所述外层温度点时,执行步骤S7;When the temperature point of the position is not the temperature point of the outer layer, step S7 is performed;

步骤S7,选择包括邻近温度点、内温内湿以及水分的变量作为样本数据;Step S7, selecting variables including adjacent temperature points, internal temperature, internal humidity and moisture as sample data;

步骤S8,将所述样本数据输入为输入层的输入序列,并选择隐含层节点数;Step S8, input the sample data as the input sequence of the input layer, and select the number of hidden layer nodes;

步骤S9,初始化权值、阈值,设定训练周期及精度;Step S9, initialize the weights and thresholds, and set the training period and precision;

步骤S10,计算网络层的实际输出;Step S10, calculating the actual output of the network layer;

步骤S11,计算误差,并修正所述权值、所述阈值;Step S11, calculate the error, and correct the weight and the threshold;

步骤S12,进行BP神经网络训练,并判断训练精度是否达到一个预设精度,或判断训练周期是否达到一个预设周期;Step S12, performing BP neural network training, and judging whether the training accuracy has reached a preset accuracy, or whether the training period has reached a preset period;

在所述训练精度达到所述预设精度或/和所述训练周期达到所述预设周期时,执行步骤S13;When the training accuracy reaches the preset accuracy or/and the training period reaches the preset period, step S13 is performed;

步骤S13,步骤S13预测出所述截面所有坐标所对应的温度值;Step S13, step S13 predicts the temperature values corresponding to all the coordinates of the section;

在所述训练精度未达到所述预设精度且所述训练周期未达到所述预设周期时,执行步骤S10;When the training accuracy does not reach the preset accuracy and the training period does not reach the preset period, step S10 is performed;

步骤S14,根据预测点数据,进行空间插值,获得所述截面的温度场图。Step S14, performing spatial interpolation according to the predicted point data to obtain the temperature field map of the cross section.

本发明通过先读取数据库中的数据,再截取不同时间点数据,然后对温度进行3D空间重建,随后选取截面并预测截面的平面温度,然后判断截面中不同位置的温度点是否为外层温度点,并以此选定变量作为样本数据,实现对粮仓数据的预处理过程,再然后将重新排列数据以作为神经训练网络中的训练集和测试集,随后进行神经网络训练以预测出平面温度点,最后对预测出的平面温度点进行插值,从而预测出仓库中真实的温度场预测图,解决了现有粮仓的粮温预测方案不能预测整仓的具体温度分布,而对每个粮仓进行数学建模分析又不切合实际的技术问题,得到了未来仓内温度场的空时变化趋势,而且直观且高效地反应粮仓粮堆内部温度信息,并且具有普适性和可扩展性,能够应用在各种仓储现场的技术效果。The invention reads the data in the database first, then intercepts the data at different time points, then reconstructs the temperature in 3D space, then selects the section and predicts the plane temperature of the section, and then judges whether the temperature points at different positions in the section are the outer layer temperature point, and use the selected variables as sample data to realize the preprocessing process of the granary data, and then rearrange the data to serve as the training set and test set in the neural training network, and then carry out the neural network training to predict the plane temperature Finally, the predicted plane temperature points are interpolated to predict the real temperature field prediction map in the warehouse, which solves the problem that the existing grain temperature prediction scheme of the granary cannot predict the specific temperature distribution of the whole warehouse. Mathematical modeling analyzes unrealistic technical problems, obtains the future space-time variation trend of the temperature field in the silo, and intuitively and efficiently reflects the internal temperature information of the granary grain stack, and has universality and scalability, which can be applied Technical effects on various warehousing sites.

作为上述方案的进一步改进,空时预测模型公式为:As a further improvement of the above scheme, the formula of the space-time prediction model is:

Figure BDA0002379604920000031
Figure BDA0002379604920000031

式中,zt+1(ε)为空间中位置为ε的插值数值,zt+1(ai,bi,ci)为已知位置为(ai,bi,ci)的插值数值,(ai,bi,ci)为粮仓中的行列层,对应粮仓中温度传感器实际的位置;θ[]代表依据真实数据的时序预测过程。In the formula, z t+1 (ε) is the interpolation value at the position of ε in the space, and z t+1 (a i ,b i ,c i ) is the known position of (a i ,b i , ci ) Interpolation value, (a i , b i , c i ) is the row and column layer in the granary, corresponding to the actual position of the temperature sensor in the granary; θ[] represents the time series prediction process based on real data.

作为上述方案的进一步改进,在进行BP神经网络训练之前,还对温度数据进行数据预处理:将不同的温度点分别对应到粮仓的各个位置,并以现场电缆排布为依据进行数据排列;所述空间温度点的数据序列公式为:As a further improvement of the above scheme, before the BP neural network training, data preprocessing is also performed on the temperature data: different temperature points are corresponding to each position of the granary, and the data is arranged based on the on-site cable arrangement; The data sequence formula of the space temperature point is:

X(a,b,c)=[x1(a,b,c),x2(a,b,c),…,xt(a,b,c)]X(a,b,c)=[x1( a ,b,c), x2 (a,b,c),..., xt (a,b,c)]

式中,X(a,b,c)为粮仓中第a行b列c层的温度点的数据序列,xt(a,b,c)为粮仓中第a行b列c层的温度点数据,t为取样数据的个数,也代表时间序列。In the formula, X(a,b,c) is the data sequence of the temperature points in the a-th row, b-column, c-layer, and c-layer in the granary, and x t (a,b,c) is the temperature point in the a-th row, b-column, b-layer, and c-layer in the granary. data, t is the number of sampled data, and also represents the time series.

作为上述方案的进一步改进,设,l为所述BP神经网络隐含层的层数,n为所述BP神经网络输入层的层数,m为所述BP神经网络输出层的层数。所述BP神经网络的隐含层的输出公式为:As a further improvement of the above scheme, let l be the layer number of the hidden layer of the BP neural network, n be the layer number of the input layer of the BP neural network, and m is the layer number of the output layer of the BP neural network. The output formula of the hidden layer of the BP neural network is:

Figure BDA0002379604920000032
Figure BDA0002379604920000032

式中,xi为所述BP神经网络的输入层的输入值,ωij为所述输入层到所述隐含层的权重,αj为所述输入层到所述隐含层的偏置;g(x)为激励函数,且满足:

Figure BDA0002379604920000041
In the formula, x i is the input value of the input layer of the BP neural network, ω ij is the weight from the input layer to the hidden layer, α j is the bias from the input layer to the hidden layer ; g(x) is the excitation function and satisfies:
Figure BDA0002379604920000041

作为上述方案的进一步改进,所述BP神经网络的输出层的输出公式为:As a further improvement of the above scheme, the output formula of the output layer of the BP neural network is:

Figure BDA0002379604920000042
Figure BDA0002379604920000042

式中,

Figure BDA0002379604920000043
ξ为1-10的常数;ωjk为所述隐含层到所述输出层的权重,βk为所述隐含层到所述输出层的偏置。In the formula,
Figure BDA0002379604920000043
ξ is a constant of 1-10; ω jk is the weight from the hidden layer to the output layer, and β k is the bias from the hidden layer to the output layer.

进一步地,在步骤S11中,误差计算公式为:Further, in step S11, the error calculation formula is:

Figure BDA0002379604920000044
Figure BDA0002379604920000044

式中,yk为期望输出。In the formula, y k is the expected output.

再进一步地,所述隐含层到所述输出层的权值的修正公式为:Still further, the correction formula of the weights from the hidden layer to the output layer is:

Figure BDA0002379604920000045
Figure BDA0002379604920000045

所述输入层到所述隐含层的权值的修正公式为:The correction formula of the weights from the input layer to the hidden layer is:

Figure BDA0002379604920000046
Figure BDA0002379604920000046

式中,ek=yk-ok,η为学习速率。In the formula, e k =y k -o k , η is the learning rate.

再进一步地,所述隐含层到所述输出层的偏置的修正公式为:Still further, the correction formula of the bias from the hidden layer to the output layer is:

Figure BDA0002379604920000047
Figure BDA0002379604920000047

所述输入层到所述隐含层的偏置的修正公式为:The correction formula of the bias from the input layer to the hidden layer is:

Figure BDA0002379604920000048
Figure BDA0002379604920000048

式中,ek=yk-ok,η为学习速率。In the formula, e k =y k -o k , η is the learning rate.

作为上述方案的进一步改进,空间插值公式为:As a further improvement of the above scheme, the spatial interpolation formula is:

Figure BDA0002379604920000049
Figure BDA0002379604920000049

式中,z(ε)为空间中需要预测的点ε处的数值,z(ai,bi,ci)为粮仓内实际温度传感器第i个位置处的预测值,w为测量值数,λi为权重系数,满足:

Figure BDA0002379604920000051
In the formula, z(ε) is the value at the point ε that needs to be predicted in the space, z(a i , b i , c i ) is the predicted value at the ith position of the actual temperature sensor in the granary, and w is the number of measured values. , λ i is the weight coefficient, satisfying:
Figure BDA0002379604920000051

本发明还提供一种基于大数据与插值预测的粮仓空时温度场预测装置,其应用上述任意所述的基于大数据与插值预测的粮仓空时温度场预测方法,其包括:The present invention also provides a granary space-time temperature field prediction device based on big data and interpolation prediction, which applies any of the above-mentioned big data and interpolation prediction-based granary space-time temperature field prediction methods, including:

数据读取模块,其用于从一个粮仓数据库中读取粮情数据及对应的仓库信息;A data reading module, which is used to read grain condition data and corresponding warehouse information from a grain warehouse database;

数据截取模块,其用于根据所述仓库信息中的仓库状态,截取不同时间点数据;a data interception module, which is used for intercepting data at different time points according to the warehouse state in the warehouse information;

重建模块,其用于对温度进行3D空间重建,获得温度点对应的位置信息;a reconstruction module, which is used to reconstruct the temperature in 3D space and obtain the position information corresponding to the temperature point;

截面选取模块,其用于选取一个方位的截面,先进行所述截面温度的时序预测;a section selection module, which is used to select a section in an orientation, and firstly perform the time series prediction of the temperature of the section;

温度点判断模块,其用于判断所述截面中不同位置的温度点是否为外层温度点;a temperature point judgment module, which is used for judging whether the temperature points at different positions in the cross section are the outer layer temperature points;

样本数据选择模块一,其用于在所述位置的温度点是所述外层温度点时,选择包括气象数据、内温内湿以及相邻温度点的变量并作为样本数据;A sample data selection module 1, which is used to select variables including meteorological data, internal temperature and internal humidity, and adjacent temperature points as sample data when the temperature point at the location is the outer temperature point;

样本数据选择模块二,其用于在所述位置的温度点不是所述外层温度点时,选择包括邻近温度点、内温内湿以及水分的变量作为样本数据;The second sample data selection module, which is used to select variables including adjacent temperature points, internal temperature and internal humidity, and moisture as sample data when the temperature point at the location is not the outer temperature point;

样本数据输入模块,其用于将所述样本数据输入为输入层的输入序列,并选择隐含层节点数;a sample data input module, which is used to input the sample data as the input sequence of the input layer, and select the number of hidden layer nodes;

初始设定模块,其用于初始化权值、阈值,设定训练周期及精度;Initial setting module, which is used to initialize weights, thresholds, and set training period and accuracy;

计算模块,其用于计算网络层的实际输出;A calculation module, which is used to calculate the actual output of the network layer;

修正模块,其用于计算误差,并修正所述权值、所述阈值;a correction module, which is used for calculating the error and correcting the weight and the threshold;

训练判断模块,其用于进行BP神经网络训练,并判断训练精度是否达到一个预设精度,或判断训练周期是否达到一个预设周期;在所述训练精度未达到所述预设精度且所述训练周期未达到所述预设周期时,所述训练判断模块驱使所述计算模块进行计算;A training judgment module, which is used for BP neural network training, and judges whether the training accuracy reaches a preset accuracy, or whether the training period reaches a preset period; when the training accuracy does not reach the preset accuracy and the When the training period does not reach the preset period, the training judgment module drives the calculation module to perform calculation;

预测模块,其用于在所述训练精度达到所述预设精度或/和所述训练周期达到所述预设周期时,预测出所述截面所有坐标所对应的温度值;以及a prediction module, configured to predict the temperature values corresponding to all the coordinates of the section when the training accuracy reaches the preset accuracy or/and the training period reaches the preset period; and

温度场获取模块,其用于根据预测点数据,进行空间插值,获得所述截面的温度场图。The temperature field acquisition module is used for performing spatial interpolation according to the predicted point data to obtain the temperature field map of the cross section.

相较于现有粮仓的粮温预测方案,本发明的基于大数据与插值预测的粮仓空时温度场预测方法及装置具有以下有益效果:Compared with the grain temperature prediction scheme of the existing granary, the granary space-time temperature field prediction method and device based on big data and interpolation prediction of the present invention have the following beneficial effects:

该基于大数据与插值预测的粮仓空时温度场预测方法,其通过先读取数据库中的数据,再截取不同时间点数据,然后对温度进行3D空间重建,随后选取截面并预测截面的平面温度,再然后判断截面中不同位置的温度点是否为外层温度点,并以此选定变量作为样本数据,实现对粮仓数据的预处理过程,再然后将重新排列数据以作为神经训练网络中的训练集和测试集,随后进行神经网络训练以预测出平面温度点,最后对预测出的平面温度点进行插值,从而预测出仓库中真实的温度场预测图,能够准确预测仓内温度场的变化趋势,直观且有效的反映粮仓粮堆内部温度信息,并且做到了模型的普适性和可扩展性,能够应用在各种仓储现场中。The method for predicting the granary space-time temperature field based on big data and interpolation prediction first reads the data in the database, then intercepts the data at different time points, then reconstructs the temperature in 3D space, and then selects the section and predicts the plane temperature of the section. , and then judge whether the temperature points at different positions in the section are the outer temperature points, and use the selected variables as sample data to realize the preprocessing process of the granary data, and then rearrange the data to be used as the neural training network. The training set and the test set, followed by neural network training to predict the plane temperature point, and finally the predicted plane temperature point is interpolated to predict the real temperature field prediction map in the warehouse, which can accurately predict the temperature field change in the warehouse Trend, intuitively and effectively reflect the internal temperature information of the grain stack in the granary, and achieves the universality and scalability of the model, which can be applied to various storage sites.

而且,该粮仓空时温度场预测方法采用BP神经网络的方法对平面温度点进行预测,进而为温度场预测图提供有效数据,并且采用克里金插值法进行空间插值拟合出二维温度场,建立一个空时温度场预测模型,能直观清楚的反映粮仓粮堆内部温度信息,为可疑点的扦样准确度提供了理论依据。在传感器数量有限的情况下,该方法在合理布置温度传感器的前提下,能够对粮仓内温度进行空间和时间上的合理分析,使得粮情信息可视化程度大大提高,提高的同时增加可信度,从而保障粮食储存质量。Moreover, the granary space-time temperature field prediction method uses the BP neural network method to predict the plane temperature points, and then provides effective data for the temperature field prediction map, and uses the kriging interpolation method to perform spatial interpolation to fit a two-dimensional temperature field. , to establish a space-time temperature field prediction model, which can intuitively and clearly reflect the internal temperature information of the grain pile in the granary, and provides a theoretical basis for the accuracy of the sampling of suspicious points. In the case of a limited number of sensors, this method can reasonably analyze the temperature in the granary in space and time under the premise of reasonable arrangement of temperature sensors, which greatly improves the visualization of grain information, and increases the reliability at the same time. So as to ensure the quality of food storage.

该基于大数据与插值预测的粮仓空时温度场预测装置的有益效果与上述粮仓空时温度场预测方法的有益效果相同,在此不再做赘述。The beneficial effect of the granary space-time temperature field prediction device based on big data and interpolation prediction is the same as the beneficial effect of the above-mentioned granary space-time temperature field prediction method, which will not be repeated here.

附图说明Description of drawings

图1为本发明实施例1的基于大数据与插值预测的粮仓空时温度场预测方法的流程图。FIG. 1 is a flowchart of a method for predicting a granary space-time temperature field based on big data and interpolation prediction according to Embodiment 1 of the present invention.

图2为本发明实施例2的基于大数据与插值预测的粮仓空时温度场预测方法实验中坐标(1,1,1)的温度预测对比图。FIG. 2 is a comparison diagram of temperature prediction of coordinates (1, 1, 1) in the experiment of the prediction method of the granary space-time temperature field based on big data and interpolation prediction according to Embodiment 2 of the present invention.

图3为本发明实施例2的基于大数据与插值预测的粮仓空时温度场预测方法实验中坐标(4,3,2)的温度预测对比图。FIG. 3 is a comparison diagram of temperature prediction of coordinates (4, 3, 2) in the experiment of the method for predicting the granary space-time temperature field based on big data and interpolation prediction according to Embodiment 2 of the present invention.

图4为本发明实施例2的基于大数据与插值预测的粮仓空时温度场预测方法实验中上时刻的温度场和本时刻预测温度场的仿真对比图。4 is a simulation comparison diagram of the temperature field at the previous moment and the temperature field predicted at this moment in the experiment of the prediction method for the granary space-time temperature field based on big data and interpolation prediction according to Embodiment 2 of the present invention.

图5为本发明实施例2的基于大数据与插值预测的粮仓空时温度场预测方法实验中本时刻的实际温度场和预测温度场的仿真对比图。5 is a simulation comparison diagram of the actual temperature field and the predicted temperature field at the current moment in the experiment of the prediction method of the granary space-time temperature field based on big data and interpolation prediction according to Embodiment 2 of the present invention.

具体实施方式Detailed ways

为了使本发明的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施例仅用以解释本发明,并不用于限定本发明。In order to make the objectives, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention, but not to limit the present invention.

实施例1Example 1

请参阅图1,本实施例提供了一种基于大数据与插值预测的粮仓空时温度场预测方法,该方法为使用大数据分析和空间插值结合的方法,利用数据分析的方法实现时序上的仓内温度点全方位预测,再利用空间插值的方法对仓内温度点进行插值,以温度场图的方式进行仓内温度的分析。在本实施例中,该粮仓空时温度场预测方法采用BP神经网络和克里金插值法来建立一个粮仓的空时温度场模型,具有包括以下这些步骤。Referring to FIG. 1, this embodiment provides a method for predicting a granary space-time temperature field based on big data and interpolation prediction. The temperature points in the warehouse are predicted in all directions, and then the spatial interpolation method is used to interpolate the temperature points in the warehouse, and the temperature in the warehouse is analyzed in the form of a temperature field map. In this embodiment, the granary space-time temperature field prediction method adopts BP neural network and kriging interpolation method to establish a granary space-time temperature field model, and includes the following steps.

步骤S1,从一个粮仓数据库中读取粮情数据及对应的仓库信息。该粮仓数据库可为现有的数据库,并存储有粮仓的各种信息,例如粮情数据、仓库信息、管理信息等。Step S1, read grain condition data and corresponding warehouse information from a grain warehouse database. The granary database can be an existing database, and stores various information of the granary, such as grain condition data, warehouse information, management information, and the like.

步骤S2,根据仓库信息中的仓库状态,截取不同时间点数据。在本实施例中,空时温度场模型需要先对粮仓内的温度点进行时序上的预测。因此,在本步骤中则截取不同时间点数据,从而为后续处理提供数据支撑。Step S2, according to the warehouse state in the warehouse information, intercept data at different time points. In this embodiment, the space-time temperature field model needs to first perform time series prediction on the temperature points in the granary. Therefore, in this step, data at different time points are intercepted to provide data support for subsequent processing.

步骤S3,对温度进行3D空间重建,获得温度点对应的位置信息。In step S3, the temperature is reconstructed in 3D space, and the position information corresponding to the temperature point is obtained.

步骤S4,选取一个方位的截面,并预测截面的平面温度。在本实施例中,最终需要展示的温度场便是选取粮仓的某个截面作为温度展示面,以便于预测出更加全面和丰富的温度数据。Step S4, select a section in an azimuth, and predict the plane temperature of the section. In this embodiment, the final temperature field that needs to be displayed is to select a certain section of the granary as the temperature display surface, so as to predict more comprehensive and abundant temperature data.

步骤S5,判断所述截面中不同位置的温度点是否为外层温度点。Step S5, it is judged whether the temperature points at different positions in the cross section are outer layer temperature points.

在所述位置的温度点是外层温度点时,执行步骤S6。When the temperature point at the position is the outer layer temperature point, step S6 is performed.

步骤S6,选择包括气象数据、内温内湿以及相邻温度点的变量并作为样本数据。In step S6, variables including meteorological data, internal temperature and internal humidity, and adjacent temperature points are selected as sample data.

在所述位置的温度点不是外层温度点时,执行步骤S7。When the temperature point at the position is not the outer layer temperature point, step S7 is performed.

步骤S7,选择包括邻近温度点、内温内湿以及水分的变量作为样本数据。In step S7, variables including adjacent temperature points, internal temperature, internal humidity, and moisture are selected as sample data.

在本实施例中,时序预测的方法基于BP神经网络,BP神经网络是由输入层、隐含层和输出层组成。输入层的输入序列,为粮仓的温度数据以及湿度数据。从数据库取出的数据需要做数据预处理,再作为神经网络的输入序列。在本实施例中,还需要对温度数据进行数据预处理:将不同的温度点分别对应到粮仓的各个位置,并以现场电缆排布为依据进行数据排列;所述空间温度点的数据序列公式为:In this embodiment, the method for time series prediction is based on a BP neural network, which is composed of an input layer, a hidden layer and an output layer. The input sequence of the input layer is the temperature data and humidity data of the granary. The data taken from the database needs to be preprocessed and then used as the input sequence of the neural network. In this embodiment, it is also necessary to perform data preprocessing on the temperature data: different temperature points are corresponding to each position of the granary, and the data is arranged based on the on-site cable arrangement; the data sequence formula of the spatial temperature points for:

X(a,b,c)=[x1(a,b,c),x2(a,b,c),…,xt(a,b,c)]X(a,b,c)=[x1( a ,b,c), x2 (a,b,c),..., xt (a,b,c)]

式中,X(a,b,c)为粮仓中第a行b列c层的温度点的数据序列,xt(a,b,c)为粮仓中第a行b列c层的温度点数据,t为取样数据的个数。由于取的数据为定时数据,t也是时间顺序。In the formula, X(a,b,c) is the data sequence of the temperature points in the a-th row, b-column, c-layer, and c-layer in the granary, and x t (a,b,c) is the temperature point in the a-th row, b-column, b-layer, and c-layer in the granary. data, t is the number of sampled data. Since the fetched data is timing data, t is also time sequence.

将温度数据处理好之后,结合湿度数据,进行BP神经网络的训练。训练过程由信号的前向传播以及误差的反向传播两个阶段组成。前一阶段由输入层出发,输出层终止,中间经过隐含层。后一阶段恰恰相反,由输出层出发,输入层终止,中间经过隐含层,但是在传播的过程需要分别调节传播中的权值和偏置。After the temperature data is processed, combined with the humidity data, the BP neural network is trained. The training process consists of two stages, the forward propagation of the signal and the back propagation of the error. The previous stage starts from the input layer, terminates the output layer, and passes through the hidden layer in the middle. The latter stage is just the opposite, starting from the output layer, terminating the input layer, and passing through the hidden layer in the middle, but in the process of propagation, the weights and biases in the propagation need to be adjusted separately.

步骤S8,将样本数据输入为输入层的输入序列,并选择隐含层节点数。Step S8, input the sample data as the input sequence of the input layer, and select the number of hidden layer nodes.

在本实施例中,信号前向传播,BP神经网络的隐含层的输出公式为:In this embodiment, the signal is propagated forward, and the output formula of the hidden layer of the BP neural network is:

Figure BDA0002379604920000091
Figure BDA0002379604920000091

式中,xi为BP神经网络的输入层的输入值,ωij为输入层到隐含层的权重,αj为输入层到隐含层的偏置。g(x)为激励函数,且满足:

Figure BDA0002379604920000092
In the formula, x i is the input value of the input layer of the BP neural network, ω ij is the weight from the input layer to the hidden layer, and α j is the bias from the input layer to the hidden layer. g(x) is the excitation function and satisfies:
Figure BDA0002379604920000092

在本实施例中,BP神经网络的输出层的输出公式为:In this embodiment, the output formula of the output layer of the BP neural network is:

Figure BDA0002379604920000093
Figure BDA0002379604920000093

式中,l为隐含层的层数,满足:

Figure BDA0002379604920000094
n为输入层的层数,m为输出层的层数,ξ为1-10的常数。ωjk为隐含层到输出层的权重,βk为隐含层到输出层的偏置。In the formula, l is the number of hidden layers, satisfying:
Figure BDA0002379604920000094
n is the number of layers of the input layer, m is the number of layers of the output layer, and ξ is a constant of 1-10. ω jk is the weight from the hidden layer to the output layer, and β k is the bias from the hidden layer to the output layer.

步骤S9,初始化权值、阈值,设定训练周期及精度。Step S9, initialize the weights and thresholds, and set the training period and precision.

步骤S10,计算网络层的实际输出。In step S10, the actual output of the network layer is calculated.

步骤S11,计算误差,并修正权值、阈值。Step S11, calculate the error, and correct the weight and threshold.

在本实施例中,误差反向传播,因此误差计算公式为:In this embodiment, the error propagates backward, so the error calculation formula is:

Figure BDA0002379604920000095
Figure BDA0002379604920000095

式中,yk为期望输出。其中,i=1,2,…,n;j=1,2,…l;k=1,2,…m。In the formula, y k is the expected output. Wherein, i=1,2,...,n; j=1,2,...l; k=1,2,...m.

在本实施例中,通过使用梯度下降法调节权值,隐含层到输出层的权值的修正公式为:In this embodiment, by using the gradient descent method to adjust the weights, the correction formula of the weights from the hidden layer to the output layer is:

Figure BDA0002379604920000096
Figure BDA0002379604920000096

输入层到隐含层的权值的修正公式为:The correction formula for the weights from the input layer to the hidden layer is:

Figure BDA0002379604920000101
Figure BDA0002379604920000101

式中,ek=yk-ok,η为学习速率。In the formula, e k =y k -o k , η is the learning rate.

并且,隐含层到输出层的偏置的修正公式为:And, the correction formula for the bias from the hidden layer to the output layer is:

Figure BDA0002379604920000102
Figure BDA0002379604920000102

输入层到隐含层的偏置的修正公式为:The correction formula for the bias from the input layer to the hidden layer is:

Figure BDA0002379604920000103
Figure BDA0002379604920000103

式中,ek=yk-ok,η为学习速率。In the formula, e k =y k -o k , η is the learning rate.

步骤S12,进行BP神经网络训练,并判断训练精度是否达到一个预设精度,或判断训练周期是否达到一个预设周期。Step S12, perform BP neural network training, and judge whether the training precision reaches a preset precision, or judge whether the training period reaches a preset period.

在训练精度达到预设精度或/和训练周期达到预设周期时,执行步骤S13。When the training precision reaches the preset precision or/and the training period reaches the preset period, step S13 is performed.

步骤S13,预测出截面所有坐标所对应的温度值。In step S13, the temperature values corresponding to all the coordinates of the section are predicted.

在训练精度未达到预设精度且训练周期未达到预设周期时,执行步骤S10。When the training accuracy does not reach the preset accuracy and the training period does not reach the preset period, step S10 is performed.

在得出粮仓温度点的预测值,便可进行下一步,对粮仓的离散温度点进行空间插值,从而得到粮仓测温点周围的温度预估值。After the predicted value of the temperature point of the granary is obtained, the next step is to perform spatial interpolation on the discrete temperature points of the granary, so as to obtain the estimated temperature value around the temperature measurement point of the granary.

步骤S14,根据预测点数据,进行空间插值,获得截面的温度场图。In step S14, according to the predicted point data, spatial interpolation is performed to obtain the temperature field map of the cross-section.

在本实施例中,本实施例将温度场的时空分析用在粮仓的储存上,对粮仓进行空间重建,将每个温度点的数据对应到粮仓的各个位置,以现场的电缆排布为标准,以a、b、c代表粮仓的行列层,将温度数据进行时序上预测,然后再进行空间上的插值估计。空时预测模型的公式为:In this embodiment, the spatiotemporal analysis of the temperature field is used in the storage of the granary, the spatial reconstruction of the granary is performed, and the data of each temperature point is corresponding to each position of the granary, and the cable arrangement on site is used as the standard , the row and column layers of the granary are represented by a, b, and c, the temperature data is predicted in time series, and then the spatial interpolation estimation is carried out. The formula for the space-time prediction model is:

Figure BDA0002379604920000104
Figure BDA0002379604920000104

式中,zt+1(ε)为空间中位置为ε的插值数值,zt+1(ai,bi,ci)为已知位置为(ai,bi,ci)的插值数值,(ai,bi,ci)为粮仓中的行列层,对应粮仓中温度传感器实际的位置;θ[]代表依据真实数据的时序预测过程,与以往的粮仓温度数据相关。In the formula, z t+1 (ε) is the interpolation value at the position of ε in the space, and z t+1 (a i ,b i ,c i ) is the known position of (a i ,b i , ci ) Interpolation value, (a i , b i , c i ) is the row and column layer in the granary, corresponding to the actual position of the temperature sensor in the granary; θ[] represents the time series prediction process based on real data, which is related to the previous granary temperature data.

本模型的最终要展示的温度场,便是选取粮仓的某个截面作为温度展示面,选取当前截面上的点进行空时预测分析,然后进行拟合,得到温度场的二维图。在本实施例中,对于训练好的BP神经网络,输入温度数据进行预测,神经网络输出的预测值

Figure BDA0002379604920000114
代表粮仓的各个温度点预测数据。接下来对平面分布的离散温度点进行插值。在本实施例中,平面中的温度点相当于观测点,周围空白就是未采样点,未采样点的值是邻近观测值的线性加权平均,而权重是由拟合的变异函数决定。因此,空间插值公式为:The final temperature field to be displayed in this model is to select a certain section of the granary as the temperature display surface, select points on the current section to perform space-time prediction analysis, and then perform fitting to obtain a two-dimensional map of the temperature field. In this embodiment, for the trained BP neural network, input temperature data for prediction, and the predicted value output by the neural network
Figure BDA0002379604920000114
Represents the forecast data for each temperature point of the granary. Next, the discrete temperature points of the planar distribution are interpolated. In this embodiment, the temperature point in the plane corresponds to the observation point, the surrounding blank is the unsampled point, the value of the unsampled point is a linear weighted average of adjacent observation values, and the weight is determined by the fitted variogram. Therefore, the spatial interpolation formula is:

Figure BDA0002379604920000111
Figure BDA0002379604920000111

式中,z(ε)为空间中需要预测的点ε处的数值,z(ε)是通过w个观测样本值的线性组合得到的。此处的ε为粮仓空间的任意位置,不局限于上述温度点(a,b,c)。z(ai,bi,ci)为粮仓内实际温度传感器第i个位置处的预测值,w为测量值数,λi为权重系数,满足:

Figure BDA0002379604920000112
λi的取值直接决定了待估计值的精度,由于克里金插值法的依据是无偏最优估计,则λi满足
Figure BDA0002379604920000113
待估计值只与相临近位置的已知值有关,则需满足z(s0)的协方差Cov(si,si)存在,λi的取值需将增量的方差存在且最小,使得估计数据与已知数据相关性最强从而使得方差最小。In the formula, z(ε) is the value at the point ε to be predicted in the space, and z(ε) is obtained by the linear combination of w observed sample values. Here, ε is any position in the granary space, and is not limited to the above-mentioned temperature points (a, b, c). z(a i , b i , c i ) is the predicted value at the ith position of the actual temperature sensor in the granary, w is the number of measured values, and λ i is the weight coefficient, which satisfies:
Figure BDA0002379604920000112
The value of λ i directly determines the accuracy of the value to be estimated. Since the basis of the kriging interpolation method is the unbiased optimal estimation, then λ i satisfies
Figure BDA0002379604920000113
The value to be estimated is only related to the known value of the adjacent position, then the covariance Cov(s i , s i ) of z(s 0 ) needs to exist, and the value of λ i needs to exist and minimize the variance of the increment, The estimated data is most correlated with the known data and the variance is minimized.

综上所述,相较于现有粮仓的粮温预测方案,本实施例的基于大数据与插值预测的粮仓空时温度场预测方法具有以下优点:To sum up, compared with the existing grain temperature prediction scheme for grain silos, the method for predicting the space-time temperature field of grain silos based on big data and interpolation prediction in this embodiment has the following advantages:

该基于大数据与插值预测的粮仓空时温度场预测方法,其通过先读取数据库中的数据,再截取不同时间点数据,然后对温度进行3D空间重建,随后选取截面并预测截面的平面温度,然后判断所述截面中不同位置的温度点是否为外层温度点,并以此选定变量作为样本数据,实现对粮仓数据的预处理过程,再然后将重新排列数据以作为神经训练网络中的训练集和测试集,随后进行神经网络训练以预测出平面温度点,最后对预测出的平面温度点进行插值,从而预测出仓库中真实的温度场预测图,能够准确预测仓内温度场的变化趋势,直观且有效的反映粮仓粮堆内部温度信息,并且做到了模型的普适性和可扩展性,能够应用在各种仓储现场中。The method for predicting the granary space-time temperature field based on big data and interpolation prediction first reads the data in the database, then intercepts the data at different time points, then reconstructs the temperature in 3D space, and then selects the section and predicts the plane temperature of the section. , and then judge whether the temperature points at different positions in the section are the outer temperature points, and use the selected variables as sample data to realize the preprocessing process of the granary data, and then rearrange the data to be used as the neural training network. The training set and test set are then trained by neural network to predict the plane temperature point, and finally the predicted plane temperature point is interpolated to predict the real temperature field prediction map in the warehouse, which can accurately predict the temperature field in the warehouse. The change trend can intuitively and effectively reflect the internal temperature information of the grain stack in the granary, and the model is universal and extensible, and can be applied to various storage sites.

而且,该粮仓空时温度场预测方法采用BP神经网络的方法对平面温度点进行预测,进而为温度场预测图提供有效数据,并且采用克里金插值法进行空间插值拟合出二维温度场,建立一个空时温度场预测模型,能直观清楚的反映粮仓粮堆内部温度信息,为可疑点的扦样准确度提供了理论依据。在传感器数量有限的情况下,该方法在合理布置温度传感器的前提下,能够对粮仓内温度进行空间和时间上的合理分析,使得粮情信息可视化程度大大提高,提高的同时增加可信度,从而保障粮食储存质量。Moreover, the granary space-time temperature field prediction method uses the BP neural network method to predict the plane temperature points, and then provides effective data for the temperature field prediction map, and uses the kriging interpolation method to perform spatial interpolation to fit a two-dimensional temperature field. , to establish a space-time temperature field prediction model, which can intuitively and clearly reflect the internal temperature information of the grain pile in the granary, and provides a theoretical basis for the accuracy of the sampling of suspicious points. In the case of a limited number of sensors, this method can reasonably analyze the temperature in the granary in space and time under the premise of reasonable arrangement of temperature sensors, which greatly improves the visualization of grain information, and increases the reliability at the same time. So as to ensure the quality of food storage.

实施例2Example 2

本实施例提供了一种基于大数据与插值预测的粮仓空时温度场预测方法,其在实施例1的基础上进行仿真实验。在粮情数据库中取某个粮情用户下的一个仓进行温度场预测,数据范围为最近半年的历史数据,共计328条数据。BP神经网络的设定最大训练次数为5000次,学习率为0.05,训练要求精度为1e-3。该仓库的行列层为7行6列4层。This embodiment provides a method for predicting the space-time temperature field of a granary based on big data and interpolation prediction, which performs a simulation experiment on the basis of Embodiment 1. In the grain situation database, a warehouse under a certain grain situation user is used to predict the temperature field. The data range is the historical data of the last half year, with a total of 328 pieces of data. The maximum training times of BP neural network is set to 5000 times, the learning rate is 0.05, and the training accuracy is 1e-3. The row and column layers of the warehouse are 7 rows, 6 columns and 4 layers.

首先,取出该仓库的历史数据进行处理。对于要预测的温度场截面,根据温度点位置,获取相应的变量数据作为BP神经网络的输入序列。如:对于坐标点为(1,1,1)的外层温度点的预测,由于靠近粮仓墙壁或者仓顶,影响因素有外温外湿,内温内湿,以及相邻点(1,1,2)、(1,2,1)的温度数据;对于中心的的温度点,如坐标点(4,3,2)的温度预测,外温外湿的影响很小,内温内湿、前后左右上下的温度点相关度较大,可取内温内湿数据以及相邻点(4,3,3)、(4,3,1)、(4,2,2)、(4,4,2)、(5,3,2)和(3,3,2)温度数据。First, take out the historical data of the warehouse for processing. For the temperature field section to be predicted, according to the position of the temperature point, the corresponding variable data is obtained as the input sequence of the BP neural network. For example, for the prediction of the outer temperature point whose coordinate point is (1,1,1), because it is close to the wall or roof of the granary, the influencing factors are the external temperature and external humidity, the internal temperature and internal humidity, and the adjacent points (1,1 , 2), (1, 2, 1) temperature data; for the central temperature point, such as the temperature prediction of the coordinate point (4, 3, 2), the influence of external temperature and external humidity is small, and the internal temperature and internal humidity, The temperature points of the front, back, left, right, up and down are highly correlated, and the internal temperature and humidity data and adjacent points (4,3,3), (4,3,1), (4,2,2), (4,4, 2), (5,3,2) and (3,3,2) temperature data.

接着采用BP神经网络方法对数据进行分析处理,设定训练周期以及精度,对训练集进行训练,用测试集进行测试,取粮仓中不同位置的点进行作图展示,结果如图2以及图3所示。Then use the BP neural network method to analyze and process the data, set the training period and accuracy, train the training set, use the test set for testing, and plot points at different positions in the granary for display. The results are shown in Figure 2 and Figure 3 shown.

选取相应平面的历史数据经过BP神经网络预测后,得出平面中不同位置的温度点预测值,将其与实际比较。如下表所示,为第一行的截面,即坐标为(1,b,c)的温度点实际值预测值对比表,请参见表1。After the historical data of the corresponding plane is selected and predicted by the BP neural network, the predicted values of temperature points at different positions in the plane are obtained and compared with the actual ones. As shown in the following table, it is the section of the first row, that is, the comparison table of the actual value prediction value of the temperature point whose coordinates are (1,b,c), please refer to Table 1.

表1截面温度值的预测表Table 1 Prediction table of section temperature values

Figure BDA0002379604920000131
Figure BDA0002379604920000131

最后,在得出当前平面的温度预测值后,结合实际的仓库信息,将温度点的空间分布还原到实际场景中,并根据温度点的预测值进行克里金插值拟合,得出该平面的温度场分布。根据本仓库设置,仓库长40米,宽35米。行列之间的间距为5米,最外层电缆距四周墙壁距离取2.5米;层间间距为1.5米,最顶层测温点距顶层间距取0.75米。测温点排布为自上而下排布,截面上的坐标(1,1)对应的就是实际仓库截面图中的(0.75,5.25),以此类推进行画图,如图4以及图5所示。Finally, after the predicted temperature value of the current plane is obtained, combined with the actual warehouse information, the spatial distribution of temperature points is restored to the actual scene, and kriging interpolation is performed according to the predicted value of the temperature point to obtain the plane. temperature field distribution. According to this warehouse setting, the warehouse is 40 meters long and 35 meters wide. The distance between rows and columns is 5 meters, the distance between the outermost cable and the surrounding walls is 2.5 meters; the distance between layers is 1.5 meters, and the distance between the topmost temperature measurement point and the top layer is 0.75 meters. The temperature measurement points are arranged from top to bottom, and the coordinates (1, 1) on the section correspond to (0.75, 5.25) in the actual warehouse section diagram, and so on for drawing, as shown in Figure 4 and Figure 5 Show.

而且,本模型采用均方根误差和平均绝对百分比误差来评估。对于上述的实验数据,将粮仓内测控点的位置对应的预测温度值与真实值进行误差检验,得出:RMSE=0.1387;MAPE=1.75%。结果说明实施例采用的方法得到的温度场预测图效果良好。Furthermore, the model is evaluated using root mean square error and mean absolute percentage error. For the above experimental data, the error test of the predicted temperature value corresponding to the position of the measurement and control point in the granary and the actual value is carried out, and it is obtained: RMSE=0.1387; MAPE=1.75%. The results show that the temperature field prediction map obtained by the method adopted in the embodiment has a good effect.

实施例3Example 3

本实施例提供了一种一种基于大数据与插值预测的粮仓空时温度场预测装置,其应用实施例1的基于大数据与插值预测的粮仓空时温度场预测方法,并且包括数据读取模块、数据截取模块、重建模块、截面选取模块、温度点判断模块、样本数据选择模块一、样本数据选择模块二、样本数据输入模块、初始设定模块、计算模块、修正模块、训练判断模块、预测模块以及温度场获取模块。This embodiment provides a granary space-time temperature field prediction device based on big data and interpolation prediction, which applies the granary space-time temperature field prediction method based on big data and interpolation prediction in Embodiment 1, and includes data reading module, data interception module, reconstruction module, section selection module, temperature point judgment module, sample data selection module 1, sample data selection module 2, sample data input module, initial setting module, calculation module, correction module, training judgment module, Prediction module and temperature field acquisition module.

数据读取模块用于从一个粮仓数据库中读取粮情数据及对应的仓库信息,其可以实现实施例1中的步骤S1。数据截取模块用于根据仓库信息中的仓库状态,截取不同时间点数据,该模块可以实现实施例1中的步骤S2。重建模块用于对温度进行3D空间重建,获得温度点对应的位置信息,该模块可以实现实施例1中的步骤S3。截面选取模块用于选取一个方位的截面,并预测截面的平面温度,该模块可以实现实施例1中的步骤S4。温度点判断模块用于判断截面中不同位置的温度点是否为外层温度点,该模块可以实现实施例1中的步骤S5。样本数据选择模块一用于在实时温度点是外层温度点时,选择包括气象数据、内温内湿以及相邻温度点的变量并作为样本数据,该模块可以实现实施例1中的步骤S6。样本数据选择模块二用于在实时温度点不是外层温度点时,选择包括邻近温度点、内温内湿以及水分的变量作为样本数据,该模块可以实现实施例1中的步骤S7。样本数据输入模块用于将样本数据输入为输入层的输入序列,并选择隐含层节点数,该模块可以实现实施例1中的步骤S8。初始设定模块用于初始化权值、阈值,设定训练周期及精度,该模块可以实现实施例1中的步骤S9。计算模块用于计算网络层的实际输出,该模块可以实现实施例1中的步骤S10。修正模块用于计算误差,并修正权值、阈值,该模块可以实现实施例1中的步骤S11。训练判断模块用于进行BP神经网络训练,并判断训练精度是否达到一个预设精度,或判断训练周期是否达到一个预设周期,该模块可以实现实施例1中的步骤S12。在训练精度未达到预设精度且训练周期未达到预设周期时,训练判断模块驱使计算模块进行计算。预测模块用于在训练精度达到预设精度或/和训练周期达到预设周期时,预测出截面所有坐标所对应的温度值,该模块可以实现实施例1中的步骤S13。温度场获取模块用于根据预测点数据,进行空间插值,获得截面的温度场图,该模块可以实现实施例1中的步骤S14。The data reading module is used for reading grain condition data and corresponding warehouse information from a grain warehouse database, which can implement step S1 in the first embodiment. The data interception module is used to intercept data at different time points according to the warehouse state in the warehouse information, and the module can implement step S2 in the first embodiment. The reconstruction module is used to reconstruct the temperature in 3D space and obtain the position information corresponding to the temperature point, and the module can implement step S3 in the first embodiment. The section selection module is used to select a section in an azimuth and predict the plane temperature of the section, and the module can implement step S4 in Embodiment 1. The temperature point judging module is used for judging whether the temperature points at different positions in the cross section are the outer layer temperature points, and the module can implement step S5 in the first embodiment. The sample data selection module 1 is used to select variables including meteorological data, internal temperature and humidity, and adjacent temperature points as sample data when the real-time temperature point is the outer layer temperature point, and this module can implement Step S6 in Embodiment 1 . The second sample data selection module is used to select variables including adjacent temperature points, internal temperature and internal humidity, and moisture as sample data when the real-time temperature point is not the outer temperature point. This module can implement step S7 in Embodiment 1. The sample data input module is used to input the sample data as the input sequence of the input layer, and select the number of nodes in the hidden layer. This module can implement step S8 in the first embodiment. The initial setting module is used for initializing weights, thresholds, and setting training periods and precisions, and this module can implement step S9 in Embodiment 1. The calculation module is used to calculate the actual output of the network layer, and the module can implement step S10 in Embodiment 1. The correction module is used to calculate the error and correct the weight and threshold, and the module can implement step S11 in the first embodiment. The training judging module is used for BP neural network training and judging whether the training accuracy reaches a preset accuracy, or whether the training period reaches a preset period, and the module can implement step S12 in Embodiment 1. When the training accuracy does not reach the preset accuracy and the training period does not reach the preset period, the training judgment module drives the calculation module to perform calculation. The prediction module is used to predict the temperature values corresponding to all the coordinates of the section when the training accuracy reaches the preset accuracy or/and the training period reaches the preset period, and the module can implement step S13 in Embodiment 1. The temperature field acquisition module is used to perform spatial interpolation according to the predicted point data to obtain the temperature field map of the cross-section, and the module can implement step S14 in the first embodiment.

本实施例的基于大数据与插值预测的粮仓空时温度场预测装置的优点与上述粮仓空时温度场预测方法的有益效果相同,在此不再做赘述。The advantages of the granary space-time temperature field prediction device based on big data and interpolation prediction in this embodiment are the same as the beneficial effects of the above-mentioned granary space-time temperature field prediction method, which will not be repeated here.

实施例4Example 4

本实施例提供了一种计算机终端,其包括存储器、处理器以及存储在存储器上并可在处理器上运行的计算机程序。处理器执行程序时实现实施例1基于大数据与插值预测的粮仓空时温度场预测方法的步骤。This embodiment provides a computer terminal, which includes a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the program, the steps of the method for predicting the granary space-time temperature field based on big data and interpolation prediction in Embodiment 1 are implemented.

实施例1粮仓空时温度场预测方法在应用时,可以软件的形式进行应用,如设计成独立运行的程序,安装在计算机终端上,计算机终端可以是电脑、智能手机、控制系统以及其他物联网设备等。实施例1的粮仓空时温度场预测方法也可以设计成嵌入式运行的程序,安装在计算机终端上,如安装在单片机上。Example 1 When the method for predicting the air-time temperature field of a granary is applied, it can be applied in the form of software, such as a program designed to run independently, and installed on a computer terminal. The computer terminal can be a computer, a smart phone, a control system, and other Internet of Things. equipment, etc. The method for predicting the space-time temperature field of a granary in Embodiment 1 can also be designed as an embedded running program, which is installed on a computer terminal, such as a single-chip microcomputer.

实施例5Example 5

本实施例提供了一种计算机可读存储介质,其上存储有计算机程序。程序被处理器执行时,实现实施例1的基于大数据与插值预测的粮仓空时温度场预测方法的步骤。This embodiment provides a computer-readable storage medium on which a computer program is stored. When the program is executed by the processor, the steps of the method for predicting the space-time temperature field of a granary based on big data and interpolation prediction in Embodiment 1 are implemented.

实施例1的粮仓空时温度场预测方法在应用时,可以软件的形式进行应用,如设计成计算机可读存储介质可独立运行的程序,计算机可读存储介质可以是U盘,设计成U盾,通过U盘设计成通过外在触发启动整个方法的程序。When the method for predicting the air-time temperature field of a granary in Embodiment 1 is applied, it can be applied in the form of software, such as a program designed to be run independently by a computer-readable storage medium. , is designed to initiate the entire method program through the external trigger through the U disk.

以上所述仅为本发明的较佳实施例而已,并不用以限制本发明,凡在本发明的精神和原则之内所作的任何修改、等同替换和改进等,均应包含在本发明的保护范围之内。The above descriptions are only preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent replacements and improvements made within the spirit and principles of the present invention shall be included in the protection of the present invention. within the range.

Claims (10)

1. A granary space-time temperature field prediction method based on big data and interpolation prediction is characterized by comprising the following steps:
step S1, reading grain situation data and corresponding warehouse information from a granary database;
step S2, intercepting different time point data according to the warehouse state in the warehouse information;
step S3, performing 3D space reconstruction on the temperature to obtain position information corresponding to the temperature point;
step S4, selecting a section to be predicted, and firstly performing time sequence prediction of the section temperature;
step S5, judging whether the temperature points of different positions of the cross section are outer layer temperature points or not;
when the temperature point of the location is the outer layer temperature point, performing step S6;
step S6, selecting variables including meteorological data, internal temperature and humidity and adjacent temperature points as sample data;
when the temperature point of the location is not the outer layer temperature point, performing step S7;
step S7, selecting variables including adjacent temperature points, internal temperature and humidity and moisture as sample data;
step S8, inputting the sample data into an input sequence of an input layer, and selecting the number of nodes of a hidden layer;
step S9, initializing weight and threshold, and setting training period and precision;
step S10, calculating the actual output of the network layer;
step S11, calculating an error, and correcting the weight and the threshold;
step S12, carrying out BP neural network training, and judging whether the training precision reaches a preset precision or whether the training period reaches a preset period;
when the training precision reaches the preset precision or/and the training period reaches the preset period, executing step S13;
step S13, predicting temperature values corresponding to all coordinates of the section in step S13;
when the training precision does not reach the preset precision and the training period does not reach the preset period, executing step S10;
and step S14, performing spatial interpolation according to the predicted point data to obtain the temperature field diagram of the cross section.
2. The method of predicting a spatio-temporal temperature field of a granary based on big data and interpolation prediction according to claim 1, wherein the formula of the spatio-temporal prediction model is:
Figure FDA0002379604910000021
in the formula, zt+1(epsilon) is an interpolation value with a spatial position of epsilon; z is a radical oft+1(ai,bi,ci) Is a known position of (a)i,bi,ci) The interpolated value of (d); (a)i,bi,ci) The grain bin is a line-row layer in the grain bin and corresponds to the actual position of the temperature sensor in the grain bin; theta 2]Representing a time-sequential prediction process from real data.
3. The method for predicting the spatiotemporal temperature field of the granary based on the big data and the interpolation prediction as claimed in claim 1, wherein before the training of the BP neural network, the data preprocessing is further performed on the temperature data: respectively corresponding different temperature points to each position of the granary, and carrying out data arrangement by taking field cable arrangement as a basis; the data sequence formula of the space temperature point is as follows:
X(a,b,c)=[x1(a,b,c),x2(a,b,c),…,xt(a,b,c)]
wherein X (a, b, c) is a data sequence of temperature points of a layer in a row a, a column b and a column c in the granary, and Xt(a, b, c) is the temperature point data of the layer c in the row a, column b and column a in the granary, and t is the number of the sampling dataNumbers, also represent time series.
4. The method according to claim 1, wherein l is the number of layers of the hidden layer of the BP neural network, n is the number of layers of the input layer of the BP neural network, and m is the number of layers of the output layer of the BP neural network. The method is characterized in that the output formula of the hidden layer of the BP neural network is as follows:
Figure FDA0002379604910000022
in the formula, xiThe input value of the input layer of the BP neural network is x at different positionst(a,b,c);ωijα as the weight of the input layer to the hidden layerjA bias for the input layer to the hidden layer; g (x) is an excitation function and satisfies:
Figure FDA0002379604910000023
5. the method of predicting the spatiotemporal temperature field of the granary based on big data and interpolation prediction according to claim 4, wherein the output formula of the output layer of the BP neural network is as follows:
Figure FDA0002379604910000031
in the formula, satisfy:
Figure FDA0002379604910000032
ξ is a constant number from 1 to 10jkWeight of the hidden layer to the output layer, βkIs the biasing of the hidden layer to the output layer.
6. The method of predicting the spatiotemporal temperature field of a granary based on big data and interpolation prediction according to claim 5, wherein in step S12, the error calculation formula is:
Figure FDA0002379604910000033
in the formula, ykIs the desired output.
7. The method of claim 6, wherein the formula for modifying the weights from the hidden layer to the output layer is as follows:
Figure FDA0002379604910000034
the modification formula of the weight from the input layer to the hidden layer is as follows:
Figure FDA0002379604910000035
in the formula, ek=yk-okAnd η is the learning rate.
8. The method of claim 6, wherein the offset from the hidden layer to the output layer is modified by the formula:
Figure FDA0002379604910000036
the modification formula of the bias from the input layer to the hidden layer is as follows:
Figure FDA0002379604910000037
in the formula, ek=yk-okAnd η is the learning rate.
9. The method of claim 1, wherein the spatial interpolation formula is as follows:
Figure FDA0002379604910000041
wherein z (epsilon) is a numerical value at a point epsilon to be predicted in space, and z (a)i,bi,ci) The predicted value of the ith position of the actual temperature sensor in the granary is shown, w is the number of measured values, and lambda isiAs a weight coefficient, satisfy:
Figure FDA0002379604910000042
10. a prediction device of a granary space-time temperature field based on big data and interpolation prediction, which is applied to the prediction method of the granary space-time temperature field based on big data and interpolation prediction according to any one of claims 1-9, and is characterized by comprising:
the data reading module is used for reading the grain condition data and corresponding warehouse information from a granary database;
the data interception module is used for intercepting different time point data according to the warehouse state in the warehouse information;
the reconstruction module is used for performing 3D space reconstruction on the temperature to obtain position information corresponding to the temperature point;
the section selection module is used for selecting a section in one direction and predicting the time sequence of the temperature of the section;
the temperature point judging module is used for judging whether the temperature points at different positions in the section are outer layer temperature points or not;
the first sample data selection module is used for selecting variables comprising meteorological data, internal temperature and internal humidity and adjacent temperature points as sample data when the real-time temperature point is the outer-layer temperature point;
the second sample data selection module is used for selecting variables including adjacent temperature points, internal temperature humidity and moisture as sample data when the real-time temperature point is not the outer-layer temperature point;
the sample data input module is used for inputting the sample data into an input sequence of an input layer and selecting the number of nodes of a hidden layer;
the initial setting module is used for initializing the weight and the threshold value and setting the training period and the precision;
a calculation module for calculating an actual output of the network layer;
the correcting module is used for calculating errors and correcting the weight and the threshold;
the training judgment module is used for carrying out BP neural network training and judging whether the training precision reaches a preset precision or not or judging whether the training period reaches a preset period or not; when the training precision does not reach the preset precision and the training period does not reach the preset period, the training judgment module drives the calculation module to calculate;
the prediction module is used for predicting temperature values corresponding to all coordinates of the cross section when the training precision reaches the preset precision or/and the training period reaches the preset period; and
and the temperature field acquisition module is used for carrying out spatial interpolation according to the predicted point data to obtain a temperature field diagram of the section.
CN202010079018.0A 2020-02-03 2020-02-03 Granary space-time temperature field prediction method and device based on big data and interpolation prediction Active CN111310317B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010079018.0A CN111310317B (en) 2020-02-03 2020-02-03 Granary space-time temperature field prediction method and device based on big data and interpolation prediction

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010079018.0A CN111310317B (en) 2020-02-03 2020-02-03 Granary space-time temperature field prediction method and device based on big data and interpolation prediction

Publications (2)

Publication Number Publication Date
CN111310317A true CN111310317A (en) 2020-06-19
CN111310317B CN111310317B (en) 2023-02-14

Family

ID=71147013

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010079018.0A Active CN111310317B (en) 2020-02-03 2020-02-03 Granary space-time temperature field prediction method and device based on big data and interpolation prediction

Country Status (1)

Country Link
CN (1) CN111310317B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112577671A (en) * 2020-11-27 2021-03-30 武汉工程大学 Well lid monitoring method and system by using Kriging method
CN113092178A (en) * 2021-06-09 2021-07-09 亿海蓝(北京)数据技术股份公司 Control method and control system of sampling machine and readable storage medium
CN114998823A (en) * 2022-04-28 2022-09-02 河南科技大学 Historical grain storage state judgment method based on temperature field cloud picture
CN115112264A (en) * 2022-06-24 2022-09-27 国家粮食和物资储备局科学研究院 A single-point temperature prediction method based on improved GRU grain pile
CN116227247A (en) * 2023-05-09 2023-06-06 交通运输部水运科学研究所 A big data-based simulation method and system for the collapse of grain silos
CN117634673A (en) * 2023-11-15 2024-03-01 浪潮数字粮储科技有限公司 A method, equipment and medium for predicting pests in granaries based on the Transformer model
CN119374757A (en) * 2024-12-27 2025-01-28 之江实验室 A device for measuring temperature field inside and outside a tank and a method for building a database

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015172560A1 (en) * 2014-05-16 2015-11-19 华南理工大学 Central air conditioner cooling load prediction method based on bp neural network
CN106227038A (en) * 2016-07-29 2016-12-14 中国人民解放军信息工程大学 Grain drying tower intelligent control method based on neutral net and fuzzy control
CN109639762A (en) * 2018-11-07 2019-04-16 重庆光电信息研究院有限公司 City Internet of Things information grading processing system and method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015172560A1 (en) * 2014-05-16 2015-11-19 华南理工大学 Central air conditioner cooling load prediction method based on bp neural network
CN106227038A (en) * 2016-07-29 2016-12-14 中国人民解放军信息工程大学 Grain drying tower intelligent control method based on neutral net and fuzzy control
CN109639762A (en) * 2018-11-07 2019-04-16 重庆光电信息研究院有限公司 City Internet of Things information grading processing system and method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
高松等: "基于BP神经网络方法的高大平房仓温度场预测研究", 《粮油食品科技》 *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112577671A (en) * 2020-11-27 2021-03-30 武汉工程大学 Well lid monitoring method and system by using Kriging method
CN113092178A (en) * 2021-06-09 2021-07-09 亿海蓝(北京)数据技术股份公司 Control method and control system of sampling machine and readable storage medium
CN114998823A (en) * 2022-04-28 2022-09-02 河南科技大学 Historical grain storage state judgment method based on temperature field cloud picture
CN115112264A (en) * 2022-06-24 2022-09-27 国家粮食和物资储备局科学研究院 A single-point temperature prediction method based on improved GRU grain pile
CN116227247A (en) * 2023-05-09 2023-06-06 交通运输部水运科学研究所 A big data-based simulation method and system for the collapse of grain silos
CN117634673A (en) * 2023-11-15 2024-03-01 浪潮数字粮储科技有限公司 A method, equipment and medium for predicting pests in granaries based on the Transformer model
CN119374757A (en) * 2024-12-27 2025-01-28 之江实验室 A device for measuring temperature field inside and outside a tank and a method for building a database

Also Published As

Publication number Publication date
CN111310317B (en) 2023-02-14

Similar Documents

Publication Publication Date Title
CN111310317B (en) Granary space-time temperature field prediction method and device based on big data and interpolation prediction
Matsumura et al. Maize yield forecasting by linear regression and artificial neural networks in Jilin, China
CN117893362B (en) A multi-temporal and spatial scale offshore wind power feature screening and enhanced power prediction method
CN116187203A (en) Water quality prediction method, system, electronic equipment and storage medium of a river basin
CN116861347B (en) A method for calculating magnetic anomaly data based on deep learning model
CN113901384A (en) A ground-level PM2.5 concentration modeling method considering global spatial autocorrelation and local heterogeneity
CN110533173A (en) A kind of storage grain heap temperature predicting method and device based on multistage attention network
CN116611588B (en) Precipitation multi-driving factor segmented calibrated optimization forecast method and system
CN111754045A (en) Prediction system based on fruit tree growth
CN116128141A (en) Storm surge prediction method and device, storage medium and electronic equipment
CN119474739B (en) A hybrid deep learning model construction and output interpretation method for spaceborne GNSS-R sea surface significant wave height inversion
CN113569324A (en) Anomaly data analysis and optimization method for slope deformation monitoring
CN119294104A (en) A method, medium and program product for estimating and predicting the dynamic exchange coefficient of the air-sea interface based on AI and multi-source fusion data
CN117906376A (en) Method and system for monitoring carbon emission of rotary kiln
CN113283161A (en) Landslide deformation displacement prediction method for improving BP neural network
CN116383589A (en) Spatial interpolation prediction method for soil nutrients
WO2006120724A1 (en) Geographic information system using neural networks
CN118070951B (en) Large-area adaptive crop yield prediction method and system based on attention mechanism
CN118155082A (en) Double-branch change detection method based on hyperspectral space and spectral information
Tang et al. Stochastic Ground‐Motion Simulation of the 2021 M w 5.9 Woods Point Earthquake: Facilitating Local Probabilistic Seismic Hazard Analysis in Australia
CN113313330B (en) Electromagnetic environment parameter interval prediction method, device and computer equipment
Li et al. IoT Empowered Early Warning of Transmission Line Galloping Based on Integrated Optical Fiber Sensing and Weather Forecast Time Series Data.
CN119335166B (en) Soil monitoring method, device and system for fruit tree seedling cultivation
CN119358776B (en) Multi-station photovoltaic power generation power prediction method and system based on graph attention network
CN117851736B (en) A meteorological element interpolation method based on fuzzy adaptive optimization fusion

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
GR01 Patent grant
GR01 Patent grant