一种基于时间序列Transformer的海水表层温度预测方法

文档序号:34735029发布日期:2023-07-12 18:40阅读:265来源:国知局
一种基于时间序列Transformer的海水表层温度预测方法

本发明涉及海水表层温度领域,尤其涉及一种基于时间序列transformer的海水表层温度预测方法。


背景技术:

1、海水表层温度(以下简称“海表温度”)是全球海洋-大气系统中最重要的参数之一,在海洋和大气之间的能量、动力和水分交换中起关键作用。准确预测海表温度可以帮助提取海洋表面流场、锋面位置和强度,还可以有助于检测海洋生态系统和评估系统的变异性。同时,对理解全球或局地气候变化、计划各种海上活动、提前识别潜在的极端天气等科学研究和应用至关重要[1-8]。

2、当前,海表温度预测方法主要有数值模型方法、数据驱动方法和混合模型方法三类。

3、(1)数值模型方法

4、基于复杂的物理过程,数值模型方法获取大空间的平均信息建立数学模型,从大气-海洋的热传递过程描述海表温度变化。主要技术有:马尔科夫模型[9,10]、规范相关分析[11]、统计预测模型[12]、季节性预报技术[13]等。由于对海表温度发生发展的机理尚不能给出清晰的物理解释,故这类模型的构建一般并不准确,且相对复杂,计算成本高,比较适合用于大范围海表温度预测。

5、(2)数据驱动方法

6、绕过复杂的数理形成、演化机制,数据驱动方法从数据本身特性及内部规律出发,预测海表温度。主要方法有:支持向量机[14]、遗传算法[15]、多级向量自回归模型[16]和神经网络[17-26]。这类方法通过对大量已知样本进行训练,让计算机从数据中自行学习规则,进行新样本的预测。

7、(3)混合模型方法

8、目前,混合模型方法主要是结合数值模型方法和人工神经网络,先计算数值模型估计和海表温度观测间的误差,然后利用小波神经网络进行海表温度误差的时间序列预测,最后将误差的预测值更新到数值模型估计值得到最终的海表温度预测结果[27]。由于使用了两种或两种以上的模型,这种方法最为复杂,计算资源耗费最多,耗时最久。

9、参考文献

10、[1]frank j.wentz,chelle gentemann,deborah smith,and dudley chelton,2000.satellite measurements of sea surface temperature throughclouds.science,288(5467),847-850.

11、[2]timothy d.herbert,laura cleaveland peterson,kira t.lawrence,andzhonghui liu,2010.tropical ocean temperatures over the past 3.5millionyears.science,328(5985),1530-1534.

12、[3]sara a.rauscher,xiaoyan jiang,allison steiner,a.park williams,d.michael cai,and nathan g.mcdowell,2015.sea surface temperature warmingpatterns and future vegetation change.journal of climate,28(20),7943-7961.

13、[4]sandra l.castro,gary a.wick,and michael steele,2016.validation ofsatellite sea surface temperature analyses in the beaufort sea using uptempobuoys.remote sensing of environment,187,458-475.

14、[5]marouan bouali,olga t.sato,and paulo s.polito,2017.temporal trendsin sea surface temperature gradients in the south atlantic ocean.remotesensing of environment,194,100-114.[6]nicolas c.jourdain,alexander sen gupta,andréa s.taschetto,caroline c.ummenhofer,aurel f.moise,and karumuri ashok,2013.the indo-australian monsoon and its relationship to enso and iod inreanalysis data and the cmip3/cmip5 simulations.climate dynamics,41,3073-3102.

15、[7]eun-pa lim,harry h.hendon,mei zhao,and yonghong yin,2017.inter-decadal variations in the linkages between enso,the iod and south-easternaustralian springtime rainfall in the past 30years.climate dynamics,49,97-112.

16、[8]shangping xie,kaiming hu,jan hafner,hiroki tokinaga,yan du,ganghuang,and takeaki sampe,2009.indian ocean capacitor effect on indo–westernpacific climate during the summer following eljournal of climate,22(3),730-747.

17、[9]yan xue and ants leetmaa,2000.forecasts of tropical pacific sstand sea level using amarkov model.geophysical research letters,27(17),2701-2704.

18、[10]scot d.johnson,david s.battisti,and e.s.sarachik,2000.empiricallyderived markov models and prediction of tropical pacific sea surfacetemperature anomalies.journal of climate,13,3-17.

19、[11]d.c.collins,c.j.c.reason,and f.tangang,2004.predictability ofindian ocean sea surface temperature using canonical correlationanalysis.climate dynamics,22,481-497.

20、[12]jong-seong kug,in-sik kang,june-yi lee,and jong-ghap jhun,2004.astatistical approach to indian ocean sea surface temperature prediction usinga dynamical enso prediction.geophysical research letters,31(9),l09212.

