Greenhouse soil temperature prediction method based on DI-LSTM and electronic equipment

By adding parallel branches to the update gate part of the LSTM model, forming a DI-LSTM module, and embeding multiple parallel interleaved branches in the network, the problem of lack of feature extraction limitations and insufficient balance of update gates in traditional LSTM models when predicting greenhouse soil temperature is solved, and higher prediction accuracy and robustness are achieved.

CN119862416APending Publication Date: 2025-04-22SHANGHAI MARITIME UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411759388.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-03
Publication Date
2025-04-22

AI Technical Summary

Technical Problem

When predicting greenhouse soil temperature, the traditional LSTM model has limitations in feature extraction, simple network structure leads to underfitting problems, and insufficient balance of the update gate during information update, resulting in a decrease in prediction accuracy.

Method used

A greenhouse soil temperature prediction method based on DI-LSTM is proposed. By adding parallel branches to the update gate part of LSTM, a DI-LSTM module with a double-branch update gate is formed, and multiple parallel interlaced branches are embedded in the network to improve the balance of information update and prediction accuracy.

Benefits of technology

It improves the accuracy and robustness of greenhouse soil temperature prediction, can better adapt to complex and changeable greenhouse environment, reduces the impact of misinformation on the prediction results, and enhances the robustness of the prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119862416A_ABST
    Figure CN119862416A_ABST
Patent Text Reader

Abstract

The invention relates to a DI-LSTM-based greenhouse soil temperature prediction method and electronic equipment, and the method comprises the following steps: constructing and training a time sequence temperature prediction network which comprises a plurality of DI-LSTM modules and is embedded with a plurality of parallel staggered branches, and the DI-LSTM modules are embedded with multiple parallel staggered branches on the basis of LSTM. A parallel branch is added to the updating gate part; and inputting a to-be-predicted greenhouse environment data set into the trained time sequence temperature prediction network, and outputting a real-time prediction result of the greenhouse soil temperature. Compared with the prior art, the method has the advantages of being more accurate in prediction result, higher in robustness and the like.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of greenhouse soil temperature prediction, and in particular to a greenhouse soil temperature prediction method and electronic equipment based on DI-LSTM. Background Art

[0002] With the rapid development of facility agriculture in my country, greenhouses have become an important part of agricultural production. As one of the key factors affecting crop growth, accurate prediction of greenhouse soil temperature is of great significance for the rational arrangement of agricultural production and the improvement of crop yield and quality.

[0003] In recent years, greenhouse soil temperature prediction methods have become increasingly diversified and intelligent. Although traditional prediction methods based on empirical formulas and statistical models can meet basic needs to a certain extent, their prediction accuracy and applicability are often limited when faced with complex and changeable climate conditions and soil environments.

[0004] Traditional prediction methods based on physical models mainly rely on accurate measurements of environmental factors inside greenhouses and complex physical process modeling. Although this method can predict soil temperature to a certain extent, the calculation process is cumbersome and highly dependent on parameters, making it difficult to promote and apply in actual production. In recent years, with the continuous development of machine learning technology, data-driven prediction methods have gradually become a research hotspot. Recurrent neural networks (RNNs) have been applied to a variety of sequence prediction problems and have achieved incredible success. However, when processing long sequence data, RNNs have difficulty capturing long-distance temporal dependencies.

[0005] As a special type of recurrent neural network (RNN), the long short-term memory network (LSTM) has significant advantages in processing time series data and has achieved good prediction results in many fields. However, the traditional LSTM model still has the following shortcomings in predicting greenhouse soil temperature: 1. Greenhouse soil temperature is affected by many factors, such as soil properties, meteorological conditions, irrigation system, etc. The traditional LSTM may have certain limitations in feature extraction and it is difficult to fully capture the interaction between these complex factors; the network structure is relatively simple, and for problems with many influencing factors, such as greenhouse soil temperature prediction, the probability of underfitting may increase; in the process of updating knowledge, the update gate of the traditional LSTM will affect the balance of information update and reduce the accuracy of model prediction if the update gate is opened too low or too high.

[0006] How to achieve more accurate greenhouse soil temperature prediction has become a technical problem that needs to be solved. Summary of the invention

[0007] The purpose of the present invention is to overcome the defects of the above-mentioned prior art and provide a greenhouse soil temperature prediction method and electronic device based on DI-LSTM.

[0008] The purpose of the present invention can be achieved by the following technical solutions:

