Method and system for dynamic updating of plant cultivation data based on a knowledge graph

By aligning plant planting data in a time-space manner and analyzing temporal causal relationships, the plant planting knowledge graph is dynamically updated, which solves the logical conflict problem caused by noise and false correlations in existing technologies, and ensures the rigor and predictive accuracy of the knowledge graph.

CN123159490APending Publication Date: 2026-11-24肥城市老城街道农业综合服务中心
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611427263.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-15
Publication Date
2026-11-24

AI Technical Summary

Technical Problem

Existing plant cultivation knowledge graphs lack in-depth mining and verification of temporal causal relationships when monitoring data updates in real time, leading to data noise or spurious correlations, causing semantic and logical conflicts, and undermining the rigor of the underlying agronomical prior logic and the security of the topological structure of the graph.

Method used

By collecting plant planting data for spatiotemporal alignment, dynamic entity nodes and relational edges are generated. The conditional probability distribution divergence of dynamic relational edges and static edges is determined along the temporal causal relationship. Reverse intervention test is performed to dynamically update the graph topology, generate predictive knowledge edges, and roll back and delete temporary edges when the real-time data matching residual exceeds the threshold, so as to update the knowledge graph in a closed loop.

Benefits of technology

It effectively eliminates spurious conflicts caused by noise or false correlations, ensuring the rigor of the underlying agronomical prior logic and the security of the topological structure of the knowledge graph, and significantly improving the prediction accuracy and robustness of the plant cultivation knowledge graph in the long-term cultivation process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123159490A_ABST
    Figure CN123159490A_ABST
Patent Text Reader

Abstract

This invention discloses a method and system for dynamically updating plant planting data based on a knowledge graph. The invention relates to the technical field of knowledge graphs, mapping dynamic entity nodes and their corresponding dynamic edges to a plant planting knowledge graph. It determines the conditional probability distribution divergence between dynamic relationship edges and existing static edges in the plant planting knowledge graph along temporal causal relationships, thereby determining the target triplet to be dynamically updated. This ensures the rigor of the underlying agronomical prior logic and the security of the topological structure of the graph. The dynamically updated graph topology is used as input and fed into a pre-defined generative graph neural network to generate predictive knowledge edges within a pre-defined future time window. These predictive knowledge edges are marked as temporary edges. When the next round of real-time plant planting data is obtained, the subgraph matching residual between the next round of real-time plant planting data and the predictive knowledge edges is determined, and the plant planting knowledge graph is updated in a closed loop.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the technical field of knowledge graphs, and in particular to a method and system for dynamically updating plant planting data based on knowledge graphs. Background Technology

[0002] As modern agriculture develops towards intelligence and precision, the planting management in greenhouses increasingly relies on knowledge graph technology to integrate agronomical prior knowledge with real-time monitoring data in order to achieve accurate representation of plant growth status and decision support. However, existing plant planting knowledge graphs have many limitations in practical applications.

[0003] Existing technologies typically employ direct writing or overlay strategies based on simple similarity thresholds when updating real-time monitoring data to knowledge graphs. This lacks in-depth mining and verification of temporal causal relationships. Such blind updating methods are highly susceptible to interference from data noise or spurious correlations, leading to semantic and logical conflicts between newly added dynamic relationship edges and the inherent static edges in the graph. Existing technologies lack quantitative assessment mechanisms and counterfactual causal intervention methods for such information conflicts, making it impossible to eliminate spurious conflicts. Consequently, frequent updates compromise the rigor of the underlying agronomical prior logic and the security of the topological structure of the graph. Summary of the Invention

[0004] The purpose of this invention is to overcome the shortcomings of the prior art. This invention provides a method and system for dynamically updating plant planting data based on knowledge graphs.

[0005] This invention provides a method for dynamically updating plant cultivation data based on knowledge graphs, including: Plant planting data is collected during the inspection of the plant greenhouse. The plant planting data is spatiotemporally aligned to output aligned data. The aligned data is then mapped into a low-dimensional dense vector. Dynamic entity nodes and corresponding dynamic relation edges are generated based on the iteration of the low-dimensional dense vector. Dynamic entity nodes and their corresponding dynamic edges are mapped to the plant cultivation knowledge graph. The conditional probability distribution divergence between the dynamic relationship edges and the existing static edges in the plant cultivation knowledge graph is determined along the temporal causal relationship. In this way, a reverse intervention test is performed to determine the target triplet to be dynamically updated. The target triplet is subjected to a dynamic update operation on the graph topology to output the dynamically updated graph topology. The dynamically updated graph topology is then used as input to a pre-defined generative graph neural network to generate predictive knowledge edges within a pre-defined time window. Predictive knowledge edges are marked as temporary edges. When the next round of real-time plant planting data is obtained, the subgraph matching residual between the next round of real-time plant planting data and the predictive knowledge edge is determined. If the subgraph matching residual is greater than the preset residual threshold, the temporary edge is rolled back and deleted to update the plant planting knowledge graph in a closed loop.

[0006] This invention provides a knowledge graph-based dynamic update system for plant cultivation data, which is applied to the aforementioned knowledge graph-based dynamic update method for plant cultivation data. The knowledge graph-based dynamic update system for plant cultivation data includes: The iterative module is used to collect plant planting data during the detection process of the plant greenhouse, perform spatiotemporal alignment on the plant planting data to output aligned data, map the aligned data into a low-dimensional dense vector, and generate dynamic entity nodes and corresponding dynamic relation edges based on the iteration of the low-dimensional dense vector. The knowledge graph module is used to map dynamic entity nodes and their corresponding dynamic edges to the plant cultivation knowledge graph, and to determine the conditional probability distribution divergence between the dynamic relationship edges and the existing static edges in the plant cultivation knowledge graph along the temporal causal relationship, thereby performing reverse intervention tests and determining the target triplet to be dynamically updated. The prediction module is used to perform dynamic update operations on the graph topology of the target triples to output the dynamically updated graph topology. The dynamically updated graph topology is used as the input condition and fed into a preset generative graph neural network to generate predictive knowledge edges within a preset time window in the future. The update module is used to mark predictive knowledge edges as temporary edges. When the next round of real-time plant planting data is obtained, the subgraph matching residual between the next round of real-time plant planting data and the predictive knowledge edge is determined. If the subgraph matching residual is greater than the preset residual threshold, the temporary edge is rolled back and deleted to update the plant planting knowledge graph in a closed loop.

[0007] Compared with the prior art, the beneficial effects of the present invention are: (1) During the detection process of the plant greenhouse, plant planting data is collected and spatiotemporally aligned to output aligned data. The aligned data is then mapped to a low-dimensional dense vector. Dynamic entity nodes and corresponding dynamic relation edges are generated based on the iteration of the low-dimensional dense vector. The dynamic entity nodes and corresponding dynamic edges are mapped to the plant planting knowledge graph. The conditional probability distribution divergence between the dynamic relation edges and the existing static edges in the plant planting knowledge graph is determined along the temporal causal relationship. In this way, a reverse intervention test is performed to determine the target triplet to be dynamically updated. This effectively eliminates false conflicts caused by data noise or false correlations, ensuring that only target triplets with strong causal driving force and verified as true are updated. This ensures the rigor of the underlying agronomic prior logic of the graph and the security of the topological structure.

[0008] (2) Perform dynamic update operation on the graph topology of the target triplet to output the dynamically updated graph topology; take the dynamically updated graph topology as the conditional input and input it into the preset generative graph neural network to generate predictive knowledge edges within the preset time window; mark the predictive knowledge edges as temporary edges; when the next round of real-time plant planting data is obtained, determine the subgraph matching residual between the next round of real-time plant planting data and the predictive knowledge edge. If the subgraph matching residual is greater than the preset residual threshold, trigger the rollback deletion of the temporary edge to update the plant planting knowledge graph in a closed loop, so that the plant planting knowledge graph can continuously self-correct and evolve in the complex physical greenhouse environment, which significantly improves the prediction accuracy and robustness of the plant planting knowledge graph in the long-term planting process. Attached Figure Description

[0009] Figure 1 This is a flowchart illustrating the dynamic updating method for plant planting data based on knowledge graphs in an embodiment of the present invention. Figure 2 This is a simplified schematic diagram illustrating a specific application scenario of the dynamic updating method for plant planting data based on knowledge graphs in this invention embodiment. Figure 3 This is a schematic diagram of the structural composition of a knowledge graph-based dynamic update system for plant planting data in an embodiment of the present invention. Detailed Implementation

[0010] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.

[0011] Please see Figures 1 to 3 A dynamic update method for plant planting data based on knowledge graphs is proposed and applied to knowledge graph scenarios. The dynamic update method for plant planting data based on knowledge graphs includes: Step S11: Collect plant planting data during the detection process of the plant greenhouse, perform spatiotemporal alignment on the plant planting data to output aligned data, map the aligned data into a low-dimensional dense vector, and generate dynamic entity nodes and corresponding dynamic relation edges based on the iteration of the low-dimensional dense vector. Step S12: Map the dynamic entity nodes and their corresponding dynamic edges to the plant planting knowledge graph, and determine the conditional probability distribution divergence between the dynamic relationship edges and the existing static edges in the plant planting knowledge graph along the temporal causal relationship, thereby performing a reverse intervention test and determining the target triplet to be dynamically updated. Step S13: Perform a dynamic update operation on the graph topology of the target triplet to output the dynamically updated graph topology; use the dynamically updated graph topology as input and input it into a preset generative graph neural network to generate predictive knowledge edges within a preset time window in the future. Step S14: Mark the predictive knowledge edge as a temporary edge; when the next round of real-time plant planting data is obtained, determine the subgraph matching residual between the next round of real-time plant planting data and the predictive knowledge edge. If the subgraph matching residual is greater than the preset residual threshold, the temporary edge is rolled back and deleted to update the plant planting knowledge graph in a closed loop.

[0012] In step S11, the specific steps are as follows: S111: Deploy a multimodal sensing array inside the greenhouse to collect plant planting data, which includes environmental factors and physiological characteristics. Use a spatiotemporal alignment network to perform timestamp alignment and spatial location mapping on the plant planting data to output aligned data. S112: Map the aligned data to a unified vector space, maximize intermodal mutual information to preserve the semantic features of the plant, and further output a low-dimensional dense vector. Perform multi-level iteration on the low-dimensional dense vector, determine the corresponding temporal iteration trajectory during the iteration process, determine the changes in the plant growth state based on the identification of the temporal iteration trajectory, further dynamically generate dynamic entity nodes that represent the transient state of plant growth, and construct corresponding dynamic relation edges based on the semantic dependencies and temporal proximity between nodes.

[0013] In step S111, the specific steps are as follows: At this time, a multimodal sensing array is deployed in the plant greenhouse. This multimodal sensing array includes, but is not limited to, an environmental factor acquisition module and a physiological sign acquisition module. The environmental factor acquisition module consists of distributed sensor nodes and is used to collect environmental factor data such as air temperature and humidity, light quantum flux density (PPFD), soil volumetric water content, soil electrical conductivity (EC), and soil pH in the plant greenhouse in real time.

