CNN-BiGRU model sap flow prediction method and system based on attention mechanism

By adopting the CNN-BiGRU model based on attention mechanism in sap flow prediction, the problems of large data volume and large noise interference in the prior art are solved, and more efficient and accurate sap flow prediction is achieved.

CN119537935APending Publication Date: 2025-02-28ZHEJIANG FORESTRY UNIVERSITY
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202410916266.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-09
Publication Date
2025-02-28

AI Technical Summary

Technical Problem

In the sap flow prediction, the existing technology has large data volume and large noise interference, resulting in large calculation processing volume of neural network models, low computing efficiency and low prediction accuracy, making it difficult to meet actual needs.

Method used

The CNN-BiGRU model based on attention mechanism is adopted, and the trunk flow data is decomposed through the CEEMDAN model, data reconstruction and normalization are performed, feature values ​​are extracted, and the CNN-BiGRU-SA model is constructed. The spatial features are extracted using CNN, BiGRU captures time series features, and the Attention layer enhances the model's attention to important features.

Benefits of technology

Effectively process and predict trunk fluid flow, enhance feature extraction capabilities in data, reduce data processing volume and noise interference, and significantly improve the accuracy and efficiency of model prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119537935A_ABST
    Figure CN119537935A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of artificial intelligence, and provides a CNN-BiGRU model sap flow prediction method based on an attention mechanism, and the method comprises the steps: S1-S3, collecting trunk sap flow data and environment data, decomposing the trunk sap flow data into N intrinsic model functions through a CEEMDAN model, removing the noise in the complex high-dimensional data, and carrying out the prediction of the sap flow through a CNN-BiGRU model. And feature value extraction is carried out after the data normalization process to form a CNN-BiGRU-SA model, the CNN is used for extracting spatial features, the BiGRU captures time sequence features, and the SA enhances attention of the model to important features and correlation mining of global variables. The invention further discloses a system, the method and the system can effectively process and predict the trunk liquid flow, the feature extraction capability in the trunk liquid flow data and the environment data is enhanced, the data processing amount and noise interference in the data processing process are reduced, and the accuracy and the efficiency of model prediction are greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a CNN-BiGRU model sap flow prediction method and system based on an attention mechanism. Background Art

[0002] Trunk sap flow refers to the process in which water is transported to the leaves through the xylem due to water loss in the plant. It receives soil water absorbed and collected by the huge underground root system, determines the transpiration of the entire crown, and can reflect the water transfer status in the plant. Analyzing the relationship between trunk sap flow and environmental factors provides a basis for mastering the laws of plant water consumption and studying tree transpiration and water consumption. Establishing a trunk sap flow prediction model provides data support for tree transpiration and water-saving irrigation in agriculture and forestry, and provides a scientific basis for plant water demand and adaptability research, forest ecosystem water cycle process, forest ecological function assessment, stand transpiration estimation, and plant stress resistance research, which is helpful for the rational use and protection of forest resources and improving the function and stability of forest ecosystems.

[0003] CN116484624A discloses a method and system for simulating transient sap flow changes in a tree trunk, comprising the following steps: obtaining an original model of transient sap flow changes in the tree trunk based on the relationship between solar radiation and changes in trunk sap flow; considering complex environmental factors, constructing a transient sap flow change model in the tree trunk based on the original model of transient sap flow changes in the tree trunk; solving the transient sap flow change model in the tree trunk to obtain the trunk sap flow rate.

[0004] CN116450995B discloses a trunk sap flow velocity prediction system based on big data analysis, including a trunk sap flow measurement module, a trunk sap flow prediction system and a trunk sap flow prediction adjustment system; the trunk sap flow measurement module is used to perform real-time detection of the flow rate and flow velocity of the trunk sap flow, and transmit the detection result to the trunk sap flow prediction system, the trunk sap flow prediction system predicts future trunk sap flow information based on weather information and the trunk sap flow information in the trunk sap flow measurement module, and transmits the prediction result to the trunk sap flow prediction adjustment system, after the trunk sap flow prediction system completes the prediction of the trunk sap flow information, the trunk sap flow measurement module continues to detect the flow rate and flow velocity of the trunk sap flow, the trunk sap flow prediction adjustment system compares the information collected in the trunk sap flow measurement module with the prediction information of the trunk sap flow prediction system, and adjusts according to the comparison result.