[0009] According to one aspect of the present invention, a method for predicting greenhouse soil temperature based on DI-LSTM is provided, wherein the method comprises the following steps:

[0010] Step S1, obtaining a greenhouse environment data set to be predicted;

[0011] Step S2, constructing and training a time series temperature prediction network, wherein the time series temperature prediction network is a network including multiple DI-LSTM modules and embedded with multiple parallel interleaved branches, wherein the DI-LSTM module adds a parallel branch to the update gate part based on the LSTM;

[0012] Step S3, inputting the data set of step S1 into the trained time series temperature prediction network, and outputting the real-time prediction result of the greenhouse soil temperature.

[0013] Preferably, the time series temperature prediction network includes a trunk network and multiple parallel branch networks, the trunk network includes multiple DI-LSTM modules connected in series; each branch includes at least one DI-LSTM module, and the DI-LSTM module on the branch is fused with the corresponding DI-LSTM module on the trunk network through a fully connected layer.

[0014] More preferably, the backbone network includes the first, second and third DI-LSTM modules, the multiple parallel branch networks include the first branch network and the second branch network, the first branch network includes the fourth DI-LSTM module, and the second branch network includes the fifth and sixth DI-LSTM modules connected in series; the fourth DI-LSTM module and the second DI-LSTM module are fused through the first fully connected layer and the second fully connected layer; the sixth DI-LSTM module and the third DI-LSTM module are fused through the third fully connected layer and the fourth fully connected layer.

[0015] Preferably, the update gate part of the DI-LSTM module includes two parallel branches responsible for screening, and the weights of the two branches are both set to one-half.

[0016] Preferably, the number of branches responsible for screening in the update gate part is ≤ twice the number of branches responsible for extracting knowledge at the current moment.

[0017] Preferably, the training process of the time series temperature prediction network includes:

[0018] S301, initializing network weights;

[0019] S302, forward propagation and calculation of loss;

[0020] S303, back propagate and update weights according to gradients;

[0021] S304, repeat S302 to S303 according to the epoch number to train the time series temperature prediction network.

[0022] More preferably, the initializing network weights includes:

[0023] The bias items of each layer are initialized to 0;

[0024] For the fully connected layers in the network, Xavier initialization is used, and the weights are initialized from the Gaussian distribution N(0,σ 2 ), where the standard deviation σ is determined by the following formula:

[0025]

[0026] Here in is the number of input neurons.

[0027] More preferably, the forward propagation process includes:

[0028] The hidden state h at the last moment t-1 and memory information K t-1 The first DI-LSTM module of the backbone network is used as input to enter the time series temperature prediction network, and the input data at the current moment is respectively input to each DI-LSTM module in the time series temperature prediction network, wherein the input data includes the environmental data measured at the current moment, including the light intensity, greenhouse humidity and greenhouse temperature of the greenhouse;

[0029] For the forget gate:

[0030] f t =σ(W f ·[h t-1 ,x t ]+b f )

[0031] Among them, f t is the output of the forget gate; W f is the weight matrix of the forget gate; b f is the bias vector of the forget gate; h t-1 is the hidden state of the previous time step; x t is the input data of the current time step; σ is the sigmoid activation function; h t-1 is the hidden state at the last moment;

[0032] For the update gate:

[0033] i′ t =0.5σ(W′ i ·[h t-1 ,x t ]+b′ i )

[0034] i″ t =0.5σ(W″ i ·[h t-1 ,x t ]+b″ i )

[0035] Among them, i′ t andi″ t are the outputs of the two branches of the update gate respectively; W′ i With W″ i and b′ i and b″ i They are the weight matrix and bias vector of the two branches of the update gate respectively;

[0036] g t =tanh(W g ·[h t-1 ,x t ]+b g )

[0037] Among them, g t is the new candidate cell state; tanh is the hyperbolic tangent activation function; W g and b g are the weight matrix and bias vector of the candidate cell state respectively;

[0038] For cell status update:

[0039]

[0040] K t is the updated cell state; K t-1 is the cell state at the previous time step; represents element-wise multiplication;

[0041] For the output gate:

[0042] o t =σ(W o ·[h t-1 ,x t ]+b o )

[0043] Among them, t is the output of the output gate; Wo and b o They are the weight matrix and bias vector of the output gate respectively;

[0044] For hidden states and outputs:

[0045]

[0046] Among them, h t is the hidden state at the current time step.

[0047] More preferably, after each forward propagation is completed, a loss function is calculated, wherein the loss function is a mean square loss function.

