A method and device for constructing a red soil acidification knowledge graph
By constructing the knowledge map of red soil acidization, the problem of low knowledge and accuracy of knowledge acquisition in the agricultural field has been solved, and the efficient integration and expression of soil acidization knowledge is realized.
Patent Information
- Application Number
- CN202411282719.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-13
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2044-09-13
AI Technical Summary
When the prior art faces the problem of red soil acidification, it cannot meet the efficiency and accuracy of knowledge acquisition in the agricultural field.
By collecting and modular geographical space data and non -geographical space data, the red soil acidization knowledge map is constructed, and the preset database is used for physical extraction and relationships, and stored in the knowledge map.
Improve the efficiency and accuracy of the knowledge of red soil acidization. By integrating and expressing soil acidification and related knowledge, it integrates geographical space information and intuitively express the spatial relationship and connection between entities.
Smart Images

Figure CN118798349B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of agricultural technology, and in particular to a method and device for constructing a red soil acidification knowledge graph. Background Art
[0002] As a new technology, knowledge graph can integrate information, provide intelligent search and recommendation, support decision-making, and be applied to natural language processing and intelligent dialogue systems. Its flexibility, scalability and intelligence make it widely used in various industries, such as medical knowledge graph, police knowledge graph, procuratorial knowledge graph, retail knowledge graph, business knowledge graph, policy knowledge graph, and science and technology knowledge graph.
[0003] However, the application of knowledge graphs in agriculture is still lacking, and its application in red soil acidification is even less. At present, the problem of red soil acidification is becoming increasingly prominent. As people's requirements for efficiency and accuracy in problem solving continue to increase, traditional search engines cannot meet the efficiency and accuracy of knowledge acquisition in the agricultural field. Summary of the invention
[0004] In view of this, the purpose of the present invention is to provide a method and device for constructing a red soil acidification knowledge graph, aiming to solve the problem of low efficiency and accuracy in acquiring knowledge about red soil acidification in the prior art when facing the problem of red soil acidification.
[0005] The embodiment of the present invention is implemented as follows:
[0006] A method for constructing a red soil acidification knowledge graph, the method comprising:
[0007] Collect geospatial data and non-geospatial data on red soil acidification respectively, and divide the geospatial data and non-geospatial data into modules respectively, into corresponding multiple geospatial modules and non-geospatial modules;
[0008] Connecting the plurality of geospatial modules through coordinate strings, and connecting the non-geospatial module with the corresponding geospatial module through basic field information to obtain a red soil acidification knowledge graph ontology;
[0009] Extracting entities from a preset database for the knowledge that needs to be included in the geospatial module and the non-geospatial module, respectively, to obtain corresponding target entities and the relationships between the target entities;
[0010] The target entities and the relationships between the target entities are added to the knowledge graph ontology accordingly and then stored to obtain a red soil acidification knowledge graph.
[0011] Furthermore, in the method for constructing the red soil acidification knowledge graph, the geographic space module includes an administrative division module, a soil module, a climate and meteorology module, and a topography module, and the non-geographic space module includes a crop module, a field management module, and a soil acidification module;
[0012] The soil module includes soil type, parent rock and soil properties; the climate and meteorology module includes average monthly sunshine duration, average monthly rainfall, average annual rainfall, temperature, atmospheric deposition and evapotranspiration; the topography module includes terrains of different sizes, terrain parts, slope shapes, slope gradients, slope directions and elevations;
[0013] The crop module includes crop types, biological nitrogen fixation, concentration of harvested parts of crops, and concentration of crop residues. The field management module includes irrigation conditions, straw return conditions, tillage systems, fertilizer types, and lime application.
[0014] Furthermore, in the above-mentioned method for constructing the red soil acidification knowledge graph, the steps of connecting the plurality of the geospatial modules through coordinate strings, and connecting the non-geospatial modules with the corresponding geospatial modules through basic field information to obtain the red soil acidification knowledge graph ontology include:
[0015] In the crop module, the crop is used as a first-level concept node, connected to the crop type node through a preset relationship, and the biological nitrogen fixation, the concentration of the harvested part of the crop, and the concentration of the crop residue are used as the next-level concept nodes and connected to the crop type node through a preset relationship;
[0016] In the field management module, field management is used as the first-level concept node, and the irrigation situation, straw return to field situation, tillage system, fertilizer type and lime application are used as the next-level concept nodes, and the first-level concept nodes are respectively connected to the next-level concept nodes through preset relationships;
[0017] In the soil module, the soil type, parent rock and parent material, and soil properties are respectively used as first-level concept nodes, soil type, subtype, soil genus, and soil species are respectively used as next-level concept nodes of the soil type, parent rock and parent material are respectively used as next-level concept nodes of the parent rock and parent material, soil biological properties, soil physical properties, and soil chemical properties are respectively used as next-level concept nodes of the soil properties, and the first-level concept nodes are respectively connected to the next-level concept nodes through preset relationships;
[0018] In the climate and meteorology module, climate and meteorology are taken as the first-level concept nodes, and the average monthly sunshine duration, average monthly rainfall, average annual rainfall, temperature, atmospheric deposition and evapotranspiration are taken as the next-level concept nodes of the climate and meteorology, respectively, and the first-level concept nodes are connected to the next-level concept nodes through preset relationships;
[0019] In the landform module, the landform is taken as the first-level concept node, and the landforms of different sizes, landform parts, slope shapes, slopes, slope directions, and elevations are respectively taken as the next-level concept nodes of the landform, and the first-level concept nodes are respectively connected with the next-level concept nodes through preset relationships;
[0020] In the soil acidification module, the acidification rate, pH value change value, and acid buffering capacity are used as first-level conceptual nodes, and the relevant nodes affecting the acidification rate, pH value change value, and acid buffering capacity in the non-geographic space module and the geographic space module are stored in the form of triples.
[0021] Furthermore, in the above-mentioned method for constructing the red soil acidification knowledge graph, the step of extracting entities from the knowledge required to be included in the geographic space module and the non-geographic space module using a preset database comprises:
[0022] Obtaining a text sequence about red soil acidification knowledge, and mapping the text sequence into a high-dimensional vector space to obtain a word vector representation;
[0023] The dependency relationship between the previous and next words in the text sequence is captured according to the word vector representation, and the dependency relationship between the previous and next words in the text sequence is optimized by performing joint probability modeling on the entire text sequence to perform entity extraction on the text sequence.
[0024] Furthermore, in the above-mentioned method for constructing the red soil acidification knowledge graph, the step of extracting entities from the knowledge required to be included in the geographic space module and the non-geographic space module using a preset database further includes:
[0025] When it is necessary to extract geographic knowledge, extract the topological relationship of entities contained in the geographic knowledge;
[0026] A document about the topological relationship is obtained, and a semantic conversion is performed on the document through a preset conversion software according to the semantic form corresponding to the topological relationship so as to extract entities of the geographic knowledge.
[0027] Furthermore, in the above-mentioned method for constructing the red soil acidification knowledge graph, the step of extracting entities from the knowledge required to be included in the geographic space module and the non-geographic space module using a preset database further includes:
[0028] When the data to be extracted is raster data, the raster data is cleaned, denoised and standardized, and then the raster data is resampled, cropped and projected;
[0029] By using preset tools, pixel values at specific locations are obtained from the raster data by specifying row and column indices or geographic coordinates of pixels, and indicators or attributes that can represent data characteristics are extracted from the pixel values to perform entity extraction on the raster data.
[0030] Furthermore, the method for constructing the red soil acidification knowledge graph further comprises:
[0031] A red soil acidification question-answering system is established according to the red soil acidification knowledge graph to obtain an input natural language question sentence about acidification rate calculation;
[0032] Identify the natural language question to obtain the field number related to acidification rate calculation in the natural language question;
[0033] The field number is linked to the red soil acidification knowledge graph, and the nodes and attributes for calculating the acidification rate are searched step by step according to the field number, and the data therein are called, and the acidification rate of the field corresponding to the field number is calculated according to the calculation formula of the acidification rate.
[0034] Another object of the present invention is a device for constructing a red soil acidification knowledge graph, the device comprising:
[0035] A collection module, for collecting geospatial data and non-geospatial data on red soil acidification, and dividing the geospatial data and non-geospatial data into modules, respectively, into corresponding multiple geospatial modules and non-geospatial modules;
[0036] A connection module, used to connect the plurality of the geospatial modules through a coordinate string, and to connect the non-geospatial module with the corresponding geospatial module through basic information of the field to obtain a red soil acidification knowledge graph ontology;
[0037] An extraction module, used to extract entities from the knowledge required to be included in the geospatial module and the non-geospatial module using a preset database to obtain corresponding target entities and the relationships between the target entities;
[0038] A storage module is used to add the target entity and the relationship between the target entities to the knowledge graph ontology and then store them to obtain a red soil acidification knowledge graph.
[0039] Another object of the present invention is to provide a readable storage medium having a computer program stored thereon, wherein the program implements the steps of the above method when executed by a processor.
[0040] Another object of the present invention is to provide an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the program.
[0041] The present invention collects geospatial data and non-geospatial data about red soil acidification respectively, and divides the geospatial data and non-geospatial data into modules respectively, and divides them into corresponding multiple geospatial modules and non-geospatial modules; connects multiple geospatial modules through coordinate strings, and connects non-geospatial modules with corresponding geospatial modules through basic information of fields to obtain red soil acidification knowledge graph ontology; extracts entities from knowledge required to be included in geospatial modules and non-geospatial modules using a preset database to obtain corresponding target entities and the relationship between target entities; adds target entities and the relationship between target entities to the knowledge graph ontology and stores them to obtain red soil acidification knowledge graph, and integrates and expresses soil acidification and soil-related knowledge by utilizing the knowledge graph's information sorting and computing capabilities, as well as its flexibility, scalability and intelligent characteristics, and integrates geospatial information, more intuitively expresses the spatial relationship between entities and the connection therein, and facilitates the acquisition of red soil acidification knowledge and improves the accuracy of acquisition. The present invention solves the problem of low efficiency and accuracy in acquiring knowledge of red soil acidification in the prior art when facing the problem of red soil acidification. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 It is a flow chart of the method for constructing the red soil acidification knowledge graph in the first embodiment of the present invention;
[0043] Figure 2 This is a structural block diagram of a device for constructing a red soil acidification knowledge graph in the third embodiment of the present invention.
[0044] The following specific implementation manner will further illustrate the present invention in conjunction with the above-mentioned drawings. DETAILED DESCRIPTION
[0045] In order to facilitate the understanding of the present invention, the present invention will be described more fully below with reference to the relevant drawings. Several embodiments of the present invention are given in the drawings. However, the present invention can be implemented in many different forms and is not limited to the embodiments described herein. On the contrary, the purpose of providing these embodiments is to make the disclosure of the present invention more thorough and comprehensive.
[0046] It should be noted that when an element is referred to as being "fixed to" another element, it may be directly on the other element or there may be a central element. When an element is considered to be "connected to" another element, it may be directly connected to the other element or there may be a central element at the same time. The terms "vertical", "horizontal", "left", "right" and similar expressions used herein are for illustrative purposes only.
[0047] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which the present invention belongs. The terms used herein in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The term "and / or" used herein includes any and all combinations of one or more of the related listed items.
[0048] How to improve the efficiency and accuracy of red soil knowledge acquisition will be described in detail below with reference to specific embodiments and drawings.
[0049] Embodiment 1
[0050] See also Figure 1 , shown is a method for constructing a red soil acidification knowledge graph in the first embodiment of the present invention, and the method includes steps S10 to S13.
[0051] Step S10, respectively collecting geospatial data and non-geospatial data on red soil acidification, and dividing the geospatial data and non-geospatial data into modules, respectively, into corresponding multiple geospatial modules and non-geospatial modules.
[0052] Among them, the geospatial data mainly include administrative division data, soil data, climate and meteorological data, and topography data; the non-geospatial data mainly include crop and fertilizer data, and field management measures data. Therefore, by dividing the geospatial data and non-geospatial data into modules, we can get geospatial modules containing geospatial information and non-geospatial modules containing non-geospatial information. Among them, the geospatial modules mainly include administrative division modules, soil modules, climate and meteorological modules, and topography modules, and the non-geospatial modules mainly include crop modules, field management modules, and soil acidification modules.
[0053] Specifically, administrative division data is accurate to the village administrative level. Soil data mainly includes soil type, parent rock and soil properties. Soil type includes soil class, subclass, soil genus and soil species. Soil properties are divided into soil physical properties, soil chemical properties and soil biological properties. Among them, soil physical properties include soil moisture, soil structure, gravel in the soil, soil texture, soil mechanical composition, water-stable macroaggregates, soil bulk density, plow layer thickness, and clay mineral type. Soil chemical properties include CEC (cation exchange capacity), organic matter, pH value, calcium carbonate, exchangeable base ions, available potassium, available phosphorus, water-soluble salts, total aluminum, total nitrogen, and organic carbon. Biological properties include microbial biomass and enzymes. The various properties of soil are important factors affecting soil acidification.
[0054] Climate and meteorological data include average monthly sunshine duration, average monthly rainfall, average annual rainfall, temperature (average monthly temperature, extreme temperature, average temperature), atmospheric deposition, and evapotranspiration. Topographic data include terrains of different sizes, such as large terrain, medium terrain, and small terrain, as well as terrain location, slope shape, slope, slope direction, and elevation. Crop data include crop types, biological nitrogen fixation, concentration of crop harvested parts, and concentration of crop residues. Field management data include irrigation conditions, straw return to the field, tillage system, fertilizer types, and lime application.
[0055] Step S11, connecting the plurality of the geospatial modules through coordinate strings, and connecting the non-geospatial modules with the corresponding geospatial modules through basic field information to obtain a red soil acidification knowledge graph ontology.
[0056] Among them, knowledge is usually stored in the form of triples such as "entity-relationship-entity" or "entity-attribute-value". The entity relationship network composed of all the data stored in the database forms a knowledge graph. Entities are usually the basic elements of the knowledge graph, such as specific fertilizer names, place names, crop names, etc. Relationships represent the connection between entities. Attributes are supplements to entities, such as fertilizer application amount, regional coordinates, crop yields, etc., which represent the mapping relationship between entities and attribute values. This mapping relationship is converted into storage in triples of "entity-relationship-entity". In the data layer of the knowledge graph, nodes represent entities and attribute values, and edges represent relationships between entities or entity attributes.
[0057] Specifically, all data are divided into different knowledge modules, namely crop module, field management module, administrative division module, soil property module, climate and meteorology module, topography module and soil acidification module. Among them, the administrative division module, soil property module, climate and meteorology module, and topography module contain geospatial information. The scales of information in different modules are different, and they are connected to each other through coordinate strings. The crop module and field management module do not contain geospatial information, and are connected to other geospatial information modules through the basic information of the field. The soil acidification module also does not contain geospatial information, but is calculated through data in other modules.
[0058] For example, in the crop module, there are three layers of nodes, among which "crop" is a concept node, which is connected to the specific crop type node through the relationship "crop", indicating that a specific crop type belongs to the broader concept category of "crop", and the crop type node is expressed in the form of the crop type name. The attributes of the node include "ratio", "water content", "yield" and other attributes, indicating these specific values of the crop under specific conditions. The next layer of nodes are "biological nitrogen fixation", "concentration of harvested part of crop", and "concentration of crop residue", which are all concept nodes, respectively connected to the crop type node through the relationship bio nitrogen fixation, which represents the biological nitrogen fixation ability of a certain crop, that is, the ability of crops to convert atmospheric nitrogen into a form that can be used by plants through biological processes. Concentration establishes a connection between the "concentration of harvested part of crop" and "concentration of crop residue" concept nodes and the crop type node. These two relationships respectively represent the concentration of certain chemical components (such as nitrogen, phosphorus, and potassium) in the harvested part of the crop, and the concentration of chemical components in the part of the crop that remains in the field after harvesting.
[0059] In the field management module, irrigation connects the field management concept node with the irrigation situation concept node. This relationship represents the irrigation-related operations and strategies in field management. Straw turnover connects the field management concept node with the straw turnover concept node. This represents the management practice in field management where crop straw is put back into the soil as a source of organic matter. Season: connects the field management node with the tillage system node, indicating that different management practices may vary depending on the planting season. Straight fertilizer connects the field management node with the variety names of various straight fertilizers, indicating the specific type of fertilizer used in management. Compound fertilizer connects the field management node with the variety names of compound fertilizers, indicating the type of compound fertilizer used. Barnyard manure connects the field management node with the barnyard manure name, indicating the type of barnyard manure used in field management. Lime connects the field management node with the lime application situation, indicating whether and how lime is used for soil improvement. Green manure connects "field management" with the name of green manure, indicating the application of green manure. Commercial organic fertilizer connects "field management" with the name of commercial organic fertilizer, indicating the use of commercial organic fertilizer in field management. Ammonia volatilization connects various fertilizer name nodes with ammonia volatilization nodes, indicating the ammonia volatilization caused by the application of different fertilizers.
[0060] In the administrative division module, phone and name connect the parcel number node with the contact information and name of the person in charge, which is convenient for management and contact. The relationships of hamlet, village, county, city, and province represent the geographical hierarchical division of the parcel, connecting from village to province step by step.
[0061] The soil module is divided into three categories, and the top-level concept nodes are "soil type", "parent rock and parent material", and "soil attribute". The "soil type" concept node is divided into soil type, subtype, soil genus, and soil species, all expressed in the form of category names. The "parent rock and parent material" concept node is divided into parent rock and parent material, expressed in the form of category names. The "soil attribute" concept node includes soil biological attributes, soil physical attributes, and soil chemical attributes, which are directly connected to the value of the attribute through different attribute relationships.
[0062] In the climate and meteorology module, "climate and meteorology" is a concept node, which is connected with "average monthly sunshine duration", "rainfall", "temperature", "atmospheric deposition" and "evapotranspiration" through inclusion relationships. The "rainfall" node includes two concept nodes: "average monthly rainfall" and "average annual rainfall".
[0063] In the topography module, megarelief, mesorelief, smallerrelief, topographic position, slope forms, slope gradient, aspect, and elevation directly connect different topography nodes with their corresponding values, indicating the topographic characteristics of a specific plot.
[0064] The soil acidification module contains three nodes, "acidification rate", "pH change value", and "acid buffering capacity". The three are closely related to the nodes in the above six modules and expressed in the form of relationships. The nodes "crops", "irrigation", "fertilizer", "ammonia volatilization", and "atmospheric deposition" and the attributes contained in the nodes affect the acidification rate; the nodes "crops", "irrigation", "ammonia volatilization", "soil properties", and "pH value" affect the change of pH change value; the nodes "clay mineral type", "organic matter", and "mechanical composition" in soil properties affect the value of acid buffering capacity. This influence is expressed in the form of triples in the knowledge graph, and a relationship is established between two related nodes, such as the relationship between soil properties and climate and meteorology, the relationship between terrain location and rainfall, and the relationship between parent rock parent material and soil subtypes.
[0065] Step S12, extracting entities from the knowledge that needs to be included in the geospatial module and the non-geospatial module respectively using a preset database to obtain corresponding target entities and the relationships between the target entities.
[0066] Specifically, in the red soil acidification knowledge graph, geospatial information is the key information that connects various modules together, covering geographical knowledge in the red soil region in terms of soil conditions, climate, meteorology, topography, and geomorphology, which can provide geographical services for farmers and assist users in geographical knowledge query. In view of the characteristics of geographical entities in the field of red soil acidification, the knowledge graph construction process combining the characteristics of the red soil acidification field with geospatial knowledge is used on the basis of the construction methods of geographical knowledge graphs and domain knowledge graphs to complete the extraction of entities and relationships and the construction of the ontology.
[0067] Among them, the preset database includes structured data, unstructured data and semi-structured data. Structured data includes electronic maps, attribute tables, etc. The extraction method of geographic structured data is mainly to establish a mapping relationship between the concepts in the database and the ontology in the knowledge graph, and to perform reasoning based on rules, so as to realize automatic retrieval of geographic features, attributes and their relationships from the database. Semi-structured data includes Internet web page data, etc., and web page knowledge extraction is realized through template features created by web pages and crawling and other technologies. For example, the name, label, basic description and other information data of the current entry are extracted from Baidu Encyclopedia. Unstructured data includes text, Weibo, etc., which mainly uses the existing knowledge in the geographic knowledge graph to extract entities from the text through rule methods, machine learning methods or deep learning methods.
[0068] Furthermore, the data sources of the red soil acidification knowledge graph are diverse. For the extraction of multi-source heterogeneous red soil acidification knowledge, the embodiments of the present invention adopt different extraction methods for different data types. Specifically, this study proposes a method that combines the BERT-BiLSTM-CRF model with geospatial data extraction, so that the knowledge graph not only contains rich semantic information, but also has the accuracy and relevance of geospatial, providing a comprehensive and in-depth knowledge basis for the study of red soil acidification.
[0069] Among them, the BERT-BiLSTM-CRF model has high accuracy and stability in soil knowledge extraction tasks. This model combines the contextual semantic understanding ability of BERT, the sequence information capture ability of BiLSTM, and the sequence annotation optimization ability of CRF, and can effectively extract entities, relationships and other related knowledge in the soil field.
[0070] Specifically, the BERT model, as the basis of the framework, can map the input text sequence into a high-dimensional vector space to obtain a word vector representation through its pre-trained powerful semantic representation ability. BERT not only considers the semantics of the word itself, but also combines contextual information to accurately understand the meaning of the same word in different contexts. For example, in the sentence "The soil contains a lot of organic matter", BERT can understand that "organic matter" is a component of "soil", and in another sentence "Organic matter has an important influence on plant growth", "organic matter" is an important factor in plant growth. This contextual sensitivity of BERT enables the model to perform well when processing complex soil knowledge.
[0071] After obtaining the word vector representation generated by BERT, the BiLSTM layer further processes these vectors to capture the dependencies between the previous and next words in the sequence. BiLSTM is a bidirectional long short-term memory network that can simultaneously consider the forward and backward information of the sequence, allowing the model to extract richer contextual information from the entire sentence structure. For example, in the sentence "Soil pH affects the absorption of nutrients in the soil", BiLSTM can capture the potential connection between "pH" and "nutrients", thereby helping to identify the correlation between them.
[0072] As an optimization tool for sequence labeling, the CRF layer can globally optimize the output of BiLSTM. By modeling the joint probability of the entire sentence, CRF can better capture the dependencies between words, thereby improving the accuracy of sequence labeling. For example, when extracting the relationship between "soil type" and "characteristics", CRF can ensure that the model's labeling of the sentence "sandy soil has good drainage" is consistent in a given context, thereby avoiding problems such as labeling conflicts or inconsistencies.
[0073] More specifically, when we need to extract the characteristic information of different types of soil from a scientific article on soil analysis, we first encode the entire article through BERT, then process these codes through BiLSTM to capture the complex relationship between soil types and characteristics, and finally, CRF ensures the rationality and consistency of the extraction results through global optimization. In this way, we can accurately extract information such as "sandy loam - good drainage" and "clay - strong water retention".
[0074] In general, the BERT-BiLSTM-CRF model has shown significant advantages in soil knowledge extraction. It can not only make full use of the semantic understanding ability of BERT and the sequence information processing ability of BiLSTM, but also perform global optimization through CRF to ensure the accuracy and consistency of the extraction results. In the construction of the red soil acidification knowledge graph, by integrating the semantic understanding of BERT, the sequence modeling of BiLSTM and the optimization ability of CRF, the model can accurately extract soil-related entities and relationships, thereby constructing triples, and then integrating knowledge supplements into the red soil acidification knowledge graph.
[0075] On the other hand, the difference between geographic knowledge extraction and general knowledge extraction is that geographic knowledge extraction not only has the entity characteristics and attribute characteristics of general knowledge extraction, but also has spatial characteristics. In the construction of geographic knowledge graphs, the construction of spatial knowledge is of great significance. Because once the position, shape, and size of spatial features change, the spatial relationship between the geographic entity and its adjacent entities will also change. Therefore, when extracting geographic knowledge, the expression of spatial features is the first thing to consider and pay attention to. Different from the usual way of knowledge extraction, geographic knowledge extraction must consider the complex space between geographic entities, such as topological relationships, distance relationships, and directional relationships.
[0076] Extracting entities and the relationships between entities from map data is a relatively complex process. Converting map data into a structural diagram of entities and relationships in the atlas is essentially based on different layers to extract geographic entities in each layer, such as sampling point information in the point layer, roads and rivers in the line layer, administrative divisions, plots, soil types, soil textures, etc. in the surface layer. Then determine the spatial relationship between different entities in the same layer, such as the location topological relationship between two administrative divisions in the surface layer; or determine the topological relationship between entities in different layers, such as the soil type of the plot location, which is to determine the topological relationship between the plot and different soil types. The topological relationship between different geographic entities in the map can be realized by topological calculation, but this topological relationship is not an expression of semantic relationship in the atlas, and the result of topological calculation needs to be converted into an expression of semantic relationship.
[0077] Therefore, in an embodiment of the present invention, the geographic layer of the entity is input, their topological relationship is calculated, the topological relationship between the two entities is judged according to the set topological calculation rules, the document of the topological relationship between the two entities is recorded and output, and semantic conversion is implemented in the conversion software according to the semantic form corresponding to the topological relationship. In this way, the conversion of the topological relationship between entities in the map data to the semantic relationship is completed.
[0078] For example, taking Ji'an County as the experimental object, arcgis was used to extract some entities of three types of objects in Ji'an County, such as Ji'an County, Oilfield Town, Miaoqian Village, Red Muddy Red Soil, Middle Red Muddy Red Soil, and Slope Deposits. The topological relationship between the entities was extracted according to the calculation process, and the topological calculation results were exported as TXT format files, converted into CSV table files in EXCEL, and according to the topological relationship corresponding to the calculation results, the topological relationship field was added to the table to record the topological relationship between the entities.
[0079] Separate the entity column and the topological relationship column from the topological relationship record results, retain the entities with non-empty topological relationships, and convert the topological relationships into semantic forms based on the conversion of spatial relationships and semantic descriptions. Specifically, the conversion results from topological relationships to semantic relationships are shown in Table 1 below.
[0080] On the other hand. In the study of red soil acidification, raster data, as another type of geospatial data different from vector data, also carries a huge amount of data. The knowledge extraction method of raster data is a complex and multi-level process, which specifically involves extracting valuable information and knowledge from raster data. The first step of knowledge extraction is data preprocessing, including cleaning, denoising and standardizing raster data to ensure data quality and consistency. The preprocessing stage may also involve resampling, clipping and projection transformation of the data to meet the needs of subsequent analysis.
[0081] After data preprocessing is completed, the next stage is feature extraction. The purpose of feature extraction is to extract indicators or attributes that can represent data characteristics from the original raster data. These features can be spectral features, texture features, shape features, etc. Using tools such as GDAL (Geospatial Data Abstraction Library), you can open the raster dataset and read the pixel values at a specific location. Specifically, by specifying the row and column index or geographic coordinates of the pixel, you can get the pixel value. Indicators or attributes that can represent data characteristics are extracted from the pixel value to perform entity extraction on the raster data. For multi-band raster datasets, you need to specify the band to be extracted and perform necessary mathematical or logical operations.
[0082] Step S13, adding the target entity and the relationship between the target entities to the knowledge graph ontology accordingly and then storing them to obtain a red soil acidification knowledge graph.
[0083] Among them, the graph database is a non-relational database, which uses nodes and edges to represent the relationship between entities, thereby obtaining a knowledge graph of red soil acidification.
[0084] In summary, the method for constructing the red soil acidification knowledge graph in the above embodiment of the present invention is to collect geospatial data and non-geospatial data about red soil acidification respectively, and divide the geospatial data and non-geospatial data into modules respectively, and divide them into corresponding multiple geospatial modules and non-geospatial modules; connect the multiple geospatial modules through coordinate strings, and connect the non-geospatial modules with the corresponding geospatial modules through the basic information of the field to obtain the red soil acidification knowledge graph ontology; use the preset database to extract entities for the knowledge that needs to be included in the geospatial modules and the non-geospatial modules respectively, and obtain the corresponding target entities and the relationship between the target entities; add the target entities and the relationship between the target entities to the knowledge graph ontology and store them to obtain the red soil acidification knowledge graph, and use the knowledge graph to organize and calculate information, as well as the characteristics of flexibility, scalability and intelligence, to integrate and express soil acidification and soil-related knowledge, and integrate them into geospatial information, so as to more intuitively express the spatial relationship between entities and the connection therein, so as to facilitate the acquisition of red soil acidification knowledge and improve the accuracy of acquisition. This solves the problem that the existing technology cannot meet the efficiency and accuracy of agricultural knowledge acquisition when facing the problem of red soil acidification.
[0085] Embodiment 2
[0086] This embodiment also proposes a method for constructing a red soil acidification knowledge graph. The difference between the method for constructing a red soil acidification knowledge graph in this embodiment and the method for constructing a red soil acidification knowledge graph in Example 1 is that:
[0087] After step S13, the following steps are also included:
[0088] A red soil acidification question-answering system is established according to the red soil acidification knowledge graph to obtain an input natural language question sentence about acidification rate calculation;
[0089] Identify the natural language question to obtain the field number related to acidification rate calculation in the natural language question;
[0090] The field number is linked to the red soil acidification knowledge graph, and the nodes and attributes for calculating the acidification rate are searched step by step according to the field number, and the data therein are called, and the acidification rate of the field corresponding to the field number is calculated according to the calculation formula of the acidification rate.
[0091] Soil acidification is a process in which the input of external hydrogen ions leads to a decrease in acid neutralization capacity (ANC). The processes that lead to soil acidification include nitrogen cycle, crop removal, bicarbonate leaching and direct input of hydrogen ions. The sum of acid production is the total acidification rate.
[0092] The acid production is calculated based on the balance of nutrient input and output, where the input items are atmospheric deposition, irrigation, biological nitrogen fixation, chemical fertilizers, and organic fertilizers; the output items include crop removal, gas emissions, soil leaching, and soil accumulation. Specifically, through the question-and-answer format of the knowledge graph, users can query the acidification status of a certain field on the front end. The question-and-answer system will search for each node and attribute for calculating the acidification rate step by step according to the field number queried, call the data therein, and calculate the acidification rate of the field according to the calculation formula of the acidification rate and return the specific value to the front end.
[0093] In summary, the method for constructing the red soil acidification knowledge graph in the above embodiment of the present invention is to collect geospatial data and non-geospatial data about red soil acidification respectively, and divide the geospatial data and non-geospatial data into modules respectively, and divide them into corresponding multiple geospatial modules and non-geospatial modules; connect the multiple geospatial modules through coordinate strings, and connect the non-geospatial modules with the corresponding geospatial modules through the basic information of the field to obtain the red soil acidification knowledge graph ontology; use the preset database to extract entities for the knowledge that needs to be included in the geospatial modules and the non-geospatial modules respectively, and obtain the corresponding target entities and the relationship between the target entities; add the target entities and the relationship between the target entities to the knowledge graph ontology and store them to obtain the red soil acidification knowledge graph, and use the knowledge graph to organize and calculate information, as well as the characteristics of flexibility, scalability and intelligence, to integrate and express soil acidification and soil-related knowledge, and integrate them into geospatial information, so as to more intuitively express the spatial relationship between entities and the connection therein, so as to facilitate the acquisition of red soil acidification knowledge and improve the accuracy of acquisition. This solves the problem that the existing technology cannot meet the efficiency and accuracy of knowledge acquisition in the agricultural field when facing the problem of red soil acidification.
[0094] Embodiment 3
[0095] See also Figure 2 , shown is a device for constructing a red soil acidification knowledge graph proposed in the third embodiment of the present invention, the device comprising:
[0096] The collecting module 100 is used to collect geospatial data and non-geospatial data on red soil acidification, and divide the geospatial data and non-geospatial data into modules, into corresponding multiple geospatial modules and non-geospatial modules;
[0097] A connection module 200 is used to connect the plurality of the geospatial modules through a coordinate string, and to connect the non-geospatial module with the corresponding geospatial module through basic information of a field to obtain a red soil acidification knowledge graph ontology;
[0098] An extraction module 300 is used to extract entities from the knowledge that needs to be included in the geospatial module and the non-geospatial module respectively using a preset database to obtain corresponding target entities and the relationships between the target entities;
[0099] The storage module 400 is used to add the target entity and the relationship between the target entities to the knowledge graph ontology and then store them to obtain a red soil acidification knowledge graph.
[0100] Furthermore, in the above-mentioned red soil acidification knowledge graph construction device, the geographic space module includes an administrative division module, a soil module, a climate and meteorology module, and a topography module, and the non-geographic space module includes a crop module, a field management module, and a soil acidification module;
[0101] The soil module includes soil type, parent rock and soil properties; the climate and meteorology module includes average monthly sunshine duration, average monthly rainfall, average annual rainfall, temperature, atmospheric deposition and evapotranspiration; the topography module includes terrains of different sizes, terrain parts, slope shapes, slope gradients, slope directions and elevations;
[0102] The crop module includes crop types, biological nitrogen fixation, concentration of harvested parts of crops, and concentration of crop residues. The field management module includes irrigation conditions, straw return conditions, tillage systems, fertilizer types, and lime application.
[0103] Furthermore, in the above-mentioned red soil acidification knowledge graph construction device, the steps of connecting the plurality of the geospatial modules through coordinate strings, and connecting the non-geospatial modules with the corresponding geospatial modules through basic field information to obtain the red soil acidification knowledge graph ontology include:
[0104] In the crop module, the crop is used as a first-level concept node, connected to the crop type node through a preset relationship, and the biological nitrogen fixation, the concentration of the harvested part of the crop, and the concentration of the crop residue are used as the next-level concept nodes and connected to the crop type node through a preset relationship;
[0105] In the field management module, field management is used as the first-level concept node, and the irrigation situation, straw return to field situation, tillage system, fertilizer type and lime application are used as the next-level concept nodes, and the first-level concept nodes are respectively connected to the next-level concept nodes through preset relationships;
[0106] In the soil module, the soil type, parent rock and parent material, and soil properties are respectively used as first-level concept nodes, soil type, subtype, soil genus, and soil species are respectively used as next-level concept nodes of the soil type, parent rock and parent material are respectively used as next-level concept nodes of the parent rock and parent material, soil biological properties, soil physical properties, and soil chemical properties are respectively used as next-level concept nodes of the soil properties, and the first-level concept nodes are respectively connected to the next-level concept nodes through preset relationships;
[0107] In the climate and meteorology module, climate and meteorology are taken as the first-level concept nodes, and the average monthly sunshine duration, average monthly rainfall, average annual rainfall, temperature, atmospheric deposition and evapotranspiration are taken as the next-level concept nodes of the climate and meteorology, respectively, and the first-level concept nodes are connected to the next-level concept nodes through preset relationships;
[0108] In the landform module, the landform is taken as the first-level concept node, and the landforms of different sizes, landform parts, slope shapes, slopes, slope directions, and elevations are respectively taken as the next-level concept nodes of the landform, and the first-level concept nodes are respectively connected with the next-level concept nodes through preset relationships;
[0109] In the soil acidification module, the acidification rate, pH value change value, and acid buffering capacity are used as first-level conceptual nodes, and the relevant nodes affecting the acidification rate, pH value change value, and acid buffering capacity in the non-geographic space module and the geographic space module are stored in the form of triples.
[0110] Furthermore, in the above-mentioned red soil acidification knowledge graph construction device, the step of extracting entities from a preset database for the knowledge to be included in the geographic space module and the non-geographic space module includes:
[0111] Obtaining a text sequence about red soil acidification knowledge, and mapping the text sequence into a high-dimensional vector space to obtain a word vector representation;
[0112] The dependency relationship between the previous and next words in the text sequence is captured according to the word vector representation, and the dependency relationship between the previous and next words in the text sequence is optimized by performing joint probability modeling on the entire text sequence to perform entity extraction on the text sequence.
[0113] Furthermore, in the above-mentioned red soil acidification knowledge graph construction device, the step of extracting entities from the knowledge required to be included in the geographic space module and the non-geographic space module using a preset database further includes:
[0114] When it is necessary to extract geographic knowledge, extract the topological relationship of entities contained in the geographic knowledge;
[0115] A document about the topological relationship is obtained, and a semantic conversion is performed on the document through a preset conversion software according to the semantic form corresponding to the topological relationship so as to extract entities of the geographic knowledge.
[0116] Furthermore, in the above-mentioned red soil acidification knowledge graph construction device, the step of extracting entities from the knowledge required to be included in the geographic space module and the non-geographic space module using a preset database further includes:
[0117] When the data to be extracted is raster data, the raster data is cleaned, denoised and standardized, and then the raster data is resampled, cropped and projected;
[0118] By using preset tools, pixel values at specific locations are obtained from the raster data by specifying row and column indexes or geographic coordinates of pixels, and indicators or attributes that can represent data characteristics are extracted from the pixel values to perform entity extraction on the raster data.
[0119] Furthermore, in the above-mentioned device for constructing a knowledge graph of red soil acidification, the method further comprises:
[0120] A red soil acidification question-answering system is established according to the red soil acidification knowledge graph to obtain an input natural language question sentence about acidification rate calculation;
[0121] Identify the natural language question to obtain the field number related to acidification rate calculation in the natural language question;
[0122] The field number is linked to the red soil acidification knowledge graph, and the nodes and attributes for calculating the acidification rate are searched step by step according to the field number, and the data therein are called, and the acidification rate of the field corresponding to the field number is calculated according to the calculation formula of the acidification rate.
[0123] The functions or operation steps implemented when the above modules are executed are substantially the same as those in the above method embodiments, and will not be repeated here.
[0124] Embodiment 4
[0125] Another aspect of the present invention further provides a readable storage medium having a computer program stored thereon, and when the program is executed by a processor, the steps of the method described in any one of the above-mentioned embodiments 1 to 2 are implemented.
[0126] Embodiment 5
[0127] Another aspect of the present invention provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method described in any one of the above-mentioned embodiments 1 to 2 when executing the program.
[0128] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0129] Those skilled in the art will appreciate that the logic and / or steps represented in the flowchart or otherwise described herein, for example, may be considered as an ordered list of executable instructions for implementing logical functions, and may be specifically implemented in any computer-readable storage medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For purposes of this specification, a "computer-readable storage medium" may be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.
[0130] More specific examples (a non-exhaustive list) of computer-readable storage media include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable storage medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a computer memory.
[0131] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or a combination thereof: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0132] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0133] The above-mentioned embodiments only express several implementation methods of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of the patent of the present invention. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.
Claims
1. A method for constructing a red soil acidification knowledge graph, characterized in that: The method comprises: Collect geospatial data and non-geospatial data on red soil acidification respectively, and divide the geospatial data and non-geospatial data into modules respectively, into corresponding multiple geospatial modules and non-geospatial modules; Connecting the plurality of geospatial modules through coordinate strings, and connecting the non-geospatial module with the corresponding geospatial module through basic field information to obtain a red soil acidification knowledge graph ontology; Extracting entities from a preset database for the knowledge that needs to be included in the geospatial module and the non-geospatial module, respectively, to obtain corresponding target entities and the relationships between the target entities; Adding the target entity and the relationship between the target entities to the knowledge graph ontology accordingly and then storing them to obtain a red soil acidification knowledge graph; The step of extracting entities from the knowledge required to be included in the geospatial module and the non-geospatial module using a preset database comprises: Obtaining a text sequence about red soil acidification knowledge, and mapping the text sequence into a high-dimensional vector space to obtain a word vector representation; The dependency relationship between the preceding and following words in the text sequence is captured according to the word vector representation, and the dependency relationship between the preceding and following words in the text sequence is optimized by performing joint probability modeling on the entire text sequence, so as to perform entity extraction on the text sequence: When it is necessary to extract geographic knowledge, extract the topological relationship of entities contained in the geographic knowledge; Obtaining documents about the topological relationship, and performing semantic conversion on the documents through preset conversion software according to the semantic form corresponding to the topological relationship to extract entities from the geographic knowledge: When the data to be extracted is raster data, the raster data is cleaned, denoised and standardized, and then the raster data is resampled, cropped and projected; Using a preset tool, by specifying the row and column index or geographic coordinates of the pixel, the pixel value at a specific position is obtained from the raster data, and an indicator or attribute that can represent the data feature is extracted from the pixel value to perform entity extraction on the raster data; The geospatial module includes an administrative division module, a soil module, a climate and meteorological module, and a topography module, and the non-geospatial module includes a crop module, a field management module, and a soil acidification module; The soil module includes soil type, parent rock and soil properties; the climate and meteorology module includes average monthly sunshine duration, average monthly rainfall, average annual rainfall, temperature, atmospheric deposition and evapotranspiration; the topography module includes terrains of different sizes, terrain parts, slope shapes, slope gradients, slope directions and elevations; The crop module includes crop types, biological nitrogen fixation, concentration of harvested parts of crops, and concentration of crop residues; the field management module includes irrigation conditions, straw return conditions, tillage system, fertilizer types, and lime application; The step of connecting the plurality of geospatial modules through coordinate strings, and connecting the non-geospatial module with the corresponding geospatial module through basic field information to obtain a red soil acidification knowledge graph ontology comprises: In the crop module, the crop is used as a first-level concept node, connected to the crop type node through a preset relationship, and the biological nitrogen fixation, the concentration of the harvested part of the crop, and the concentration of the crop residue are used as the next-level concept nodes and connected to the crop type node through a preset relationship; In the field management module, field management is used as the first-level concept node, and the irrigation situation, straw return to field situation, tillage system, fertilizer type and lime application are used as the next-level concept nodes, and the first-level concept nodes are respectively connected to the next-level concept nodes through preset relationships; In the soil module, the soil type, parent rock and parent material, and soil properties are respectively used as first-level concept nodes, soil type, subtype, soil genus, and soil species are respectively used as next-level concept nodes of the soil type, parent rock and parent material are respectively used as next-level concept nodes of the parent rock and parent material, soil biological properties, soil physical properties, and soil chemical properties are respectively used as next-level concept nodes of the soil properties, and the first-level concept nodes are respectively connected to the next-level concept nodes through preset relationships; In the climate and meteorology module, climate and meteorology are taken as the first-level concept nodes, and the average monthly sunshine duration, average monthly rainfall, average annual rainfall, temperature, atmospheric deposition and evapotranspiration are taken as the next-level concept nodes of the climate and meteorology, respectively, and the first-level concept nodes are connected to the next-level concept nodes through preset relationships; In the landform module, the landform is taken as the first-level concept node, and the landforms of different sizes, landform parts, slope shapes, slopes, slope directions, and elevations are respectively taken as the next-level concept nodes of the landform, and the first-level concept nodes are respectively connected with the next-level concept nodes through preset relationships; In the soil acidification module, the acidification rate, pH value change value, and acid buffering capacity are used as first-level conceptual nodes, and the relevant nodes affecting the acidification rate, pH value change value, and acid buffering capacity in the non-geographic space module and the geographic space module are stored in the form of triples.
2. The method for constructing a red soil acidification knowledge graph according to claim 1, characterized in that: The method further comprises: A red soil acidification question-answering system is established according to the red soil acidification knowledge graph to obtain an input natural language question sentence about acidification rate calculation; Identify the natural language question to obtain the field number related to acidification rate calculation in the natural language question; The field number is linked to the red soil acidification knowledge graph, and the nodes and attributes for calculating the acidification rate are searched step by step according to the field number, and the data therein are called, and the acidification rate of the field corresponding to the field number is calculated according to the calculation formula of the acidification rate.
3. A device for constructing a red soil acidification knowledge graph, characterized in that: A method for constructing a red soil acidification knowledge graph according to any one of claims 1 to 2, the device comprising: A collection module, for collecting geospatial data and non-geospatial data on red soil acidification, and dividing the geospatial data and non-geospatial data into modules, respectively, into corresponding multiple geospatial modules and non-geospatial modules; A connection module, used to connect the plurality of the geospatial modules through a coordinate string, and to connect the non-geospatial module with the corresponding geospatial module through basic information of the field to obtain a red soil acidification knowledge graph ontology; An extraction module, used to extract entities from the knowledge required to be included in the geospatial module and the non-geospatial module using a preset database to obtain corresponding target entities and the relationships between the target entities; A storage module is used to add the target entity and the relationship between the target entities to the knowledge graph ontology and then store them to obtain a red soil acidification knowledge graph.
4. A readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method according to any one of claims 1 to 2 are implemented.
5. An electronic device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method according to any one of claims 1 to 2 when executing the program.
Citation Information
Patent Citations
Geographic entity space-time knowledge graph ontology library construction method
CN115269751A
Intelligent archive construction method fusing artificial intelligence and knowledge graph technology
CN115994230A