[0005] CN115907204A discloses a method for predicting forest transpiration water consumption by using a sparrow search algorithm to optimize a BP neural network, comprising the following steps: obtaining tree trunk sap flow data and corresponding environmental influencing factors in an actual time period and environmental influencing factors in a time period to be measured, and obtaining a training set and a prediction set respectively; preprocessing the training set and the prediction set; constructing a sparrow search algorithm to optimize a BP neural network model based on the preprocessed data, and training the model using the training set; simulating the prediction set based on the sparrow search algorithm to optimize the BP neural network model after training the training set, and outputting predicted tree trunk sap flow values.

[0006] CN114529102A discloses a method and system for predicting the sap flow of a single Larix principis-rupprechtii under the influence of coupled multiple factors, comprising the following steps: step S1, using the single tree competition index CI and the relative tree height HR to reflect the influencing factors of the spatial dimension, and the potential evapotranspiration ETref and the soil moisture content REW to reflect the influencing factors of the temporal dimension, and assuming that the responses of the tree growth indicators under the influence of coupled multiple factors to each influencing factor are independent of each other, and the response model of tree transpiration to multiple factors can be expressed as the multiplication of the response function of a single factor, then the daily scale single tree trunk sap flow model under the influence of coupled multiple factors is: JS = f(REW) · f(ETref) · f(CI) · f(HR) (1) where JS is the trunk sap flow rate, and f(REW), f(ETref), f(CI), and f(HR) represent the functions of the trunk sap flow rate in response to soil moisture content, potential evapotranspiration, Hegyi index, and relative tree height, respectively; step S2, obtaining the observed data of the prediction area, including the time series data of the trunk sap flow rate JS, soil Step S3, calculate the time lag between the trunk sap flow rate JS and the soil moisture content REW and the potential evapotranspiration ETref according to the obtained time series data and adjust the time series data; Step S4, construct the response function of the trunk sap flow rate of a single tree to the competition pressure of the horizontal direction of the forest, the response function of the trunk sap flow rate of a single tree to the competition pressure of the vertical direction of the forest, the response function of the trunk sap flow rate of a single tree to the potential evapotranspiration, and the response function of the trunk sap flow rate of a single tree to the soil moisture content; Step S5, multiply the trunk sap flow rate and its single factor response function f(hegyi), f(HR), f(ETref), f(REW) to achieve the coupling of multiple factors and obtain a prediction model that can reflect the influence of multiple factors on the trunk sap flow rate in spatial structure and time process; Step S6, use the constructed daily-scale single-tree trunk sap flow model with coupled multiple factors to predict the single-tree sap flow rate of Larix principis-rupprechtii.

[0007] In the prior art, environmental factor data is directly used to calculate and predict sap flow, and prediction calculations are performed through neural networks. Due to the large number of environmental factors, the model is complex and the amount of calculation is large, so the prediction precision and accuracy of this type of prediction method are not high. Summary of the invention

[0008] After long-term practice, it was found that due to the large amount of trunk sap flow data and environmental data, the large interference of noise data, the large amount of computational processing of the neural network model, the low computational efficiency and the low overall prediction accuracy, it is difficult to meet the actual needs of sap flow prediction accuracy and other technical problems.

[0009] In view of this, the present invention provides a CNN-BiGRU model sap flow prediction method based on attention mechanism, comprising:

[0010] Step S1, collecting trunk sap flow data and environmental data, performing data preprocessing on the trunk sap flow data and the environmental data respectively, and dividing the preprocessed data into a training set and a test set in a ratio of 8:2; the data preprocessing includes a sap flow reconstruction process, a data normalization process and a feature value extraction process, and the sap flow reconstruction process includes introducing a CEEMDAN model to decompose the trunk sap flow data into N intrinsic model functions, where N is a positive integer greater than 1;

[0011] Step S2, constructing a CNN-BiGRU-SA model, wherein the convolution layer, excitation layer, pooling layer, fully connected layer, BiGRU layer and Attention layer of the CNN model in the CNN-BiGRU-SA model are connected in sequence;

[0012] Step S3, input the training set into the CNN-BiGRU-SA model to train the model, use the test set to test the CNN-BiGRU-SA model, and if the prediction accuracy of the CNN-BiGRU-SA model reaches a preset threshold, output the CNN-BiGRU-SA model.