[0048] According to another aspect of the present invention, an electronic device is provided, comprising a memory and a processor, wherein a computer program is stored in the memory, and the method described above is implemented when the processor executes the program.

[0049] Compared with the prior art, the present invention has the following beneficial effects:

[0050] 1) The present invention aims at the problem of traditional LSTM update gate. By adding parallel branches of the update gate, the update gate mechanism is made more reasonable. This mechanism can better balance the fusion of new and old information, avoid the decline in prediction accuracy due to improper opening and closing of the update gate, and thus improve the accuracy of greenhouse soil temperature prediction. Compared with traditional prediction methods, the present invention can more accurately predict soil temperature changes in complex and changeable greenhouse environments, and provide reliable data support for greenhouse crop growth.

[0051] 2) The time series temperature prediction network using the DI-LSTM module and including multiple parallel interleaved branches proposed in the present invention can better adapt to the complex dynamic changes of greenhouse soil temperature, handle information updates more robustly, reduce the impact of erroneous information on prediction results, enhance the robustness of the prediction, and maintain a high prediction accuracy even in the case of frequent and unstable information updates. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] Figure 1 It is a schematic diagram of the structure of the time series temperature prediction network in the present invention;

[0053] Figure 2 It is a structural diagram of the DI-LSTM module in the present invention;

[0054] Figure 3 It is a schematic diagram of the flow chart of the operation of the time series temperature prediction network in the present invention;

[0055] Figure 4 This is the classic LSTM module structure diagram referenced by the present invention;

[0056] In the figure, FC: fully connected layer. DETAILED DESCRIPTION

[0057] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0058] When processing long sequence data, ordinary RNNs have difficulty capturing long-distance temporal dependencies because the network lacks a structure that can maintain long-term dependencies. Although the classic LSTM is a special RNN architecture, it maintains long-term dependencies by introducing a gating mechanism. The classic LSTM structure is relatively simple, without parallel branches, and it is difficult for a simple network to fully capture the interactions between various complex factors in a complex system. In the process of updating knowledge, the update gate of the traditional LSTM faces risks in the balance of information updates, because there is a certain degree of uncertainty in the opening and closing of the update gate. If it is too low, the model may not be able to adapt to changes in current trends or patterns. If it is too high, the model may focus too much on the latest information and ignore long-term dependencies. Either case will affect and reduce the accuracy of model predictions.

[0059] The present embodiment relates to a greenhouse soil temperature prediction method based on DI-LSTM, which is intended to further improve the performance of a time series prediction model in predicting greenhouse soil temperature, while enabling the memory cells in the LSTM to maintain the balance of information updating during the knowledge updating process.

[0060] This method adds multiple parallel interleaved branches to the classic long short-term memory network (LSTM), proposes a new double-branch update gate LSTM module (Doublebranches-Input Gate LSTM Block, referred to as DI-LSTM module) to replace the classic LSTM module, and applies the DI-LSTM module on each branch, in which the multiple parallel interleaved branches are fused with the backbone network in the shallow and deep parts respectively.

[0061] The method comprises the following steps:

[0062] Step S1, obtaining an environmental data set for greenhouse soil temperature prediction;

[0063] Step S2, constructing a time series temperature prediction network based on multiple parallel interleaved branches of DI-LSTM blocks;

[0064] Step S3, using the acquired data set to train and test the time series temperature prediction network;

[0065] Step S4, saving the trained model parameters and deploying the time series temperature prediction network;

[0066] Step S5, inputting the greenhouse environment data set to be predicted into the time series temperature prediction network to perform real-time prediction of the greenhouse soil temperature.

[0067] Step S1 includes: obtaining a public environmental data set with the required type from the Internet, and dividing the data set into a training set and a test set, wherein the environmental data includes air temperature, air humidity, light intensity, carbon dioxide concentration, wind speed, etc.

[0068] Step S2 includes: establishing a network based on LSTM, embedding multiple parallel interleaved branches, replacing the classic LSTM block with a DI-LSTM module, and forming a time series temperature prediction network for greenhouse soil temperature prediction.

[0069] Step S3 includes: using the data set obtained in step S1 to train the time series temperature prediction network constructed in step S2.

[0070] Step S4 includes: for the time series temperature prediction network trained in step S3, saving the trained network parameters, performing operations such as transcoding or neural network compression according to the actual application scenario, and deploying the time series temperature prediction network to perform real-time prediction of the greenhouse soil temperature.

