A knowledge graph automatic construction method and device for the whole process of grass production
Patent Information
- Application Number
- CN202610306114.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-03-13
- Publication Date
- 2026-08-21
- Estimated Expiration
- 2046-03-13
AI Technical Summary
现有研究多聚焦于单一环节,如仅构建牧草品种本体或土壤养分关系网络,未能覆盖“从种子到饲喂”的全生命周期
1、实现草业全链条知识语义贯通:首次构建覆盖“育—种—管—收—加—储—用”七环节的统一领域本体,并以此引导知识抽取与融合,有效解决长期存在的知识碎片化与系统孤岛问题。
Smart Images

Figure CN122198093B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of artificial intelligence and agricultural science and technology, and in particular to a method and apparatus for automatically constructing knowledge graphs for the entire process of grass production. Background Technology
[0002] As a crucial foundational industry for modern animal husbandry, ecological restoration, and carbon sequestration agriculture, the forage industry encompasses a complete production chain, from forage variety selection, land preparation and sowing, field management, harvesting, processing, storage and transportation to feed utilization. With the deepening of smart agriculture and digital ranch construction, the data generated during forage production is exploding, originating from diverse and heterogeneous sources including scientific literature, agricultural manuals, IoT sensors, remote sensing images, production logs, and policy standards. However, current forage knowledge management faces three core bottlenecks: First, knowledge is highly fragmented, with key information scattered across different systems and carriers, lacking a unified semantic framework for integration; second, terminology is inconsistent—for example, "silage" may be expressed as "wrapped silage," "cellar storage," or "fermented forage" in different regions or systems, making cross-platform data alignment and sharing difficult; third, intelligent application support is weak—due to the lack of a structured, reasonable knowledge base, artificial intelligence technology struggles to be implemented in high-value scenarios such as pest and disease early warning, optimal harvesting period recommendation, and forage nutrition matching.
[0003] Although knowledge graph technology has achieved remarkable results in fields such as medicine and finance, its application in agriculture, especially in the forage industry, is still in its early stages. Existing research mostly focuses on single links, such as only constructing forage variety ontology or soil nutrient relationship networks, failing to cover the entire life cycle "from seed to feed". Although some attempts have proposed agricultural knowledge graph frameworks, they generally have the following defects: (1) they rely on manual rule extraction, have a low degree of automation, and are difficult to adapt to large-scale data; (2) they lack strong constraint guidance from domain ontology, resulting in frequent logical conflicts of triples (such as "planting mutually exclusive forage grasses in the same plot at the same time"); (3) they do not embed agronomic expert rules for axiomatic modeling, and cannot support deep reasoning; (4) they lack a systematic verification mechanism, and the quality of the knowledge graph is uncontrollable.
[0004] Furthermore, mainstream general knowledge graph construction methods (such as information extraction based on open-domain pre-trained models) perform poorly when directly applied to the grassland industry. This is because grassland texts are highly specialized, have high terminology density, and complex temporal logic (such as "processing must be completed within 48 hours after harvesting"), making it difficult for general models to accurately identify entity boundaries and relational semantics. Additionally, grassland data contains numerous synonyms, aliases, and abbreviations (such as "alfalfa" also being called "alfalfa" or "Luzerne"). Without the support of domain dictionaries and rule bases, the accuracy of entity disambiguation drops significantly.
[0005] Therefore, there is an urgent need for a knowledge graph construction method that is ontology-driven and end-to-end automated throughout the entire grass industry production process. This method should deeply integrate domain knowledge and artificial intelligence technology, achieving efficient and scalable automated knowledge production while ensuring semantic rigor. The method should possess formal ontology modeling capabilities, adaptability to multi-source heterogeneous data, conflict resolution and knowledge completion mechanisms, and output a high-quality knowledge graph that conforms to international standards (such as OWL2DL) and supports logical reasoning and semantic querying. This will provide solid support for intelligent decision-making, precise management, and digital transformation of the grass industry. Summary of the Invention
[0006] To address the shortcomings of existing technologies, this invention constructs an ontology covering the entire forage production process, including variety selection, sowing, field management, mowing, processing, storage, transportation, and feeding. It automatically identifies forage entities and extracts semantic relationships from multi-source heterogeneous data to generate initial knowledge triples. Through entity alignment, referencing resolution, conflict resolution, and ontology-driven completion, knowledge fusion and standardization are achieved. The verified triples are mapped to a graph database according to ontology constraints, generating a knowledge graph oriented towards the entire forage production process. Furthermore, this invention provides a device, storage medium, and computer equipment for the automatic construction of a knowledge graph oriented towards the entire forage production process.
[0007] This application provides a method for automatically constructing a knowledge graph for the entire process of grassland production. The technical solution adopted by the method includes the following steps: S1. Construct an ontology covering the entire process of forage production, including variety selection, land preparation and sowing, field management, harvesting, processing, storage and transportation, and feeding. Explicitly define the set of entity types Attribute set Subclass semantic relation set and Domain Logic Axioms Φ ; S2. Automatically identify grassland entities from multi-source heterogeneous grassland data and extract semantic relationships between entities to generate initial knowledge triples. ; S3. Perform entity alignment, referential resolution, conflict detection, and knowledge completion on the initial knowledge triples of grassland production to generate standardized knowledge triples. ; S4. Based on the structural constraints of the domain ontology, the standardized knowledge triples are subjected to ontology constraint verification, RDF triple serialization, import into a graph database, and indexed to generate a knowledge graph supporting semantic query and logical reasoning for the entire grass industry production process. GPKG .
[0008] Further, step S1 includes the following sub-steps: S1-1. Formalize the boundaries of the entire grass production process, user roles, and application tasks into a domain requirement triplet. , Represented as:
[0009] in It encompasses the entire production process, from breed selection to feeding and utilization. For the target user role set, A set of task requirements;
[0010]
[0011]
[0012] The grass industry production stages are specifically divided into 7 types. =Variety selection and breeding =Land preparation and sowing, =Field management, = Harvesting, =Processing and modulation, =Storage and transportation =Feeding utilization; The target user role set is specifically divided into 4 types. =Grassland researchers, = Ranch production manager, =Intelligent agricultural machinery system =Grassland Industry Policy Supervision Platform; The task requirements set is specifically divided into four types. =Intelligent diagnosis of diseases and pests =Optimal work period recommendation =Forage nutrition matching decision-making =Production risk warning; S1-2: Based on Extracting core concepts and constructing a hierarchical class system that satisfies partial order relations, specifically including: constructing a class collection. ,in A set of indexes that uniquely identifies the class; Define the set of semantic relations for subclasses ,satisfy: ① Semantic definition: ; ②Transitivity: ; ③ Antisymmetry: ; in: Represents the set of all semantic classes in the ontology; express Any two classes in; A set of unique identifier indexes representing a class; This indicates semantic relation operators for subclasses, representing subclass inheritance relationships. Represents the set consisting of semantic relations of all subclasses; These are the universal quantifier, implication, and conjunction symbols in first-order logic, respectively. S1-3: Define the data attribute set With object property collection Specifically, it includes: Data attribute set is defined as ,in And for numerical attributes Additional value range constraints ; Object property collection is defined as ; in: Represents the complete set of data attributes. Represents a single data attribute; Represents attributes Domain; Represents attributes The range of values; Represents a collection of predefined data types; These represent numerical attributes. The minimum and maximum constraint values, wherein the units of the minimum and maximum constraint values are determined based on attribute semantics; Represents the complete set of object properties. Represents a single object property; 、 Representing object properties Domain class and range class; S1-4: Constructing a set of structured axioms Φ :
[0013] in Represents the universal set of axioms of a domain. Represents a subset of mutually exclusive axioms. Represents a subset of the axioms of temporal constraints. This represents a subset of the functional constraint axioms. This represents a subset of the axioms that constrain the range of values. Invoke a description logic inference engine conforming to the web ontology language standard to perform dual verification: verify the ontology. Ensure overall logical consistency and verify that all classes in the class set are satisfiable; once verification is successful, the ontology can be generated and output. If verification fails, the conflict point is located based on the inference engine feedback, and the class system or attribute definition is iteratively corrected.
[0014] Further, step S2 includes the following sub-steps: S2-1: Preprocess the multi-source grassland production data, converting unstructured text... Semi-structured tables With structured databases Merge into the original dataset :
[0015] After cleaning, word segmentation, and terminology standardization, a set of structured text sequences is generated. :
[0016] in Commonly used preprocessing functions for cleaning, word segmentation, and terminology standardization. For text sequence indexing, identify the first preprocessed text. A sequence of structured text; S2-2: Identify entities in the grass production sector, Input a sequence labeling model based on a fusion dictionary of grassland production, and output an entity set. :
[0017] satisfy and ,in The entity sequence number represents the number of the [entity name]. The first identified in the text One entity, , These are the start and end character indices of the entity, respectively. S2-3: Extract relationships within the grassland production sector, assuming... and For indexing entity-relation pairs, in the first... The sequence numbers of the two entities involved in relation extraction in the text ( ),right Middle Entity Pair Calculate conditional probabilities using a relation classifier Select the relationship with the highest probability :
[0018] This allows the generation of triples. , recorded as ; S2-4: Initial Knowledge Triple Generation and Confidence Filtering Sub-steps: Merge all triples to obtain...
[0019] in, Given the initial set of knowledge triples, m represents the total amount of text, and confidence levels are preserved. The triplet, To pre-set the reliability threshold.
[0020] Furthermore, step S3 includes the following sub-steps: S3-1: Align the entities involved in grassland production, based on the initial set of knowledge triples. All head and tail entities constitute the original entity set. Perform composite similarity calculation to generate entity alignment mapping function. :
[0021] in, For a standardized set of entities, satisfying ; Must guarantee ,in To integrate the similarity function of edit distance and semantic embedding, Alignment threshold; S3-2: Perform referential resolution on entities related to the grass industry production sector. Based on a pre-constructed ontology of referential rules for the grass industry production sector, alias entities are resolved. Mapping to standard entities , can be represented as:
[0022] in, For the identified subset of alias entities, there exists Make ; S3-3: Perform conflict detection and weighted resolution on grassland production entities to identify conflict triple sets.
[0023] in, 、 、 They represent triples respectively. The header entity, relation type, and tail entity are determined based on the data source credibility weight. With time freshness Calculate the overall confidence level :
[0024] in, These are weighting coefficients. Preset values based on the authority of the data source , Based on timestamp Normalization to interval; Retain in each conflict group The highest triplet; S3-4: Knowledge Completion and Standardization of Grassland Production Driven by Ontology Constraints, Based on the Ontology Constructed in Step S1 and axiom set Generate a complete set of triples through logical reasoning. :
[0025] in, This represents logical implication, that is, it can be deduced from the ontology and existing triples. Then, the conflict-reducing triples and the completion triples are combined and entity alignment mapping is applied to output a set of standardized knowledge triples. :
[0026] in The entity normalization mapping function defined in step S3-1.
[0027] Further, step S4 includes the following sub-steps: S4-1: Sub-step for ontology constraint verification: Perform standardization of the knowledge triplet set... Each triplet in Perform structural verification and retain those that meet the requirements. The triples are generated and verified using a set. ; in 、 For relationship In the body The domain class and range class are defined in [the document / reference]. For entities in The associated ontology category, Indicates a subclass relationship; S4-2: RDF triple serialization sub-step: ... Convert to RDF triple set :
[0028]
[0029] in A function for generating unique identifiers based on namespaces. Construct a constructor for literals with data type annotations; S4-3: Graph Database Import and Index Construction Sub-steps: Importing and Indexing Graph Databases by RDF / XML Format import support OWL2DL The graph database automatically constructs entity primary key indexes, relation type indexes, and full-text search indexes, ultimately generating a knowledge graph covering the entire process of grassland production. GPKG .
[0030] This application also provides a knowledge graph generation device for the entire process of grassland production, characterized by comprising: The construction unit builds an ontology covering the entire process of forage production, including variety selection, land preparation and sowing, field management, harvesting, processing, storage and transportation, and feeding. ; The processing unit automatically identifies entities involved in grass production and extracts semantic relationships between entities to generate initial knowledge triples. The system performs entity alignment, referential resolution, conflict detection, and knowledge completion on the initial knowledge triples of grassland production to generate standardized knowledge triples. ; The generation unit is used to generate a knowledge graph of the entire grassland production process that supports semantic querying and logical reasoning by taking the standardized knowledge triples according to the structural constraints of the domain ontology, performing ontology constraint verification, RDF triple serialization, importing them into a graph database, and building an index. GPKG .
[0031] This application also provides a computer-readable storage medium having a computer program stored thereon, characterized in that the program, when executed by a processor, implements the steps of any of the methods described above.
[0032] This application also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor executes the program to implement the steps of any of the methods described above.
[0033] The beneficial effects of this invention are as follows: 1. Achieve semantic connectivity of knowledge across the entire grass industry chain: For the first time, a unified domain ontology covering seven stages of "breeding, planting, management, harvesting, processing, storage and use" is constructed, which guides knowledge extraction and integration, effectively solving the long-standing problems of knowledge fragmentation and system silos.
[0034] 2. Significantly improve the level and quality of knowledge construction automation: Through ontology-constrained entity recognition, relation extraction and conflict resolution mechanisms, the accuracy of triples is improved to over 90%, greatly reducing the cost of manual verification.
[0035] 3. Supports highly reliable intelligent decision-making: Embeds agricultural rule axioms (such as operation timing, numerical range, class mutual exclusion, etc.) to enable the generated knowledge graph to have logical reasoning ability, automatically discover hidden knowledge, and support scenarios such as disease and pest diagnosis and optimal operation period recommendation.
[0036] 4. Strong engineering feasibility and scalability: Outputs an RDF knowledge graph that conforms to the OWL2DL standard, which can be seamlessly integrated into mainstream graph databases and intelligent application systems, and the architecture supports smooth expansion to new scenarios such as carbon sequestration measurement and ecological assessment. Attached Figure Description
[0037] Figure 1 This is a schematic diagram of the overall process of this method. Detailed Implementation
[0038] The specific embodiments of the present invention are described below to enable those skilled in the art to understand the present invention. However, it should be understood that the present invention is not limited to the scope of the specific embodiments. For those skilled in the art, various changes are obvious as long as they are within the spirit and scope of the present invention as defined and determined by the appended claims. All inventions utilizing the concept of the present invention are protected.
[0039] like Figure 1 As shown in the technical roadmap, the automatic knowledge graph construction method for the entire grass production process disclosed in this invention includes the following steps: constructing a grass production domain ontology covering all stages such as variety selection, sowing, field management, mowing, processing, storage and transportation, and feeding; automatically identifying grass entities and extracting semantic relationships from multi-source heterogeneous data to generate initial knowledge triples; achieving knowledge fusion and standardization through entity alignment, referential resolution, conflict resolution, and ontology-driven completion; and mapping the verified triples to a graph database according to ontology constraints to generate a knowledge graph for the entire grass production process.
[0040] S11. In this embodiment, the boundary of the entire forage production process is defined as a set of seven production stages, including variety selection and breeding, and feeding utilization, namely: ,in =Variety selection and breeding =Land preparation and sowing, =Field management, = Harvesting, =Processing and modulation, =Storage and transportation =Feeding utilization.
[0041] The target user role set is defined as follows: ,in =Grassland researchers, = Ranch production manager, =Intelligent agricultural machinery system =Grassland Policy Supervision Platform.
[0042] The task requirement set is defined as ,in =Intelligent diagnosis of diseases and pests =Optimal work period recommendation =Forage nutrition matching decision-making =Production risk warning.
[0043] Domain demand triplet This embodiment clarifies the seven production stages, four types of user roles, and four core task requirements that the knowledge graph needs to cover.
[0044] S12, Constructing a Collection of Classes The class-unique identifier index set is Based on the business logic of the entire grass production process, 25 core semantic classes were defined, including: forage varieties, forage variety characteristics, sowing conditions, irrigation frequency, types of pests and diseases, mowing conditions, silage technology, storage conditions, and feeding programs.
[0045] Define subclass relation set ,satisfy: ① Semantic definition:
[0046] ②Transitivity:
[0047] ③ Antisymmetry:
[0048] For example, the subclasses "alfalfa" (class ID=2) and "sheepgrass" (class ID=3) are defined under "forage varieties" (class ID=1); and the subclasses "water management" (class ID=5), "fertilizer management" (class ID=6), and "pest and disease control" (class ID=7) are defined under "field management" (class ID=4), thus constructing a hierarchical class system.
[0049] S13. Define data attribute sets and object attribute sets. Data attribute set is defined as ,in This represents the total number of data attributes. This embodiment defines 40 data attributes, such as "Growth Period (days)" (attribute ID=1), "Protein Content (%)" (attribute ID=2), and "Sowing Time" (attribute ID=3). Value range constraints are added to numerical attributes, such as the minimum constraint value for "Growth Period (days)" being 120, the maximum constraint value being 365, and the unit being days.
[0050] Object property collection is defined as ,in This represents the total number of object attributes. In this example, 25 object attributes are defined, such as "Variety Characteristics" (attribute ID=1, domain class=forage variety, value class=forage variety characteristics) and "Sowing Conditions" (attribute ID=2, domain class=sowing, value class=sowing conditions), etc.
[0051] S1-4. Construct a structured set of axioms Φ and perform double verification. Constructing a set of structured axioms ,in: Mutually exclusive subsets, such as "breeding" and "feeding utilization" being mutually exclusive. A subset of the axioms of temporal constraints, such as "cutting" must precede "processing and modulation". A subset of functional constraint axioms, such as "forage variety" must have the "growth period" attribute. Numerical range constraint subset, such as "sowing density" must be within the range of 5-15 kg / mu. This embodiment calls a description logic inference engine (using the Apache Jena framework) that conforms to the OWL2DL standard to perform dual verification: 1. Verify the overall logical consistency of the ontology: Ensure the set of axioms There is no logical contradiction; 2. Verify that all classes in the collection are satisfiable: ensure that each class has an instance in the ontology; If verification passes, the domain ontology is generated and output. If verification fails, the conflict point is located based on the inference engine feedback, and the class hierarchy or attribute definition is iteratively corrected.
[0052] S21. Preprocess the multi-source grassland production data. This embodiment collects multi-source grassland data including: scientific research literature (1000 articles), agricultural technology manuals (500 copies), IoT sensor data (1 million records), remote sensing images (2000 scenes), production logs (5000 records), and policy standards (300 documents). Unstructured text, semi-structured tables, and structured databases are merged into the original dataset. .
[0053] After cleaning (removing HTML tags and special characters), word segmentation (using the jieba word segmentation library), and terminology standardization (integrating with a grass industry dictionary, such as standardizing "purple alfalfa" to "purple alfalfa" and "alfalfa" to "purple alfalfa"), a structured text sequence set is generated. ,in =10000.
[0054] S22. Identify entities in the grass industry production field. In this embodiment, the sequence labeling model (based on BiLSTM-CRF architecture) of the grass industry production professional dictionary is integrated as input. Output entity set ,in =50000. Entity recognition satisfies... , For entity serial number, Representative at the The first identified in the text One entity, , These are the start and end character indices of the entity, respectively.
[0055] For example, in the text "The growth period of alfalfa is generally 180-220 days", the entities "alfalfa" (start index=0, end index=4) and "180-220 days" (start index=10, end index=17) are identified.
[0056] S23. Extract relationships within the grass industry production sector, and set... and For indexing entity-relation pairs, in the first... The sequence numbers of the two entities involved in relation extraction in the text ( ).right Middle Entity Pair The conditional probabilities are calculated using a relation classifier (a classification model based on BERT fine-tuning). Select the relationship with the highest probability .
[0057] For example, in the text "Alfalfa has a protein content of 20-25%", the relation "protein content" is identified, and a triplet is generated. .
[0058] S24. Initial knowledge triple generation and confidence filtering; merging all triples to obtain the complete set of initial knowledge triples. ,in =200000. (Preserve confidence level) The triples, with a pre-set confidence threshold =0.7, generating an initial set of knowledge triples. .
[0059] S31. Align the entities involved in grassland production, and adjust the initial set of knowledge triples. All head and tail entities constitute the original entity set. Perform composite similarity calculation to generate entity alignment mapping function. ,in For a standardized set of entities, satisfying .
[0060] Composite similarity function ,in =0.6, which is the similarity function that combines edit distance and semantic embedding, and the alignment threshold. =0.85.
[0061] For example, the composite similarity between "alfalfa" and "purple alfalfa" is 0.87, which exceeds the threshold and is mapped to the standard entity "purple alfalfa".
[0062] S32. Perform referential resolution on entities related to grass production. Based on the pre-constructed ontology of referential rules for the grass production domain, resolve alias entities. Mapping to standard entities , can be represented as .
[0063] For example, the alias "clover" ( ) is mapped to the standard entity "alfalfa" through the referencing rule base. ).
[0064] S33. Perform conflict detection and weighted resolution on grassland production entities to identify conflict triple sets. .
[0065] Based on data source credibility weight With time freshness Calculate the overall confidence level ,in =0.7, The values are preset based on the authority of the data source (e.g., scientific research literature = 0.95, agricultural technology manual = 0.85). Normalized to the [0,1] interval based on timestamp.
[0066] The triple with the highest overall confidence level is retained in each conflict group.
[0067] S34. Knowledge Completion and Standardization of Grassland Production Driven by Ontology Constraints: Ontology and Axiom Set Constructed in Step S1 Generate a complete set of triples through logical reasoning. ,in This indicates that it can be derived from the ontology and existing triples. .
[0068] For example, given that the "growth period" of "alfalfa" is 180-220 days, and that "forage varieties" must have the "growth period" attribute, the "growth period" of "alfalfa" can be deduced to be 180-220 days through ontological constraints.
[0069] After merging the conflict-reducing triples and the completion triples, apply entity alignment mapping to output a set of standardized knowledge triples. .
[0070] S41. Ontology constraint verification, for standardized knowledge triple sets. Each triplet in Perform structural verification and retain those that meet the requirements. The triples are generated and verified using a set. .
[0071] For example, triples In the equation, the domain class of the relation "fertility period" is "forage variety" and the value class is "numerical value". The ontology class of "alfalfa" is "forage variety" and the ontology class of "180-220 days" is "numerical value", which satisfies the structural constraints.
[0072] S42 and RDF triple serialization, Convert to RDF triple set ,in Functions for generating unique identifiers based on namespaces (such as...) ), Construct a literal constructor with data type annotations.
[0073] S43, Graph Database Import and Index Construction, Import the graph database (using Apache JenaTDB) that supports OWL2DL in RDF / XML format, automatically build entity primary key indexes, relation type indexes and full-text search indexes, and finally generate a knowledge graph GPKG for the entire grass industry production process.
[0074] After importing this embodiment, the knowledge graph contains 120,000 entities, 80,000 relations, and 200,000 triples, with an average triple accuracy of 92.5%. It supports semantic queries (such as "query all forage varieties with a protein content higher than 20%) and logical reasoning (such as "recommend a suitable feeding program for dairy cows based on forage nutrition matching decisions"), providing scientific support for decision-making throughout the entire forage production process.
[0075] This embodiment also provides an automatic knowledge graph generation device for the entire process of grassland production, the device comprising: The construction unit is used to construct an ontology covering the entire process of grass production, including variety selection, land preparation and sowing, field management, harvesting, processing and preparation, storage and transportation, and feeding and utilization. The processing unit automatically identifies entities in grass production and extracts semantic relationships between entities, generates initial knowledge triples, performs entity alignment, referential resolution, conflict detection and knowledge completion on the initial knowledge triples of grass production, and generates standardized knowledge triples. The generation unit is used to automatically map the standardized knowledge triples to the graph database according to the structural constraints of the domain ontology, and generate a knowledge graph GPKG that supports semantic query and logical reasoning for the entire process of grassland production.
[0076] The device provided in this embodiment corresponds to the above-mentioned method for automatically generating knowledge graphs for the entire process of grass production. It has corresponding functional modules and beneficial effects, which will not be described again here to avoid repetition.
[0077] This embodiment also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the automatic knowledge graph generation method for the entire grass industry production process as described in the above embodiment.
[0078] The medium provided in this embodiment corresponds to the above-mentioned method for automatically generating knowledge graphs for the entire process of grass production. It has corresponding functional modules and beneficial effects, and will not be described again here to avoid repetition.
[0079] This embodiment also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the steps of the automatic knowledge graph generation method for the entire grass industry production process as described in the above embodiment.
[0080] The computer equipment provided in this embodiment corresponds to the above-mentioned method for automatically generating knowledge graphs for the entire process of grassland production. It has corresponding functional modules and beneficial effects, which will not be described again here to avoid repetition.
Claims
1. A method for automatically constructing a knowledge graph for the entire process of grassland production, characterized in that, Includes the following steps: S1. Construct an ontology covering the entire process of forage production, including variety selection, land preparation and sowing, field management, harvesting, processing, storage and transportation, and feeding. Explicitly define the set of entity types Attribute set Subclass semantic relation set and Domain Logic Axioms Φ ; S2. Automatically identify grassland entities from multi-source heterogeneous grassland data and extract semantic relationships between entities to generate initial knowledge triples. ; S3. Perform entity alignment, referential resolution, conflict detection, and knowledge completion on the initial knowledge triples of grassland production to generate standardized knowledge triples. ; S4. Based on the structural constraints of the domain ontology, the standardized knowledge triples are subjected to ontology constraint verification, RDF triple serialization, import into a graph database, and indexed to generate a knowledge graph supporting semantic query and logical reasoning for the entire grass industry production process. GPKG; Step S4 includes the following sub-steps: S4-1: Sub-step for ontology constraint verification: Perform standardization of the knowledge triplet set... Each triplet in Perform structural verification and retain those that meet the requirements. The triples are generated and verified using a set. ; in 、 For relationship In the body The domain class and range class are defined in [the document / reference]. For entities in The associated ontology category, Indicates a subclass relationship; S4-2: RDF triple serialization sub-step: ... Convert to RDF triple set : in A function for generating unique identifiers based on namespaces. Construct a constructor for literals with data type annotations; S4-3: Graph Database Import and Index Construction Sub-steps: Importing and Indexing Graph Databases by RDF / XML Format import support OWL2DL The graph database automatically constructs entity primary key indexes, relation type indexes, and full-text search indexes, ultimately generating a knowledge graph covering the entire process of grassland production. GPKG .
2. The method for automatically constructing a knowledge graph for the entire process of grassland production according to claim 1, characterized in that, Step S1 includes the following sub-steps: S1-1. Formalize the boundaries of the entire grass production process, user roles, and application tasks into a domain requirement triplet. , Represented as: in It encompasses the entire production process, from breed selection to feeding and utilization. For the target user role set, A set of task requirements; The grass industry production stages are specifically divided into 7 types. =Variety selection and breeding =Land preparation and sowing, =Field management, = Harvesting, =Processing and modulation, =Storage and transportation =Feeding utilization; The target user role set is specifically divided into 4 types. =Grassland researchers, = Ranch production manager, =Intelligent agricultural machinery system =Grassland Industry Policy Supervision Platform; The task requirements set is specifically divided into four types. =Intelligent diagnosis of diseases and pests =Optimal work period recommendation =Forage nutrition matching decision-making =Production risk warning; S1-2: Based on Extracting core concepts and constructing a hierarchical class system that satisfies partial order relations, specifically including: constructing a class collection. ,in A set of indexes that uniquely identifies the class; Define the set of semantic relations for subclasses ,satisfy: ① Semantic definition: ; ②Transitivity: ; ③ Antisymmetry: ; in: Represents the set of all semantic classes in the ontology; express Any two classes in; A set of unique identifier indexes representing a class; This indicates semantic relation operators for subclasses, representing subclass inheritance relationships. Represents the set consisting of semantic relations of all subclasses; These are the universal quantifier, implication, and conjunction symbols in first-order logic, respectively. S1-3: Define the data attribute set With object property collection Specifically, it includes: Data attribute set is defined as ,in And for numerical attributes Additional value range constraints ; Object property collection is defined as ; in: Represents the complete set of data attributes. Represents a single data attribute; Represents attributes Domain; Represents attributes The range of values; Represents a collection of predefined data types; These represent numerical attributes. The minimum and maximum constraint values, wherein the units of the minimum and maximum constraint values are determined based on attribute semantics; Represents the complete set of object properties. Represents a single object property; 、 Representing object properties Domain class and range class; S1-4: Constructing a set of structured axioms Φ : in Represents the universal set of axioms of a domain. Represents a subset of mutually exclusive axioms. Represents a subset of the axioms of temporal constraints. This represents a subset of the functional constraint axioms. This represents a subset of the axioms that constrain the range of values. Invoke a description logic inference engine conforming to the web ontology language standard to perform dual verification: verify the ontology. Ensure overall logical consistency and verify that all classes in the class set are satisfiable; after successful verification, generate and output the ontology. If verification fails, the conflict point is located based on the inference engine feedback, and the class system or attribute definition is iteratively corrected.
3. The method for automatically constructing a knowledge graph for the entire process of grassland production according to claim 1, characterized in that, Step S2 includes the following sub-steps: S2-1: Preprocess the multi-source grassland production data, converting unstructured text... Semi-structured tables With structured databases Merge into the original dataset : After cleaning, word segmentation, and terminology standardization, a set of structured text sequences is generated. : in Commonly used preprocessing functions for cleaning, word segmentation, and terminology standardization. For text sequence indexing, identify the first preprocessed text. A sequence of structured text; S2-2: Identify entities in the grass production sector, Input a sequence labeling model based on a fusion dictionary of grassland production, and output an entity set. : satisfy and ,in The entity sequence number represents the number of the [entity name]. The first identified in the text One entity, , These are the start and end character indices of the entity; S2-3: Extract relationships within the grassland production sector, assuming... and For indexing entity-relation pairs, in the first... The sequence numbers of the two entities involved in relation extraction in the text ( ),right Middle Entity Pair Calculate conditional probabilities using a relation classifier Select the relationship with the highest probability : Generate triples , recorded as ; S2-4: Initial Knowledge Triple Generation and Confidence Filtering Sub-steps: Merge all triples to obtain... in, Given the initial set of knowledge triples, m represents the total amount of text, and confidence levels are preserved. The triplet, To pre-set the reliability threshold.
4. The method for automatically constructing a knowledge graph for the entire process of grassland production according to claim 1, characterized in that, Step S3 includes the following sub-steps: S3-1: Align the entities involved in grassland production, based on the initial set of knowledge triples. All head and tail entities constitute the original entity set. Perform composite similarity calculation to generate entity alignment mapping function. : in, For a standardized set of entities, satisfying ; Must guarantee ,in To integrate the similarity function of edit distance and semantic embedding, Alignment threshold; S3-2: Perform referential resolution on entities related to the grass industry production sector. Based on a pre-constructed ontology of referential rules for the grass industry production sector, alias entities are resolved. Mapping to standard entities , is represented as: in, For the identified subset of alias entities, there exists Make ; S3-3: Perform conflict detection and weighted resolution on grassland production entities to identify conflict triple sets. in, 、 、 They represent triples respectively. The header entity, relation type, and tail entity are determined based on the data source credibility weight. With time freshness Calculate the overall confidence level : in, These are weighting coefficients. Preset values based on the authority of the data source , Based on timestamp Normalization to interval; Retain in each conflict group The highest triplet; S3-4: Knowledge Completion and Standardization of Grassland Production Driven by Ontology Constraints, Based on the Ontology Constructed in Step S1 and axiom set Generate a complete set of triples through logical reasoning. : in, This represents logical implication, that is, deduced from the ontology and existing triples. After merging the conflict-reducing triples and the completion triples, apply entity alignment mapping to output a set of standardized knowledge triples. : in The entity normalization mapping function defined in step S3-1.
5. A knowledge graph generation device for the entire process of grassland production, characterized in that, The apparatus for performing the method as described in any one of claims 1-4 includes: The construction unit builds an ontology covering the entire process of forage production, including variety selection, land preparation and sowing, field management, harvesting, processing, storage and transportation, and feeding. ; The processing unit automatically identifies entities involved in grass production and extracts semantic relationships between entities to generate initial knowledge triples. The system performs entity alignment, referential resolution, conflict detection, and knowledge completion on the initial knowledge triples of grassland production to generate standardized knowledge triples. ; The generation unit is used to generate a knowledge graph of the entire grassland production process that supports semantic querying and logical reasoning by taking the standardized knowledge triples according to the structural constraints of the domain ontology, performing ontology constraint verification, RDF triple serialization, importing them into a graph database, and building an index. GPKG .
6. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps of the method as described in any one of claims 1-4.
7. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the method as described in any one of claims 1-4.
Citation Information
Patent Citations
Entity alignment method for multi-modal crop knowledge graph
CN120494079A
Construction method and system of Chinese herbal medicine knowledge graph
CN121168620A