21、[13]t.n.krishnamurti,arindam chakraborty,ruby krishnamurti,williamk.dewar,and carol anne clayson,2006.seasonal prediction of sea surfacetemperature anomalies using a suite of13coupled atmosphere–oceanmodels.journal of climate,19,6069-6088.

22、[14]isis didier lins,moacyr araujo,márcio das chagas moura,marcusandrésilva,and enrique lópez droguett,2013.prediction of sea surfacetemperature in the tropical atlantic by support vector machines.computationalstatistics and data analysis,61,187-198.

23、[15]neetu,rashmi sharma,s2016.multilevel vector autoregressiveprediction of sea surface temperature in the north tropical atlantic oceanand the caribbean sea.climate dynamics,47,95-106.

24、[17]张韧,2000.非线性bp网络映射与赤道太平洋海温预测.海洋通报,19(4),1-7.

25、[18]aiming wu,william w.hsieh,and benyang tang,2006.neural networkforecasts of the tropical pacific sea surface temperatures.neural networks,19,145-154.

26、[19]elisa garcia-gorriz and joan garcia-sanchez,2007.prediction ofsea surface temperatures in the western mediterranean sea by neural networksusing satellite ujit basu,abhijit sarkar,and p.k.pal,2011.data-adaptiveprediction of sea-surface temperature in the arabian sea.ieee geoscience andremote sensing letters,8(1),9-13.

27、[16]dong eun lee,david chapman,naomi henderson,chen chen,and marka.cane,

28、observations.geophysical research letters,34(11),l11603.

29、[20]kalpesh patil and makaranad chintamani deo,2017.prediction ofdaily sea surface temperature using efficient neural networks.ocean dynamics,67,357-368.

30、[21]qin zhang,hui wang,junyu dong,guoqiang zhong,and xin sun,2017.prediction of sea surface temperature using long short-term memory.ieeegeoscience and remote sensing letters,14(10),1745-1749.

31、[22]yuting yang,junyu dong,xin sun,estanislau lima,quanquan mu,andxinhua wang,2018.a cfcc-lstm model for sea surface.ieee geoscience and remotesensing letters,15(2),207-211.

32、[23]kalpesh patil and m.c.deo,2018.basin-scale prediction of seasurface temperature with artificial neural networks.journal of atmosphericand oceanic technology,35(7),1441-1455.

33、[24]kun zhang,xupu geng,and xiao-hai yan,2020.prediction of 3-d oceantemperature by multilayer convolutional lstm.ieee geoscience and remotesensing letters,17(8),1303-1307.[25]s.g.aparna,selrina d’souza and n.b.arjun,2018.prediction of daily sea surface temperature using artificial neuralnetworks.international journal of remote sensing,39(12),4214-4231.

34、[26]li wei,lei guan,and liqin qu,2020.prediction of sea surfacetemperature in the south china sea by artificial neural networks.ieeegeoscience and remote sensing letters,17(4),558-562.

35、[27]kalpesh patil,m.c.deo,and m.ravichandran,2016.prediction of seasurface temperature by combining numerical and neural techniques.journal ofatmospheric and oceanic technology,33(8),1715-1726.


技术实现思路

1、本发明的目的在于解决现有技术中的上述问题,提供一种基于时间序列transformer的海水表层温度预测方法,受益于自注意力机制,经典transformer在建模序列数据的长期依赖关系方面获得了巨大优势,但由于经典模型transformer主要为自然语言序列处理而开发,可能不完全适用于海表温度等时间序列数据预测,本发明将时序嵌入经典transformer模型,用于海表温度预测,有效提高海表温度的长期预测精度。

2、为达到上述目的,本发明采用如下技术方案:

3、一种基于时间序列transformer的海水表层温度预测方法,包括以下步骤:

4、步骤1、选取海表温度历史数据作为训练验证数据集,作高斯归一化处理,并按照时间先后顺序,以7:1的数据量比例划分训练集和验证集;

5、步骤2、对时间序列transformer编码器输入、解码器输入、输出标签进行设置;

6、步骤3、对时间序列transformer编码器输入进行时序嵌入操作;

7、步骤4、经过嵌入的编码器输入经过第一个编码器层中的多头注意力层、前馈神经网络层、以及残差连接和层归一化操作,得到第一个编码器层输出;如果编码器有n个编码器层其中,n>1且是整数,第n-1个编码器层输出作为第n个编码器层输入进行级联堆叠得到编码器输出;

8、步骤5、对时间序列transformer解码器输入进行时序嵌入操作;

9、步骤6、经过嵌入的解码器输入经过第一个解码器层中的遮挡多头注意力层、残差连接和层归一化操作,得到的结果和编码器的输出一并通过第一个解码器层中的多头注意力层、前馈神经网络层、以及残差连接和层归一化操作,得到第一个解码器层输出;如果解码器有m个解码器层,其中,m>1且是整数,第m-1个解码器层输出经过第m个解码器层中的遮挡多头注意力层、残差连接和层归一化操作,得到的结果和编码器输出一并通过第m个解码器层中的多头注意力层、前馈神经网络层、以及残差连接和层归一化操作,最终得到解码器输出;