[0071] In step S5, the following types of environmental data are collected in real time through the sensor network arranged in the greenhouse or the existing intelligent agricultural system, including air temperature, air humidity, light intensity, carbon dioxide concentration, wind speed, etc. Each time a time step passes, the currently collected environmental data is input into the trained time series temperature prediction network to obtain the predicted value of soil temperature in the future. After the model is deployed, according to the feedback of real-time data, if it is found that the prediction accuracy decreases or the environment changes significantly, new data can be collected again and the model can be retrained or fine-tuned to improve the long-term performance of the model.

[0072] like Figure 1 , the time series temperature prediction network includes a main network and two parallel branches. The first, second and third DI-LSTM modules numbered 1 to 3 are located on the main network, the fourth DI-LSTM module numbered 4 is located on the first branch network, and the fifth and sixth DI-LSTM modules numbered 5 and 6 are located on the second branch network. The first branch and the second branch constitute two parallel branch networks. All DI-LSTM modules are structurally the same, such as Figure 2 As shown. Figure 1The current input x is omitted t .

[0073] like Figure 4 The following is a schematic diagram of the structure of a classic LSTM module. Figure 2 The present invention improves the update gate part in the classic LSTM module in order to better t After screening, additional branches are added, and the weights of both branches are set to half, thus obtaining the DI-LSTM module. The additional branches ensure the balance of information updates.