[0013] In one embodiment, in step S1, N intrinsic model functions are sequentially calculated with the trunk sap flow data to obtain N Hce values, forming a vector HCE=[Hce1, Hce2, ..., Hce n ]; Square the amplitudes of the N intrinsic model functions in turn, and then perform time integration to obtain the vector EIMF = [E1, E2, ..., E n ], perform dot multiplication of vector HCE and vector EIMF to obtain vector M = [M1, M2, ..., M n ].

[0014] In one embodiment, the data normalization process includes Max-Min normalization or Z-score normalization.

[0015] In one embodiment, the feature value extraction process includes calculating the Hce value between the trunk sap flow data and the environmental data, selecting a feature factor according to the Hce value,

[0016] u=F X ()

[0017] v=F Y (y)

[0018] F X,Y (x,y)=(F X (x), Y (y))=(u,v)

[0019] H ce (u,v)=-∫∫C(u,v)logC(u,v)d u d v

[0020] X is the trunk sap flow data set, x is the trunk sap flow data, Y is the environmental data set, y is the environmental data, F X (), F Y (y) is the marginal distribution function, F X,Y (x, y) is the joint distribution function, C is the Copula function, H ce (u, v) is the Hce value between the trunk sap flow data and the environmental data.

[0021] In one embodiment, the excitation layer uses a ReLU function to perform nonlinear mapping on the input data, including:

[0022]

[0023] Among them, f(x) is the ReLU function and x is the input data.

[0024] In one embodiment, the BiGRU layer includes an update gate and a reset gate.

[0025] In one embodiment, the real-time collected trunk sap flow data and environmental data are transmitted to the trained CNN-BiGRU-SA model in the cloud server to calculate the predicted value of the trunk sap flow.

[0026] The present invention also discloses a system for executing the above-mentioned CNN-BiGRU model sap flow prediction method based on the attention mechanism, the system comprising:

[0027] A data acquisition unit is used to collect trunk sap flow data and environmental data, perform data preprocessing on the trunk sap flow data and the environmental data respectively, and divide the preprocessed data into a training set and a test set according to a ratio of 8:2; the data preprocessing includes a sap flow reconstruction process, a data normalization process and a feature value extraction process, and the sap flow reconstruction process includes introducing a CEEMDAN model to decompose the trunk sap flow data into N intrinsic model functions, where N is a positive integer greater than 1;

[0028] A model construction unit, used to construct a CNN-BiGRU-SA model, wherein the convolution layer, excitation layer, pooling layer, fully connected layer, BiGRU layer and Attention layer of the CNN model in the CNN-BiGRU-SA model are connected in sequence;

[0029] A training unit, used for inputting the training set into the CNN-BiGRU-SA model to train the model, using the test set to test the CNN-BiGRU-SA model, and outputting the CNN-BiGRU-SA model if the prediction accuracy of the CNN-BiGRU-SA model reaches a preset threshold;

[0030] The prediction unit is used to transmit the real-time collected trunk sap flow data and environmental data to the trained CNN-BiGRU-SA model in the cloud server to calculate the predicted value of the trunk sap flow.

[0031] The present invention also provides an electronic device, comprising at least one processor; and a memory connected to the at least one processor in communication; wherein:

[0032] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the above-mentioned CNN-BiGRU model sap flow prediction method based on the attention mechanism.

[0033] The present invention also provides a machine-readable storage medium having instructions stored thereon, the instructions being used to enable a machine to execute the CNN-BiGRU model sap flow prediction method based on the attention mechanism as described above.

[0034] Compared with the prior art, the CNN-BiGRU model sap flow prediction method based on the attention mechanism disclosed in the present invention, through steps S1-S3, by collecting trunk sap flow data and environmental data, using the CEEMDAN (Complete Ensemble Empirical Mode Decomposition with Adaptive Noise) model to decompose the trunk sap flow data into N intrinsic model functions, remove the noise in the complex high-dimensional data, extract the eigenvalues ​​after the data normalization process, and can mine the relevant components that affect the trunk sap flow. Construct a CNN-BiGRU-SA model, CNN is used to extract spatial features, BiGRU captures time series features, SA (Self-Attention) enhances the model's attention to important features and the correlation mining of global variables. The present invention also discloses a system for executing the above-mentioned CNN-BiGRU model sap flow prediction method based on the attention mechanism, the method and system can effectively process and predict the trunk sap flow, enhance the feature extraction capability in the trunk sap flow data and environmental data, reduce the data processing amount and noise interference in the data processing process, and greatly improve the accuracy and efficiency of model prediction.