10、步骤7、解码器的输出经过一个线性的全连接层得到时间序列transformer网络输出,然后和海表温度观测进行比较,得到误差后向传播,微调网络权重和偏置;

11、步骤8、训练验证结束后,时间序列transformer网络输出经过尺度逆变换,得到最终预测值。

12、步骤1中,高斯归一化处理后的训练验证数据集符合标准正态分布,高斯归一化处理的公式为:

13、

14、其中,y和y*分别表示高斯归一化前后海表温度数据,ymean表示高斯归一化前海表温度数据平均值,ystd表示高斯归一化前海表温度数据标准差。

15、步骤2中,根据时间先后顺序,先将观测长度为seq_len的训练验证数据作为时间序列transformer编码器输入,再将时间序列transformer编码器输入中,从后往前数长度为label_len的训练验证数据和预测长度pred_len个0进行连接作为时间序列transformer解码器输入,最后将观测长度seq_len之后的观测长度pred_len的训练验证数据作为输出标签。

16、步骤3和步骤5中,对时间序列transformer编码器输入和解码器输入的嵌入操作主要包括:

17、(4)对编码器输入和解码器输入分别使用固定位置嵌入来保留局部上下文信息,具体为:

18、

19、

20、其中,pos表示位置,i表示维度,dmodel表示嵌入向量维度;

21、(5)对编码器输入和解码器输入分别进行标量投影,具体为:使用一维卷积,参数:卷积核大小为3,步幅为1,填充值为1,模式为循环填充,对输入进行标量投影;

22、(6)对编码器输入和解码器输入对应的时间戳信息分别进行时序嵌入以访问全局上下文信息,具体为:根据时间戳间隔类型(月、日、小时、分钟和秒),进行嵌入编码到区间[-1,1],编码公式如下:

23、2×(index_month-1)/11.0-1  (1)

24、2×index_dayofweek/6.0-1  (2)

25、2×(index_day-1)/30.0-1  (3)

26、2×(index_dayofyear-1)/365.0-1  (4)

27、2×index_hour/23.0-1  (5)

28、2×index_minute/59.0-1  (6)

29、2×index_second/59.0-1  (7)

30、5)当时间戳间隔是“月”时,使用编码公式(1),将时间戳编码到一个向量;

31、6)当时间戳间隔是“日”时,使用编码公式(2)、(3)和(4),将时间戳编码到三个向量;

32、7)当时间戳间隔是“小时”时,使用编码公式(2)、(3)、(4)和(5),将时间戳编码到四个向量;

33、8)当时间戳间隔是“分钟”时,使用编码公式(2)、(3)、(4)、(5)和(6),将时间戳编码到五个向量;

34、当时间戳间隔是“秒”时,使用编码公式(2)、(3)、(4)、(5)、(6)和(7),将时间戳编码到六个向量。

35、步骤4、6和7中,网络训练验证过程中,使用“adam”优化器,均方差mean squareerror(mse)作为损失函数,初始学习率lr=0.0001,并根据以下公式来调整学习率:

36、lr_adjust=lr×(0.5(epoch-1))

37、其中,epoch是所有训练样本的训练轮次;

38、此外,还使用提前停止策略,具体是:当验证数据集的损失mse在若干轮次(epoch)内一直不下降,则停止训练。

39、步骤8中,尺度逆变换公式如下:

40、y=y*×ystd+ymean

41、其中,y*和y分别表示逆变换前后海表温度数据,ymean表示逆变换前海表温度数据平均值,ystd表示逆变换前海表温度数据标准差。

42、本发明将时序嵌入经典transformer模型,引入海表温度预测,首先对海表温度历史数据进行高斯归一化处理,划分训练集和验证集,然后对编码器输入,解码器输入和输出标签进行设置,接着分别对编码器输入和解码器输入进行时序嵌入操作,并进行编码器层的多头注意力层、前馈神经网络层、以及残差连接和层归一化操作,以及解码器层的遮挡多头注意力层、多头注意力层、前馈神经网络层、以及残差连接和层归一化操作,然后解码器输出经过一个线性全连接层得到网络输出,和海表温度观测(标签)进行比较,得到误差后向传播,微调网络,最后网络输出经过尺度逆变换,得到最终预测值。

43、相对于现有技术,本发明技术方案取得的有益效果是:

44、考虑到海表温度是时间序列数据,在经典transformer模型基础上对输入嵌入局部和全局时序操作,捕捉数据间长期依存关系,提升海表温度的长期预测精度。

当前第1页1 2 
网友询问留言 已有0条留言
  • 还没有人留言评论。精彩留言会获得点赞!
1