[0014] The physiological characteristics acquisition module consists of wearable plant sensors and image acquisition equipment, used to collect physiological characteristics data such as plant stem flow rate, leaf temperature, fruit enlargement pressure, and canopy multispectral images. Each module sensor is equipped with a local high-precision clock during acquisition and is labeled with absolute geographic coordinates or relative grid coordinates within the greenhouse, thereby outputting raw multi-source plant planting data with timestamps and spatial identifiers.

[0015] Because there is an asymmetric difference in the sampling frequency between the environmental factor acquisition module and the physiological sign acquisition module—for example, the air temperature and humidity sensor samples once per minute, while the stem flow sensor samples once every ten minutes, and the image device collects data once per hour—direct merging would lead to time axis misalignment. Therefore, the time alignment module in the spatiotemporal alignment network is used to align the timestamps of the plant planting data.

[0016] The spatiotemporal alignment module employs an asymmetric time alignment strategy based on dynamic time warping combined with spline interpolation. High-frequency environmental factor data serves as the reference time series. For low-frequency physiological characteristic data, cubic spline interpolation is used to calculate the higher-order derivatives in the time dimension, deriving the transition state values ​​between two adjacent sampling points. This generates an interpolated sequence aligned with the high-frequency data time nodes on the time axis. The dynamic time warping algorithm is then used to calculate the optimal curved path between the interpolated physiological and environmental sequences, eliminating micro-time series drift caused by sensor response delays. Finally, a time-aligned data matrix for each modality on a unified time grid is output.

[0017] Optionally, the spatiotemporal alignment network consists of a time alignment module and a spatial mapping module connected in series. Both modules are trainable network structures based on deep learning. The time alignment module adopts a multimodal temporal fusion network based on an attention mechanism. Its backbone network is a recurrent neural network containing three layers of gated recurrent units, with each layer having a hidden state dimension of 256. A time attention layer is stacked on top of this recurrent network. This attention layer is used to adaptively evaluate the contribution weight of the hidden states at each historical moment to the current alignment moment.

[0018] The time alignment module takes as input the original time series data collected by each sensor and outputs a multimodal temporal feature matrix aligned on a unified time grid. Its training phase employs supervised learning, with the training dataset derived from pre-collected synchronously labeled data in a standard greenhouse environment. This labeled data is obtained by simultaneously acquiring all modal signals using a high-precision synchronous triggering device. The training loss function uses a multi-task loss, comprising the mean squared error loss of the aligned time points and the difference consistency loss between adjacent time points, weighted 7:3. The optimizer uses an adaptive moment estimation optimizer with an initial learning rate of 0.001, which decays to 0.9 times its original value every 50 epochs during training, until the loss function no longer decreases for 10 consecutive epochs on the validation set, at which point training terminates.

[0019] To address the issue of sensor spatial inconsistency caused by the heterogeneity of three-dimensional space within a greenhouse, a spatial mapping module in a spatiotemporal alignment network is used to map the spatial location of time-aligned data. Specifically, a three-dimensional spatial grid model of the greenhouse is constructed, dividing the physical space of the greenhouse into a multi-layered, multi-grid three-dimensional voxel array. The spatial coordinates of each sensor are mapped to the corresponding voxel center, establishing a first-level mapping relationship between sensor nodes and three-dimensional voxels.

[0020] Optionally, the spatial mapping module is constructed based on a graph attention network, which contains two graph attention layers, each with four attention heads. The output feature dimension of each attention head is 64-dimensional. The network input is an initial spatial graph structure constructed from sensor coordinates and a 3D grid model of the greenhouse, where the sensor and voxel are graph nodes, and the negative exponential value of the physical distance between the sensor and voxel is used as the initial edge weight between nodes. The output is an aligned feature map updated after spatial information propagation.

[0021] The training of this spatial mapping module employs a self-supervised approach, using the spatial consistency of measurements from different sensors within the same spatial voxel at the same time as the training criterion. A contrastive loss function is designed: the cosine distance between mapped feature vectors within the same voxel should be less than 0.2, and the cosine distance between feature vectors from different voxels should be greater than 0.6. During training, a stochastic gradient descent optimizer is used, with a momentum coefficient of 0.9, an initial learning rate of 0.01, 200 training epochs, and a batch size of 32 spatial sample points. Training stops when the training loss reaches stable convergence on the validation set (i.e., loss fluctuation is less than 5% for 5 consecutive epochs).

[0022] Considering the physiological linkage between plant roots and crowns across space, a spatial influence weight matrix is ​​constructed based on the topological structure of plant planting areas, such as the arrangement of blueberry cultivation troughs and the root depth distribution. This establishes a second-level mapping relationship that characterizes the physical association between individual plants or specific planting areas and environmental perception voxels.

[0023] For image data in physiological sign data, a multi-view geometric algorithm is used to project its two-dimensional pixel coordinates onto the corresponding plant canopy voxels in the three-dimensional raster model of the greenhouse. Through the above multi-level mapping, environmental factor data and physiological sign data within the same time and spatial grid are spatially fused and stitched together, thereby outputting aligned data that is strictly aligned in both time and spatial dimensions.

[0024] In step S112, the specific steps are as follows: At this point, for the aligned multimodal data output in step S111, which includes environmental factors and physiological characteristics data, a multimodal encoder is used to encode them into high-dimensional feature representations respectively; for example, a one-dimensional convolutional network is used to extract local temporal dependency features for one-dimensional environmental time series, and a two-dimensional convolutional network is used to extract spatial texture features for image phenotypic data; the above heterogeneous high-dimensional features are projected into a shared unified vector space.

[0025] The multimodal encoder consists of two parts: an environmental temporal encoder and an image feature encoder. The environmental temporal encoder adopts a one-dimensional convolutional network structure, which contains three sequentially connected convolutional blocks. The first convolutional block has a kernel size of 7 and 64 channels, the second convolutional block has a kernel size of 5 and 128 channels, and the third convolutional block has a kernel size of 3 and 256 channels. Each convolutional block is followed by a batch normalization layer and a linear rectified activation function. A max pooling layer with a stride of 2 is added after each convolutional block for downsampling, and the final output is a 256-dimensional environmental temporal feature vector.

[0026] The image feature encoder employs a two-dimensional convolutional network structure. This network contains five sequentially connected convolutional blocks with channel numbers of 32, 64, 128, 256, and 512 respectively. Each convolutional block has a 3×3 kernel size. Each convolutional block is followed by a batch normalization layer and a linear rectified activation function. A stride-2 average pooling layer is added after the third, fourth, and fifth convolutional blocks. Finally, a global average pooling layer outputs a 512-dimensional image feature vector. Both encoders were pre-trained on a publicly available plant phenotypic dataset in a greenhouse environment. This dataset includes synchronously collected environmental time-series data and canopy image data. The pre-training task was a multimodal autoencoder reconstruction task, using the reconstructed original input signal as the supervision signal. The pre-training cycle was 100 epochs with a learning rate of 0.0001.

[0027] To eliminate the semantic gap between modalities and preserve the objective semantic features of plants, a contrastive learning framework is adopted. This framework maximizes the mutual information between different modalities within the same spatial unit at the same time. Specifically, environmental modal vectors and physiological modal vectors at the same spatiotemporal alignment node are constructed as positive sample pairs, while vectors at different spatiotemporal nodes are constructed as negative sample pairs. The InfoNCE loss function is used to optimize the projection matrix, minimizing the distance between positive sample pairs in a unified vector space and maximizing the distance between negative sample pairs. Through this optimization process, environmental factors and physiological features are deeply fused, outputting a low-dimensional dense vector that fully represents the current comprehensive transient features of the plant in a low-dimensional space.

[0028] Optionally, when projecting the high-dimensional features output by the two encoders to a shared unified vector space, two projection networks with identical structures are used for projection. Each projection network is a three-layer fully connected network with output dimensions of 512, 256, and 128 respectively. The first two layers are followed by a random dropout layer with a dropout rate of 0.2 and a linear rectified activation function. The last layer has no activation function and directly outputs a 128-dimensional low-dimensional dense vector.

[0029] During the training phase of the projection network based on contrastive learning, the construction rule for positive sample pairs is as follows: the environmental modality projection vector and the physiological modality projection vector within the same voxel at the same time and in the same space constitute a positive sample pair; the construction rule for negative sample pairs is as follows: within the same training batch, any environmental modality projection vector and the physiological modality projection vector within different voxels at different times constitute a negative sample pair. If the batch size is 256, then each positive sample pair corresponds to 254 negative sample pairs (excluding self-pairing).

[0030] The temperature coefficient of the InfoNCE loss function is set to 0.07. This temperature coefficient is used to scale the cosine similarity between feature vectors to adjust the gradient smoothness of the contrastive loss. The projection network is trained using a stochastic gradient descent optimizer with a momentum parameter of 0.9, an initial learning rate of 0.01, and a cosine annealing learning rate scheduling strategy with a minimum learning rate of 0.00001. The total number of training epochs is 150, with each batch containing 256 spatiotemporally aligned samples. The training termination condition is set when the contrastive loss value on the validation set no longer decreases for eight consecutive epochs; at this point, the model parameters are saved for subsequent inference. During the inference phase, the multimodal encoder and the projection network are cascaded. Real-time collected plant planting data are sequentially processed by the multimodal encoder to extract high-dimensional features, which are then mapped by the projection network into a 128-dimensional low-dimensional dense vector. This vector serves as the final output representing the current comprehensive transient characteristics of the plant.

[0031] The low-dimensional dense vector output above is input into a sequence modeling network, such as a long short-term memory network or a temporal encoder composed of gated recurrent units, and multi-level state iterations are performed along the time axis. In each iteration, the temporal network not only receives the low-dimensional dense vector at the current time step, but also integrates the hidden state vector at the previous time step. Through a "gating mechanism, including an input gate, a forget gate, and an output gate", the cell state and hidden state at the current time step are calculated and updated. After recursive iterations of multiple time steps, the network extracts deep temporal features containing historical evolution trends, and then outputs a hidden state sequence that represents the dynamic evolution of plants. This sequence records the evolution direction and rate of plant features within a continuous time window.

[0032] Based on the hidden state sequence output by the above multi-level iteration, the corresponding temporal iteration trajectory is determined during the iteration process; wherein, the absolute value of the difference between the hidden state vectors between adjacent time steps is calculated, and the difference vector is mapped to the trajectory space to form a temporal iteration trajectory with direction and velocity attributes; the temporal iteration trajectory is compared and identified using a preset growth state baseline trajectory model.

[0033] When the trajectory vector deviates from the baseline trajectory by an angle or Euclidean distance exceeding a preset dynamic threshold at a certain moment, the state change event determination mechanism is triggered. By performing local feature decoupling and pattern classification on the deviated trajectory segment, the specific changes in the plant growth state are determined. For example, the transition from a normal state to a water stress state, a high temperature stress state, or a latent disease state is identified, and the core feature clusters characterizing the specific transient change are extracted.

