Method, device, medium and equipment for time-series causal discovery of digital agricultural information
By employing hierarchical supervised learning and convolutional neural networks, the time-series data of digital agricultural information is decomposed into mechanistic invariant and time-invariant modules. This solves the problems of noise diversity and insufficient data volume in causal discovery in digital agricultural information, and achieves efficient causal relationship identification.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HARBIN INST OF TECH
- Filing Date
- 2023-04-10
- Publication Date
- 2026-04-21
AI Technical Summary
Existing technologies are difficult to apply effectively to causal discovery of time-series data in digital agriculture, especially when noise is diverse and the data volume is small, which presents significant limitations.
A hierarchical supervised learning approach is adopted, which uses a convolutional neural network to expand the dataset into multiple window representations and decomposes the temporal causal mechanism into a summation of mechanism-invariant and time-invariant modules. The mechanism-invariant and time-invariant modules output the causal numerical transformation relationship and window causal graph, and the model is trained by combining the squared error for time prediction.
It improves time and sample efficiency, identifies causal relationships between variables within time slices and between time slice variables within time chains, overcomes the problems of noise diversity and small data volume in digital agricultural information time series data, and provides a theoretical basis for the mechanism research of digital agricultural information.
Smart Images

Figure CN116401291B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of agricultural information technology, and more specifically, to a method, apparatus, medium, and equipment for discovering the temporal causality of digital agricultural information. Background Technology
[0002] Causal discovery in time series data aims to capture causal relationships between variables within a time slice and between variables in a time slice. For example, during the growth and development of crops, the various states of the crop at the current moment all affect the state at the next moment, which includes causal effects. Compared with causal discovery in non-time series data, causal discovery in time series data requires more data samples and has higher time complexity.
[0003] For digital agricultural information data, plant height data, leaf nitrogen content data, chlorophyll content data, soil temperature data, soil moisture data, weather temperature data, weather humidity data, wind speed data, carbon dioxide concentration data, light intensity data, and effective sunshine duration data all exhibit causal relationships in the form of ordinary differential equations. However, the time series data in digital agricultural information data are characterized by diverse noise and small data volume. Existing causal discovery methods for time series data are difficult to apply to the analysis of digital agricultural information data, resulting in significant limitations. Summary of the Invention
[0004] To address the shortcomings of existing technologies, this invention provides a causal discovery device and apparatus based on hierarchical supervised learning.
[0005] In a first aspect, the present invention provides a method for discovering the temporal causality of digital agricultural information, comprising:
[0006] Acquire a dataset comprising multiple observable time series of digital agriculture information, wherein each observable time series contains samples within the same time range, and the variables in the dataset include at least two of the following: plant height data, leaf nitrogen content data, chlorophyll content data, soil temperature data, soil moisture data, weather temperature data, weather humidity data, wind speed data, carbon dioxide concentration data, light intensity data, and effective light duration data.
[0007] Based on convolutional neural networks, the dataset is expanded into multiple window representations, and the temporal causal mechanism of the dataset is decomposed into a summation form with mechanism-invariant modules and time-invariant modules;
[0008] Based on the dataset, the causal numerical transformation relationship is output through the mechanism invariance module;
[0009] Based on the dataset, a windowed causal graph is output through the time-invariant module;
[0010] Based on the causal numerical transformation relationship and the window causal graph, a time prediction is performed by training a model using squared error to obtain the temporal causal relationship of different variables in digital agriculture information.
[0011] Optionally, acquiring a dataset comprising multiple observable time series of digital agriculture information includes:
[0012] Obtain a dataset X∈R containing d observable time series of digital agriculture information. d×T Each of the observable time series contains samples within the same time range t: t+T-1.
[0013] Optionally, expanding the dataset into multiple window representations based on a convolutional neural network includes:
[0014] Use a length of The sliding window converts the dataset into a matrix. Each M in the matrix M ω Represents the window observation value, where, τ represents the maximum lag delay. ω represents the window index, ω∈{1,...,c}.
[0015] Optionally, the step of decomposing the temporal causal mechanism of the dataset into a summation form having mechanistic invariant modules and time invariant modules includes:
[0016] The temporal causal mechanism is decomposed into a summation form, including causal weights representing time invariance and causal transformation relationships representing mechanism invariance, expressed by Equation 1, which includes:
[0017]
[0018] in, Let represent the observed data of variable i at time t, w represent the causal weight, f represent the causal transformation relationship, and i and j represent different time series. Let t' represent the weight of the causal influence of time series j on time series i, and t' represent the time delay. Indicates from arrive The transformation equation, Let t' represent the observed data of variable j at time t', where t' ∈ {t-τ, ..., t}. Indicates noise.
[0019] Optionally, the step of outputting the causal numerical transformation relationship based on the dataset through the mechanism invariance module includes:
[0020] Using a transform kernel For each window observation in the matrix M Perform the Hadamard product, then use PReLU as the activation function to obtain the output. Formula 2 is used to express this, and Formula 2 includes:
[0021]
[0022] in, This represents the observed value M corresponding to the window. ω The transformed matrix, K m M represents the transform kernel. ω The value represents the window observation, and ⊙ represents the Hadamard product between matrices;
[0023] The above process is repeated using different transform kernels to transform the c window observations M ω The transformed matrix obtained by performing the transformation By splicing the components, a three-dimensional matrix is obtained. The output is then the transformation equation f(X) between the different variables in the dataset.
[0024] Optionally, the step of outputting a windowed causal graph through the time-invariant module based on the dataset includes:
[0025] For any of the observed values in the window Formula 3 is used to aggregate similarity information between time series data within the window. Formula 3 includes:
[0026]
[0027] Among them, P ω K indicates t This indicates extracting each M ω The general extraction kernel, ω∈{1,...,c}, ⊙ represents the Hadamard product between matrices, d represents the number of variables, and τ represents the maximum lag delay;
[0028] The obtained time relationship P is mapped to using a feedforward neural network. Furthermore, when the time lag is zero, the self-looping property of the window cause-effect graph is limited, expressed by Formula 4, which includes:
[0029]
[0030] in, The weight represents the causal influence of time series i on j, with a time delay of t∈{0,...,τ}, and p represents the weight that makes i causal with j. Sparse threshold;
[0031] Based on the results output by Formula 3 and Formula 4, the window cause-effect graph is obtained.
[0032] Optionally, the step of obtaining the temporal causal relationship of different variables in digital agriculture information by training a model through squared error based on the causal numerical transformation relationship and the windowed causal graph includes:
[0033] Based on the causal numerical transformation relationship output by the mechanism invariance module and the windowed causal graph output by the time invariance module, parameter learning is performed through autoregression to obtain the temporal causal relationship, as represented by Formula 5, which includes:
[0034]
[0035] in, This represents the predicted data for variable j at time t′+τ. Represents the original input matrix X t′:′τ A time slice after transformation by the mechanism invariance module. Let represent the weight matrix of all causal edges pointing to time series j, d represent the number of variables, τ represent the maximum lag, and ⊙ represent the Hadamard product between matrices;
[0036] By optimizing prediction The window causality matrix W that satisfies the condition is found by using the squared error loss of the true value X at each time t′, as expressed by Formula 6, which includes:
[0037]
[0038] Among them, X t′ This represents the observed data of all variables at time t′. This represents the predicted data for all variables at time t′;
[0039] Based on the window causal matrix, the temporal causal relationships of different variables in digital agriculture information are obtained.
[0040] In a second aspect, the present invention provides a time-series causal discovery device for digital agricultural information, comprising:
[0041] The acquisition module is used to acquire a dataset of observable time series including multiple digital agriculture information, wherein each observable time series contains samples within the same time range, and the variables in the dataset include at least two of the following: plant height data, leaf nitrogen content data, chlorophyll content data, soil temperature data, soil moisture data, weather temperature data, weather humidity data, wind speed data, carbon dioxide concentration data, light intensity data, and effective light duration data.
[0042] The decomposition module is used to expand the dataset into multiple window representations based on a convolutional neural network, and decompose the temporal causal mechanism of the dataset into a summation form with mechanism-invariant modules and time-invariant modules;
[0043] The first calculation module is used to output the causal numerical transformation relationship based on the dataset through the mechanism invariance module;
[0044] The second calculation module is used to output a windowed causal graph based on the dataset through the time-invariant module;
[0045] The training module is used to perform time prediction by training a model through squared error based on the causal numerical transformation relationship and the window causal graph, and to obtain the temporal causal relationship of different variables in digital agriculture information.
[0046] Thirdly, the present invention provides a computer-readable storage medium storing a computer program for executing the aforementioned method for discovering the temporal causal relationship of digital agricultural information.
[0047] Fourthly, the present invention provides a computer device, including a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor executes the aforementioned method for discovering the temporal causal relationship of digital agricultural information.
[0048] The present invention provides a method, apparatus, medium, and device for discovering temporal causality in digital agricultural information. By using a convolutional neural network as the basic network structure, the observable time-series dataset of acquired digital agricultural information is expanded into multiple window representations. The temporal causal mechanism in the dataset is decomposed into a summation form with mechanism-invariant and time-invariant modules. Furthermore, the causal numerical transformation relationships and window causal graphs between different variables in the dataset are obtained through the mechanism-invariant and time-invariant modules, respectively. The results output by the two modules are then used to predict using a squared error model, thereby ultimately obtaining the temporal causal relationships between different variables in the digital agricultural information. This research provides a theoretical basis for the study of the mechanisms of digital agricultural information. It integrates mechanism-invariant and time-invariant information in the causal discovery process, making full use of the time-invariant and mechanism-invariant characteristics of causal relationships within each observation window, thereby improving time and sample efficiency. Through the causal numerical transformation relationship output by the mechanism-invariant module and the window causal graph output by the time-invariant module, it identifies the causal relationships between variables within time slices and between variables in time slices within the time chain, obtaining a consistent optimal causal directed acyclic graph. This overcomes the problems of diverse noise and small data volume in digital agricultural information time series data, and has good application prospects in the study of the mechanisms of digital agricultural information. Attached Figure Description
[0049] Figure 1 This is a diagram illustrating the application environment of the temporal causal discovery method for digital agricultural information in this embodiment of the invention.
[0050] Figure 2 This is a flowchart illustrating the temporal causal discovery method for digital agricultural information in an embodiment of the present invention;
[0051] Figure 3 This is a structural block diagram of the time-series causal discovery device for digital agricultural information in an embodiment of the present invention;
[0052] Figure 4 This is an internal structural diagram of a computer device in an embodiment of the present invention. Detailed Implementation
[0053] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Although some embodiments of the present invention are shown in the drawings, it should be understood that the present invention can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the present invention. It should be understood that the accompanying drawings and embodiments of the present invention are for illustrative purposes only and are not intended to limit the scope of protection of the present invention.
[0054] It should be understood that the various steps described in the method embodiments of the present invention may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present invention is not limited in this respect.
[0055] The term "comprising" and its variations as used herein are open-ended, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments"; the term "optionally" means "optional embodiments". Definitions of other terms will be given in the following description. It should be noted that the concepts of "first", "second", etc., mentioned in this invention are used only to distinguish different devices, modules, or units, and are not intended to limit the order of functions performed by these devices, modules, or units or their interdependencies.
[0056] It should be noted that the terms "a" and "a plurality of" used in this invention are illustrative rather than restrictive. Those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".
[0057] The names of the messages or information exchanged between the multiple devices in the embodiments of the present invention are for illustrative purposes only and are not intended to limit the scope of these messages or information.
[0058] In existing technologies, causal discovery methods for time series data typically utilize information within and between time slices, such as linear regression, conditional independence, and smoothing score functions. These methods can be broadly categorized into Granger causality-based methods, constraint-based methods, and score-based methods.
[0059] Among them, Granger causality-based methods use regression models to search for directed acyclic graphs. However, such methods are difficult to generalize to other types of datasets under the assumptions of stationary linear systems and independent random noise with zero mean.
[0060] Constraint-based methods test the conditional independence of all time series between two variables. For example, if and only if At that time, they established a system based on the irreversibility of time. arrive The causal relationship, in which However, as the number of variables and the maximum time lag increase, the solution space of causal graphs grows exponentially. Worse still, when data is limited, such methods require strong but impractical assumptions (e.g., Markov conditions, fidelity, and Gaussian noise).
[0061] Fractional-based methods use a fractional function S and search the solution space of a directed acyclic graph to maximize the fractional function S using a directed graph G within time slices and a directed graph A between time slices. Inspired by smooth representations, fractional-based methods use acyclicity to constrain G to learn temporal causal structures. While acyclicity regularization coefficients enable more efficient optimization of the fractional function, they do not guarantee finding the correct causal graph and often get trapped in local optima.
[0062] Therefore, existing causal discovery methods for time-series data have certain limitations. In addition, the diverse noise and small data volume of time-series data in digital agriculture information further increase the difficulty of applying existing causal methods for time-series data in the analysis of digital agriculture information time-series data.
[0063] To make the content disclosed in the embodiments of the present invention clearer, the technical terms and technical background used in the embodiments of the present invention will be introduced before the specific technical solutions are described.
[0064] I. Discovery of Time-Based Causality:
[0065] Consider a dataset X∈R containing d observable time series. d×T Each time series contains samples within the same time range t: t+T-1. Time-series causal discovery aims to discover observable time series (X1, ..., X...). d The causal relationships between these factors include time lag and causal relationships within the same time slice, which can be represented by a weight matrix. It means that, among them It is obtained by adding one to the maximum time lag delay τ. Non-zero terms in W Represents time series X i For time series X j The effects are generated with a time delay t∈{0,...,τ}. For a windowed causal matrix, it can form a windowed causal graph to describe the causal relationships within or between time slices. For example, for digital agricultural information data, plant height data, leaf nitrogen content data, chlorophyll content data, soil temperature data, soil moisture data, weather temperature data, weather humidity data, wind speed data, carbon dioxide concentration data, light intensity data, and effective light duration data all exhibit time-series causal relationships in the form of ordinary differential equations, where the maximum time lag τ is usually 1.
[0066] The windowed cause-effect graph is defined as follows: Assume X is a multivariate dataset containing d observable time series. The time windows are... The windowed cause-effect graph of X is defined as a directed acyclic graph G = (V, E), where τ represents the maximum time lag. In G, nodes represent data samples. Edges represent causal relationships between nodes. Furthermore, edges... X represents i Cause X j At any time t, the time delay is 0 ≤ t′ ≤ τ. It should be noted that when i = j, t′ ≠ 0.
[0067] The aforementioned windowed cause-effect graphs are typically discovered using Granger causality tests. Granger causality is based on numerical computation, determining temporal causality by calculating numerical fitting loss and variance.
[0068] Specifically, Granger causality is defined as follows: Suppose X is a multivariate dataset containing d observable time series, and V represents all nodes of G. If... in Indicates using V for prediction The variance of X indicates j Cause X i And the time delay is tt′, which is caused by express.
[0069] II. Causality
[0070] In the discovery of temporal causality, the invariance conditions include time invariance and mechanism invariance, which together form causal invariance.
[0071] The definition of time invariance is: Let X∈R d×T Let be d observable time series within a time range T. For any two variables i, j∈{1,...,d}, if So As long as t1-t2 = t3-t4, where Pa(·) is the parent node of the vertex in the window cause-effect graph.
[0072] Specifically, taking time-series data of digital agriculture information as an example, the aforementioned time invariance manifests as follows: if there is a causal relationship between leaf nitrogen content and chlorophyll content, then this causal relationship holds for any time t. Furthermore, the invariance over time can be written as a function of time, with T representing the time index. Further, the mechanistic invariance can be obtained from a given time series using the value of T.
[0073] Mechanism invariance is defined as: for any variable V i Given a set of variables S, and a conditional distribution P(V) i |S) is constant under different T values if and only if
[0074] The invariance of the above mechanism indicates that, for any time t, the conditional probability (mechanism of action) between nodes remains unchanged. In other words, the causal generation formula between leaf nitrogen content and chlorophyll content does not change with time.
[0075] Furthermore, based on the two properties of causality in time series mentioned above, the following lemma can be derived:
[0076] Window Independence Lemma: On a finite time series dataset with a maximum time lag of τ, including variables X... t -τ , ..., X t If there is in P(X) and 0≤t i ≤τ, then there is still For all maxt i -τ≤t′≤mint i t′.
[0077] The aforementioned lemma shows that for an identifiable time-series causal graph, the independence condition for time translation holds for any time t. Specifically, the causal edges and causal generation equations between leaf nitrogen content and chlorophyll content are both time-translation independent. Furthermore, this lemma can be used to transform observed data X into windowed observation data for causal discovery. Additionally, the final windowed causal graph and data transformation equations can be obtained by extracting common information from each window.
[0078] III. Necessity of Convolution
[0079] Using Cramer representations and spectral representations of covariance sequences, Granger causality shows that the sequence can be decomposed into the sum or integral of uncorrelated components. Inspired by such representations and Fourier transforms, for observed data X∈R... d×T , Consider a function X = Wf(X) + E, which can be decomposed into Fourier integral form:
[0080]
[0081] Where s represents the projection of Wf(X) onto the spatial domain, and t represents the projection of Wf(X) onto the time domain. Indicates the use of transformation equations Coupling acting on two vectors.
[0082] Then, the time series data is decomposed using the multivariate Fourier transform:
[0083] Similar to the time-independent Schrödinger equation, we assume that f(x, y) can be decomposed into a spatial domain and a time domain, i.e.
[0084] According to the convolution theorem, F{h*g}=F{h}·F{g}, where F{·} denotes the Fourier transform. Furthermore, the convolution formula can be transformed into:
[0085]
[0086] The above formula shows that the observation X can be obtained by convolving its temporally informational convolution kernel with its structurally detailed window signal, i.e. Furthermore, sliding in the form of a window is one way to achieve structural order. Through the above transformation, it can be proven that for this kind of causal discovery from digital agricultural information, it can be decomposed into spatial domain components and temporal domain components. By convolving the two parts separately and then coupling them, the corresponding causal information can be obtained, and thus the causal discovery results can be obtained.
[0087] Furthermore, Granger causality indicates that if X i Past values provide information about X j The unique statistical significance of future values, then time series X i Granger's effect on X j Therefore, based on the definition of Granger causality test, causal discovery can be solved as a numerical fitting problem.
[0088] Figure 1 This is a diagram illustrating the application environment of a time-series causal discovery method for digital agriculture information in one embodiment. (Refer to...) Figure 1 This time-series causal discovery method for digital agricultural information is applied to a time-series causal discovery system for digital agricultural information. The system includes a terminal 110 and a server 120. The terminal 110 and server 120 are connected via a network. The terminal 110 can be a desktop terminal or a mobile terminal; a mobile terminal can be at least one of a mobile phone, tablet, or laptop. The server 120 can be a standalone server or a server cluster consisting of multiple servers.
[0089] like Figure 2 As shown, this embodiment of the invention provides a method for discovering the temporal causality of digital agricultural information, including:
[0090] Step 210: Obtain a dataset comprising multiple observable time series of digital agriculture information, wherein each observable time series contains samples within the same time range, and the variables in the dataset include at least two of the following: plant height data, leaf nitrogen content data, chlorophyll content data, soil temperature data, soil moisture data, weather temperature data, weather humidity data, wind speed data, carbon dioxide concentration data, light intensity data, and effective light duration data.
[0091] Step 220: Based on the convolutional neural network, the dataset is expanded into multiple window representations, and the temporal causal mechanism of the dataset is decomposed into a summation form with mechanism-invariant modules and time-invariant modules;
[0092] Step 230: Based on the dataset, output the causal numerical transformation relationship through the mechanism invariance module;
[0093] Step 240: Based on the dataset, output a windowed causal graph through the time-invariant module;
[0094] Step 250: Based on the causal numerical transformation relationship and the window causal graph, time prediction is performed by training a model using squared error to obtain the temporal causal relationship of different variables in digital agriculture information.
[0095] Figure 2 This is a flowchart illustrating a time-series causal discovery method for digital agriculture information in one embodiment. It should be understood that, although... Figure 2 The steps in the flowchart are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise explicitly stated herein, there is no strict order in which these steps are executed, and they can be performed in other orders. Figure 2 At least some of the steps in the process may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least some of the sub-steps or stages of other steps.
[0096] Step 210 includes a dataset of multiple observable time series of digital agricultural information. Each observable time series contains samples within the same time range, facilitating causal discovery of time series data between different variables. The variables in the dataset include at least two of the following: plant height data, leaf nitrogen content data, chlorophyll content data, soil temperature data, soil moisture data, weather temperature data, weather humidity data, wind speed data, carbon dioxide concentration data, light intensity data, and effective light duration data.
[0097] In this dataset, each variable is sampled once at each time point within the time range, and each sample of a variable corresponds to one sample.
[0098] For example, the dataset is a dataset X∈R containing d observable time series of digital agriculture information. d×T Each observable time series contains samples within the same time range t: t+T-1. The variables in the dataset include plant height data, leaf nitrogen content data, chlorophyll content data, soil temperature data, soil moisture data, weather temperature data, weather humidity data, wind speed data, carbon dioxide concentration data, light intensity data, and effective light duration data.
[0099] In step 220, expanding the dataset into multiple window representations based on a convolutional neural network includes:
[0100] Use a length of The sliding window converts the dataset into a matrix. Each M in the matrix M ω Represents the window observation value, where, τ represents the maximum lag delay. ω represents the window index, ω∈{1,...,c}.
[0101] In other words, using a length of The sliding window will contain d data points of digital agriculture information, specifically an observable time series dataset X∈R. d×T Convert to matrix Each M in matrix M represents a window; that is, matrix M includes multiple window representations. Correspondingly, M ω This represents the observed value in the window.
[0102] The step of decomposing the temporal causal mechanism of the dataset into a summation form with mechanistic invariant modules and time invariant modules includes:
[0103] The temporal causal mechanism is decomposed into a summation form, including causal weights representing time invariance and causal transformation relationships representing mechanism invariance, expressed by Equation 1, which includes:
[0104]
[0105] in, Let represent the observed data of variable i at time t, w represent the causal weight, f represent the causal transformation relationship, and i and j represent different time series. Let t' represent the weight of the causal influence of time series j on time series i, and t' represent the time delay. Indicates from arrive The transformation equation, Let t' represent the observed data of variable j at time t', where t' ∈ {t-τ, ..., t}. Indicates noise.
[0106] Based on the basic network structure of convolutional neural networks, the dataset is expanded into a three-step structure after window representation, with module B having mechanism invariance. m Time Invariance Module B t Specifically, it includes causal weights w representing time invariance and causal transformation relationships f representing mechanism invariance. It can make full use of causal relationships within and between time slices in the process of discovering time-series causality in digital agricultural information, and integrates time-invariant information and mechanism-invariant information, thereby improving time and sample efficiency.
[0107] In step 230, the step of outputting the causal numerical transformation relationship based on the dataset through the mechanism invariance module includes:
[0108] Using a transform kernel For each window observation in the matrix M Perform the Hadamard product, then use PReLU as the activation function to obtain the output. Formula 2 is used to express this, and Formula 2 includes:
[0109]
[0110] in, This represents the observed value M corresponding to the window. ω The transformed matrix, K m M represents the transform kernel. ω The value represents the window observation, and ⊙ represents the Hadamard product between matrices;
[0111] The above process is repeated using different transform kernels to transform the c window observations M ω The transformed matrix obtained by performing the transformation By splicing the components, a three-dimensional matrix is obtained. The output is then the transformation equation f(X) between the different variables in the dataset.
[0112] The above steps can find a unified transformation equation for all window representations, which includes the equation relationship between different variables (such as leaf nitrogen content data and chlorophyll content data) in the dataset of digital agricultural information time series data.
[0113] It should be noted that the transformation equations obtained through the above steps are not entirely causal transformation processes and need to be further filtered using a time-invariant module.
[0114] In step 240, the temporal information within the window is fused using a causal convolutional network structure, specifically:
[0115] For any of the observed values in the window Formula 3 is used to aggregate similarity information between time series data within the window. Formula 3 includes:
[0116]
[0117] Among them, P ω K indicates t This indicates extracting each M ω The general extraction kernel, ω∈{1,...,c}, ⊙ represents the Hadamard product between matrices, d represents the number of variables, and τ represents the maximum lag delay;
[0118] Using the same extraction kernel After performing the Hadamard product, the output can display the similarity features between time series data, and at the same time, K t As an invariant representation of time series data, it is possible to predict future values of a target time series by learning specific repeating patterns in the input sequence. These learned patterns represent the correlation (and possibly causal relationship) between the input and output sequences, which is crucial for causal discovery.
[0119] The obtained time relationship P is mapped to using a feedforward neural network. Furthermore, when the time lag is zero, the self-looping property of the window cause-effect graph is limited, expressed by Formula 4, which includes:
[0120]
[0121] in, The weight represents the causal influence of time series i on j, with a time delay of t∈{0,...,τ}, and p represents the weight that makes i causal with j. Sparse threshold;
[0122] The window cause-effect graph is obtained from the results of Formulas 3 and 4.
[0123] In one embodiment, since the weight matrix in the window causal graph can display the causal direction and causal weight, after obtaining the window causal graph, it is possible to further obtain the causal direction between different variables, including the causal edge between leaf nitrogen content and chlorophyll content in digital agricultural information time series data.
[0124] In step 250, both the Cramer representation and the spectral representation of the covariance sequence indicate that the sequence can be decomposed into the sum or integral of uncorrelated components. Therefore, the outputs of the mechanism-invariant module and the time-invariant module can be combined to calculate... Given It represents the predicted data of all variables from time t+τ to time T, which means that the parameters are learned through autoregression to obtain accurate time-series causal relationships.
[0125] Specifically, based on the causal numerical transformation relationship output by the mechanism invariance module and the windowed causal graph output by the time invariance module, parameter learning is performed through autoregression to obtain the temporal causal relationship, expressed by Formula 5, which includes:
[0126]
[0127] in, This represents the predicted data for variable j at time t′+τ. Represents the original input matrix X t′:t′+τ A time slice after transformation by the mechanism invariance module. Let represent the weight matrix of all causal edges pointing to time series j, d represent the number of variables, τ represent the maximum lag, and ⊙ represent the Hadamard product between matrices;
[0128] Causal edges, including those within and between time slices, have already been computed in W;
[0129] By optimizing prediction The window causality matrix W that satisfies the condition is found by using the squared error loss of the true value X at each time t′, as expressed by Formula 6, which includes:
[0130]
[0131] Among them, X t′ This represents the observed data of all variables at time t′. This represents the predicted data for all variables at time t′;
[0132] Based on the window causal matrix, the temporal causal relationships of different variables in digital agriculture information are obtained.
[0133] In order to perform the steps in the above embodiments and various optional embodiments, such as Figure 3 As shown, another embodiment of the present invention provides a time-series causal discovery device for digital agricultural information, comprising:
[0134] Acquisition device 310 is used to acquire a dataset of observable time series including multiple digital agriculture information, wherein each observable time series contains samples within the same time range, and the variables in the dataset include at least two of the following: plant height data, leaf nitrogen content data, chlorophyll content data, soil temperature data, soil moisture data, weather temperature data, weather humidity data, wind speed data, carbon dioxide concentration data, light intensity data, and effective light duration data.
[0135] The decomposition module 320, based on a convolutional neural network, expands the dataset into multiple window representations and decomposes the temporal causal mechanism of the dataset into a summation form with mechanism-invariant modules and time-invariant modules;
[0136] The first calculation module 330 outputs the causal numerical transformation relationship through the mechanism invariance module based on the dataset.
[0137] The second calculation module 340 outputs a windowed causal graph based on the dataset through the time-invariant module;
[0138] The training module 350, based on the causal numerical transformation relationship and the window causal graph, uses a squared error training model to perform time prediction and obtain the temporal causal relationship of different variables in digital agricultural information.
[0139] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor:
[0140] Obtain a dataset of observable time series including multiple digital agriculture information, wherein each observable time series contains samples within the same time range, and the variables in the dataset include at least two of the following: plant height data, leaf nitrogen content data, chlorophyll content data, soil temperature data, soil moisture data, weather temperature data, weather humidity data, wind speed data, carbon dioxide concentration data, light intensity data, and effective light duration data.
[0141] Based on convolutional neural networks, the dataset is expanded into multiple window representations, and the temporal causal mechanism of the dataset is decomposed into a summation form with mechanism-invariant modules and time-invariant modules;
[0142] Based on the dataset, the causal numerical transformation relationship is output through the mechanism invariance module;
[0143] Based on the dataset, a windowed causal graph is output through the time-invariant module;
[0144] Based on the causal numerical transformation relationship and the window causal graph, a time prediction is performed by training a model using squared error to obtain the temporal causal relationship of different variables in digital agriculture information.
[0145] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform the following steps:
[0146] Acquire a dataset comprising multiple observable time series of digital agriculture information, wherein each observable time series contains samples within the same time range, and the variables in the dataset include at least two of the following: plant height data, leaf nitrogen content data, chlorophyll content data, soil temperature data, soil moisture data, weather temperature data, weather humidity data, wind speed data, carbon dioxide concentration data, light intensity data, and effective light duration data.
[0147] Based on convolutional neural networks, the dataset is expanded into multiple window representations, and the temporal causal mechanism of the dataset is decomposed into a summation form with mechanism-invariant modules and time-invariant modules;
[0148] Based on the dataset, the causal numerical transformation relationship is output through the mechanism invariance module;
[0149] Based on the dataset, a windowed causal graph is output through the time-invariant module;
[0150] Based on the causal numerical transformation relationship and the window causal graph, a time prediction is performed by training a model using squared error to obtain the temporal causal relationship of different variables in digital agriculture information.
[0151] Figure 4 An internal structural diagram of a computer device in one embodiment is shown. Specifically, this computer device may be... Figure 1 Terminal 110 (or server 120) in the middle. For example... Figure 4As shown, the computer device includes a processor, memory, network interface, input device, and display screen connected via a system bus. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores an operating system and may also store computer programs. When executed by the processor, these programs enable the processor to implement a time-series causal discovery method for digital agricultural information. The internal memory may also store computer programs, which, when executed by the processor, enable the processor to implement the time-series causal discovery method for digital agricultural information. The display screen can be an LCD screen or an e-ink screen. The input device can be a touch layer covering the display screen, buttons, a trackball, or a touchpad mounted on the computer device's casing, or an external keyboard, touchpad, or mouse.
[0152] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments described above. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0153] The above description is merely a specific embodiment of the present invention, enabling those skilled in the art to understand or implement the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the present invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features claimed herein.
Claims
1. A method for discovering temporal causality in digital agricultural information, characterized in that, include: Obtain a dataset of observable time series including multiple digital agriculture information, wherein each observable time series contains samples within the same time range, and the variables in the dataset include at least two of the following: plant height data, leaf nitrogen content data, chlorophyll content data, soil temperature data, soil moisture data, weather temperature data, weather humidity data, wind speed data, carbon dioxide concentration data, light intensity data, and effective light duration data. Based on convolutional neural networks, the dataset is expanded into multiple window representations, and the temporal causal mechanism of the dataset is decomposed into a summation form with mechanism-invariant modules and time-invariant modules; Based on the dataset, the causal numerical transformation relationship is output through the mechanism invariance module; Based on the dataset, a windowed causal graph is output through the time-invariant module; Based on the causal numerical transformation relationship and the window causal graph, time prediction is performed by training a model using squared error to obtain the temporal causal relationship of different variables in digital agriculture information; The acquisition of an observable time series dataset comprising multiple digital agriculture information items includes: Get included d A dataset of digital agricultural information that can be observed over time. Each of the observable time series contains the same time range. The samples in; The method of expanding the dataset into multiple window representations based on a convolutional neural network includes: Use a length of The sliding window converts the dataset into a matrix. The matrix Each of them Represents the window observation value, where, , Indicates the maximum lag delay. , Indicates the index of the window. ; The step of decomposing the temporal causal mechanism of the dataset into a summation form with mechanistic invariant modules and time invariant modules includes: The temporal causal mechanism is decomposed into a summation form, including causal weights representing time invariance and causal transformation relationships representing mechanism invariance, expressed by Equation 1, which includes: ; in, Indicates in Time variable Observational data, This represents the causal weight. This indicates the causal transformation relationship. and Representing different time series Representing time series Time series The weight of causal influence, Indicates time delay. Indicates from arrive The transformation equation, Indicates in Time variable Observational data, , Indicates noise; The step of outputting causal numerical transformation relationships based on the dataset through the mechanism invariance module includes: Using a transform kernel For each of the matrices The window observation value in Perform the Hadamard product, then use PReLU as the activation function to obtain the output. The following is expressed using Formula 2, which includes: ; in, Indicates the observed value corresponding to the window. The transformed matrix, Indicates the transformation kernel. This represents the observed value of the window. Represents the Hadamard product between matrices; The above process is repeated using different transform kernels, and The observed values of the window The transformed matrix obtained by performing the transformation By splicing the components, a three-dimensional matrix is obtained. Then the output is the transformation equation between the different variables in the dataset. ; The step of outputting a windowed causal graph based on the dataset through the time-invariant module includes: For any of the observed values in the window Formula 3 is used to aggregate similarity information between time series data within the window. Formula 3 includes: ; in, Indicates extracting each Universal extraction kernel , Represents the Hadamard product between matrices. Indicates the number of variables. Indicates the maximum lag delay; The obtained time relationship is obtained by using a feedforward neural network. Mapped to Furthermore, when the time lag is zero, the self-looping property of the window cause-effect graph is restricted, expressed by Formula 4, which includes: ; in, Representing time series right The weight of causal effects, with a time delay of , Indicates to make Sparse threshold; Based on the results output by Formula 3 and Formula 4, obtain the window cause-effect graph; The step of obtaining the temporal causal relationships of different variables in digital agriculture information by training a model using squared error based on the causal numerical transformation relationship and the windowed causal graph includes: Based on the causal numerical transformation relationship output by the mechanism invariance module and the windowed causal graph output by the time invariance module, parameter learning is performed through autoregression to obtain the temporal causal relationship, which is expressed by Formula 5, which includes: ; in, Indicates in Time variable The predicted data, Represents the original input matrix A time slice after transformation by the mechanism invariance module. Indicates pointing to time series The weight matrix of all causal edges, Indicates the number of variables. Indicates the maximum lag delay. Represents the Hadamard product between matrices; By optimizing prediction and the true value At each time The squared error loss between the two is used to find the window causality matrix that meets the conditions. Formula Six is used to represent this, and Formula Six includes: ; in, Indicates in Observational data for all variables at any given time. Indicates in Predicted data for all variables at any given time; Based on the window causal matrix, the temporal causal relationships of different variables in digital agriculture information are obtained.
2. A time-series causal discovery device for digital agricultural information, characterized in that, The method for time-series causal discovery of digital agricultural information as described in claim 1 includes: The acquisition module is used to acquire a dataset of observable time series including multiple digital agriculture information, wherein each observable time series contains samples within the same time range, and the variables in the dataset include at least two of the following: plant height data, leaf nitrogen content data, chlorophyll content data, soil temperature data, soil moisture data, weather temperature data, weather humidity data, wind speed data, carbon dioxide concentration data, light intensity data, and effective light duration data. The decomposition module is used to expand the dataset into multiple window representations based on a convolutional neural network, and decompose the temporal causal mechanism of the dataset into a summation form with mechanism-invariant modules and time-invariant modules; The first calculation module is used to output the causal numerical transformation relationship based on the dataset through the mechanism invariance module; The second calculation module is used to output a windowed causal graph based on the dataset through the time-invariant module; The training module is used to perform time prediction by training a model through squared error based on the causal numerical transformation relationship and the window causal graph, and to obtain the temporal causal relationship of different variables in digital agriculture information.
3. A computer-readable storage medium, characterized in that, The storage medium stores a computer program for executing the time-series causal discovery method for digital agricultural information as described in claim 1.
4. A computer device, characterized in that, The method includes a processor, a memory, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the time-series causal discovery method for digital agricultural information as described in claim 1.
Citation Information
Patent Citations
A causal structure discovery method for temporal latent variables
CN108985460A
Process variable assessment method based on Granger causality
CN109960881A