[0035] Other features and advantages of the present invention will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] The accompanying drawings constituting a part of the present invention are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the accompanying drawings:

[0037] Figure 1 A schematic diagram of a sap flow prediction method of a CNN-BiGRU model based on an attention mechanism according to an embodiment of the present invention;

[0038] Figure 2 The figure is a flowchart of a method for predicting sap flow using a CNN-BiGRU model based on an attention mechanism according to an embodiment of the present invention. DETAILED DESCRIPTION

[0039] The specific implementation of the present invention is described in detail below in conjunction with the accompanying drawings. It should be understood that the specific implementation described here is only used to illustrate and explain the present invention, and is not used to limit the present invention.

[0040] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only 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.

[0041] It should be noted that the terms "first", "second", "third", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so as to describe the embodiments of the present invention described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0042] In the prior art, due to the large amount of trunk sap flow data and environmental data, the large amount of noise data interference, the large amount of neural network model calculation processing, the low calculation efficiency and the low overall prediction accuracy, it is difficult to meet the actual requirements of sap flow prediction accuracy and precision. Figure 1-2 As shown, the present invention provides a CNN-BiGRU model sap flow prediction method based on an attention mechanism, and the CNN-BiGRU model sap flow prediction method based on an attention mechanism includes:

[0043] Step S1, collecting trunk sap flow data and environmental data, performing data preprocessing on the trunk sap flow data and the environmental data respectively, and dividing the preprocessed data into a training set and a test set in a ratio of 8:2; the data preprocessing includes a sap flow reconstruction process, a data normalization process and a feature value extraction process, and the sap flow reconstruction process includes introducing a CEEMDAN model to decompose the trunk sap flow data into N intrinsic model functions, where N is a positive integer greater than 1;

[0044] Step S2, constructing a CNN-BiGRU-SA model, wherein the convolution layer, excitation layer, pooling layer, fully connected layer, BiGRU layer and Attention layer of the CNN model in the CNN-BiGRU-SA model are connected in sequence;

[0045] Step S3, input the training set into the CNN-BiGRU-SA model to train the model, use the test set to test the CNN-BiGRU-SA model, and if the prediction accuracy of the CNN-BiGRU-SA model reaches a preset threshold, output the CNN-BiGRU-SA model.

[0046] The CNN-BiGRU model sap flow prediction method based on the attention mechanism disclosed in the present invention, through steps S1-S3, collects trunk sap flow data and environmental data, uses the CEEMDAN (Complete Ensemble EmpiricalMode Decomposition with Adaptive Noise) model to decompose the trunk sap flow data into N intrinsic model functions, removes the noise in the complex high-dimensional data, extracts the eigenvalues ​​after the data normalization process, and can mine the relevant components that affect the trunk sap flow. Construct a CNN-BiGRU-SA model, CNN is used to extract spatial features, BiGRU captures time series features, and SA (Self-Attention) enhances the model's attention to important features and the correlation mining of global variables. The method can effectively process and predict trunk sap flow, enhance the feature extraction capabilities in trunk sap flow data and environmental data, reduce the data processing volume and noise interference in the data processing process, and greatly improve the accuracy and efficiency of model prediction.

[0047] In order to more effectively process nonlinear and non-stationary signals, for each intrinsic model function IMF (Intrinsic Mode Functions), the cross-correlation value between it and the original trunk sap flow data is calculated to obtain N Hce values. In one embodiment of the present invention, in step S1, N intrinsic model functions are sequentially calculated with the trunk sap flow data to obtain N Hce values, forming a vector HCE = [Hce1, Hce2, ..., Hce n ]; Square the amplitudes of the N intrinsic model functions in turn, and then perform time integration to obtain the vector EIMF = [E1, E2, ..., E n ], perform dot multiplication of vector HCE and vector EIMF to obtain vector M = [M1, M2, ..., M n ]. By calculating the Hce value and EIMF value and performing point multiplication operations to strengthen the key features in the data, the CEEMDAN model can effectively decompose and remove noise in the data and improve the quality of data preprocessing. By emphasizing key features and suppressing noise, the training effect and prediction accuracy of the entire model are improved.