[0034] For the time-series iterative trajectory, the time-series iterative trajectory is composed of a sequence of difference vectors between the hidden state vectors of adjacent time steps. The direction angle of each difference vector is defined as the angle between the vector and the preset reference axis (i.e., the direction of the first principal component) in the 128-dimensional latent space. Its value ranges from 0 to 360 degrees and is used to characterize the rising and falling trend of plant physiological indicators. The magnitude of each difference vector is defined as the Euclidean norm of the vector and is used to characterize the rate of change of plant state.

[0035] The preset growth state baseline trajectory model is pre-constructed in the following way: collect historical low-dimensional dense vector sequences of the target plant variety in a healthy growth state within at least three complete growth cycles, calculate the mean vector and covariance matrix for the vector set at each time point, use the mean vector trajectory as the central baseline, and use twice the standard deviation of the main diagonal of the covariance matrix as the envelope width to form a reference trajectory envelope with upper and lower boundaries.

[0036] When the Euclidean distance between the time-series iterative trajectory vector and the center baseline at a certain moment exceeds twice the standard deviation, and this deviation is not corrected within four consecutive sampling time steps (i.e., four consecutive acquisition cycles), a state change event is triggered. The first time point of this consecutive deviation segment is then marked as the start time of the state change. The preset dynamic threshold is the combination of the above-mentioned twice the standard deviation and four consecutive sampling time steps as the determination condition; both conditions must be met simultaneously.

[0037] When generating dynamic entity nodes, the system extends five sampling time steps forward and five sampling time steps backward, centered on the state change initiation time. It extracts a low-dimensional dense vector sequence within these eleven time steps and calculates the element-wise mean vector of this sequence, which serves as the initial feature vector for the dynamic entity node. The globally unique identifier of this node is composed of three parts concatenated sequentially: the first part is a four-character greenhouse region code; the second part is the Coordinated Universal Time (UTC) timestamp of the state change initiation time, accurate to the second, in the format year-year-year-month-day-hour-minute-second; and the third part is a six-digit random hexadecimal number used to prevent identifier conflicts when multiple triggers occur within the same second. The state semantic label is determined by calculating the cosine similarity between the initial feature vector and each standard template vector in the preset state label library. The state label library contains five standard state categories: normal growth, water stress, high temperature stress, nutrient deficiency, and early stage of disease. Each category corresponds to a 128-dimensional standard template vector obtained by cluster analysis of historical typical samples. The state category with the highest cosine similarity and a value of not less than 0.65 is selected as the semantic label of the dynamic entity node. If the highest similarity is less than 0.65, it is marked as "unrecognized state".

[0038] Regarding the construction of dynamic relationship edges, the system iterates through the existing static entity nodes in the plant cultivation knowledge graph one by one, and calculates the following two quantitative indicators: The first is the semantic dependency weight, defined as the cosine similarity between the initial feature vector of the dynamic entity node and the feature vector of the static entity node, with a value range of 0 to 1; the second is the temporal proximity weight, which is calculated as follows: obtain the set of timestamps corresponding to all historical event records associated with the static entity node in the knowledge graph, calculate the absolute value of the time difference between the start time of the state change of the dynamic entity node and each element in the timestamp set, take the minimum value in the set of absolute values, subtract the minimum time difference from the preset temporal influence window length (set to 72 hours), divide by the preset temporal influence window length, and the resulting quotient is the temporal proximity weight, which also has a value range of 0 to 1; if the start time of the state change of the dynamic entity node has no historical event timestamps that can be matched with the static entity node, the temporal proximity weight is directly assigned a value of 0.

[0039] The semantic dependency weight and temporal proximity weight are weighted equally (0.5 each) and summed to obtain a comprehensive association score. When this comprehensive association score reaches or exceeds the preset edge generation threshold of 0.7, a directed dynamic relationship edge is created between the dynamic entity node and the corresponding static entity node. The assignment rules for the semantic relationship type are as follows: if the state semantic label of the dynamic entity node is "water stress", the relationship type is assigned as "induced"; if the label is "high temperature stress", the relationship type is assigned as "occurrence environment"; if the label is "normal growth", the relationship type is assigned as "presentation state"; if the label is "nutrient deficiency", the relationship type is assigned as "caused"; if the label is "early stage of disease", the relationship type is assigned as "initiated"; if the label is "unidentified state", the relationship type is uniformly assigned as "association". All the above assignment correspondences are pre-stored in the system configuration file and obtained directly from the table based on the dynamically identified label results during the inference phase.

[0040] Based on the plant growth state changes identified by the aforementioned temporal iteration trajectory, dynamic entity nodes representing the transient state of plant growth are dynamically generated. This core feature cluster is used as the node feature vector, and a globally unique dynamic entity node identifier is assigned, along with a corresponding state semantic label, such as "high-temperature stress event node." Next, based on the knowledge graph topology, the association between this newly generated dynamic entity node and existing "static nodes, such as specific plant variety nodes or greenhouse area nodes," is calculated. On one hand, the cosine similarity between the features of the dynamic entity node and the features of the static entity node in the vector space is calculated, serving as the semantic dependency weight. On the other hand, the intersection ratio between the occurrence time of the dynamic event and the context time window of the static node is calculated, serving as the temporal proximity weight. When the weighted sum of the semantic dependency weight and the temporal proximity weight exceeds a preset edge generation threshold, a dynamic relationship edge connecting the dynamic entity node and the corresponding static node is constructed, and a semantic relationship type is assigned, such as "induced," "presentation state," or "occurrence environment," thereby completing the generation of the local dynamic graph structure.

[0041] In step S12, the specific steps are as follows: S121: Obtain the preset plant planting knowledge graph, map the dynamic entity nodes and dynamic relationship edges to the global coordinate system of the plant planting knowledge graph through semantic alignment, and then construct a dynamic Bayesian network across time slices to sort out the temporal causal relationship between dynamic relationship edges and static edges. S122: Obtain the historical context corresponding to the dynamic relationship edge, and perform probability calculations in combination with the dynamic relationship edge to determine the corresponding posterior probability distribution. Further determine the conditional probability distribution divergence between the dynamic relationship edge and the existing static edge edge distribution in the plant planting knowledge graph, thereby quantifying the degree of information conflict. At the same time, introduce a counterfactual reasoning mechanism to perform reverse intervention testing, simulate the causal effect of the graph topology on the plant growth prediction results when a specific dynamic relationship edge is removed, and determine the target triplet to be dynamically updated by combining the significant fluctuation of the causal effect.

[0042] In step S121, the specific steps are as follows: At this point, a pre-constructed plant cultivation knowledge graph is obtained. This static graph contains prior knowledge such as plant biological characteristics, agronomic mechanisms, and historical planting experience. It consists of "static entity nodes, such as plant varieties, organ parts, and agricultural operations" and "static edges, such as "belongs to", "contains", and "operational site". Since the vector space of the dynamic entity nodes and dynamic relation edges generated in the previous steps is heterogeneous with the symbol space of the static graph, the dynamic elements need to be connected to the static graph through semantic alignment mapping.

[0043] Specifically, a pre-trained graph representation learning model is used to extract the feature vectors of dynamic entity nodes and the feature representations of entities in the static graph. A metric learning method is used to calculate the semantic similarity distance between the feature vectors of dynamic nodes and the feature representations of static entities, such as cosine similarity or Euclidean distance. When the distance is less than a preset semantic alignment threshold, it is determined that there is a semantic mapping relationship between the dynamic entity and the static entity, thereby anchoring the dynamic entity node and the dynamic relationship edge to the corresponding local subgraph of the static graph and eliminating the semantic gap caused by heterogeneity.

[0044] After completing the semantic mapping, a global coordinate system for the plant cultivation knowledge graph is constructed to uniformly manage dynamic and static elements. The global coordinate system includes three orthogonal dimensions: logical topology dimension, time series dimension, and spatial location dimension.

[0045] Among them, the logical topology dimension represents the relative position of graph nodes and edges in the network topology of the graph structure, such as the shortest path hop count and subgraph cluster center point; the time series dimension represents the effective time window and the order of occurrence of the node; and the spatial location dimension represents the physical spatial grid coordinates of the greenhouse associated with the node. Through this three-dimensional coordinate system, "dynamic entity nodes: with transient life cycle" and "static entity nodes: with constant life cycle" are both given a unique global spatial coordinate identifier, so that subsequent path search and probability calculation can be carried out under a unified spatial benchmark.

[0046] Based on the aforementioned global coordinate system, a dynamic Bayesian network spanning time slices is constructed. The time series dimension in the global coordinate system is discretized into multiple consecutive time slices. Static entities and mapped dynamic entities within the current time slice are used as network nodes. Based on the semantics of static edges and the temporal attributes of dynamic relation edges in the graph, causal relationship edges within the time slice are established, representing the causal logic within the same time step.

[0047] Meanwhile, by utilizing the Markov assumption of dynamic Bayesian networks, we extract nodes with correlations between adjacent time slices, especially dynamic entity nodes, and construct cross-time slice transition edges. We quantify the dependency strength of these edges using conditional probability tables, thereby clarifying the temporal causal relationship between dynamic and static edges. This clarifies how "historical environment / operation, static or past dynamic edges" influence "current plant transient changes, current dynamic edges" through temporal transitions, providing a temporal causal basis for subsequent divergence calculations and intervention tests.

[0048] In step S122, the specific steps are as follows: At this point, based on the cross-time-slice dynamic Bayesian network constructed in step S121, the set of prior nodes that are temporally connected to the current dynamic relationship edge is extracted and used as the historical context. The historical context includes, but is not limited to, the environmental baseline state of the previous time slice, past agricultural operation nodes, and historical dynamic transient nodes. Combining the state characteristics of the historical context and the current dynamic relationship edge, the confidence propagation algorithm or variational inference algorithm in the probabilistic graphical model is used to perform probability calculation.

[0049] In this process, historical context is injected into the dynamic Bayesian network as an evidence variable. The local confidence of each node in the network is iteratively updated through a message passing mechanism. Then, the probability of occurrence of the state represented by the current dynamic relation edge under given historical conditions is calculated. This probability is used as the posterior probability distribution of the dynamic relation edge, which represents the actual occurrence intensity of the current dynamic event under the constraints of historical temporal logic.

[0050] After obtaining the posterior probability distribution of the dynamic relationship edge, the marginal probability distribution of existing static edges with the same head and tail entities or the same causal semantic path as the dynamic relationship edge is further extracted from the plant planting knowledge graph. The marginal probability distribution of the static edge represents the steady-state expected probability based on the summary of agricultural prior knowledge. The conditional probability distribution divergence between the above posterior probability distribution and the marginal probability distribution is calculated. Among them, KL divergence or Wasserstein distance metric function is used to calculate the difference in information entropy and probability density offset between the dynamic distribution and the static distribution. The larger the divergence value, the more serious the deviation of the dynamic growth state currently monitored in real time from the conventional planting logic solidified in the static knowledge graph is. Thus, this divergence value is used as the core indicator to quantify the degree of information conflict and accurately identify local subgraphs that may cause logical contradictions in the graph.