[0074] If you need to update the branch responsible for filtering in the gate ( Figure 2 Output i′ t andi″ t The number of branches) is adjusted, such as Figure 2 , the number of branches responsible for screening should not exceed the number of branches responsible for extracting current knowledge in the update gate ( Figure 2 Output g t For the network proposed by the present invention, the modification of a certain DI-LSTM module does not need to be synchronized to all other DI-LSTM modules in the time series temperature prediction network (that is, the structures of each DI-LSTM module can be different).

[0075] When applying the DI-LSTM module to replace the classic LSTM module, there is no need to consider the connection problem of the front and back stacked modules, because the previous module still passes the tensor representing the hidden state and memory information backward.

[0076] Figure 1 In the figure, the fourth DI-LSTM module numbered 4 on the first branch network is fused with the second DI-LSTM module numbered 2 on the trunk network through the first fully connected layer (FC) numbered 7 and the second fully connected layer numbered 8; the sixth DI-LSTM module numbered 6 on the second branch network is fused with the third DI-LSTM module numbered 3 on the trunk network through the third fully connected layer numbered 9 and the fourth fully connected layer numbered 10.

[0077] The training process of the time series temperature prediction network in step S3 includes:

[0078] S301, initializing network weights;

[0079] S302, forward propagation and calculation of loss;

[0080] S303, back propagate and update weights according to gradients;

[0081] S304, repeating steps S2 to S3 according to the epoch number to train the time series temperature prediction network.

[0082] Specific implementation method:

[0083] S301, the bias items of each layer are initialized to 0; Xavier initialization is used for the fully connected layer in the network, and the weights are initialized from the Gaussian distribution N(0,σ 2 ), where the standard deviation σ is determined by the following formula:

[0084]

[0085] Here in is the number of input neurons.

[0086] S302, such as Figure 1 and Figure 3 As shown, the hidden state h at the last moment t-1 and memory information K t-1 The first DI-LSTM module numbered 1 is used as input to the time series temperature prediction network. For the input data x at the current moment t (exist Figure 1 Ignore the diagram in the figure), and input them into each DI-LSTM module in the network, such as Figure 2 x in t As shown. The input data x t This includes using sensors to measure current environmental data, such as greenhouse temperature, light intensity, greenhouse humidity, etc., to provide real-time environmental conditions information. The connected sensor information is determined by the actual installation situation in the greenhouse.

[0087] The calculation formulas for each part of the DI-LSTM module are as follows:

[0088] For the forget gate:

[0089] f t =σ(W f ·[h t-1 ,x t ]+b f )

[0090] Among them, f t is the output of the forget gate, which determines which information should be discarded from the cell state; W f is the weight matrix of the forget gate; b f is the bias vector of the forget gate; h t-1 is the hidden state of the previous time step; x t is the input of the current time step; σ is the sigmoid activation function; h t-1 is the hidden state at the last moment.

[0091] For the update gate:

[0092] i′ t =0.5σ(W′ i ·[h t-1 ,x t ]+b′ i )

[0093] i″ t =0.5σ(W″ i ·[h t-1 ,x t ]+b″ i )

[0094] Among them, i′ t andi″ t They are the outputs of the two branches of the update gate, which determine which new information is updated to the cell state; W′ i With W″ i and b′ i and b″ i They are the weight matrix and bias vector of the two branches of the update gate respectively.

[0095] g t =tanh(W g ·[h t-1 ,x t ]+b g )

[0096] Among them, g t is the new candidate cell state; tanh is the hyperbolic tangent activation function; W g and b g are the weight matrix and bias vector of the candidate cell state, respectively.

[0097] For cell status update:

[0098]

[0099] K t is the updated cell state; K t-1 is the cell state at the previous time step; Represents element-wise multiplication.

[0100] For the output gate:

[0101] o t =σ(W o ·[h t-1 ,x t ]+b o )

[0102] Among them, tis the output of the output gate, which determines which part of the cell state will be output to the hidden state; W o and b o are the weight matrix and bias vector of the output gate respectively.

[0103] For hidden states and outputs:

[0104]

[0105] Among them, h t is the hidden state at the current time step.

[0106] After executing the operation in the first DI-LSTM module numbered 1, the memory information and hidden state obtained are passed to the second, fourth and fifth DI-LSTM modules numbered 2, 4 and 5 respectively, and forward propagation is continued. When encountering the branch fusion part, the vector is spliced ​​and used as the input of the fully connected layer for operation to obtain a new vector that integrates the branch information. For example, the second and fourth DI-LSTM modules numbered 2 and 4 are spliced, and the output obtained by splicing the memory information vectors of the two through the first fully connected layer numbered 7 is input as the new memory information to the third DI-LSTM module numbered 3; similarly, the output obtained by splicing the hidden state vectors of the two through the second fully connected layer numbered 8 is input as the new hidden state information to the third DI-LSTM module numbered 3, and the same is true for the information fusion between the third and sixth DI-LSTM modules numbered 3 and 6.

[0107] After each forward propagation is completed, the loss function is calculated. The network loss function uses the classic mean square loss function, and its calculation formula is as follows:

[0108]

[0109] where y i is the true value, is the predicted value and N is the number of samples.

[0110] S303. Calculate the gradient of each layer according to the loss function calculated in S302. Use the Adam optimizer to adjust the parameters of each layer of the network according to the calculated gradient.

[0111] S304. Repeat steps S302 and S303 according to the set epoch number. The network generally follows the training strategy from scratch for training, which requires a larger epoch number, which is set to 120 by default. According to the actual training situation, you can choose to use the early stopping technique, and set the patience value to 5 by default, that is, if the verification loss does not decrease within the next 5 epochs, the training will stop. After the training is completed, the resulting prediction network can be used for reasoning to solve the greenhouse soil temperature prediction problem.

[0112] The electronic device of the present invention includes a central processing unit (CPU), which can perform various appropriate actions and processes according to computer program instructions stored in a read-only memory (ROM) or loaded from a storage unit into a random access memory (RAM). In the RAM, various programs and data required for device operation can also be stored. The CPU, ROM and RAM are connected to each other via a bus. An input / output (I / O) interface is also connected to the bus.

[0113] Multiple components in the device are connected to the I / O interface, including: input units, such as keyboards, mice, etc.; output units, such as various types of displays, speakers, etc.; storage units, such as disks, optical disks, etc.; and communication units, such as network cards, modems, wireless communication transceivers, etc. The communication unit allows the device to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunication networks.

[0114] The processing unit performs the various methods and processes described above. For example, in some embodiments, the method can be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit. In some embodiments, part or all of the computer program can be loaded and / or installed on the device via a ROM and / or a communication unit. When the computer program is loaded into RAM and executed by the CPU, one or more steps of the method described above can be performed. Alternatively, in other embodiments, the CPU can be configured to perform the method in any other appropriate manner (e.g., by means of firmware).

[0115] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0116] The program code for implementing the method of the present invention can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code can be executed entirely on the machine, partially on the machine, partially on the machine as a stand-alone software package and partially on a remote machine, or entirely on a remote machine or server.

[0117] In the context of the present invention, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0118] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. A greenhouse soil temperature prediction method based on DI-LSTM, characterized in that: The method comprises the following steps: Step S1, obtaining a greenhouse environment data set to be predicted; Step S2, constructing and training a time series temperature prediction network, wherein the time series temperature prediction network is a network including multiple DI-LSTM modules and embedded with multiple parallel interleaved branches, wherein the DI-LSTM module adds a parallel branch to the update gate part based on the LSTM; Step S3, inputting the data set of step S1 into the trained time series temperature prediction network, and outputting the real-time prediction result of the greenhouse soil temperature.