[0048] By normalizing, we ensure that the data is on the same scale, reduce the impact of outliers on the robustness of the model, and prevent the gradient from disappearing or exploding during the back propagation process, thereby improving the performance and stability of the model and ensuring the accuracy of model training and prediction. In one embodiment of the present invention, the data normalization process includes Max-Min normalization or Z-score normalization. For example, Max-Min normalization includes:

[0049]

[0050] For the i-th variable value x i Max-Min normalization processing, the maximum value max(x i ), minimum value min( i ), x new is the normalized value. Z-score normalization, also known as standardization, converts the data into a distribution with a mean of 0 and a standard deviation of 1.

[0051] In order to better explore how environmental factors affect the physiological processes of plants and the interactions between plants and the environment, feature factors with better correlation are selected. Feature factors with high Hce values ​​indicate that these feature factors have a stronger correlation with the trunk sap flow data, and therefore have a greater contribution to the predictive ability of the model. Features are directly screened based on statistics such as Hce values, or models such as decision trees and random forests are used to evaluate the importance of features and select the most important features. In one embodiment of the present invention, the feature value extraction process includes calculating the Hce value between the trunk sap flow data and the environmental data, selecting feature factors based on the Hce value,

[0052] u=F X ()

[0053] v=F Y (y)

[0054] F X,Y (x,y)=(F X (x), Y (y))=(u,v)

[0055] H ce (u,v)=-∫∫C(u,v)logC(u,v)d u d v

[0056] X is the trunk sap flow data set, x is the trunk sap flow data, Y is the environmental data set, y is the environmental data, F X (), F Y (y) is the marginal distribution function, F X,Y(x, y) is the joint distribution function, C is the Copula function, H ce (u, v) is the Hce value between the trunk sap flow data and the environmental data.

[0057] The calculation of the ReLU function is very fast and efficient. The gradient of the ReLU function on the positive semi-axis is always 1, so it can effectively avoid the gradient vanishing problem, allowing the network to learn at a deeper level, simple calculation, avoid the gradient vanishing problem, promote sparse activation, and accelerate convergence. In one embodiment of the present invention, the excitation layer uses the ReLU (Rectified Linear Unit) function to perform nonlinear mapping on the input data, including:

[0058]

[0059] Among them, f(x) is the ReLU function and x is the input data.

[0060] Bidirectional Gated Recurrent Unit (BiGRU), bidirectionality enables the model to utilize past and future contextual information at the same time, which is very useful for understanding complex patterns and dependencies in sequences. Including update gates and reset gates, in one embodiment of the present invention, the BiGRU layer includes update gates and reset gates. The update gate determines how much information to retain from the previous time step in the current time step, and how much new information to introduce from the current input. The update gate allows the model to effectively capture long-term dependencies when processing sequence data. By adjusting the weights of the update gate, the model decides which information to retain over a long time span, thereby avoiding the common gradient vanishing problem in traditional RNNs. The update gate enables the model to selectively update the hidden state, which means that the model can selectively retain or discard information based on the context of the input data, improving the flexibility and expressiveness of the model. The reset gate determines how much information from the previous time step is ignored when calculating the candidate hidden state of the current time step. Short-term dependency capture, the reset gate allows the model to effectively capture short-term dependencies when processing sequence data. By adjusting the weight of the reset gate, the model decides which information to focus on in a short period of time, thereby better processing local features in the sequence. Forgetting mechanism, the reset gate provides a forgetting mechanism that enables the model to selectively ignore irrelevant historical information, which is especially important for processing long sequence data because it helps the model focus on currently relevant information.

[0061] The CNN-BiGRU-SA model combines the feature extraction capability of convolutional neural networks, the sequence processing capability of bidirectional gated recurrent units, and the feature attention capability of self-attention mechanisms, thereby improving the accuracy and reliability of predictions. In one embodiment of the present invention, real-time collected trunk sap flow data and environmental data are transmitted to the trained CNN-BiGRU-SA model in the cloud server to calculate the predicted value of trunk sap flow. The sensor collects trunk sap flow data in real time. The collected environmental data includes temperature, humidity, light intensity, wind speed, etc. The collected data is transmitted to the cloud server through wireless transmission technologies such as Wi-Fi, LoRa, NB-IoT, etc. At the same time, through edge computing, the collected data is prevented from being processed at the edge and then transmitted to the cloud server, reducing the amount of data transmission, thereby improving the computing efficiency and processing power of the entire model.