[0051] To eliminate false conflicts caused by noisy data, a counterfactual reasoning mechanism is introduced to perform reverse intervention testing. Specifically, the Do calculus logic from the structural causal model is used to construct the original test graph topology containing the current dynamic relationship edge, and the counterfactual graph topology after removing the specific dynamic relationship edge. These two topologies are then input into a pre-defined plant growth prediction model to simulate and calculate the plant's future growth prediction results under two parallel time-series conditions: "the existence of the dynamic event" and "assuming the absence of the dynamic event." By comparing the differences between the two prediction results in "key physiological indicators, such as yield prediction and disease occurrence probability," the causal effect of the dynamic relationship edge on the prediction results is calculated.

[0052] If the significance of the causal effect fluctuates beyond a preset threshold, i.e., removing the edge causes a significant and non-random shift in the output of the prediction model, then the dynamic relationship edge is determined to carry the key causal driving force, and the conflict it causes is not caused by noise, but by a real change in the growth state. Accordingly, the dynamic entity node with significant divergence and confirmed to have a significant causal effect through reverse intervention testing, the dynamic relationship edge and its associated static entity node together constitute the head entity, relationship, and tail entity combination, which is determined as the target triplet to be dynamically updated.

[0053] For the structural causal model, the structural causal model is defined in a structured manner based on the cross-time-slice dynamic Bayesian network constructed in step S121. The causal model contains three types of node variables: environmental variables (including air temperature, substrate water content, and light integral in the current time slice), intervention variables (i.e., the physiological state transition events corresponding to the current dynamic relationship edge to be evaluated, such as the transition from normal growth to water stress), and outcome variables (key physiological indicators of plants in the next time slice, including changes in stem flow rate and leaf temperature).

[0054] During the Do-calculus intervention test, the system switches the intervention variable from a passively observed state to an actively defined state. Specifically, this involves cutting off all incoming edges pointing to the intervention variable in the dynamic Bayesian network (i.e., blocking the influence path of environmental variables on the event), retaining only the outgoing edges pointing to the outcome variable, and fixing the state of the intervention variable to existent during inference (i.e., setting the dynamic relationship edge to true). Based on this, the confidence propagation algorithm is re-run to calculate the conditional probability distribution of the outcome variable under this forced intervention condition. In contrast, in the counterfactual graph topology, the system not only cuts off incoming edges pointing to the intervention variable but also forcibly sets the state of the intervention variable to non-existent, assuming the dynamic event did not occur, and recalculates the conditional probability distribution of the outcome variable under this condition. The difference between the conditional probability distributions of the outcome variable obtained under these two conditions represents the causal effect size of the dynamic relationship edge.

[0055] For the plant growth prediction model, a time series prediction network based on gated recurrent units is adopted. This network contains two layers of gated recurrent units, each with a hidden state dimension of 128. The input layer receives a 256-dimensional feature vector formed by concatenating the low-dimensional dense vector (128-dimensional) of the spatial voxel of the target plant in the current time slice and the feature mean vector (128-dimensional) of its first-order neighbor nodes in the knowledge graph. The output layer is a fully connected layer with an output dimension of 16, which predicts the values ​​of four physiological indicators (stem flow rate, leaf temperature, canopy temperature, and fruit enlargement rate) in the next three time slices (each time slice is one hour) at the next three moments (a total of 4 indicators × 3 moments × 1 predicted value = 12 dimensions), as well as the direction encoding of the changing trend of these four indicators from the current moment to the next three time slices (each of the 4 indicators outputs a binary direction code, for a total of 4 dimensions).

[0056] The training dataset for this predictive model comes from a historical operating database of a plant greenhouse. This database contains multimodal sensing data from at least two complete growth cycles and their corresponding knowledge graph snapshot sequences. Training samples are constructed in time slices, with the input feature being the state vector of the current time slice and the supervision label being the physiological indicator values ​​actually observed in the subsequent three time slices. The loss function used during training is the mean absolute error loss, and the optimizer is the adaptive moment estimation optimizer. The initial learning rate is set to 0.0005, the batch size is set to 128 samples, and the total number of training epochs is 300. An early stopping strategy is adopted, terminating training and saving the optimal model parameters when the validation set loss does not decrease for 15 consecutive epochs.

[0057] During the reverse intervention test, the system inputs the original test graph topology and the counterfactual graph topology into the pre-trained prediction model, respectively, and each model independently runs forward inference calculations to obtain two sets of predicted physiological index values. The significance fluctuation of the causal effect is determined by the following quantification method: the mean of the predicted value of the stem flow rate change in the two sets of prediction results at three future time points is calculated, and the absolute value of the difference between the two is taken as the stem flow causal effect value; the mean of the predicted value of the fruit enlargement rate in the two sets of prediction results at three future time points is calculated, and the absolute value of the difference between the two is taken as the yield causal effect value; the stem flow causal effect value and the yield causal effect value are summed with equal weights to obtain the comprehensive causal effect strength value. The system preset significance threshold is 0.15, which is determined based on three times the standard deviation of the prediction model output under random noise disturbance in historical data.

[0058] If the calculated comprehensive causal effect strength value is greater than or equal to 0.15, the dynamic relationship edge is determined to carry a key causal driving force, and the information conflict it causes is not caused by noise, but is a real signal of growth state change. Conversely, if the comprehensive causal effect strength value is less than 0.15, the edge is determined to be a false causal relationship and will not be included in the subsequent target triplet update process. Based on this determination, the head entity-relationship-tail entity combination consisting of dynamic entity nodes, dynamic relationship edges, and their associated static entity nodes that have significant conditional probability distribution divergence and whose comprehensive causal effect strength value reaches or exceeds the significance threshold is determined as the target triplet to be dynamically updated.

[0059] In step S13, the specific steps are as follows: S131: Perform a dynamic update operation on the graph topology of the target triplet, and constrain the updated topology by defining the energy loss of the plant planting knowledge graph, and then output the dynamically updated graph topology. S132: The dynamically updated graph topology is used as a condition constraint and input into a pre-defined generative graph neural network. The generative graph neural network adopts a graph generation architecture based on a denoising diffusion probability mechanism, which gradually denoises in the latent space to generate predictive knowledge edges within a future pre-defined time window that conform to the plant growth pattern. These predictive knowledge edges not only include the connection relationships between nodes, but also integrate the attribute features and temporal weights of the edges.

[0060] In step S131, the specific steps are as follows: At this point, the target triplet, head entity, relation, and tail entity to be dynamically updated, determined in step S122, are obtained; the dynamic update operation of the graph topology is performed in the graph storage engine of the plant planting knowledge graph; wherein, the operation includes two sub-processes: node embedding and edge linking: if the head entity or tail entity in the target triplet is a newly generated dynamic entity node, then the corresponding new node is instantiated in the graph topology and an initial node feature vector is assigned to it.

[0061] If the entities in the target triple already exist in the existing graph, their feature vectors are extracted and updated. Based on this, a directed edge is constructed between the head and tail entities according to the relation type defined in the target triple. When constructing the directed edge, the temporal proximity, semantic dependency weight, or conditional probability divergence calculated in the previous steps are assigned as the weight attributes of the edge, thereby completing the physical linking and attribute initialization of the local subgraph structure.

[0062] To avoid introducing noisy nodes or disrupting the original agronomical logic consistency of the graph during dynamic updates, an energy loss function based on the graph's topological characteristics is introduced to constrain the updated structure. This energy loss function comprehensively considers constraints across three dimensions: First, the local adjacency consistency constraint term calculates the feature cosine similarity between the updated node and its first-order neighbor nodes, and penalizes edge connections with too low similarity to ensure that connected nodes have reasonable associations in the semantic space. Second, the topological smoothness constraint term uses the graph Laplacian matrix to calculate the signal energy of the updated region, penalizing severe topological oscillations and ensuring a smooth transition between dynamically updated edges and surrounding static edges. Third, the causal divergence penalty term introduces the conditional probability distribution divergence calculated in the previous steps as a regularization term to penalize edge connections with excessive divergence that fail the intervention test. By weighted summation of the constraint terms in the above three dimensions, a total energy loss function is constructed. Using gradient descent algorithm or message passing mechanism, the feature vector representations of nodes and edges in the local subgraph are backpropagated in the vector space and updated. Iterative optimization continues until the total energy loss function converges to a preset minimum value, thereby ensuring that the updated topology contains dynamic new knowledge and conforms to the topological self-consistency of the overall agricultural knowledge graph.

[0063] The energy loss function is a weighted sum of three constraint terms, denoted as L_total, which ranges from 0 to positive infinity. The goal is to reduce this value to below a preset convergence threshold of 0.01 through iterative optimization. The specific mathematical definitions and calculation methods of the three constraint terms are as follows: The first term is the local adjacency consistency constraint, denoted as L_adj. This constraint is calculated as follows: extract the feature vectors of the updated target node and its first-order neighbors in the vector space; calculate the cosine similarity between the target node and each of its first-order neighbors; take the arithmetic mean of all cosine similarities; and then subtract this mean from the constant 1. The difference is the value of L_adj. This term ranges from 0 to 2. A smaller value indicates a stronger semantic connection between the target node and its neighbors. An ideal value of 0 indicates that all neighbors have completely identical features to the target node.

[0064] The second term is the topological smoothness constraint, denoted as L_smooth. This constraint is calculated based on the quadratic form of the graph Laplacian matrix. The specific calculation steps are as follows: Construct the adjacency matrix A and degree matrix D of the updated local subgraph, where the degree matrix D is a diagonal matrix whose diagonal elements are the sum of the weights of the adjacent edges of the corresponding nodes; calculate the graph Laplacian matrix L_graph = D - A based on this; then construct the node feature matrix F of the updated region, where each row of this matrix is ​​a 128-dimensional feature vector of the corresponding node; finally, calculate L_smooth, which is the trace of the matrix obtained by multiplying the transpose of the feature matrix by the Laplacian matrix and then by the feature matrix. The larger the value of this term, the higher the signal energy of the updated region in the graph structure, i.e., the more intense the topological oscillation; the optimization objective is to minimize this term to ensure that the updated node features exhibit a smooth distribution within their topological neighborhood.

[0065] The third term is the causal divergence penalty term, denoted as L_causal. This term is calculated by directly taking the divergence value of the conditional probability distribution corresponding to the dynamic relation edge calculated in step S122. This value has already been calculated in step S122 using KL divergence or Wasserstein distance. If the target triple involves multiple dynamic relation edges, the arithmetic mean of all divergence values ​​is taken as L_causal. The value of this term ranges from 0 to positive infinity. A larger value indicates a more severe deviation of the current dynamic relation edge from the static prior logic. The optimization objective is to minimize the value of this term.

[0066] The weighting coefficients of the above three terms in the total energy loss function are allocated as follows: the weighting coefficient w_adj for the local adjacency consistency constraint term is set to 0.4, the weighting coefficient w_smooth for the topological smoothness constraint term is set to 0.4, and the weighting coefficient w_causal for the causal divergence penalty term is set to 0.2. The sum of the three weighting coefficients is 1. The formula for calculating the total energy loss function is: L_total = w_adj × L_adj + w_smooth × L_smooth + w_causal × L_causal. The above weighting coefficients are determined based on the grid search optimization results of a large number of historical graph update experiments and remain unchanged during the actual operation of the system.