2. A greenhouse soil temperature prediction method based on DI-LSTM according to claim 1, characterized in that: The time series temperature prediction network includes a trunk network and multiple parallel branch networks, the trunk network includes multiple DI-LSTM modules connected in series; each branch includes at least one DI-LSTM module, and the DI-LSTM modules on the branches are fused with the corresponding DI-LSTM modules on the trunk network through a fully connected layer.

3. A greenhouse soil temperature prediction method based on DI-LSTM according to claim 2, characterized in that: The backbone network includes the first, second and third DI-LSTM modules, the multiple parallel branch networks include the first branch network and the second branch network, the first branch network includes the fourth DI-LSTM module, and the second branch network includes the fifth and sixth DI-LSTM modules connected in series; the fourth DI-LSTM module and the second DI-LSTM module are fused through the first fully connected layer and the second fully connected layer; the sixth DI-LSTM module and the third DI-LSTM module are fused through the third fully connected layer and the fourth fully connected layer.

4. The greenhouse soil temperature prediction method based on DI-LSTM according to claim 1 is characterized in that: The update gate part of the DI-LSTM module includes two parallel branches responsible for screening, and the weights of the two branches are both set to one-half.

5. The greenhouse soil temperature prediction method based on DI-LSTM according to claim 1 is characterized in that: The number of branches responsible for screening in the update gate part is ≤ twice the number of branches responsible for extracting knowledge at the current moment.

6. The greenhouse soil temperature prediction method based on DI-LSTM according to claim 1, characterized in that: The training process of the time series temperature prediction network includes: S301, initializing network weights; S302, forward propagation and calculation of loss; S303, back propagate and update weights according to gradients; S304, repeat S302 to S303 according to the epoch number to train the time series temperature prediction network.

7. The greenhouse soil temperature prediction method based on DI-LSTM according to claim 6 is characterized in that: The initialization network weights include: The bias items of each layer are initialized to 0; For the fully connected layers in the network, Xavier initialization is used, and the weights are initialized from the Gaussian distribution N(0,σ 2 ), where the standard deviation σ is determined by the following formula: Here in is the number of input neurons.

8. The greenhouse soil temperature prediction method based on DI-LSTM according to claim 6 is characterized in that: The forward propagation process includes: The hidden state h at the last moment t-1 and memory information K t-1 The first DI-LSTM module of the backbone network is used as input to enter the time series temperature prediction network, and the input data at the current moment is respectively input to each DI-LSTM module in the time series temperature prediction network, wherein the input data includes the environmental data measured at the current moment, including the light intensity, greenhouse humidity and greenhouse temperature of the greenhouse; For the forget gate: f t =σ(W f ·[h t-1 ,x t ]+b f ) Among them, f t is the output of the forget gate; W f is the weight matrix of the forget gate; b f is the bias vector of the forget gate; h t-1 is the hidden state of the previous time step; x t is the input data of the current time step; σ is the sigmoid activation function; h t-1 is the hidden state at the last moment; For the update gate: i′ t =0.5σ(W′ i ·[h t-1 ,x t ]+b′ i ) i″ t =0.5σ(W″ i ·[h t-1 ,x t ]+b″ i ) Among them, i′ t andi″ t are the outputs of the two branches of the update gate respectively; W i ′ and W i ″ and b″ i and b″ i They are the weight matrix and bias vector of the two branches of the update gate respectively; g t =tanh(W g ·[h t-1 ,x t ]+b g ) Among them, g t is the new candidate cell state; tanh is the hyperbolic tangent activation function; W g and b g are the weight matrix and bias vector of the candidate cell state respectively; For cell status update: K t is the updated cell state; K t-1 is the cell state at the previous time step; represents element-wise multiplication; For the output gate: the t =σ(W o ·[h t-1 ,x t ]+b o ) Among them, t is the output of the output gate; W o and b o They are the weight matrix and bias vector of the output gate respectively; For hidden states and outputs: Among them, h t is the hidden state at the current time step.

9. The greenhouse soil temperature prediction method based on DI-LSTM according to claim 6 is characterized in that: After each forward propagation is completed, the loss function is calculated, where the loss function is the mean square loss function.

10. An electronic device comprising a memory and a processor, wherein a computer program is stored in the memory, wherein: When the processor executes the program, the method according to any one of claims 1 to 9 is implemented.