[0062] The present invention also discloses a system for executing the above-mentioned CNN-BiGRU model sap flow prediction method based on the attention mechanism, the system comprising:

[0063] A data acquisition unit is used to collect trunk sap flow data and environmental data, perform data preprocessing on the trunk sap flow data and the environmental data respectively, and divide the preprocessed data into a training set and a test set according to a ratio of 8:2; the data preprocessing includes a sap flow reconstruction process, a data normalization process and a feature value extraction process, and the sap flow reconstruction process includes introducing a CEEMDAN model to decompose the trunk sap flow data into N intrinsic model functions, where N is a positive integer greater than 1;

[0064] A model construction unit, used to construct a CNN-BiGRU-SA model, wherein the convolution layer, excitation layer, pooling layer, fully connected layer, BiGRU layer and Attention layer of the CNN model in the CNN-BiGRU-SA model are connected in sequence;

[0065] A training unit, used for inputting the training set into the CNN-BiGRU-SA model to train the model, using the test set to test the CNN-BiGRU-SA model, and outputting the CNN-BiGRU-SA model if the prediction accuracy of the CNN-BiGRU-SA model reaches a preset threshold;

[0066] The prediction unit is used to transmit the real-time collected trunk sap flow data and environmental data to the trained CNN-BiGRU-SA model in the cloud server to calculate the predicted value of the trunk sap flow.

[0067] The present invention discloses a system for the above-mentioned CNN-BiGRU model sap flow prediction method based on the attention mechanism. The data acquisition unit collects trunk sap flow data and environmental data, uses the CEEMDAN model to decompose the trunk sap flow data into N intrinsic model functions, removes the noise in the complex high-dimensional data, and extracts the characteristic value after the data normalization process, so as to mine the relevant components affecting the trunk sap flow. The model construction unit constitutes a CNN-BiGRU-SA model, CNN is used to extract spatial features, BiGRU captures time series features, and SA (Self-Attention) enhances the model's attention to important features and the correlation mining of global variables. The prediction unit collects trunk sap flow data and environmental data in real time, transmits them to the trained CNN-BiGRU-SA model in the cloud server, and calculates the predicted value of the trunk sap flow. The system can effectively process and predict the trunk sap flow, enhance the feature extraction capability in the trunk sap flow data and environmental data, reduce the data processing amount and noise interference in the data processing process, and greatly improve the accuracy and efficiency of the model prediction.

[0068] The present invention also provides an electronic device, at least one processor; and

[0069] a memory communicatively connected to the at least one processor; wherein,

[0070] The memory stores instructions that can be executed by the at least one processor. The instructions are executed by the at least one processor so that the at least one processor can perform the above method.

[0071] The present invention also provides a machine-readable storage medium, on which instructions are stored, and the instructions are used to enable a machine to execute the method of the present invention as described above.

[0072] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the described action sequence, because according to the present invention, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.

[0073] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0074] In the several embodiments provided by the present invention, it should be understood that the disclosed device can be implemented in other ways. For example, the device embodiments described above are only schematic, such as the division of the units, which is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical or other forms.

[0075] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0076] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0077] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a mobile terminal, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk and other media that can store program codes.

[0078] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A CNN-BiGRU model sap flow prediction method based on attention mechanism, characterized in that: The CNN-BiGRU model sap flow prediction method based on the attention mechanism includes: Step S1, collecting trunk sap flow data and environmental data, preprocessing the trunk sap flow data and the environmental data respectively, and dividing the preprocessed data into a training set and a test set in a ratio of 8:2; The data preprocessing includes a sap flow reconstruction process, a data normalization process and a feature value extraction process, wherein the sap flow reconstruction process includes introducing a CEEMDAN model to decompose the trunk sap flow data into N intrinsic model functions, wherein N is a positive integer greater than 1; Step S2, constructing a CNN-BiGRU-SA model, wherein the convolution layer, excitation layer, pooling layer, fully connected layer, BiGRU layer and Attention layer of the CNN model in the CNN-BiGRU-SA model are connected in sequence; Step S3, input the training set into the CNN-BiGRU-SA model to train the model, use the test set to test the CNN-BiGRU-SA model, and if the prediction accuracy of the CNN-BiGRU-SA model reaches a preset threshold, output the CNN-BiGRU-SA model.