[0067] In the optimization process of the energy loss function, the system uses a backpropagation algorithm based on graph topology to iteratively update the feature vectors. The specific optimization steps are as follows: First, the topological connection structure of the current local subgraph is fixed, and only the feature vectors of the target node and its first-order neighbor nodes are used as trainable variables. Then, the gradient of the total energy loss function L_total with respect to the feature vectors of each node is calculated. This gradient is obtained through backpropagation along the graph structure edge-by-edge and node-by-node using an automatic differentiation mechanism. Next, an adaptive moment estimation optimizer is used to update the feature vectors. The initial learning rate of the optimizer is set to 0.005, the exponential decay rate of the first-order moment estimation is set to 0.9, the exponential decay rate of the second-order moment estimation is set to 0.999, and the numerical stability constant is set to 10 to the power of -8. After each round of feature vector updates, the current total energy loss function value is recalculated, and it is checked whether it has dropped below the preset convergence threshold of 0.01. Simultaneously, the absolute value of the rate of change of the total energy loss function value between the current iteration and the previous iteration is checked to be less than 0.001. If either of the two convergence conditions is met—that is, the total energy loss is less than 0.01, or the absolute value of the rate of change of the loss between two adjacent rounds is less than 0.001—then the iterative optimization stops, and the energy loss function is considered to have converged. If neither of the two conditions is met, the next iteration continues, and the learning rate is decayed every 100 iterations with a decay coefficient of 0.9.

[0068] After the energy loss function converges, the local subgraph after feature optimization and topology reshaping is extracted. The updated node feature vectors and edge weights are remapped back to the storage matrix of the global plant planting knowledge graph. The global adjacency matrix and node feature matrix are updated synchronously. The overall graph structure, which includes newly added dynamic nodes, dynamic edges, and static nodes after feature updates, is marked as the dynamically updated graph topology structure and output as the conditional input base for subsequent generative graph neural networks.

[0069] In step S132, the specific steps are as follows: At this point, the dynamically updated graph topology output from step S131 is used as the input for conditional constraints. A graph encoder is used to extract features from this graph topology, outputting node feature matrices and a global adjacency tensor. To reduce the computational complexity of large-scale graphs and preserve high-order topological semantics, a pre-trained graph variational autoencoder is used to map the high-dimensional node feature matrices and adjacency tensors to a low-dimensional continuous latent space, generating a latent space feature representation. This latent space feature representation not only compresses the static and dynamic node features of the current graph but also encodes the relative topological positions between nodes and the temporal causal relationships that have occurred, serving as the conditional guidance vector for subsequent generative networks.

[0070] Optionally, the graph encoder adopts a three-layer stacked architecture based on a relational graph convolutional network. The first layer of the relational graph convolutional network has an input dimension of the original dimension of the node feature matrix (i.e., 128 dimensions) and an output dimension of 256 dimensions. This layer sets up weight transformation matrices for four relation types, corresponding to the four semantic relations in the knowledge graph: "inducing", "occurring environment", "presentation state", and "causing". The second layer of the relational graph convolutional network has an input dimension of 256 dimensions and an output dimension of 512 dimensions, and also sets up weight transformation matrices for four relation types. The third layer of the relational graph convolutional network has an input dimension of 512 dimensions and an output dimension of 256 dimensions. This layer aggregates multiple relation types and outputs a unified node feature matrix.

[0071] Each layer of the graph convolutional network is followed by a layer normalization operation and a linear rectified activation function. A random dropout layer with a dropout rate of 0.2 is added between the second and third layers to prevent overfitting. The graph variational autoencoder consists of an encoder and a decoder. The encoder uses the aforementioned three-layer graph convolutional network as its backbone, mapping the node feature matrix and adjacency tensor to a 64-dimensional latent space. The output latent space features are represented by two parameter matrices: a 64-dimensional mean vector and a 64-dimensional log-variance vector.

[0072] The graph decoder employs a two-layer fully connected network. The first layer has a 64-dimensional input and a 128-dimensional output, followed by a linear rectified activation function. The second layer has a 128-dimensional input and an output dimension equal to the number of elements in the original adjacency matrix, which is then activated by a sigmoid function to output the probability of each edge in the reconstructed adjacency matrix. The graph variational autoencoder is trained unsupervised, using historical snapshot sequences of the plant cultivation knowledge graph (at least 500 snapshots at various time points). The training loss function is the sum of the reconstruction loss and the KL divergence loss, where the reconstruction loss uses a binary cross-entropy loss, and the KL divergence loss is used to constrain the consistency between the latent space distribution and the standard Gaussian distribution. The weight ratio of the two is 10:1. The optimizer uses an adaptive moment estimation optimizer with an initial learning rate of 0.001, a batch size of 16 graph snapshots, and 200 training epochs. The learning rate is decayed by a factor of 0.8 every 50 epochs until the reconstruction loss no longer decreases for 10 consecutive epochs on the validation set. At this point, training terminates and the optimal parameters of the encoder and decoder are saved.

[0073] A graph generation architecture based on a denoising diffusion probability mechanism is introduced; the target graph structure within a future preset time window is defined, that is, a graph subgraph containing future states, and it is mapped to the latent space as the target vector; during the forward diffusion process, Gaussian noise is gradually added to the target latent space vector according to a preset variance scheduling table, and after multiple iterations, it is made to approach the standard Gaussian distribution, thereby constructing training samples.

[0074] In terms of architecture design, the generative graph neural network uses U-Net or Graph Transformer as the backbone network, takes the extracted current graph latent space conditional guidance vector as the key-value pair input across the attention mechanism, and takes the noisy target graph latent vector as the query input to build an end-to-end conditional graph generation model.

[0075] In the inference generation stage, starting from a randomly sampled standard Gaussian noise graph vector, a reverse denoising process is performed under the constraint of a conditional guiding vector. Specifically, the noisy graph vector at the current time step and the graph conditional guiding vector are input into the generative graph neural network. The network predicts the noise component added in the current step through forward computation and uses the reparameterization technique to subtract the predicted noise component and scaling factor from the noisy vector, outputting the denoised graph vector.

[0076] After a multi-level reverse denoising iteration, the latent space prediction graph vector within the preset future time window is output. The latent space prediction graph vector is reconstructed back to the original space using the decoder of the graph variational autoencoder, and the adjacency matrix within the future time window is parsed. By thresholding the non-zero elements in the adjacency matrix, the future node connection relationship that conforms to the plant growth law is generated, i.e., predictive knowledge edge.

[0077] This predictive knowledge edge not only includes the connection relationships between nodes and topological edges, but also further integrates the attribute features and temporal weights of the edges. Specifically, from the multidimensional tensor output by the decoder, in addition to extracting the probability of the edge's existence, the continuous feature vector of the corresponding dimension of the tensor is also extracted as the attribute features of the predictive knowledge edge, such as the predicted stress intensity and the rate of change of physiological indicators. At the same time, based on the attention weight distribution or temporal embedding vector output by the generator network, the temporal weight of the predictive edge occurring within a preset time window in the future is calculated. The connection relationships, attribute features, and temporal weights are then concatenated into a tensor to form a complete predictive knowledge edge, which is then output.

[0078] Optionally, the generative graph neural network adopts a graph Transformer-based backbone network architecture, which includes 6 graph Transformer encoder layers and 6 graph Transformer decoder layers. The attention mechanism of each layer is set to 8 attention heads, each attention head has a feature dimension of 64 dimensions, the overall hidden dimension of the model is 512 dimensions, and the intermediate dimension of the feedforward network is extended to 2048 dimensions.

[0079] During the training of the generative network, the extracted current graph latent space conditional guidance vector (i.e., the 64-dimensional latent vector output by the graph variational autoencoder) is used as a key-value pair input across the attention mechanism to each layer of the decoder, while the noisy target graph latent vector is used as the query input.

[0080] The training loss function is defined as the noise prediction loss, which is the mean squared error between the noise component predicted by the network and the actual noise component added. The smaller this loss value, the more accurate the network's noise prediction. Training data comes from consecutive map pairs in historical map snapshot sequences. Each pair contains the latent vector of the map in the current time slice and the latent vector of the target map 6 hours later, constructing at least 10,000 training samples. Training uses an adaptive moment estimation optimizer with an initial learning rate of 0.0002, a batch size of 32 sample pairs, 500 training epochs, and a cosine annealing learning rate scheduling strategy with a minimum learning rate of 0.00001. During training, the noise prediction loss of the validation set is monitored. If the validation set loss does not decrease for 20 consecutive epochs, an early stopping mechanism is triggered, and the model weights with the lowest validation loss are saved as the final generated model.

[0081] In step S14, the specific steps are as follows: S141: Predictive knowledge edges are marked as temporary edges with confidence weights and temporarily stored in the virtual memory area of ​​the plant planting knowledge graph; when the next round of real-time plant planting data is obtained, an observation subgraph containing real-time data is introduced, and the subgraph matching residual between the observation subgraph and the prediction subgraph containing predictive knowledge edges is further calculated. This subgraph matching residual quantifies the relative distance between the real data distribution and the predicted data distribution in terms of node features and topology. S142: If the subgraph matching residual is greater than the preset residual threshold, the predictive knowledge edge will drift or become invalid, and the temporary edge rollback deletion mechanism will be triggered. In this way, real-time data will be used as positive and negative feedback samples to input into the model for online adjustment, thereby updating the plant planting knowledge graph in a closed loop.

[0082] In step S141, the specific steps are as follows: At this point, the predictive knowledge edge output in step S132 is obtained. This predictive knowledge edge includes the connection relationship between nodes, the attribute features of the edge, and the temporal weight. Since this predictive knowledge edge is the future state inferred based on the graph generation network, it has not been verified by actual physical data. Directly writing it into the static persistence layer of the graph may lead to the contamination of prior knowledge.

[0083] Therefore, the system marks predictive knowledge edges as "temporary edges" and assigns them initial confidence weights. These confidence weights are derived from the edge existence probability values ​​output during the generative network's reverse denoising decoding process. An independent virtual memory region is partitioned within the graph storage engine of the plant cultivation knowledge graph, logically isolated from the persistent storage region of the static graph. Temporary edges with confidence weights and their associated node feature vectors are temporarily stored in this virtual memory region, constructing one or more floating predictive subgraphs. These predictive subgraphs serve as hypothetical knowledge structures, participating in graph query and inference calculations without altering the physical state of the underlying static adjacency matrix.

[0084] When the system reaches the time node corresponding to the temporal weight defined by the predictive knowledge edge, i.e. the next round of preset time window, it acquires a new round of real-time collected plant planting data; following the same processing logic as steps S111 and S112, it performs spatiotemporal alignment, modal unification mapping, and low-dimensional dense vector iteration on the new round of real-time data, thereby generating dynamic entity nodes and dynamic relation edges that represent the current actual plant growth status.

[0085] The generated dynamic nodes and edges are mapped to the plant cultivation knowledge graph, and the local topology centered on the actual event is extracted to construct an observation subgraph containing real-time data. The observation subgraph represents the distribution of plant states in the real physical world at the current time step.

