CN-122021633-A - Knowledge graph construction method for poppy substitution planting
Abstract
The invention discloses a knowledge graph construction method for poppy alternative planting, which comprises the steps of obtaining soil humidity, illumination intensity, air temperature and precipitation data from an Internet of things sensing node deployed in an alternative planting area, analyzing the growth state of crops by combining remote sensing images to generate a structured environment observation tuple, carrying out entity recognition and relation extraction on policy and regulation texts, agricultural and technical manuals and historical planting records to construct an initial triplet set, inputting the structured environment observation tuple and the initial triplet set into a graph neural network encoder to generate node embedded vectors, and calculating semantic association weights among entities by adopting a graph attention mechanism based on the node embedded vectors to construct a dynamic adjacent matrix.
Inventors
- LUO XIAONAN
- LI FANG
- WANG HUADENG
- LI JI
- WANG RUOMEI
- HU CHANGAN
Assignees
- 桂林电子科技大学
- 广东海纳德生物芯片技术有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20260210
Claims (8)
- 1. A knowledge graph construction method for poppy substitute planting, comprising: Acquiring soil humidity, illumination intensity, air temperature and precipitation data from an Internet of things sensing node deployed in a substitute planting area, and analyzing the growth state of crops by combining a remote sensing image to generate a structural environment observation tuple; entity identification and relation extraction are carried out on the policy and regulation text, the agricultural technical manual and the historical planting record, and an initial triplet set is constructed; inputting the structured environment observation tuple and the initial triplet set into a graph neural network encoder to generate a node embedded vector; Based on the node embedded vector, calculating semantic association weights among entities by adopting a graph attention mechanism, and constructing a dynamic adjacency matrix; iteratively updating node representation through a graph convolution layer to obtain entity feature vectors fused with multi-source information; According to the entity feature vector, a path reasoning algorithm is executed, and an implicit planting adaptation rule is deduced from the knowledge graph; If the reasoning result meets the preset substitute planting compliance constraint, writing the newly generated triples into a distributed graph database, and synchronizing to the edge computing nodes through a consensus mechanism; and searching a sub-graph structure matched with the current land block coordinates from the distributed graph database, judging whether a closed-loop reasoning path exists in the sub-graph, and outputting executable planting decision suggestions if the closed-loop reasoning path exists in the sub-graph.
- 2. The method for constructing a knowledge graph for poppy alternative planting of claim 1 wherein the step of obtaining soil humidity, illumination intensity, air temperature and precipitation data from the sensing nodes of the Internet of things deployed in the alternative planting area, resolving the growth state of crops by combining remote sensing images, and generating a structured environmental observation tuple comprises the steps of: acquiring original sensing data from a soil temperature and humidity sensor, an illumination sensor and a weather station deployed in the field through a LoRaWAN protocol, and packaging the original sensing data into a JSON format message with a time stamp and geographic coordinates; Acquiring an NDVI index image by using an unmanned aerial vehicle carried with a multispectral camera, extracting a crop coverage area through a U-Net segmentation model, and generating a pixel-level growth state label; aligning the JSON format message and the NDVI image tag to the same geographic grid unit, filling the missing value by adopting a spatial interpolation algorithm, and forming an observation record with uniform space-time granularity; Executing Schema mapping on the observation records, mapping field soil humidity into predicates hasSoilMoisture in the RDF triples, wherein the subject is plot_region_XY, and the object is numerical literal quantity; and adding source identifiers to all mapped triples, wherein the identifiers comprise equipment IDs, acquisition time and data credibility scores, and generating a structured environment observation tuple with traceability information.
- 3. The method for constructing a knowledge graph for poppy replacement planting of claim 1 wherein the step of performing entity recognition and relation extraction on the text of policy regulations, agricultural manuals and historical planting records to construct an initial triplet set comprises: crawling the related policy files for replacing planting from the rural area official network and local poisoning database, and identifying the crop varieties, forbid cultivating areas and named entities of the subsidy standard by adopting a BERT-BiLSTM-CRF model; after performing OCR processing on the agricultural popularization PDF document, matching the fertilization period, irrigation frequency and operational phrases for pest control by using a rule template, and extracting a main guest structure; analyzing the Farmer ID, the planting area, the harvest yield and the rotation records from the historical planting standing account, and constructing an example triplet in the form of Farmer_A-cultivated-loop_B; Aligning the entity identification result with the relationship extraction result to a predefined ontology, the ontology including Class "AlternativeCrop", property "requiresMinRainfall", datatype "hectare"; and executing an authority-based resolution strategy on the conflict triples, preferentially reserving data of government release sources, and generating an initial triples set without contradiction.
- 4. The method for constructing a knowledge graph for poppy replacement planting of claim 1 wherein the step of inputting the set of structured environmental observation tuples and initial triplets into a graph neural network encoder to generate node embedding vectors comprises: Converting the triples into a graph structure, wherein each unique URI is used as a graph node, and each predicate is used as a directed edge; The numerical type attribute is embedded after being discretized by boxes, and the text type attribute is Sentence-BERT to generate 768-dimensional vectors; Initializing a node feature matrix, wherein the rows of the matrix correspond to nodes, the columns correspond to feature dimensions, and missing features fill zero vectors; Inputting the node characteristic matrix and the adjacent matrix into two layers GRAPHSAGE of encoders, and aggregating neighbor node information and splicing self characteristics in each layer; after being processed by a nonlinear activation function ReLU, the 128-dimensional node embedded vector is output.
- 5. The method for constructing a knowledge graph for poppy replacement planting of claim 1 wherein the step of calculating inter-entity semantic association weights based on the node embedded vector using a graph attention mechanism to construct a dynamic adjacency matrix comprises: for any two nodes i and j, calculating dot product attention scores of embedded vectors of the nodes i and j; normalizing the attention score by Softmax to obtain the weight alpha_ij of the edge (i, j); Setting a threshold value tau=0.35, if alpha_ij is larger than or equal to tau, reserving the edge in the dynamic adjacent matrix, otherwise, setting zero; attaching a relationship type label to the reserved edge; and outputting the thinned dynamic adjacency matrix.
- 6. The method for constructing a knowledge graph for poppy replacement planting of claim 1, wherein the step of iteratively updating the node representation by a graph convolution layer to obtain the entity feature vector fused with the multi-source information comprises the steps of: Inputting the dynamic adjacency matrix and the node embedded vector into three layers of GCNs, and executing each layer Calculating; wherein A is an adjacency matrix, D is a degree matrix, W (l) is a learnable parameter, and sigma is an ELU activation function; After the third layer is output, carrying out L2 normalization on the feature vector of each node; performing cluster analysis on the normalized vector to identify potential planting pattern clusters; and outputting the final entity characteristic vector.
- 7. The method according to claim 1, wherein said step of performing a path inference algorithm based on said entity feature vector to derive implicit planting adaptation rules in a knowledge graph comprises: setting a source node as a current land block geographic identifier and a target node as a 'ApprovedAlternativeCrop' type; projecting the relation to a specific subspace by adopting TransR space mapping method to calculate a path score; traversing paths with the length not exceeding 4, and screening candidate paths with the score higher than 0.8; Performing a logical consistency check on the candidate paths, excluding paths that violate forbid cultivating altitude >2500m hard constraint; The effective path is converted into a regular form of 'If soil pH E [6.0,7.5] and annual rainfall >800mmTHEN recommended maca planting'.
- 8. The method for constructing a knowledge graph for poppy alternative planting of claim 1 wherein the step of writing the newly generated triples into the distributed graph database and synchronizing to the edge computing nodes through a consensus mechanism if the inference result satisfies a preset alternative planting compliance constraint comprises: Serializing the rule triples into an XML format; invoking IPFS a client to generate a content hash CID as a triplet unique identifier; initiating a write transaction to the Neo4j cluster, wherein the transaction comprises CID, generation time and reasoning path abstract; the edge node monitors event logs on the blockchain, and when detecting that a new block contains the local area CID, triggers local cache update; and ensuring that at least three edge nodes confirm the successful writing through Raft consensus protocol, and completing synchronization.
Description
Knowledge graph construction method for poppy substitution planting Technical Field The invention relates to the technical field of intersection of a knowledge graph and agricultural information technology, in particular to a knowledge graph construction method for poppy alternative planting. Background In the field of poppy replacement planting, the traditional agricultural management method mainly depends on empirical judgment and a scattered data recording mode, and lacks of system integration of multi-source heterogeneous information such as crop growth environments, pest and disease damage early warning, soil nutrient change, policy and regulation and the like. In recent years, with the development of accurate agriculture and digital rural construction, partial research attempts are being made to introduce Internet of things equipment, remote sensing monitoring and biological detection technology to assist in replacing planting management. For example, there are schemes of adopting an adaptive fusion positioning algorithm based on an inertial sensor, combining optical fiber synchronization and wireless communication technology to track the position of field biological detection equipment, and other techniques of integrating a microfluidic chip with an optical detection module for PCR quantitative analysis of crop pathogens. The technology improves the real-time performance and accuracy of data acquisition under a specific scene, but still exists in the form of isolated data points or a simple database at the knowledge organization level, and a semantic association system covering the dimensions of planting varieties, geographic climate, agronomic operations, policy guidance and the like is not established. Therefore, when facing the complex and changeable alternative planting requirements, the existing method has limitations in the aspects of structural, reasoning capacity and cross-domain coordination of knowledge expression, and restricts the construction and application of an intelligent decision support system. Disclosure of Invention The invention provides a knowledge graph construction method for poppy alternative planting, which aims to solve the problems of lack of semantic association, knowledge expression fragmentation, weak reasoning capacity and insufficient cross-domain synergy of multi-source heterogeneous data in the existing alternative planting management. In order to solve the technical problems, the invention adopts the following technical scheme: A knowledge graph construction method for poppy alternative planting includes the steps of obtaining soil humidity, illumination intensity, air temperature and precipitation data from sensing nodes of the Internet of things deployed in an alternative planting area, analyzing crop growth states through remote sensing images to generate a structured environment observation tuple, conducting entity identification and relation extraction on policy regulation texts, agricultural skill manuals and historical planting records to construct an initial triplet set, inputting the structured environment observation tuple and the initial triplet set into a graph neural network encoder to generate node embedding vectors, calculating semantic association weights among entities through a graph attention mechanism based on the node embedding vectors to construct dynamic adjacent matrixes, iteratively updating node representations through graph convolution layers to obtain entity feature vectors fusing multi-source information, executing a path reasoning algorithm according to the entity feature vectors, deducing implicit planting adaptation rules in the knowledge graph, writing newly generated triplets into a distributed graph database if reasoning results meet preset alternative planting rule constraints, synchronizing the newly generated triplets to edge computing nodes through a consensus mechanism, searching from the distributed graph database to judge whether a closed loop exists in a subgraph matched with a current land block coordinate structure or not, and outputting a closed loop if a closed graph is judged to exist. In one aspect of the disclosure, the step of obtaining soil humidity, illumination intensity, air temperature and precipitation data from an internet of things sensing node deployed in a replacement planting area, resolving a crop growth state in combination with a remote sensing image, and generating a structured environmental observation tuple comprises: acquiring original sensing data from a soil temperature and humidity sensor, an illumination sensor and a weather station deployed in the field through a LoRaWAN protocol, and packaging the original sensing data into a JSON format message with a time stamp and geographic coordinates; Acquiring an NDVI index image by using an unmanned aerial vehicle carried with a multispectral camera, extracting a crop coverage area through a U-Net segmentation model, and generating a pixel-level gro