2. The CNN-BiGRU model sap flow prediction method based on the attention mechanism according to claim 1 is characterized in that: In step S1, N intrinsic model functions are sequentially calculated with the trunk sap flow data to obtain N Hce values, forming a vector HCE = [Hce1, Hce2, ..., Hce n ]; Square the amplitudes of the N intrinsic model functions in turn, and then perform time integration to obtain the vector EIMF = [E1, E2, ..., E n ], perform dot multiplication of vector HCE and vector EIMF to obtain vector M = [M1, M2, ..., M n ].

3. The CNN-BiGRU model sap flow prediction method based on the attention mechanism according to claim 2 is characterized in that: The data normalization process includes Max-Min normalization or Z-score normalization.

4. The CNN-BiGRU model sap flow prediction method based on the attention mechanism according to claim 3 is characterized in that: The feature value extraction process includes calculating the Hce value between the tree trunk sap flow data and the environmental data, selecting a feature factor according to the Hce value, u=F X (x) v=F Y (y) F X,Y (x,y)=C(F X (x),F Y (y))=C(u,v) H ce (u,v)=-∫∫C(u,v)logC(u,v)d u d v X is the trunk sap flow data set, x is the trunk sap flow data, Y is the environmental data set, y is the environmental data, F X (x), F Y (y) is the marginal distribution function, F X,Y (x, y) is the joint distribution function, C is the Copula function, H ce (u, v) is the Hce value between the trunk sap flow data and the environmental data.

5. The CNN-BiGRU model sap flow prediction method based on the attention mechanism according to claim 1 is characterized in that: The excitation layer uses the ReLU function to perform nonlinear mapping on the input data, including: Among them, f(x) is the ReLU function and x is the input data.

6. The CNN-BiGRU model sap flow prediction method based on the attention mechanism according to claim 1 is characterized in that: The BiGRU layer includes an update gate and a reset gate.

7. The CNN-BiGRU model sap flow prediction method based on the attention mechanism according to any one of claims 1 to 6, characterized in that: The real-time collected trunk sap flow data and environmental data are transmitted to the trained CNN-BiGRU-SA model in the cloud server to calculate the predicted value of trunk sap flow.

8. A system for executing the CNN-BiGRU model sap flow prediction method based on the attention mechanism as described in any one of claims 1 to 7, characterized in that: The system comprises, A data collection unit, used for collecting trunk sap flow data and environmental data, preprocessing the trunk sap flow data and the environmental data respectively, and dividing the preprocessed data into a training set and a test set in a ratio of 8:2; The data preprocessing includes a sap flow reconstruction process, a data normalization process and a feature value extraction process, wherein the sap flow reconstruction process includes introducing a CEEMDAN model to decompose the trunk sap flow data into N intrinsic model functions, wherein N is a positive integer greater than 1; A model construction unit, used to construct a CNN-BiGRU-SA model, wherein the convolution layer, excitation layer, pooling layer, fully connected layer, BiGRU layer and Attention layer of the CNN model in the CNN-BiGRU-SA model are connected in sequence; A training unit, used for inputting the training set into the CNN-BiGRU-SA model to train the model, using the test set to test the CNN-BiGRU-SA model, and outputting the CNN-BiGRU-SA model if the prediction accuracy of the CNN-BiGRU-SA model reaches a preset threshold; The prediction unit is used to transmit the real-time collected trunk sap flow data and environmental data to the trained CNN-BiGRU-SA model in the cloud server to calculate the predicted value of the trunk sap flow.

9. An electronic device, characterized in that: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the CNN-BiGRU model sap flow prediction method based on the attention mechanism as described in any one of claims 1-7.

10. A machine-readable storage medium, characterized in that: The machine-readable storage medium stores instructions for causing the machine to execute the CNN-BiGRU model sap flow prediction method based on the attention mechanism as described in any one of claims 1-7.

Citation Information

Cited By

  • Gas-liquid two-phase rotational flow pattern identification method and system based on multi-module deep learning

    CN120217114A

  • Trunk liquid flow prediction method and device combining gradient lifting and time convolution

    CN121072336A

  • Tree sap flow prediction method and device combining gradient boosting and time convolution

    CN121072336B