[0086] The constructed observation subgraph is compared with the predicted subgraph in the virtual memory region, and the subgraph matching residual between the two is calculated. The calculation of the subgraph matching residual is quantified from two orthogonal dimensions: node features and topology. In the node feature dimension, the nodes in the observation subgraph and the predicted subgraph are optimally aligned using a graph matching algorithm. The Euclidean distance or cosine distance of the low-dimensional dense vectors between the aligned nodes is calculated, and the feature distances of all aligned nodes are summed and averaged as the feature residual term.

[0087] In the topological dimension, the Hamming distance between the adjacency matrix of the observed subgraph and the adjacency matrix of the predicted subgraph is calculated, or the cost of adding / deleting nodes / edges required to transform the predicted subgraph into the observed subgraph is quantized using graph editing distance quantization. This cost is used as the topological residual term. The feature residual term and the topological residual term are weighted and summed. The weights can be dynamically configured according to the graph size and monitoring focus. The final subgraph matching residual is output. This residual value mathematically quantifies the relative distance between the actual data distribution and the predicted data distribution in the underlying features and logical structure.

[0088] The subgraph matching residual is calculated by weighted summation of the feature residual and the topology residual. The total subgraph matching residual is denoted as R_total, and its value ranges from 0 to positive infinity. The larger the value, the more severe the deviation between the predicted graph structure and the actual observed graph structure.

[0089] Regarding the calculation of the feature residual term, the system first employs an optimal alignment mapping algorithm based on graph node feature similarity to match nodes in the observed subgraph and the predicted subgraph. The specific execution steps of this algorithm are as follows: A two-dimensional cost matrix is ​​constructed, where each row corresponds to a node in the observed subgraph, and each column corresponds to a node in the predicted subgraph. The value of each element in the matrix is ​​equal to the cosine distance (i.e., 1 minus the cosine similarity) of the feature vectors between the corresponding row node and column node. Then, the Hungarian algorithm is used to solve for the minimum weighted perfect matching of this cost matrix, obtaining a bidirectional mapping relationship that minimizes the overall node matching cost.

[0090] After completing the optimal alignment mapping, for each pair of matched nodes, the Euclidean distance of its 128-dimensional feature vector is calculated. The sum of the Euclidean distances of all matched node pairs is divided by the total number of matched node pairs to obtain the average feature distance, which is the feature residual term. If the number of nodes in the observed subgraph and the predicted subgraph are inconsistent, for the redundant nodes that failed to match, the magnitude of their node feature vectors is multiplied by a penalty coefficient of 1.0 and included in the sum of the feature residual terms. This sum is then divided by the larger value of the number of nodes in the two subgraphs for normalization.

[0091] Regarding the calculation of the topological residual term, the system employs a normalized graph edit distance algorithm to quantify the structural difference between the adjacency matrix of the observed subgraph and the adjacency matrix of the predicted subgraph. The specific calculation steps are as follows: The adjacency matrix of the observed subgraph is denoted as A_obs, and the adjacency matrix of the predicted subgraph is denoted as A_pred. Both matrices have dimensions N×N, where N is the size of the union of the nodes in the two subgraphs (i.e., the nodes of the two subgraphs are numbered uniformly after taking the union, and missing nodes are padded with zeros in their corresponding rows and columns); the element-wise absolute difference matrix between the two adjacency matrices is calculated, and all elements of this difference matrix are summed to obtain the original graph edit distance; then, the original graph edit distance is normalized by dividing the square of N (i.e., the total number of matrix elements), and the resulting normalized graph edit distance is the topological residual term. The value of this topological residual term ranges from 0 to 1; the smaller the value, the more similar the edge connection structures of the two subgraphs.

[0092] The weighted sum of the feature residual and the topology residual is dynamically configured according to the following rules: First, the system counts the total number of nodes in the observed subgraph. If the total number of nodes is greater than 10, the current local subgraph structure is considered relatively complex, and the accuracy of the topology is more critical. In this case, the weight coefficient w_feature of the feature residual is set to 0.3, and the weight coefficient w_topology of the topology residual is set to 0.7. If the total number of nodes in the observed subgraph is less than or equal to 10, the current local subgraph structure is considered relatively simple, and the semantic accuracy of the node features is more important. In this case, the weight coefficient w_feature of the feature residual is set to 0.6, and the weight coefficient w_topology of the topology residual is set to 0.4. If the number of nodes in the observed subgraph is zero (i.e., no identifiable state change event has actually occurred), the subgraph matching residual is directly determined to be infinite, triggering the anomaly handling process. Under both weight configurations, the sum of the two weight coefficients is 1. The final formula for calculating the total subgraph matching residual is: R_total = w_feature × feature residual term + w_topology × topology residual term.

[0093] The system's preset residual threshold is determined based on the statistical variance of monitoring data during historical normal operation. Specifically, it extracts 30 sub-plot matching residual values ​​calculated at the same time each day over the past 30 days, calculates the mean and standard deviation of these 30 residual values, and uses the mean plus three times the standard deviation as the dynamic baseline threshold. Then, it uses 1.2 times the dynamic baseline threshold as the final system preset residual threshold, which is automatically recalculated monthly to adapt to changes in the current season or growth stage.

[0094] When the calculated total subgraph matching residual R_total is greater than the system's preset residual threshold, it is determined that the predictive knowledge edge has undergone semantic drift or state invalidation, triggering the temporary edge rollback deletion mechanism; otherwise, if R_total is less than or equal to the preset residual threshold, it is determined that the prediction is successful, and the temporary edge is converted into a static edge and written into the knowledge graph persistence layer.

[0095] In step S142, the specific steps are as follows: At this point, the sub-graph matching residual calculated in step S141 is compared numerically with the residual threshold preset by the system; the preset residual threshold is a boundary value pre-calibrated based on the statistical variance of historical normal monitoring data or the topological tolerance of the map.

[0096] If the residual of the subgraph matching is greater than the preset residual threshold, it indicates that the predictive knowledge edge output by the generative graph neural network in the previous time window has not been verified in the real physical world, that is, there is a significant deviation between the predicted topology and the actual observed topology. At this time, the system diagnoses that the predictive knowledge edge has undergone semantic drift or state failure, triggers the abnormal warning logic, and enters the rollback and deletion process of the temporary edge. Conversely, if the residual is less than or equal to the threshold, it is determined that the prediction is successful, and the temporary edge is converted into a static edge and written into the graph persistence layer.

[0097] When the rollback mechanism is triggered, the system locates the virtual memory region of the plant cultivation knowledge graph and extracts the failed predictive knowledge edge and its associated temporary node. The rollback deletion mechanism not only involves physically removing the predictive knowledge edge from the virtual memory graph structure, but also disconnecting the logical connection pointer between the edge and the static entity node in the original graph.

[0098] Meanwhile, in order to maintain the integrity of the graph topology matrix, the system recalculates the adjacency matrix and Laplacian matrix of the affected local subgraphs, restoring them to the state before executing step S131 (dynamic graph topology update) or maintaining the current pure actual observation state. This rollback operation ensures that erroneous prediction data will not pollute the underlying prior logic of the knowledge graph, maintaining the self-consistency and security of the graph.

[0099] While performing rollback deletion, the system extracts the data pairs between the current prediction and the actual observation, constructing positive and negative feedback samples. If there is a semantic discrepancy between the predicted edge and the actual observed edge (e.g., predicting the occurrence of the first disease but actually the occurrence of the second disease), then "graph history state + first predicted edge" is marked as a negative sample, and "graph history state + second actual edge" is marked as a positive sample. Using these online-acquired positive and negative feedback samples, the generative graph neural network and the preceding spatiotemporal alignment network are fine-tuned online. Specifically, a gradient-based backpropagation algorithm or contrastive learning strategy is employed to minimize the generation probability of negative samples and maximize the generation probability of positive samples, updating the weight parameters of the generative model. Through online iterative updates of the model parameters, the model can output predictive knowledge edges that better conform to the actual plant growth patterns when encountering similar environmental and physiological feature vectors in the future, thereby achieving closed-loop error correction and self-evolutionary updates of the plant cultivation knowledge graph.

[0100] Compared with the prior art, the beneficial effects of the present invention are: (1) During the detection process of the plant greenhouse, plant planting data is collected and spatiotemporally aligned to output aligned data. The aligned data is then mapped to a low-dimensional dense vector. Dynamic entity nodes and corresponding dynamic relation edges are generated based on the iteration of the low-dimensional dense vector. The dynamic entity nodes and corresponding dynamic edges are mapped to the plant planting knowledge graph. The conditional probability distribution divergence between the dynamic relation edges and the existing static edges in the plant planting knowledge graph is determined along the temporal causal relationship. In this way, a reverse intervention test is performed to determine the target triplet to be dynamically updated. This effectively eliminates false conflicts caused by data noise or false correlations, ensuring that only target triplets with strong causal driving force and verified as true are updated. This ensures the rigor of the underlying agronomic prior logic of the graph and the security of the topological structure.

[0101] (2) Perform dynamic update operation on the graph topology of the target triplet to output the dynamically updated graph topology; take the dynamically updated graph topology as the conditional input and input it into the preset generative graph neural network to generate predictive knowledge edges within the preset time window; mark the predictive knowledge edges as temporary edges; when the next round of real-time plant planting data is obtained, determine the subgraph matching residual between the next round of real-time plant planting data and the predictive knowledge edge. If the subgraph matching residual is greater than the preset residual threshold, trigger the rollback deletion of the temporary edge to update the plant planting knowledge graph in a closed loop, so that the plant planting knowledge graph can continuously self-correct and evolve in the complex physical greenhouse environment, which significantly improves the prediction accuracy and robustness of the plant planting knowledge graph in the long-term planting process.

[0102] Please see Figure 2 The specific application scenarios and corresponding embodiments of this application are as follows: In step S111, the greenhouse is equipped with an "air temperature and humidity sensor: sampling frequency 1 time / minute", a "soil pH sensor: sampling frequency 1 time / 10 minutes, blueberries are extremely sensitive to rhizosphere pH" and a "macro camera: sampling frequency 1 time / hour" to monitor the growth of blueberry shoots.

[0103] The spatiotemporal alignment network uses a 1-minute time grid as the baseline. For soil pH data sampled every 10 minutes, cubic spline interpolation is used to calculate the pH smooth transition value in the middle 9 minutes. For image data collected every hour, not only is interpolation performed, but dynamic time warping is also used to eliminate the second-level delay caused by image transmission and processing, so that air temperature, soil pH and blueberry image features are aligned to the same minute-level timestamp.

[0104] The greenhouse is divided into three-dimensional voxels indexed by "cultivation trough-plant number-root canopy depth". The coordinates of the air temperature sensor of the third blueberry plant in a certain row (denoted as Plant-D-3) are mapped to the voxel where the plant canopy is located, and the soil pH sensor is mapped to the voxel where the plant rhizosphere is located. At the same time, using the camera intrinsic and extrinsic parameter matrix, the canopy pixel region of Plant-D-3 in the captured image is mapped to the same canopy voxel. Thus, the high temperature data, low pH data and leaf curling image features collected by the system at a certain time t can be accurately anchored as the fused and aligned data of Plant-D-3 at time t and spatial coordinates after spatiotemporal alignment, and serve as the basis for subsequent vectorization mapping.

[0105] In step S112, the system encodes and maps the aligned data at a certain time point output in step S111—including air temperature of 32℃, soil pH of 4.2, and leaf multispectral image features—to a unified vector space. By InfoNCE loss, the system maximizes the mutual information between the "air temperature and soil pH feature vectors" and the "leaf phenotypic feature vectors," making them closer in the low-dimensional space. The system outputs a 64-dimensional low-dimensional dense vector that integrates environmental and physiological features. This vector semantically represents the current comprehensive state of blueberries "suffering from the dual stress of rhizosphere acidification and canopy high temperature."

[0106] The 64-dimensional vector was input into an LSTM network for hourly iterations. After five consecutive time steps, the hidden state vector sequence showed a trajectory that changed sharply in a specific direction. Calculations showed that the trajectory vector difference increased sharply from the third to the fifth time step, deviating from the normal growth baseline trajectory. After pattern classification, the change was determined to be "latent state of water loss and wilting of blueberry shoots".

[0107] The system dynamically generates a dynamic entity node named "New Shoots Dehydration and Wilting Transient_03". The semantic dependency (feature cosine similarity of 0.92) and the temporal proximity of the event occurrence between this dynamic node and the static node "Blueberry Plant-D-3" are calculated. The time difference is 0, which satisfies the generation condition. Thus, a dynamic relation edge with the semantic relationship "presentation state" is constructed to connect "New Shoots Dehydration and Wilting Transient_03" and "Blueberry Plant-D-3", providing the basic structure for subsequent graph causal intervention and topology update.

[0108] In step S121, the system acquires a preset blueberry planting knowledge graph, which includes static nodes such as "blueberry", "rhizosphere soil environment", and "gray mold" as well as static edges such as "suitable pH range" and "susceptible diseases". The dynamic entity node "new shoot water loss and wilting transient_03" and the dynamic relation edge "presentation status" generated in the previous steps are used to calculate semantic similarity through a graph representation learning model. It is found that it is highly semantically related to the static node "blueberry plant Plant-D-3" and "water stress", so "new shoot water loss and wilting transient_03" is mapped to a local subgraph centered on "blueberry plant Plant-D-3".

[0109] Assign three-dimensional coordinates to the dynamic node: the logical topology dimension is located at 1 hop from the “Plant-D-3” node; the time series dimension is marked as the current time window T; and the spatial dimension is mapped to the 5th plant of the greenhouse cultivation trough 3 in the three-dimensional voxel mesh.

[0110] Time is divided into hourly time slices. Within time slice T, a "Blueberry Plant Plant-D-3" is established. Static nodes are connected to "New Shoot Water Loss and Wilting Transient_03" via "Presentation State" and dynamic edges, which are intra-slice causal edges of the dynamic nodes. Simultaneously, between time slices T-1 and T, cross-time slice transfer edges are established. For example, the static environmental nodes "Rhizosphere Low pH Event" and "Canopy High Temperature Event" at time T-1 are connected to the dynamic node "New Shoot Water Loss and Wilting Transient_03" at time T via cross-time slice transfer edges. Through conditional probability parameterization of the dynamic Bayesian network, the temporal causal relationship link of "preceding environmental anomaly, static edges and previous dynamic edges induce subsequent physiological transient changes, and the current dynamic edge" is identified. This provides a clear computational topology for determining the conditional probability distribution divergence between this dynamic edge and existing static edges such as "blueberry water transport obstruction".

[0111] In step S122, the system obtains the currently generated dynamic relation edge “(New Shoot Water Loss and Wilting Transient_03)-[Presentation State]>(Blueberry Plant-D-3)” and its historical context (such as the “Rhizosphere Low pH Event” and “Canopy High Temperature Event” 1 hour prior); these contexts are injected as evidence variables into the dynamic Bayesian network, and the posterior probability distribution of the dynamic relation edge under the current conditions is calculated through the confidence propagation algorithm. For example, the posterior probability of blueberry new shoots wilting due to water loss is calculated to be 85%.

[0112] The system extracts the existing static edge "(Blueberry Plant-D-3)-[Normal Growth State]>(Water Metabolism Balance)" from the blueberry cultivation knowledge graph. This static edge is set to a steady-state probability distribution of 95% based on prior agronomic knowledge. The divergence between "dynamic posterior probability distribution: 85% wilting probability" and "static marginal probability distribution: 95% normal probability" is calculated using the KL divergence formula. The divergence value is found to be large, which quantitatively confirms that there is a significant information conflict between the current real-time data and the inherent prior of the graph.

[0113] To verify whether the conflict is a genuine state that needs updating, the system performs a Do calculus intervention test; it constructs an original topology graph containing the dynamic edge of the "presented state" and a counterfactual topology graph that forcibly removes the dynamic edge; the two graphs are input into the plant growth prediction model respectively. If the original topology graph predicts a 20% reduction in the yield of the blueberry plant in the next 3 days, while the counterfactual topology graph predicts only a 2% reduction, then the causal effect changes significantly; based on this, the system determines that the dynamic edge has a strong causal driving force on the prediction result, and the combination "Blueberry plant Plant-D-3, presented state, new shoot water loss and wilting transient_03" is the target triplet to be dynamically updated, and is ready to enter the subsequent graph topology dynamic update process.

[0114] In step S131, the system obtains the target triplet, blueberry plant Plant-D-3, presentation state, and shoot wilting transient_03. Since "shoot wilting transient_03" is a newly emerging dynamic entity, the system creates this node in the graph engine and assigns it an initial feature representation after dimensionality reduction by multimodal fusion vector. A directed edge is generated between the static node "blueberry plant Plant-D-3" and the dynamic node, semantically labeled as "presentation state", and the previously calculated 85% posterior probability is used as the weight of the directed edge.

[0115] The system calculates the energy loss of this local update; checks local adjacency consistency: since the wilting of new shoots due to water loss is directly related to the weakening of water transport in the plant, its feature vector has a high cosine similarity to the association features of Plant-D-3, and this constraint term has low energy; secondly, it calculates topological smoothness: ensuring that the newly added dynamic edges do not disrupt the original topological path continuity of the blueberry "root-stem-new shoot", and superimposes a causal divergence penalty term; after the system weights and sums the above constraint terms, it fine-tunes the feature vector of the "new shoot wilting transient_03" node through a message passing mechanism, so that it is better compatible with the surrounding static node logic about "normal water metabolism" in the vector space, until the energy function converges.

[0116] The system solidifies the optimized features of the "New Shoots Wilting Transient_03" node and its connecting edges, and updates them to the adjacency matrix of the global blueberry planting knowledge graph. At this point, the graph not only retains the static attributes of blueberries, but also accurately includes the current dynamic transient topology of "Plant-D-3 exhibiting new shoot wilting". This is then used as the output and prepared to be input into the subsequent generative graph neural network for predicting future trends such as gray mold outbreaks.

[0117] In step S132, the system inputs the dynamically updated graph topology structure containing "Blueberry Plant-D-3" and "New Shoot Water Loss and Wilting Transient_03" and its "Associated Edges: Presentation State, Associated Rhizosphere Low pH, etc." into the graph variational autoencoder and maps it into a 64-dimensional latent space conditional guidance vector. This vector compresses the transient characteristics and topological environment of the current plant under dual stress.

[0118] The denoising diffusion probability model uses the 64-dimensional conditional guiding vector as a conditional constraint. During the forward process, the system adds Gaussian noise to the simulated "future state graph vector" until it becomes pure noise. The generative graph Transformer network uses the conditional guiding vector as the key-value pair and the noisy vector as the query to learn the evolution direction of the future graph under the current stress conditions.

[0119] The system starts with random Gaussian noise and undergoes 50 steps of reverse denoising under the guidance of conditional vectors. The network gradually infers the evolution state of the blueberry map in the next 3 days, and the decoder reconstructs it into a future adjacency matrix. A high-probability connection edge is found between the node "New Shoots Dehydration and Wilting Transient_03" and the existing static node "Gray Mold" in the matrix, thus generating a predictive knowledge edge.

[0120] The system extracts the attribute feature of the predicted edge from the tensor as "induction probability: 82%", and calculates its temporal weight as "3rd day in the future, T+72h" based on the temporal embedding vector. The system outputs a complete predictive knowledge edge: New shoot water loss and wilting transient_03, future induction, gray mold, attribute feature: induction probability 82%, temporal weight: T+72h, providing a prediction benchmark for subsequent closed-loop verification.

[0121] In step S141, the system obtains the predictive knowledge edge generated in step S132: New shoot wilting transient_03, future induction, gray mold, attribute characteristics: induction probability 82%, time series weight: T+72h; the system marks this edge as a temporary edge, assigns it a confidence weight of 0.82, and temporarily stores it and related dynamic nodes in the virtual memory buffer pool of the blueberry graph to form a predictive subgraph. At this time, the underlying static adjacency matrix of normal blueberry growth is unaffected. When the time reaches T+72h, that is, 3 days later, the system acquires a new round of real-time sensing data from the greenhouse. Through multimodal sensing array detection and spatiotemporal alignment calculation, an anomaly is found in the multispectral image of the leaves of Plant-D-3. Through vectorization iteration, the actual dynamic entity node "leaf water-soaked lesion" and the dynamic edge "presenting lesion state" are generated. The actual event is mapped to the graph, and the local topology around "blueberry plant Plant-D-3" is extracted to form the observation subgraph.

[0122] The system compares the predicted subgraph in virtual memory with the currently observed subgraph. In terms of node features, it calculates the cosine distance between the feature vector of the predicted node "gray mold" and the feature vector of the actual node "leaf water-soaked lesion". If the two are similar in pathological features, the feature residual is small. In terms of topology, it calculates the graph editing distance between "predicted edge: induced relationship" and "actual edge: presented state". Since both are connected to "new shoot water loss and wilting transient_03", their topological paths are similar. The system weights and sums the above feature distance and topological distance to calculate the final subgraph matching residual of 0.15. This residual value quantifies the relative distance between "predicted occurrence of gray mold" and "actual appearance of lesions" in the data distribution, and serves as the basis for subsequent judgment on whether to trigger temporary edge rollback.

[0123] In step S142, assuming the system sets a preset residual threshold of 0.25, and step S141 calculates that the residual between the predicted sub-graph for "new shoot wilting transient_03" inducing "gray mold" and the observed sub-graph showing "leaf water-soaked lesions" is 0.42; since 0.42 is greater than 0.25, the system determines that the previously generated "predictive knowledge edge: induces gray mold" has experienced prediction drift and has become invalid.

[0124] The system automatically retrieves the virtual memory region and completely deletes the temporary edge "New Shoots Dehydration and Wilting Transient_03, Future Induction, Gray Mold" generated 72 hours ago and its accompanying 0.82 confidence weight from the virtual memory. At the same time, it disconnects the virtual memory connection pointer between this temporary node and the static node "Blueberry Plant-D-3" to ensure that the static storage region of the underlying blueberry map is not affected by the erroneous prediction and the map is restored to a pure, actual observation state.

[0125] The system marks the current "historical graph state + induced gray mold" as negative feedback samples and the "historical graph state + actual water-soaked lesions on leaves" as positive feedback samples. The system inputs these samples into a generative graph neural network and updates the weight parameters of U-Net or Graph Transformer through backpropagation. After online fine-tuning, the model learns a new mapping logic that "for blueberries, specific high temperature and humidity accompanied by transient shoot wilting actually induces more water-soaked lesions on leaves than typical gray mold." When similar transient features appear in the greenhouse again, the model will output more accurate prediction edges, thus completing the complete closed-loop update of the blueberry planting knowledge graph from "data collection - prediction - verification - error correction".

[0126] Please see Figure 3 A knowledge graph-based dynamic update system for plant cultivation data is applied to the aforementioned knowledge graph-based dynamic update method for plant cultivation data; the knowledge graph-based dynamic update system for plant cultivation data includes: The iteration module 21 is used to collect plant planting data during the detection process of the plant greenhouse, perform spatiotemporal alignment on the plant planting data, output aligned data, map the aligned data into a low-dimensional dense vector, and generate dynamic entity nodes and corresponding dynamic relation edges based on the iteration of the low-dimensional dense vector. The knowledge graph module 22 is used to map dynamic entity nodes and their corresponding dynamic edges to the plant cultivation knowledge graph, and determine the conditional probability distribution divergence between the dynamic relationship edges and the existing static edges in the plant cultivation knowledge graph along the temporal causal relationship, thereby performing reverse intervention tests and determining the target triplet to be dynamically updated. The prediction module 23 is used to perform a dynamic update operation on the graph topology of the target triplet to output the dynamically updated graph topology; the dynamically updated graph topology is used as a conditional input and input into a preset generative graph neural network to generate predictive knowledge edges within a preset time window in the future. The update module 24 is used to mark predictive knowledge edges as temporary edges. When the next round of real-time plant planting data is obtained, the subgraph matching residual between the next round of real-time plant planting data and the predictive knowledge edge is determined. If the subgraph matching residual is greater than the preset residual threshold, the temporary edge is rolled back and deleted to update the plant planting knowledge graph in a closed loop.

[0127] It should be noted that although multiple modules are mentioned in the detailed description above, this division is not mandatory; the above description is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the protection scope of the present invention; therefore, the protection scope of the present invention should be determined by the protection scope of the claims.

Claims

1. A method for dynamically updating plant planting data based on knowledge graphs, characterized in that, include: Plant planting data is collected during the inspection of the plant greenhouse. The plant planting data is spatiotemporally aligned to output aligned data. The aligned data is then mapped into a low-dimensional dense vector. Dynamic entity nodes and corresponding dynamic relation edges are generated based on the iteration of the low-dimensional dense vector. Dynamic entity nodes and their corresponding dynamic edges are mapped to the plant cultivation knowledge graph. The conditional probability distribution divergence between the dynamic relationship edges and the existing static edges in the plant cultivation knowledge graph is determined along the temporal causal relationship. In this way, a reverse intervention test is performed to determine the target triplet to be dynamically updated. The target triplet is subjected to a dynamic update operation on the graph topology to output the dynamically updated graph topology. The dynamically updated graph topology is then used as input to a pre-defined generative graph neural network to generate predictive knowledge edges within a pre-defined time window. Predictive knowledge edges are marked as temporary edges. When the next round of real-time plant planting data is obtained, the subgraph matching residual between the next round of real-time plant planting data and the predictive knowledge edge is determined. If the subgraph matching residual is greater than the preset residual threshold, the temporary edge is rolled back and deleted to update the plant planting knowledge graph in a closed loop.

2. The method for dynamically updating plant planting data based on knowledge graphs according to claim 1, characterized in that, The process of collecting plant planting data during the detection of the greenhouse involves spatiotemporal alignment of the plant planting data to output aligned data. The aligned data is then mapped into a low-dimensional dense vector. Dynamic entity nodes and corresponding dynamic relational edges are generated based on the iteration of this low-dimensional dense vector, including: A multimodal sensing array is deployed inside a plant greenhouse to collect plant planting data, including environmental factors and physiological characteristics. A spatiotemporal alignment network is used to align the plant planting data with timestamps and map its spatial location to output aligned data.

3. The method for dynamically updating plant planting data based on knowledge graphs according to claim 2, characterized in that, The process of collecting plant planting data during the detection of the greenhouse, performing spatiotemporal alignment on the plant planting data to output aligned data, mapping the aligned data into a low-dimensional dense vector, and generating dynamic entity nodes and corresponding dynamic relational edges based on the iteration of the low-dimensional dense vector also includes: The aligned data is mapped to a unified vector space. By maximizing intermodal mutual information to preserve the semantic features of the plant, a low-dimensional dense vector is further output. The low-dimensional dense vector is iterated at multiple levels. During the iteration process, the corresponding temporal iteration trajectory is determined. Based on the identification of the temporal iteration trajectory, the changes in the plant growth state are determined. Furthermore, dynamic entity nodes representing the transient state of plant growth are dynamically generated, and corresponding dynamic relation edges are constructed based on the semantic dependencies and temporal proximity between nodes.

4. The method for dynamically updating plant planting data based on knowledge graphs according to claim 1, characterized in that, The process involves mapping dynamic entity nodes and their corresponding dynamic edges to a plant cultivation knowledge graph, determining the conditional probability distribution divergence between dynamic relationship edges and existing static edges in the plant cultivation knowledge graph along temporal causal relationships, thereby performing a reverse intervention test to determine the target triplet to be dynamically updated, including: Obtain a pre-defined plant cultivation knowledge graph, and map dynamic entity nodes and dynamic relationship edges to the global coordinate system of the plant cultivation knowledge graph through semantic alignment. Then, construct a dynamic Bayesian network across time slices to sort out the temporal causal relationship between dynamic relationship edges and static edges.

5. The method for dynamically updating plant planting data based on knowledge graphs according to claim 4, characterized in that, The process of mapping dynamic entity nodes and their corresponding dynamic edges to a plant cultivation knowledge graph, determining the conditional probability distribution divergence between dynamic relationship edges and existing static edges in the plant cultivation knowledge graph along temporal causal relationships, thereby performing a reverse intervention test, and further determining the target triplet to be dynamically updated, also includes: The historical context corresponding to the dynamic relation edges is obtained, and probability calculations are performed in combination with the dynamic relation edges to determine the corresponding posterior probability distribution. Furthermore, the conditional probability distribution divergence between the dynamic relation edges and the existing static edge distribution in the plant planting knowledge graph is determined to quantify the degree of information conflict. At the same time, a counterfactual reasoning mechanism is introduced to perform reverse intervention tests, simulating the causal effect of the graph topology on the plant growth prediction results when a specific dynamic relation edge is removed, and the target triplet to be dynamically updated is determined by combining the significant fluctuation of the causal effect.

6. The method for dynamically updating plant planting data based on knowledge graphs according to claim 1, characterized in that, The process involves performing a dynamic graph topology update operation on the target triples to output a dynamically updated graph topology; using the dynamically updated graph topology as input and feeding it into a preset generative graph neural network to generate predictive knowledge edges within a preset future time window, including: The algorithm performs a dynamic update operation on the graph topology of the target triple and constrains the updated topology by defining the energy loss of the plant planting knowledge graph, thereby outputting the dynamically updated graph topology.

7. The method for dynamically updating plant planting data based on knowledge graphs according to claim 6, characterized in that, The step of performing a dynamic update operation on the graph topology of the target triplet to output a dynamically updated graph topology; using the dynamically updated graph topology as input and feeding it into a preset generative graph neural network to generate predictive knowledge edges within a preset future time window, further includes: The dynamically updated graph topology is used as a condition constraint and input into a pre-defined generative graph neural network. This generative graph neural network adopts a graph generation architecture based on a denoising diffusion probability mechanism, which gradually denoises within the latent space to generate predictive knowledge edges within a future preset time window that conform to the plant growth pattern. These predictive knowledge edges not only include the connection relationships between nodes, but also integrate the attribute features and temporal weights of the edges.

8. The method for dynamically updating plant planting data based on knowledge graphs according to claim 1, characterized in that, The process involves marking predictive knowledge edges as temporary edges; when the next round of real-time plant planting data is obtained, determining the subgraph matching residual between the next round of real-time plant planting data and the predictive knowledge edges; if the subgraph matching residual is greater than a preset residual threshold, triggering the rollback deletion of temporary edges to update the plant planting knowledge graph in a closed loop, including: Predictive knowledge edges are marked as temporary edges with confidence weights and temporarily stored in the virtual memory area of ​​the plant planting knowledge graph. When the next round of real-time plant planting data is obtained, an observation subgraph containing real-time data is introduced. The subgraph matching residual between the observation subgraph and the prediction subgraph containing predictive knowledge edges is further calculated. This subgraph matching residual quantifies the relative distance between the real data distribution and the predicted data distribution in terms of node features and topology.

9. The method for dynamically updating plant planting data based on knowledge graphs according to claim 8, characterized in that, The step of marking predictive knowledge edges as temporary edges; when the next round of real-time plant planting data is obtained, determining the subgraph matching residual between the next round of real-time plant planting data and the predictive knowledge edges; if the subgraph matching residual is greater than a preset residual threshold, triggering the rollback deletion of temporary edges to update the plant planting knowledge graph in a closed loop, also includes: If the subgraph matching residual is greater than the preset residual threshold, the predictive knowledge edge will drift or become invalid, triggering the rollback and deletion mechanism of the temporary edge. This allows real-time data to be used as positive and negative feedback samples to be input into the model for online adjustment, thereby updating the plant cultivation knowledge graph in a closed loop.

10. A dynamic update system for plant cultivation data based on knowledge graphs, characterized in that, The knowledge graph-based dynamic update system for plant planting data is applied to the knowledge graph-based dynamic update method for plant planting data as described in any one of claims 1-9; The knowledge graph-based dynamic update system for plant cultivation data includes: The iterative module is used to collect plant planting data during the detection process of the plant greenhouse, perform spatiotemporal alignment on the plant planting data to output aligned data, map the aligned data into a low-dimensional dense vector, and generate dynamic entity nodes and corresponding dynamic relation edges based on the iteration of the low-dimensional dense vector. The knowledge graph module is used to map dynamic entity nodes and their corresponding dynamic edges to the plant cultivation knowledge graph, and to determine the conditional probability distribution divergence between the dynamic relationship edges and the existing static edges in the plant cultivation knowledge graph along the temporal causal relationship, thereby performing reverse intervention tests and determining the target triplet to be dynamically updated. The prediction module is used to perform dynamic update operations on the graph topology of the target triples to output the dynamically updated graph topology. The dynamically updated graph topology is used as the input condition and fed into a preset generative graph neural network to generate predictive knowledge edges within a preset time window in the future. The update module is used to mark predictive knowledge edges as temporary edges. When the next round of real-time plant planting data is obtained, the subgraph matching residual between the next round of real-time plant planting data and the predictive knowledge edge is determined. If the subgraph matching residual is greater than the preset residual threshold, the temporary edge is rolled back and deleted to update the plant planting knowledge graph in a closed loop.